1 #ifndef __INPUT_OUTPUT__
2 #define __INPUT_OUTPUT__
21 using namespace KM3NETDAQ ;
22 using namespace JSUPPORT;
23 using namespace JLANG;
24 using namespace JDETECTOR;
44 string detector_file ;
54 int number_neighbors ;
104 if (zap.
read(argc, argv) != 0)
110 catch(
const exception &error) {
112 ERROR(error.what() << endl);
142 run_number = inputFile.
next()->getRunNumber() ;
146 TFile* f =
new TFile(options.
ofname.c_str(),
"RECREATE") ;
150 Run[0] = run_number ;
154 Run.Write(
"Run_Info") ;
156 for(
int i = 0 ; i < (int)ToT_vs_time.size() ; ++i ) {
162 f->mkdir(dirname)->cd() ;
164 for(
int j = 0 ; j < (int)ToT_vs_time[0].size() ; ++j ) {
166 if (ToT_vs_time[i][j]==NULL) continue ;
168 if( ToT_vs_time[i][j]->Integral(1 , ToT_vs_time[i][j]->GetNbinsX() - 1 , 1 , ToT_vs_time[i][j]->GetNbinsY() - 1)>0 ) {
170 ToT_vs_time[i][j]->Write() ;
174 time[i][j]->Write() ;
unsigned int pulse_period_16ns
Utility class to parse command line options.
virtual const pointer_type & next()
Get next element.
Logical location of module.
Structure to store the different command line arguments for JRunAnalyzer.
Data structure for detector geometry and calibration.
JMultipleFileScanner ifnames
void write_output(IO options, vector< vector< TH2D * > > ToT_vs_time, vector< vector< TH1D * > > ToT, vector< vector< TH1D * > > time)
Writes a .root file with the nanobeacon pulses found by JPulseFinder.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
virtual bool hasNext()
Check availability of next element.
int read(const int argc, const char *const argv[])
Parse the program's command line options.
Utility class to parse command line options.
int read_user_options(IO &options, int argc, char **argv)
Parses the command line options and fills an IO structure with them.
virtual void rewind()
Rewind.