ToolDAQFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
WCSimReader.cpp
Go to the documentation of this file.
1 #include "WCSimReader.h"
2 
3 
5 
6 
7 bool WCSimReader::Initialise(std::string configfile, DataModel &data){
8 
9  if(configfile!="") m_variables.Initialise(configfile);
10  //m_variables.Print();
11 
12  m_verbose = 0;
13  m_variables.Get("verbose", m_verbose);
14 
15  //Setup and start the stopwatch
16  bool use_stopwatch = false;
17  m_variables.Get("use_stopwatch", use_stopwatch);
18  m_stopwatch = use_stopwatch ? new util::Stopwatch("WCSimReader") : 0;
19 
20  m_stopwatch_file = "";
21  m_variables.Get("stopwatch_file", m_stopwatch_file);
22 
24 
26  m_variables.Get("interpose_interval", m_interpose_interval);
27 
28  m_data= &data;
30 
31  //config reading
32  if(! m_variables.Get("nevents", m_n_events) ) {
33  Log("WARN: nevents configuration not found. Reading all events", WARN, m_verbose);
34  m_n_events = -1;
35  }
36  if(! m_variables.Get("first_event", m_first_event_num) ) {
38  }
39  if(! (m_variables.Get("infile", m_input_filename) !=
40  m_variables.Get("filelist", m_input_filelist))) {
41  Log("ERROR: You must use exactly one of the following options: infile filelist", ERROR, m_verbose);
42  return false;
43  }
44 
45  m_ss << "INFO: m_n_events \t" << m_n_events;
47  if(m_input_filename.size())
48  m_ss << "INFO: m_input_filename \t" << m_input_filename;
49  else
50  m_ss << "INFO: m_input_filelist \t" << m_input_filelist;
52 
53  //open the trees
54  m_chain_opt = new TChain("wcsimRootOptionsT");
55  m_chain_event = new TChain("wcsimT");
56  m_chain_geom = new TChain("wcsimGeoT");
57 
58  //add the files
59  if(!ReadTree(m_chain_opt))
60  return false;
62  return false;
64  return false;
65 
66  //set branch addresses
67  m_wcsim_opt = 0;
68  m_chain_opt ->SetBranchAddress("wcsimrootoptions", &m_wcsim_opt);
69  m_chain_opt->GetEntry(0);
70  m_wcsim_event_ID = 0;
71  m_chain_event->SetBranchAddress("wcsimrootevent", &m_wcsim_event_ID);
72  // Force deletion to prevent memory leak
73  m_chain_event->GetBranch("wcsimrootevent")->SetAutoDelete(kTRUE);
74  if(m_wcsim_opt->GetGeomHasOD()) {
75  Log("INFO: The geometry has an OD. Will add OD digits to m_data", INFO, m_verbose);
76  m_wcsim_event_OD = 0;
77  m_chain_event->SetBranchAddress("wcsimrootevent_OD", &m_wcsim_event_OD);
78  // Force deletion to prevent memory leak
79  m_chain_event->GetBranch("wcsimrootevent_OD")->SetAutoDelete(kTRUE);
80  m_data->HasOD = true;
81  }
82  else {
83  m_wcsim_event_OD = 0;
84  m_data->HasOD = false;
85  }
86  m_wcsim_geom = 0;
87  m_chain_geom ->SetBranchAddress("wcsimrootgeom", &m_wcsim_geom);
88 
89  //set number of events
90  if(m_n_events <= 0)
91  m_n_events = m_chain_event->GetEntries();
92  else if (m_n_events > m_chain_event->GetEntries())
93  m_n_events = m_chain_event->GetEntries();
94  if(m_first_event_num >= m_n_events) {
95  m_first_event_num = m_n_events - 1;
96  m_ss << "WARN: first_event set to value more than the number of events in the file. Reading just the last event in the file, number: " << m_first_event_num;
98  }
99  else if(m_first_event_num < 0) {
100  m_first_event_num = 0;
101  Log("WARN: first_event set to negative value. Set to 0", WARN, m_verbose);
102  }
104 
105  //ensure that the geometry & options are the same for each file
106  if(!CompareTree(m_chain_opt, 0)) {
107  m_n_events = 0;
108  return false;
109  }
110  if(!CompareTree(m_chain_geom, 1)) {
111  m_n_events = 0;
112  return false;
113  }
114 
115  //store the PMT locations
116  std::cerr << "OD PMTs are not currently stored in WCSimRootGeom. When they are TODO fill IDGeom & ODGeom depending on where the PMT is" << std::endl;
117  m_chain_geom->GetEntry(0);
118  for(int ipmt = 0; ipmt < m_wcsim_geom->GetWCNumPMT(); ipmt++) {
119  const WCSimRootPMT * pmt = m_wcsim_geom->GetPMTPtr(ipmt);
120  PMTInfo pmt_light(pmt->GetTubeNo(), pmt->GetPosition(0), pmt->GetPosition(1), pmt->GetPosition(2));
121  m_data->IDGeom.push_back(pmt_light);
122  }//ipmt
123 
124  //store the pass through information in the transient data model
125  m_data->WCSimGeomTree = m_chain_geom;
126  m_data->WCSimOptionsTree = m_chain_opt;
127  m_data->WCSimEventTree = m_chain_event;
128 
129  //store the relevant options
130  m_data->IsMC = true;
131  //geometry
132  m_data->detector_length = m_wcsim_geom->GetWCCylLength();
133  m_data->detector_radius = m_wcsim_geom->GetWCCylRadius();
134  m_data->pmt_radius = m_wcsim_geom->GetWCPMTRadius();
135  m_data->IDPMTDarkRate = m_wcsim_opt->GetPMTDarkRate("tank");
136  m_data->IDNPMTs = m_wcsim_geom->GetWCNumPMT();
137  if(m_data->HasOD) {
138  m_data->ODPMTDarkRate = m_wcsim_opt->GetPMTDarkRate("OD");
139  m_data->ODNPMTs = m_wcsim_geom->GetODWCNumPMT();
140  } else {
141  m_data->ODPMTDarkRate = 0;
142  m_data->ODNPMTs = 0;
143  }
144 
145  if(m_stopwatch) Log(m_stopwatch->Result("Initialise"), INFO, m_verbose);
146 
147  return true;
148 }
149 
150 bool WCSimReader::AddTreeToChain(const char * fname, TChain * chain) {
151  if(! chain->Add(fname, -1)) {
152  m_ss << "ERROR: Could not load tree: " << chain->GetName()
153  << " in file(s): " << fname;
155  return false;
156  }
157  m_ss << "INFO: Loaded tree: " << chain->GetName()
158  << " from file(s): " << fname
159  << " Chain: " << chain->GetName()
160  << " now has " << chain->GetEntries()
161  << " entries";
162  StreamToLog(INFO);
163  return true;
164 }
165 
166 bool WCSimReader::ReadTree(TChain * chain) {
167  //use InFile
168  if(m_input_filename.size()) {
169  return AddTreeToChain(m_input_filename.c_str(), chain);
170  }
171  //use FileList
172  else if(m_input_filelist.size()) {
173  std::ifstream infile(m_input_filelist.c_str());
174  std::string fname;
175  bool return_value = true;
176  while(infile >> fname) {
177  if(fname.size())
178  if(!AddTreeToChain(fname.c_str(), chain))
179  return_value = false;
180  }//read file list file
181  return return_value;
182  }
183  else {
184  Log("ERROR: Must use exactly one of the following options: infile filelist", ERROR, m_verbose);
185  return false;
186  }
187 }
188 
189 bool WCSimReader::CompareTree(TChain * chain, int mode)
190 {
191  int n = chain->GetEntries();
192  //only 1 entry so nothing to compare
193  if(n == 1)
194  return true;
195  //get the 1st entry
196  chain->GetEntry(0);
197  std::string modestr;
198  WCSimRootOptions * wcsim_opt_0;
199  WCSimRootGeom * wcsim_geom_0;
200  if(mode == 0) {
201  wcsim_opt_0 = new WCSimRootOptions(*m_wcsim_opt);
202  modestr = "WCSimRootOptions";
203  }
204  else if(mode == 1) {
205  wcsim_geom_0 = new WCSimRootGeom(*m_wcsim_geom); //this operation doesn't work in WCSim
206  modestr = "WCSimRootGeom";
207  }
208  //loop over all the other entries
209  bool diff = false;
210  for(int i = 1; i < n; i++) {
211  chain->GetEntry(i);
212  bool diff_file = false;
213  if(mode == 0) {
214  //compare only the relevant options
215  //WCSimDetector
216  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDetectorName(),
217  m_wcsim_opt->GetDetectorName(),
218  "DetectorName");
219  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetGeomHasOD(),
220  m_wcsim_opt->GetGeomHasOD(),
221  "GeomHasOD");
222  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetPMTQEMethod(),
223  m_wcsim_opt->GetPMTQEMethod(),
224  "PMTQEMethod");
225  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetPMTCollEff(),
226  m_wcsim_opt->GetPMTCollEff(),
227  "PMTCollEff");
228  //WCSimWCAddDarkNoise
229  std::vector<string> pmtlocs;
230  pmtlocs.push_back("tank");
231  if(m_data->HasOD) pmtlocs.push_back("OD");
232  for(unsigned int i = 0; i < pmtlocs.size(); i++) {
233  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetPMTDarkRate(pmtlocs.at(i)),
234  m_wcsim_opt->GetPMTDarkRate(pmtlocs.at(i)),
235  "PMTDarkRate");
236  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetConvRate(pmtlocs.at(i)),
237  m_wcsim_opt->GetConvRate(pmtlocs.at(i)),
238  "ConvRate");
239  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDarkHigh(pmtlocs.at(i)),
240  m_wcsim_opt->GetDarkHigh(pmtlocs.at(i)),
241  "DarkHigh");
242  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDarkLow(pmtlocs.at(i)),
243  m_wcsim_opt->GetDarkLow(pmtlocs.at(i)),
244  "DarkLow");
245  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDarkWindow(pmtlocs.at(i)),
246  m_wcsim_opt->GetDarkWindow(pmtlocs.at(i)),
247  "DarkWindow");
248  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDarkMode(pmtlocs.at(i)),
249  m_wcsim_opt->GetDarkMode(pmtlocs.at(i)),
250  "DarkMode");
251  }//i
252  //WCSimWCDigitizer
253  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDigitizerClassName(),
254  m_wcsim_opt->GetDigitizerClassName(),
255  "DigitizerClassName");
256  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDigitizerDeadTime(),
257  m_wcsim_opt->GetDigitizerDeadTime(),
258  "DigitizerDeadTime");
259  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDigitizerIntegrationWindow(),
260  m_wcsim_opt->GetDigitizerIntegrationWindow(),
261  "DigitizerIntegrationWindow");
262  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDigitizerTimingPrecision(),
263  m_wcsim_opt->GetDigitizerTimingPrecision(),
264  "DigitizerTimingPrecision");
265  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetDigitizerPEPrecision(),
266  m_wcsim_opt->GetDigitizerPEPrecision(),
267  "DigitizerPEPrecision");
268  //WCSimTuningParameters
269  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetRayff(),
270  m_wcsim_opt->GetRayff(),
271  "Rayff");
272  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetBsrff(),
273  m_wcsim_opt->GetBsrff(),
274  "Bsrff");
275  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetAbwff(),
276  m_wcsim_opt->GetAbwff(),
277  "Abwff");
278  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetRgcff(),
279  m_wcsim_opt->GetRgcff(),
280  "Rgcff");
281  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetMieff(),
282  m_wcsim_opt->GetMieff(),
283  "Mieff");
284  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetTvspacing(),
285  m_wcsim_opt->GetTvspacing(),
286  "Tvspacing");
287  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetTopveto(),
288  m_wcsim_opt->GetTopveto(),
289  "Topveto");
290  //WCSimPhysicsListFactory
291  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetPhysicsListName(),
292  m_wcsim_opt->GetPhysicsListName(),
293  "PhysicsListName");
294  //WCSimRandomParameters
295  diff_file = diff_file || CompareVariable(wcsim_opt_0->GetRandomGenerator(),
296  m_wcsim_opt->GetRandomGenerator(),
297  "RandomGenerator");
298 
299  }//mode == 0
300  else if(mode == 1) {
301  diff_file = !wcsim_geom_0->CompareAllVariables(m_wcsim_geom);
302  }//mode == 1
303  if(diff_file) {
304  m_ss << "ERROR: Difference between " << modestr << " tree between input file 0 and " << i;
306  diff = true;
307  }
308  }//i
309  if(mode == 0) {
310  delete wcsim_opt_0;
311  }
312  else if(mode == 1) {
313  delete wcsim_geom_0;
314  }
315  if(diff) {
316  m_ss << "ERROR: Difference between " << modestr << " trees";
318  return false;
319  }
320  return true;
321 }
322 
323 template <typename T> bool WCSimReader::CompareVariable(T v1, T v2, const char * tag)
324 {
325  if(v1 == v2)
326  return false;
327  else {
328  m_ss << "WARN: Difference between strings " << v1 << " and " << v2 << " for variable " << tag;
329  StreamToLog(WARN);
330  return true;
331  }
332 }
333 
336 
337  //Clear the triggers
338  m_data->IDTriggers.Clear();
339  m_data->ODTriggers.Clear();
340 
341  //Clear the samples
342  m_data->IDSamples.clear();
343  m_data->ODSamples.clear();
344 
345  if(m_n_events <= 0) {
346  Log("WARN: Reading 0 events", WARN, m_verbose);
347  m_data->vars.Set("StopLoop",1);
348  return true;
349  }
350 
351  if(m_current_event_num % 100 == 0) {
352  m_ss << "INFO: Event " << m_current_event_num+1 << " of " << m_n_events;
353  StreamToLog(INFO);
354  }
355  else if(m_verbose >= DEBUG1) {
356  m_ss << "DEBUG: Event " << m_current_event_num+1 << " of " << m_n_events;
358  }
359  //get the digits
360  if(!m_chain_event->GetEntry(m_current_event_num)) {
361  m_ss << "WARN: Could not read event " << m_current_event_num << " in event TChain";
362  StreamToLog(WARN);
363  return false;
364  }
365 
366  //make sure the event is pointed to in the data model
367  m_data->IDWCSimEvent_Raw = m_wcsim_event_ID;
368  m_data->ODWCSimEvent_Raw = m_wcsim_event_OD;
369 
370  //store the WCSim filename(s) and event number(s) for the current event(s)
371  m_data->CurrentWCSimFile.String() = m_chain_event->GetFile()->GetName();
372  m_data->CurrentWCSimEventNum = m_current_event_num
373  - m_chain_event->GetTreeOffset()[m_chain_event->GetTreeNumber()];
374  m_ss << "DEBUG: Current event is event " << m_data->CurrentWCSimEventNum
375  << " from WCSim file " << m_data->CurrentWCSimFile.String()
376  << " Tree offset is " << m_chain_event->GetTreeOffset()[m_chain_event->GetTreeNumber()];
378 
379  //store digit info in the transient data model
380  //ID
381  if(m_wcsim_event_ID->GetNumberOfEvents() == 1 && m_wcsim_event_ID->GetTrigger(0)->GetTriggerType() == kTriggerNoTrig) {
382  //a trigger hasn't been run, so we just add all digits to a single SubSample
383  m_wcsim_trigger = m_wcsim_event_ID->GetTrigger(0);
384  SubSample subid = GetDigits();
385  m_data->IDSamples.push_back(subid);
386  }
387  else {
388  //a trigger has been run, so we need to get all digits from all WCSim event triggers, and fill in the relevant TriggerInfo
389  Log("INFO: Reading in a file that has already been triggered", INFO, m_verbose);
390  Log("FATAL: This is not correctly implemented at the moment. Exiting", FATAL, m_verbose);
391  return false;
392  SubSample subid_all;
393  for(int itrigger = 0; itrigger < m_wcsim_event_ID->GetNumberOfEvents(); itrigger++) {
394  m_wcsim_trigger = m_wcsim_event_ID->GetTrigger(itrigger);
395  SubSample subid_this = GetDigits();
396  double trigger_time = m_wcsim_trigger->GetHeader()->GetDate();
397  //this is a hack to get something close to the readout window size:
398  // take the first/last hit times
399  double first = +9E300;
400  double last = -9E300;
401  for(size_t ihit = 0; ihit < subid_this.m_time.size(); ihit++) {
402  double time = subid_this.m_time[ihit];
403  if(time < first)
404  first = time;
405  if(time > last)
406  last = time;
407  }//ihit
408  Log("TODO: The triggered time logic is not correct.");
409  Log("TODO: First and Last need to be converted to absolute times.");
410  m_data->IDTriggers.AddTrigger(m_wcsim_trigger->GetTriggerType(),
411  trigger_time - first, //readout
412  last - trigger_time,
413  trigger_time - first, //mask
414  last - trigger_time,
415  trigger_time,
416  m_wcsim_trigger->GetTriggerInfo());
417  subid_all.Append(subid_this);
418  Log("WARN: Trigger added to TriggerInfo. Note that the mask time has been set to the entire readout window", WARN, m_verbose);
419  }//itrigger
420  m_data->IDSamples.push_back(subid_all);
421  }//
422  //OD
423  if(m_wcsim_event_OD) {
424  m_wcsim_trigger = m_wcsim_event_OD->GetTrigger(0);
425  SubSample subod = GetDigits();
426  m_data->ODSamples.push_back(subod);
427  }
428 
429  //and finally, increment event counter
431 
432  //and flag to exit the Execute() loop, if appropriate
434  m_data->vars.Set("StopLoop",1);
435 
437 
438  return true;
439 }
440 
442 {
443  // Store times relative to first hit time
444  TimeDelta first_time;
445  //loop over the digits
446  std::vector<int> PMTid;
447  std::vector<float> charge;
448  std::vector<TimeDelta::short_time_t> time;
449  for(int idigi = 0; idigi < m_wcsim_trigger->GetNcherenkovdigihits(); idigi++) {
450  //get a digit
451  TObject *element = (m_wcsim_trigger->GetCherenkovDigiHits())->At(idigi);
452  WCSimRootCherenkovDigiHit *digit =
453  dynamic_cast<WCSimRootCherenkovDigiHit*>(element);
454  //get the digit information
455  int ID = digit->GetTubeId();
456  if (idigi == 0){
457  // Store times relative to the first digit
458  first_time = TimeDelta(digit->GetT());
459  m_ss << "DEBUG: 1st digit time before shifting: " << first_time;
461  }
462  TimeDelta::short_time_t T = (TimeDelta(digit->GetT()) - first_time) / TimeDelta::ns;
463  float Q = digit->GetQ();
464  PMTid.push_back(ID);
465  time.push_back(T);
466  charge.push_back(Q);
467  //print
468  if(idigi < 10 || m_verbose >= DEBUG2) {
469  m_ss << "DEBUG: Digit " << idigi
470  << " has T " << T
471  << ", Q " << Q
472  << " on PMT " << ID;
474  }
475  }//idigi
476  m_ss << "DEBUG: Saved information on " << time.size() << " digits";
478 
479  // Set the timestamp of the SubSample to the first digit time (the one every
480  // other time is relative to) plus the trigger time as reported by WCSim.
481  // WCSim stores all digit times relative to the trigger time.
482  //
483  // WCSim also adds a 950 ns offset to the digit times, if it no running in
484  // the NoTrigger mode. But we should not care about that here.
485  //
486  // if interpose_interval is filled, events will be spaced by that many ns
487  //
488  float event_offset = m_interpose_interval*m_wcsim_trigger->GetHeader()->GetEvtNum();
489  TimeDelta timestamp = TimeDelta(m_wcsim_trigger->GetHeader()->GetDate()) + first_time + event_offset;
490  SubSample sub;
491  if (not sub.Append(PMTid, time, charge, timestamp)){
492  Log("ERROR: Appending hits failed!", ERROR, m_verbose);
493  }
494 
495  return sub;
496 }
497 
499  if(m_stopwatch) {
501  m_stopwatch->Start();
502  }
503 
504  m_ss << "INFO: Read " << m_current_event_num - m_first_event_num << " WCSim events";
505  StreamToLog(INFO);
506 
507  delete m_chain_opt;
508  delete m_chain_event;
509  delete m_chain_geom;
510 
511  if(m_stopwatch) {
512  Log(m_stopwatch->Result("Finalise"), INFO, m_verbose);
513  delete m_stopwatch;
514  }
515 
516  return true;
517 }
std::string m_input_filelist
The input WCSim filelist filename from config file.
Definition: WCSimReader.h:84
std::string Result(std::string method_name, std::string output_file="")
Definition: Stopwatch.cpp:38
TChain * m_chain_event
Input wcsimT chain - holds WCSim events.
Definition: WCSimReader.h:52
SubSample GetDigits()
Creates a SubSample containing the digits from the current m_wcsim_trigger.
long int m_current_event_num
The current WCSim event number.
Definition: WCSimReader.h:68
float short_time_t
Type for relative hit times within a SubSample. Unit = ns.
Definition: TimeDelta.h:37
util::Stopwatch * m_stopwatch
The stopwatch, if we&#39;re using one.
Definition: WCSimReader.h:87
bool Append(const SubSample &sub)
Definition: SubSample.cpp:154
void Start()
Start the stopwatch.
Definition: Stopwatch.cpp:18
int m_verbose
Verbosity level.
Definition: WCSimReader.h:92
StopwatchTimes Stop()
Stop the stopwatch, returning the CPU time.
Definition: Stopwatch.cpp:24
float m_interpose_interval
Definition: WCSimReader.h:79
std::string m_stopwatch_file
Image filename to save the histogram to, if required.
Definition: WCSimReader.h:89
Definition: PMTInfo.h:7
WCSimRootGeom * m_wcsim_geom
Holds geometry information - tank size, PMT size, PMT positions, etc.
Definition: WCSimReader.h:63
bool AddTreeToChain(const char *fname, TChain *chain)
Adds a file (or files - wildcards allowed) to the chain.
bool Initialise(std::string configfile, DataModel &data)
Definition: WCSimReader.cpp:7
bool Execute()
TChain * m_chain_geom
Input wcsimGeoT chain - holds WCSim geometry.
Definition: WCSimReader.h:54
void set_interpose_interval(float t)
Definition: DataModel.h:121
bool CompareVariable(T v1, T v2, const char *tag)
Checks for equality between 2 variables.
TChain * m_chain_opt
Input wcsimRootOptionsT chain - holds WCSim run options.
Definition: WCSimReader.h:50
std::stringstream m_ss
Streamer for easy formatting of log messages.
Definition: WCSimReader.h:95
WCSimRootEvent * m_wcsim_event_ID
Holds event information for the ID - tracks, hits, digits.
Definition: WCSimReader.h:59
long int m_first_event_num
The first WCSim event number to read.
Definition: WCSimReader.h:70
bool CompareTree(TChain *chain, int mode)
bool ReadTree(TChain *chain)
Calls AddTreeToChain for m_input_filename, or for every file within the m_input_filelist.
WCSimRootTrigger * m_wcsim_trigger
Holds trigger information - trigger time, digits, etc.
Definition: WCSimReader.h:65
WCSimRootEvent * m_wcsim_event_OD
Holds event information for the OD - hits, digits.
Definition: WCSimReader.h:61
static const TimeDelta ns
TimeDelta of 1 ns.
Definition: TimeDelta.h:57
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
Definition: Utilities.cpp:276
long int m_n_events
The total number of events in m_chain_event.
Definition: WCSimReader.h:72
std::vector< TimeDelta::short_time_t > m_time
Vector of hit times relative to timestamp for all hits in SubSample. Unit: ns.
Definition: SubSample.h:42
WCSimRootOptions * m_wcsim_opt
Holds WCSim running options - trigger thresholds, geometry names, input .kin filename, etc.
Definition: WCSimReader.h:57
bool Finalise()
std::string m_input_filename
The input WCSim filename from config file (wildcards allowed)
Definition: WCSimReader.h:82
void StreamToLog(int level)
Helper function to print streamer at specified level, and clear streamer.
Definition: WCSimReader.h:98