57 int main(
int argc,
char **argv)
61 using namespace KM3NETDAQ;
71 JCalibration_t calibrationFile;
78 JParser<> zap(
"Auxiliary program to convert fit results to Evt format.\
79 \nThe option -L corresponds to the name of a shared library \
80 \nand function so to rearrange the order of fit results.");
84 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
93 catch(
const exception& error) {
94 FATAL(error.what() << endl);
99 typedef JSingleFileScanner_t::pointer_type pointer_type;
104 if (detectorFile !=
"") {
113 unique_ptr<JDynamics> dynamics;
119 dynamics->load(calibrationFile);
121 catch(
const exception& error) {
122 if (!calibrationFile.empty()) {
138 }
catch(
const exception& error) {}
145 copy(buffer, header);
158 STATUS(
"Processing: " << *
i << endl);
163 in.setLimit(inputFile.getLimit());
173 center = get<Vec>(head);
176 }
catch(
const exception& error) {}
179 while (in.hasNext()) {
181 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
183 pointer_type ps = in.next();
188 dynamics->update(*tev);
193 if (mc.getEntries() != 0) {
213 if (!pmt_router->empty()) {
217 if (pmt_router.hasPMT(
i->pmt_id)) {
219 const JPMTAddress address = pmt_router.getAddress(
i->pmt_id);
221 const JPMT& pmt = pmt_router.getPMT(address);
223 i->dom_id =
id.getID();
224 i->channel_id =
id.getPMTAddress();
230 FATAL(
"Missing PMT" <<
i->pmt_id << endl);
235 if (!mod_router->empty()) {
239 if (mod_router.hasModule(
i->dom_id)) {
246 const JPMT& pmt = mod_router.getPMT(
id);
261 FATAL(
"Missing module " <<
i->dom_id << endl);
266 out.
id = ++number_of_events;
Router for direct addressing of PMT data in detector data structure.
double getT() const
Get calibrated time of hit.
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
static void setSlewing(const bool slewing)
Set slewing option.
const JCalibration & getCalibration() const
Get calibration.
ROOT TTree parameter settings.
Recording of objects on file according a format that follows from the file name extension.
Router for direct addressing of module data in detector data structure.
JAANET::start_run start_run
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Long64_t counter_type
Type definition for counter.
double livetime_s
Live time [s].
double getTime(const Hit &hit)
Get true time of hit.
Basic data structure for time and time over threshold information of hit.
Data structure for detector geometry and calibration.
ROOT TTree parameter settings.
Auxiliary base class for file name.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Scanning of objects from a single file according a format that follows from the extension of each fil...
double getToT() const
Get calibrated time over threshold of hit.
Auxiliary class for defining the range of iterations of objects.
bool slewing
time slewing of analogue signal
The Vec class is a straightforward 3-d vector, which also works in pyroot.
JDirection3D getDirection(const Vec &dir)
Get direction.
int mc_run_id
MC run identifier.
Auxiliary class for recursive type list generation.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getID() const
Get identifier.
Data structure for PMT geometry, calibration and status.
JPosition3D getPosition(const Vec &pos)
Get position.
virtual double getNPE(const double tot_ns) const override
Get number of photo-electrons.
Auxiliary class for map of PMT parameters.
Dynamic detector calibration.
Direct access to PMT in detector data structure.
General purpose messaging.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
void push(T JHead::*pd)
Push given data member to Head.
Direct access to module in detector data structure.
PMT analogue signal processor.
Dynamic detector calibration.
Address of PMT in detector data structure.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getLivetime(const std::string &file_name)
Get data taking live time.
General purpose class for object reading from a list of file names.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Utility class to parse command line options.
std::vector< Hit > mc_hits
MC: list of MC truth hits.
void copy(const Head &from, JHead &to)
Copy header from from to to.
PMT analogue signal processor.
int id
offline event identifier
Object reading from a list of files.
const JLimit & getLimit() const
Get limit.
Data structure for PMT parameters.
std::vector< Hit > hits
list of hits
do set_variable DETECTOR_TXT $WORKDIR detector
JTriggerCounter_t getCounter() const
Get trigger counter.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.