63 using namespace KM3NETDAQ;
85 zap[
'f'] =
make_field(inputFile ,
"input file " );
87 zap[
'a'] =
make_field(detectorFile ,
"detector file" );
89 zap[
'L'] =
make_field(analysis_level ,
"analysis level") = 0, 1, 2;
93 catch(
const exception &error) {
94 ERROR(error.what() << endl);
103 FATAL(
"FATAL ERROR. Could not open detector file '" << detectorFile <<
"'." << endl);
106 if(analysis_level == 1){
107 cout <<
"ANALYSIS OF ALL AVAILABLE PMTs INFORMATION. It may take a while!" << endl;
108 }
else if (analysis_level == 2){
109 cout <<
"BASIC ANALYSIS AT TRIGGER AND RECONSTRUCTION LEVEL." << endl;
111 cout <<
"JRUNANALYZER RUNNING WITH A REDUCED NUMBER OF PLOTS." << endl;
120 }
catch(
const exception&){}
137 FATAL(
"WRONG FILE TYPE");
140 TFile* out = p->getFile();
142 cout << out->GetName() << endl;
152 if (header.getDetectorID() !=
event->getDetectorID() ||
153 header.getRunNumber () !=
event->getRunNumber ()) {
155 header =
event->getDAQHeader();
163 const run_info runinfo(header.getDetectorID(),
164 header.getRunNumber(),
165 buffer.DAQ.livetime_s,
166 buffer.livetime.numberOfSeconds);
170 JRunAnalyzer Analyzer (inputFile,
detector, out, numberOfTimeslices, numberOfSummaryslices, numberOfEvents, analysis_level);
172 cout <<
"read events\n";
173 Analyzer.readEvents ();
174 cout <<
"read summarydata\n";
175 Analyzer.readSummaryData ();
176 cout <<
"read timeslices\n";
183 if(analysis_level == 2){
184 cout <<
"read reconstructed events\n";
185 Analyzer.readRecoEvents ();
188 Analyzer.writeToFile(out, analysis_level);
Utility class to parse command line options.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
static counter_type max()
Get maximum counter value.
Class dedicated to the analysis of KM3NeT runs.
Template definition for direct access of elements in ROOT TChain.
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.
then fatal The output file must have the wildcard in the e g root fi 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
void copy(const Head &from, JHead &to)
Copy header from from to to.
do set_variable DETECTOR_TXT $WORKDIR detector
Timeslice data structure for L0 data.