76 zap[
'f'] =
make_field(inputFile ,
"Path to input file " );
77 zap[
'o'] =
make_field(outputFile ,
"Path to output file" ) =
"out.root";
78 zap[
'a'] =
make_field(detectorFile ,
"path to detector file" );
79 zap[
't'] =
make_field(nTimeslices ,
"number of timeslices" ) = JLimit::max();
80 zap[
's'] =
make_field(nSummaryslices ,
"number of summaryslices") = JLimit::max();
81 zap[
'n'] =
make_field(nEvents ,
"number of events" ) = JLimit::max();
82 zap[
'@'] =
make_field(parameters,
"parameter values, e.g: \"p0 = 1.0;\"");
87 catch(
const exception &error) {
88 ERROR(error.what() << endl);
94 load (detectorFile, detector);
97 FATAL(
"FATAL ERROR. Could not open detector file '" << detectorFile <<
"'." << endl);
100 bool pmt_analysis =
false;
108 if(pmt_analysis ==
true){
109 cout <<
"JRUNANALYZER RUNNING WITH ALL AVAILABLE PLOTS. It may take a while!" << endl;
111 cout <<
"JRUNANALYZER RUNNING WITH A REDUCED NUMBER OF PLOTS." << endl;
120 }
catch(
const exception&){}
124 buffer.DAQ.livetime_s =
getLivetime(inputFile.begin(), inputFile.end());
132 JRunAnalyzer Analyzer (inputFile, detector, nTimeslices, nSummaryslices, nEvents, pmt_analysis);
134 Analyzer.readEvents ();
135 cout <<
"read events!\n";
136 Analyzer.readSummaryData ();
137 cout <<
"read summarydata!\n";
142 cout <<
"read timeslices!\n";
145 cout <<
"before histos!\n";
147 TFile out(outputFile.c_str(),
"recreate");
149 cout <<
"outputfile!\n";
156 for(
const auto& i: inputFile){
175 for(
const auto& i: inputFile){
180 Analyzer.writeToFile(out);
Utility class to parse command line options.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
int getParameter(const std::string &text)
Get parameter number from text string.
int getDetectorID() const
Get detector identifier.
*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
Class dedicated to the analysis of KM3NeT runs.
int getRunNumber() const
Get run number.
Timeslice data structure for L1 data.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Timeslice data structure for L2 data.
Timeslice data structure for SN data.
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
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.
Wrapper class around string.
void copy(const Head &from, JHead &to)
Copy header from from to to.
do set_variable DETECTOR_TXT $WORKDIR detector
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
Timeslice data structure for L0 data.