Go to the source code of this file.
|
struct | IO |
| Structure to store the different command line arguments for JRunAnalyzer. More...
|
|
int read_user_options |
( |
IO & |
options, |
|
|
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
inline |
Parses the command line options and fills an IO structure with them.
- Parameters
-
options | an option structure |
argc | the number of command line arguments |
argv | the command line arguments |
- Returns
- 1 if works 2 if it doesn't work
Definition at line 74 of file JPulseFinder_IO.hh.
104 if (zap.
read(argc, argv) != 0)
110 catch(
const exception &error) {
112 ERROR(error.what() << endl);
unsigned int pulse_period_16ns
Utility class to parse command line options.
JMultipleFileScanner ifnames
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int read(const int argc, const char *const argv[])
Parse the program's command line options.
Writes a .root file with the nanobeacon pulses found by JPulseFinder.
- Parameters
-
options | an IO structure |
ToT_vs_time | vector of TH2D with the nanobeacon pulses |
ToT | vector of TH1 with the ToT distribution of the nanobeacon pulses |
time | vector of TH1 with the time distribution of the nanobeacon pulses |
Definition at line 132 of file JPulseFinder_IO.hh.
140 if(inputFile.hasNext()){
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() ;
JMultipleFileScanner ifnames
General purpose class for object reading from a list of file names.