Jpp  17.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JRunHistograms.hh
Go to the documentation of this file.
1 #ifndef __JRUNHISTOGRAMS__
2 #define __JRUNHISTOGRAMS__
3 
4 /**
5  * \author rgruiz, adomi
6  */
7 
8 #include "JSupport/JSupport.hh"
10 
12 #include "JTrigger/JTriggerBits.hh"
13 
16 
20 
21 #include "JGizmo/JGizmoToolkit.hh"
22 
23 #include "JROOT/JManager.hh"
24 
25 #include "TH1D.h"
26 #include "TH2D.h"
27 #include "TProfile2D.h"
28 #include "TAxis.h"
29 #include "TCanvas.h"
30 #include "TPaveText.h"
31 #include "TStyle.h"
32 #include "TString.h"
33 #include "TMath.h"
34 #include "TColor.h"
35 #include "TDirectory.h"
36 #include "TPRegexp.h"
37 #include "TObjArray.h"
38 #include "TObjString.h"
39 
40 using namespace std ;
41 using namespace KM3NETDAQ ;
42 using namespace JLANG ;
43 using namespace JPP ;
44 using namespace JSUPPORT ;
45 
46 
47 /*
48  * Structure to store histograms obtained from the JDAQSummary TTree.
49  */
50 
52  TH1D* h_mean_fifo;
59 
60  /* One histogram for each DU */
63 
64  /* One histogram for each module */
66 
68  h_fifo_per_dom = NULL;
69  h_daq_status_per_dom = NULL;
70  h_hrv_per_dom = NULL;
71  h_rate_summary = NULL;
72  h_pmt_rate_distribution = NULL;
73  h_dom_rate_distribution = NULL;
74  m_mean_summary_rate = NULL;
75  m_mean_summary_rate_distribution = NULL;
76  m_summary_rate_distribution = NULL;
77  }
78 
79  /*
80  * Initializes the histograms for summary slices
81  */
82  void initialize(std::set<int> & du_ids , int modules_per_string){
83 
84  h_fifo_per_dom = new TH2D ("h_fifo_per_dom", " FIFO ; String ; Floor ; Number of slices with FIFO almost full x number of PMTs ",
85  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
86 
87  h_daq_status_per_dom = new TH2D ("h_daq_status_per_dom",
88  " Fraction of wrong DAQ Status [%]; String ; Floor ; Fraction of slices with wrong DAQ status of packets [%]",
89  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
90 
91  h_hrv_per_dom = new TH2D ("h_hrv_per_dom", "HRV ; String ; Floor ; Number of slices x number of PMTs in HRV",
92  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
93 
94  h_rate_summary = new TH2D ("h_rate_summary", "Summary slices ; String ; Floor ; Mean rate over all summary slices [kHz]",
95  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
96 
97  h_pmt_rate_distribution = new TH1D ("h_pmt_rate_distribution", "PMT rate distribution from summary slices ; rate [kHz] ; Counts",
98  JDAQRate::getN(), JDAQRate::getData(1.0e-4));
99 
100  h_dom_rate_distribution = new TH1D ("h_dom_rate_distribution", "DOM rate distribution from summary slices ; rate [kHz] ; Counts", 50 , log10(50) , log10(2000));
101  setLogarithmicX (h_dom_rate_distribution);
102 
103  TH1D* h = new TH1D("%/h_mean_summary_rate_distribution", " ; rate [kHz] ; # PMTs", 40 , 0 , log10(1000));
104  setLogarithmicX (h);
105  m_mean_summary_rate_distribution = new JManager < string , TH1D > (h);
106 
107  m_mean_summary_rate = new JManager < string , TH2D > (new TH2D("%/h_mean_summary_rate", " ; TDC Channel ; Floor ; rate [kHz]",
108  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5,
109  modules_per_string , 0.5 , 0.5 + modules_per_string));
110 
111  TH2D* h_summary_rate_distribution = new TH2D ("%/h_pmt_rate_distributions_Summaryslice", "Summaryslice ; TDC channel ; rate [kHz] ; counts",
112  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5, 100 , -1 , log10(10000));
113  setLogarithmicY (h_summary_rate_distribution);
114  m_summary_rate_distribution = new JManager < string , TH2D > (h_summary_rate_distribution);
115 
116  }
117 };
118 
120 
125 
126  /* One histogram per timeslice type. I decided not to use a JManager here because the range of each histogram could be different for each timeslice type. */
127 
129 
130  /* One JManager per timeslice type. Each JManager hosts a histogram for each DU */
131 
134 
135  /* One JManager per timeslice type. Each manager hosts a histogram for an optical module. The key is expected to follow the pattern SXXFXX */
136 
139 
141  min_logdt (0),
142  max_logdt (9),
143  nbins_logdt (150),
144  nbins_time (200)
145  {
146  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
147 
148  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
149  m_mean_ToT .resize (number_of_timeslice_types , NULL);
150  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
151  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
152  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
153  }
154 
155  /*
156  * Initializes histograms for a given timeslice type.
157  *
158  * \param du_ids The list of ids for the DUs in the detector
159  * \param modules_per_string the number of modules in a string
160  * \param ts_type Index of the timeslice types on the JDAQTimesliceTypes_t typelist.
161  * \param ts_name The name of the timeslice type
162  */
163  void initialize(std::set<int> du_ids , int modules_per_string , int ts_type , std::string ts_name){
164 
165  h_dom_mean_rates[ts_type] = new TH2D (MAKE_STRING ("h_mean_dom_rates_" + ts_name).c_str(),
166  MAKE_STRING (ts_name + " ; DU number ; Floor number ; time slice averaged rate [Hz]").c_str() ,
167  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
168  modules_per_string , 0.5 , 0.5 + modules_per_string);
169 
170  m_mean_ToT[ts_type] = new JManager < string , TH2D > (new TH2D (MAKE_STRING ("%/h_mean_ToT_" + ts_name).c_str(),
171  MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ").c_str(),
172  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
173  modules_per_string , 0.5 , 0.5 + modules_per_string));
174 
175  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name).c_str(),
176  MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ").c_str(),
177  256, -0.5, 255.5));
178 
179  TH2D* h = new TH2D (MAKE_STRING ("%_" + ts_name + "_2SToT").c_str(),
180  MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts").c_str(),
181  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , 256, -0.5, 255.5);
182 
183  h->Sumw2();
184 
185  m_pmt_tot_distributions[ts_type] = new JManager < string , TH2D > (h);
186 
187  int NBinsY=0;
188  double Ymax=0;
189 
191  NBinsY=100;
192  Ymax=25;
194  NBinsY=100;
195  Ymax=2;
197  NBinsY=10;
198  Ymax=0.1;
199  }
200 
201  TH2D* h_pmt_rate_distributions = new TH2D (MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name).c_str(),
202  MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ").c_str(),
203  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
204  NBinsY, 0, Ymax);
205 
206  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
207 
208  }
209 
210  /*
211  * Fills the mean ToT as a function of the PMT and floor number for a given DU
212  *
213  * \param table table with the ToT distributions for each PMT in a module, for every timeslice type
214  * \param string The string number
215  * \param floor The floor number
216  */
218 
219  int i = 0 ;
220 
221  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
222 
223  if ((*it)){
224 
225  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
226 
227  TString s (MAKE_STRING(j -> first).c_str());
228  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
229 
230  TObjArray* o = r.MatchS(s);
231 
232  int String = ((TObjString *)o->At(3))->GetString().Atoi();
233  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
234 
235  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
236 
237  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
238  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
239  }
240  }
241  }
242  }
243  }
244 
245 };
246 
247 /*
248  * Structure to store histograms obtained from the JDAQEvent TTree
249  */
251 
263 
264  /* One histogram per DU*/
265 
267 
272 
273  /*
274  * Constructor
275  */
277  h_Trigger_bit_event = NULL;
278  h_Trigger_bit_hit = NULL;
279  h_Snapshot_hits = NULL;
280  h_Triggered_hits = NULL;
281  h_Triggered_hits_3dmuon = NULL;
282  h_Triggered_hits_3dmuon_per_module = NULL;
283  h_Triggered_over_Snapshot_hits = NULL;
284  h_event_duration = NULL;
285  h_Number_of_overlays = NULL;
286  h_Snapshot_hits_per_module = NULL;
287  h_Triggered_hits_per_module = NULL;
288  m_Snapshot_hits_per_pmt = NULL;
289  h_pmt_distribution_triggered_hits = NULL;
290  h_tot_distribution_triggered_hits = NULL;
291  h_pmt_distribution_snapshot_hits = NULL;
292  h_tot_distribution_snapshot_hits = NULL;
293  }
294 
295  /*
296  * Initializes the histograms.
297  * \param du_ids The list of du ids in the detector
298  * \param frame_index_range The range of frame indices
299  * \param modules_per_string The number of modules in a string.
300  */
301  void initialize(std::set<int> & du_ids , int modules_per_string){
302 
303  h_Trigger_bit_event = new TH1D ("h_Trigger_bit_event",
304  "Number of events as a function of trigger bit in event ; Trigger Bit ; Counts",
306 
307  for (int i = 0 ; i < (int) NUMBER_OF_TRIGGER_BITS ; i++){
308 
309  if (getTriggerName(i)){
310 
311  h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 , getTriggerName(i) );
312  }else{
313 
314  h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 , "" );
315  }
316  }
317  h_Trigger_bit_event -> GetXaxis() -> LabelsOption("v");
318 
319 
320  h_Trigger_bit_hit = new TH1D ("h_Trigger_bit_hit",
321  "Number of hits per event as a function of trigger bit in hit ; Trigger Bit ; #Events",
323 
324  for (int i = 0 ; i < (int) NUMBER_OF_TRIGGER_BITS ; i++){
325 
326  if (getTriggerName(i)){
327 
328  h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 , getTriggerName(i) );
329  }else{
330 
331  h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 , "" );
332  }
333  }
334 
335  h_Trigger_bit_hit -> GetXaxis() -> LabelsOption("v");
336 
337  h_Snapshot_hits = new TH1D ("h_Snapshot_hits", " ; Number of snapshot hits; Events ", 50, 0, 4 );
338  setLogarithmicX (h_Snapshot_hits);
339 
340  h_Triggered_hits = new TH1D ("h_Triggered_hits", " ; Number of triggered hits; Events ", 50 , 0, 4 );
341  setLogarithmicX (h_Triggered_hits);
342 
343  h_Triggered_hits_3dmuon = new TH1D ("h_Triggered_hits_3dmuon", " ; Number of triggered hits for JTRIGGER3DMUON; Events ", 50 , 0, 3 );
344  setLogarithmicX(h_Triggered_hits_3dmuon);
345 
346  h_Triggered_hits_3dmuon_per_module = new TH2D ("h_Triggered_hits_3dmuon_per_module",
347  "Number of triggered hits for JTRIGGER3DMUON; String ; Floor ; Number of JTRIGGER3DMUON hits",
348  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5,
349  modules_per_string , 0.5 , modules_per_string + 0.5 );
350 
351  h_Triggered_over_Snapshot_hits = new TH1D ("h_Triggered_over_Snapshot_hits", " ; Triggered/Snapshot hits; Events", 100 , 0, 0.5 );
352 
353  h_event_duration = new TH1D ("h_event_duration", " ; Event Duration [ns]; Events", 60 , 1, 6 );
354  setLogarithmicX(h_event_duration);
355 
356  h_Number_of_overlays = new TH1D ("h_Number_of_overlays", " ; Number of overlays; Events ", 1000, -0.5, 1000 - 0.5 );
357  h_Snapshot_hits_per_module = new TH2D ("h_Snapshot_hits_per_module",
358  " ; String ; Floor ; Number of snapshot hits ",
359  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
360  modules_per_string , 0.5 , modules_per_string + 0.5 );
361 
362  h_Triggered_hits_per_module = new TH2D ("h_Triggered_hits_per_module",
363  " ; String ; Floor ; Number of triggered hits",
364  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
365  modules_per_string , 0.5 , modules_per_string + 0.5 );
366 
367  m_Snapshot_hits_per_pmt = new JManager < string , TH2D > ( new TH2D ("%/h_Snapshot_hits_per_pmt",
368  " ; TDC Channel ; Floor ; Number of snapshot hits",
369  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
370  modules_per_string , 0.5 , modules_per_string + 0.5 ) );
371 
372  h_pmt_distribution_triggered_hits = new TH1D ("h_pmt_distribution_triggered_hits",
373  " ; TDC Channel ; Counts [a.u.]", NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5);
374  h_tot_distribution_triggered_hits = new TH1D ("h_tot_distribution_triggered_hits", " ; ToT [ns] ; Counts [a.u.]", 256 , -0.5, 255.5);
375  h_pmt_distribution_snapshot_hits = new TH1D ("h_pmt_distribution_snapshot_hits", " ; TDC Channel ; Counts [a.u.]", NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5);
376  h_tot_distribution_snapshot_hits = new TH1D ("h_tot_distribution_snapshot_hits", " ; ToT [ns] ; Counts [a.u.]", 256, -0.5, 255.5);
377  }
378 };
379 
380 /*
381  * Class to manage the histograms produced by JRunAnalyzer.
382  */
384 
385 public:
386 
392 
394 
396 
397  du_ids = getStringIDs(detector);
398  modules_per_string = JDETECTOR::getNumberOfModules (detector) / getNumberOfStrings (detector);
399  h_summary = SummaryHistograms();
400  h_timeslice = TimesliceHistograms();
401  h_trigger = TriggerHistograms ();
402  }
403 
404  /*
405  * Initializes summary slice histograms.
406  *
407  * \param range The range of values for the summary slice indices in the run. The range of some histograms is based on the number of time slices, and their indices.
408  */
410 
411  h_summary.initialize(du_ids , modules_per_string);
412 
413  }
414 
415  /*
416  * Initializes summary slice histograms.
417  *
418  * \param range The range of values for the summary slice indices in the run. The range of some histograms is based on the number of time slices, and their indices.
419  */
420  template <class T>
422 
424  const string prefix = "KM3NETDAQ::JDAQ" ;
425  string ts_name = T::Class_Name();
426  string::size_type pos = ts_name.find(prefix);
427 
428  if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() , "");
429 
430  h_timeslice.initialize(du_ids , modules_per_string , index , ts_name);
431  }
432 
433  /*
434  * Initializes JDAQEvent histograms.
435  */
437 
438  h_trigger.initialize (du_ids , modules_per_string);
439  }
440 
441  /*
442  * Checks if the histograms in a table have been initialized. If yes, it writes them on the indicated directory of a root file
443  *
444  * \param f The root file
445  * \param dirname The directory where the histograms will be written
446  * \param table A vector of histograms.
447  */
448  template <class T>
449  void Write_histogram_table_to_file(TFile & f , string dirname , vector < vector < T* > > table){
450 
451  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
452 
453  f.cd (dirname.c_str());
454 
455  for (int i=0 ; i < (int)table.size(); i++){
456 
457  for (int j=0 ; j< (int)table[i].size(); j++){
458 
459  if (table[i][j]) table [i][j] -> Write();
460  }
461  }
462  }
463 
464  /*
465  * Checks if the histograms in a table have been initialized. If yes, it writes them on the indicated directory of a root file
466  *
467  * \param f The root file
468  * \param dirname The directory where the histograms will be written
469  * \param table A vector of histograms.
470  */
471  template <class T>
472  void Write_histogram_table_to_file(TFile & f , string dirname , vector < T* > table){
473 
474  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
475 
476  f.cd (dirname.c_str());
477 
478  for (int i=0 ; i < (int)table.size(); i++){
479 
480  if (table[i]) table[i] -> Write();
481  }
482  }
483 
484  /*
485  * Checks if the histograms in a table have been initialized. If yes, it writes them on the indicated directory of a root file
486  *
487  * \param f The root file
488  * \param dirname The directory where the histograms will be written
489  * \param table A vector of histograms.
490  */
491  template <class T , class V>
492  void Write_manager_to_file(TFile & f , string dirname , JManager < T , V >* table){
493 
494  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
495 
496  f.cd (dirname.c_str());
497 
498  for (typename JManager < T , V >::const_iterator i = table -> begin() ; i != table -> end() ; ++i){
499 
500  i -> second -> Write();
501  }
502  }
503 
504  /*
505  * Replaces wildcard in manager objects titles by their keys.
506  * \param A manager.
507  * \param wc The wildcard
508  */
509  template <class T , class V>
510  void Replace_wildcard_in_name(JManager < T , V >* manager , char wc = '%'){
511 
512  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
513 
514  if (i -> second -> GetTitle()){
515 
516  std::string buffer = i -> second -> GetTitle();
517  string::size_type ipos = buffer.find(wc);
518 
519  if (ipos!=std::string::npos){
520 
521  ostringstream os;
522 
523  os << i -> first ;
524 
525  buffer.replace(ipos, 1, os.str());
526 
527  i -> second -> SetTitle(buffer.c_str());
528  }
529  }
530  }
531  }
532 
533  /*
534  * Writes the contents of a JManager into a file. Each object in each will be written in a directory specified by its key.
535  * \param f The root file
536  * \param A manager.
537  */
538  template < class T , class V >
539  void Write_manager_in_key_dir(TFile & f ,JManager <T , V>* manager){
540 
541  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
542 
543  std::string fullpath = MAKE_STRING(i->second->GetName());
544 
545  int pos = fullpath.rfind ('/');
546  std::string name = fullpath.substr (pos + 1);
547  std::string path = fullpath.substr (0 , pos);
548 
549  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
550 
551  f.cd(path.c_str());
552 
553  i -> second -> SetName(name.c_str());
554  i -> second -> Write();
555  }
556  }
557 
558  /*
559  * Writes the contents of a vector of JManager objects into a file. Each object in each will be written in a directory specified by its key.
560  * \param f The root file
561  * \param table the list of JManager objects.
562  */
563  template < class T , class V >
565 
566  for (typename vector < JManager < T , V >* >::const_iterator i = table.begin() ; i != table.end() ; ++i){
567 
568  if ((*i)){
569 
570  for (typename JManager < T , V >::const_iterator j = (*i) -> begin() ; j != (*i) -> end() ; ++j){
571 
572  std::string fullpath = MAKE_STRING(j-> second -> GetName());
573 
574  int pos = fullpath.rfind ('/');
575  std::string name = fullpath.substr (pos + 1);
576  std::string path = fullpath.substr (0 , pos);
577 
578  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
579 
580  f.cd(path.c_str());
581 
582  j -> second -> SetName(name.c_str());
583  j -> second -> Write();
584  }
585  }
586  }
587  }
588 
589 };
590 
591 #endif
TH1D * h_pmt_distribution_snapshot_hits
TH2D * h_Snapshot_hits_per_module
std::set< int > du_ids
double getN(const JRange< T > &range, const double R)
Get expected number of occurrences due to given rate within specified interval.
Definition: JRange.hh:713
ROOT TTree parameter settings of various packages.
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
TH1D * h_pmt_distribution_triggered_hits
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
JManager< string, TH1D > * m_mean_summary_rate_distribution
void Write_histogram_table_to_file(TFile &f, string dirname, vector< T * > table)
vector< TH2D * > h_dom_mean_rates
TH2D * h_Triggered_hits_per_module
Detector data structure.
Definition: JDetector.hh:89
std::set< int > getStringIDs(const JDetector &detector)
Get list of strings identifiers.
void initialize(std::set< int > &du_ids, int modules_per_string)
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
void initialize(std::set< int > &du_ids, int modules_per_string)
data_type r[M+1]
Definition: JPolint.hh:758
Dynamic ROOT object management.
void initialize_summary_histograms()
JManager< string, TH2D > * m_mean_summary_rate
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
TH1D * h_dom_rate_distribution
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Length of type list.
Definition: JTypeList.hh:176
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
TimesliceHistograms h_timeslice
Detector file.
Definition: JHead.hh:226
void setLogarithmicX(TList *list)
Make x-axis of objects in list logarithmic (e.g. after using log10()).
TH1D * h_tot_distribution_snapshot_hits
TriggerHistograms h_trigger
set_variable E_E log10(E_{fit}/E_{#mu})"
void Replace_wildcard_in_name(JManager< T, V > *manager, char wc= '%')
void Write_manager_table_in_key_dir(TFile &f, vector< JManager< T, V > * > table)
Support methods.
JRA_Histograms(const JDetector &detector)
TH1D * h_pmt_rate_distribution
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DOM<$WORKDIR/ev_configure_domsimulator.txt > RC_DWRT path
void Write_histogram_table_to_file(TFile &f, string dirname, vector< vector< T * > > table)
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
void setLogarithmicY(TList *list)
Make y-axis of objects in list logarithmic (e.g. after using log10()).
SummaryHistograms h_summary
Direct access to module in detector data structure.
JManager< string, TH2D > * m_summary_rate_distribution
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
void Write_manager_in_key_dir(TFile &f, JManager< T, V > *manager)
General purpose string class.
Definition: JHead.hh:152
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_mean_ToT
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
TH1D * h_tot_distribution_triggered_hits
TH1D * h_Triggered_hits_3dmuon
void initialize(std::set< int > du_ids, int modules_per_string, int ts_type, std::string ts_name)
int j
Definition: JPolint.hh:682
Setting of trigger bits.
TH2D * h_Triggered_hits_3dmuon_per_module
Indexing of data type in type list.
Definition: JTypeList.hh:310
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
int getNumberOfModules(const JDetector &detector)
Get number of modules.
void initialize_trigger_histograms()
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
void initialize_timeslice_histograms()
void Write_manager_to_file(TFile &f, string dirname, JManager< T, V > *table)
TH1D * h_Triggered_over_Snapshot_hits