1 #ifndef __JRUNHISTOGRAMS__
2 #define __JRUNHISTOGRAMS__
25 #include "TProfile2D.h"
28 #include "TPaveText.h"
33 #include "TDirectory.h"
35 #include "TObjArray.h"
36 #include "TObjString.h"
39 using namespace KM3NETDAQ ;
40 using namespace JLANG ;
42 using namespace JSUPPORT ;
52 TAxis *axis = h->GetXaxis();
53 int bins = axis->GetNbins();
54 Axis_t from = axis->GetXmin();
55 Axis_t to = axis->GetXmax();
56 Axis_t width = (to - from) / bins;
57 Axis_t *new_bins =
new Axis_t[bins + 1];
59 for (
int i = 0; i <= bins; i++) {
60 new_bins[i] = TMath::Power(10, from + i * width);
63 axis->Set(bins, new_bins);
77 TAxis *axis = h->GetYaxis();
78 int bins = axis->GetNbins();
79 Axis_t from = axis->GetXmin();
80 Axis_t to = axis->GetXmax();
81 Axis_t width = (to - from) / bins;
82 Axis_t *new_bins =
new Axis_t[bins + 1];
84 for (
int i = 0; i <= bins; i++) {
85 new_bins[i] = TMath::Power(10, from + i * width);
88 axis->Set(bins, new_bins);
93 double binsToT[] = {-0.5 , 0.5 , 1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 6.5 , 7.5 , 8.5 , 9.5 , 10.5 , 11.5 , 12.5 , 13.5 , 14.5 , 15.5 ,
94 16.5 , 17.5 , 18.5 , 19.5 , 20.5 , 21.5 , 22.5 , 23.5 , 24.5 , 25.5 , 26.5 , 27.5 , 28.5 , 30.5 , 32.5 , 34.5 ,
95 36.5 , 38.5 , 40.5 , 45.5 , 50.5 , 55.5 , 60.5 , 65.5 , 70.5 , 75.5 , 80.5 , 85.5 , 90.5 , 95.5 , 100.5 , 120.5 , 140.5 ,
96 160.5 , 180.5 , 200.5 , 254.5 , 255.5 , 256.5};
109 for(
int i=0 ; i < h->GetNbinsX() ; i++){
111 double width = h -> GetXaxis() -> GetBinWidth(i);
113 h -> SetBinContent(i , h -> GetBinContent(i) / width);
114 h -> SetBinError (i , h -> GetBinError(i) / width);
139 h_fifo_per_dom = NULL;
140 h_daq_status_per_dom = NULL;
141 h_hrv_per_dom = NULL;
142 h_rate_summary = NULL;
143 h_pmt_rate_distribution = NULL;
144 h_dom_rate_distribution = NULL;
145 m_mean_summary_rate = NULL;
146 m_mean_summary_rate_distribution = NULL;
147 m_summary_rate_distribution = NULL;
155 init_h_fifo_per_dom (du_ids , modules_per_string);
156 init_h_daq_status_per_dom (du_ids , modules_per_string);
157 init_h_hrv_per_dom (du_ids , modules_per_string);
158 init_h_rate_summary (du_ids , modules_per_string);
159 init_h_pmt_rate_distribution ();
160 init_h_dom_rate_distribution ();
161 init_m_mean_summary_rate (modules_per_string);
162 init_m_mean_summary_rate_distribution ();
163 init_m_summary_rate_distribution ();
175 string title =
MAKE_STRING (
" FIFO ; String ; Floor ; Number of slices with FIFO almost full x number of PMTs ");
177 h_fifo_per_dom =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
189 string title =
MAKE_STRING (
" DAQ Status ; String ; Floor ; Number of slices with wrong DAQ status of packets ");
191 h_daq_status_per_dom =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
203 string title =
MAKE_STRING (
"HRV ; String ; Floor ; Number of slices x number of PMTs in HRV");
205 h_hrv_per_dom =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
217 string title =
MAKE_STRING (
"Summary slices ; String ; Floor ; Mean rate over all summary slices [kHz]");
219 h_rate_summary =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
228 string title =
MAKE_STRING (
"PMT rate distribution from summary slices ; rate [kHz] ; Counts");
230 h_pmt_rate_distribution =
new TH1D (name.c_str() , title.c_str() , 20 , 0 , log10(100));
232 BinLogX (h_pmt_rate_distribution);
234 h_pmt_rate_distribution -> SetMinimum(1);
243 string title =
MAKE_STRING (
"DOM rate distribution from summary slices ; rate [kHz] ; Counts");
245 h_dom_rate_distribution =
new TH1D (name.c_str() , title.c_str() , 50 , log10(50) , log10(2000));
247 BinLogX (h_dom_rate_distribution);
249 h_dom_rate_distribution -> SetMinimum(1);
260 string title =
MAKE_STRING (
" ; rate [kHz] ; # PMTs");
262 TH1D* h =
new TH1D(name.c_str() , title.c_str() , 40 , 0 , log10(1000));
277 string title =
MAKE_STRING (
" ; TDC Channel ; Floor ; rate [kHz]");
289 string title =
MAKE_STRING (
"Summaryslice ; TDC channel ; rate [kHz] ; counts");
291 TH2D* h_summary_rate_distribution =
new TH2D (name.c_str() , title.c_str(),
293 100 , -1 , log10(10000));
295 BinLogY (h_summary_rate_distribution);
334 h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
335 m_mean_ToT .resize (number_of_timeslice_types , NULL);
336 m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
337 m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
338 m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
351 init_h_dom_mean_rates (ts_type , du_ids , modules_per_string , ts_name);
352 init_m_mean_ToT (ts_type , modules_per_string , ts_name);
353 init_m_mean_ToT_distribution (ts_type , ts_name);
354 init_m_pmt_tot_distributions (ts_type , ts_name);
355 init_m_pmt_rate_distributions (ts_type , ts_name);
369 for (
typename vector <
JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
376 TPRegexp
r (
"(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
378 TObjArray*
o = r.MatchS(s);
380 int String = ((TObjString *)o->At(3))->GetString().Atoi();
381 int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
383 for (
int pmt = 1 ; pmt <= (
j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
385 (*m_mean_ToT[i])[
MAKE_STRING(
"Detector/DU" +
to_string(String))] -> Fill((
j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (
j -> second) -> ProjectionY (
"" , pmt , pmt) -> GetMean () );
386 (*m_mean_ToT_distribution[i])[
MAKE_STRING(
"Detector/DU" +
to_string(String))] -> Fill((
j -> second) -> ProjectionY (
"" , pmt , pmt) -> GetMean () );
403 string title =
MAKE_STRING (ts_name +
" ; DU number ; Floor number ; time slice averaged rate [Hz]");
405 h_dom_mean_rates[ts_type] =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , 0.5 + modules_per_string);
418 string title =
MAKE_STRING (ts_name +
" ; TDC channel ; Floor number ; mean ToT [ns] ");
433 string title =
MAKE_STRING (ts_name +
" ; ToT [ns] ; # PMTS ");
435 m_mean_ToT_distribution[ts_type] =
new JManager < string , TH1D > (
new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5));
447 string title =
MAKE_STRING (ts_name +
" ; TDC channel ; ToT [ns] ; counts");
466 string title =
MAKE_STRING (ts_name +
" ; TDC channel ; rate [kHz] ; counts ");
468 TH2D* h_pmt_rate_distributions =
new TH2D (name.c_str() , title.c_str(),
470 60 , -6 , log10(1000));
472 BinLogY (h_pmt_rate_distributions);
507 h_Trigger_bit_event = NULL;
508 h_Trigger_bit_hit = NULL;
509 h_Snapshot_hits = NULL;
510 h_Triggered_hits = NULL;
511 h_Triggered_hits_3dmuon = NULL;
512 h_Triggered_hits_3dmuon_per_module = NULL;
513 h_Triggered_over_Snapshot_hits = NULL;
514 h_Number_of_overlays = NULL;
515 h_Snapshot_hits_per_module = NULL;
516 h_Triggered_hits_per_module = NULL;
517 m_Snapshot_hits_per_pmt = NULL;
518 h_pmt_distribution_triggered_hits = NULL;
519 h_tot_distribution_triggered_hits = NULL;
520 h_pmt_distribution_snapshot_hits = NULL;
521 h_tot_distribution_snapshot_hits = NULL;
532 init_h_Trigger_bit_event ();
533 init_h_Trigger_bit_hit ();
534 init_h_Snapshot_hits ();
535 init_h_Triggered_hits ();
536 init_h_Triggered_hits_3dmuon ();
537 init_h_Triggered_hits_3dmuon_per_module (modules_per_string , du_ids);
538 init_h_Triggered_over_Snapshot_hits ();
539 init_h_Number_of_overlays ();
540 init_h_Snapshot_hits_per_module (modules_per_string , du_ids);
541 init_h_Triggered_hits_per_module (modules_per_string , du_ids);
542 init_m_Snapshot_hits_per_pmt (modules_per_string);
543 init_h_pmt_distribution_triggered_hits ();
544 init_h_tot_distribution_triggered_hits ();
545 init_h_pmt_distribution_snapshot_hits ();
546 init_h_tot_distribution_snapshot_hits ();
555 string title =
MAKE_STRING (
"Number of events as a function of trigger bit in event ; Trigger Bit ; Counts ");
563 h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 ,
getTriggerName(i) );
567 h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 ,
"" );
571 h_Trigger_bit_event -> GetXaxis() -> LabelsOption(
"v");
581 string title =
MAKE_STRING (
"Number of hits per event as a function of trigger bit in hit ; Trigger Bit ; #Events ");
589 h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 ,
getTriggerName(i) );
592 h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 ,
"" );
596 h_Trigger_bit_hit -> GetXaxis() -> LabelsOption(
"v");
606 string title =
MAKE_STRING (
" ; Number of snapshot hits; Events ");
608 h_Snapshot_hits =
new TH1D (name.c_str() , title.c_str() , 50, 0, 4 );
619 string title =
MAKE_STRING (
" ; Number of triggered hits; Events ");
621 h_Triggered_hits =
new TH1D (name.c_str() , title.c_str() , 50 , 0, 4 );
632 string title =
MAKE_STRING (
" ; Number of triggered hits for JTRIGGER3DMUON; Events ");
634 h_Triggered_hits_3dmuon =
new TH1D (name.c_str() , title.c_str() , 50 , 0, 3 );
636 BinLogX (h_Triggered_hits_3dmuon);
645 string title =
MAKE_STRING (
"Number of triggered hits for JTRIGGER3DMUON; String ; Floor ; Number of JTRIGGER3DMUON hits");
647 h_Triggered_hits_3dmuon_per_module =
new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , modules_per_string + 0.5 );
657 string title =
MAKE_STRING (
" ; Triggered/Snapshot hits; Events ");
659 h_Triggered_over_Snapshot_hits =
new TH1D (name.c_str() , title.c_str() , 100 , 0, 0.5 );
669 string title =
MAKE_STRING (
" ; Number of overlays; Events ");
671 int MAX_OVERLAYS = 1000;
673 h_Number_of_overlays =
new TH1D (name.c_str() , title.c_str() , MAX_OVERLAYS , -0.5, MAX_OVERLAYS - 0.5 );
684 string title =
MAKE_STRING (
" ; String ; Floor ; Number of snapshot hits ");
686 h_Snapshot_hits_per_module =
new TH2D (name.c_str() , title.c_str() ,
687 *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
688 modules_per_string , 0.5 , modules_per_string + 0.5 );
699 string title =
MAKE_STRING (
" ; String ; Floor ; Number of triggered hits ");
701 h_Triggered_hits_per_module =
new TH2D (name.c_str() , title.c_str() ,
702 *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
703 modules_per_string , 0.5 , modules_per_string + 0.5 );
714 string title =
MAKE_STRING (
" ; TDC Channel ; Floor ; Number of snapshot hits ");
717 modules_per_string , 0.5 , modules_per_string + 0.5 ) );
728 string title =
MAKE_STRING (
" ; TDC Channel ; Counts [a.u.]");
739 string title =
MAKE_STRING (
" ; ToT [ns] ; Counts [a.u.]");
741 h_tot_distribution_triggered_hits =
new TH1D (name.c_str() , title.c_str() ,
nbinsToT ,
binsToT);
751 string title =
MAKE_STRING (
" ; TDC Channel ; Counts [a.u.]");
763 string title =
MAKE_STRING (
" ; ToT [ns] ; Counts [a.u.]");
765 h_tot_distribution_snapshot_hits =
new TH1D (name.c_str() , title.c_str() ,
nbinsToT ,
binsToT);
801 h_summary.initialize(du_ids , modules_per_string);
814 const string prefix =
"KM3NETDAQ::JDAQ" ;
815 string ts_name = T::Class_Name();
816 string::size_type pos = ts_name.find(prefix);
818 if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() ,
"");
820 h_timeslice.initialize(du_ids , modules_per_string , index , ts_name);
828 h_trigger.initialize (du_ids , modules_per_string);
841 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
843 f.cd (dirname.c_str());
845 for (
int i=0 ; i < (int)table.size(); i++){
847 for (
int j=0 ;
j< (int)table[i].size();
j++){
849 if (table[i][
j]) table [i][
j] -> Write();
864 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
866 f.cd (dirname.c_str());
868 for (
int i=0 ; i < (int)table.size(); i++){
870 if (table[i]) table[i] -> Write();
881 template <
class T ,
class V>
884 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
886 f.cd (dirname.c_str());
890 i -> second -> Write();
899 template <
class T ,
class V>
904 if (i -> second -> GetTitle()){
906 std::string buffer = i -> second -> GetTitle();
907 string::size_type ipos = buffer.find(wc);
909 if (ipos!=std::string::npos){
915 buffer.replace(ipos, 1, os.str());
917 i -> second -> SetTitle(buffer.c_str());
928 template <
class T ,
class V >
933 std::string fullpath =
MAKE_STRING(i->second->GetName());
935 int pos = fullpath.rfind (
'/');
936 std::string
name = fullpath.substr (pos + 1);
937 std::string
path = fullpath.substr (0 , pos);
939 if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
943 i -> second -> SetName(name.c_str());
944 i -> second -> Write();
953 template <
class T ,
class V >
962 std::string fullpath =
MAKE_STRING(
j-> second -> GetName());
964 int pos = fullpath.rfind (
'/');
965 std::string
name = fullpath.substr (pos + 1);
966 std::string
path = fullpath.substr (0 , pos);
968 if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
972 j -> second -> SetName(name.c_str());
973 j -> second -> Write();
988 if (h_summary.h_fifo_per_dom) h_summary.h_fifo_per_dom -> Write();
989 if (h_summary.h_daq_status_per_dom) h_summary.h_daq_status_per_dom -> Write();
990 if (h_summary.h_hrv_per_dom) h_summary.h_hrv_per_dom -> Write();
991 if (h_summary.h_rate_summary) h_summary.h_rate_summary -> Write();
992 if (h_summary.h_pmt_rate_distribution) h_summary.h_pmt_rate_distribution -> Write();
993 if (h_summary.h_dom_rate_distribution) h_summary.h_dom_rate_distribution -> Write();
995 Write_histogram_table_to_file(f ,
MAKE_STRING(
"Detector"), h_timeslice.h_dom_mean_rates);
997 for (
typename vector <
JManager < string , TH2D >* >::const_iterator i = h_timeslice.m_pmt_tot_distributions.begin() ; i != h_timeslice.m_pmt_tot_distributions.end() ; ++i){
1003 for(
int k=1 ;
k <
j -> second -> GetNbinsX() ; ++
k){
1005 for(
int t=1 ; t <
j -> second -> GetNbinsY() ; ++t){
1007 double width =
j -> second -> GetYaxis() -> GetBinWidth(t);
1009 j -> second -> SetBinContent(
k,t,
j -> second -> GetBinContent(
k,t) / width);
1010 j -> second -> SetBinError(
k,t,
j -> second -> GetBinError(
k,t) / width);
1017 Write_manager_table_in_key_dir (f , h_timeslice.m_pmt_tot_distributions);
1018 Write_manager_table_in_key_dir (f , h_timeslice.m_pmt_rate_distributions);
1019 if (h_summary.m_summary_rate_distribution) Write_manager_in_key_dir (f , h_summary.m_summary_rate_distribution);
1021 if (h_summary.m_mean_summary_rate) Write_manager_in_key_dir( f , h_summary.m_mean_summary_rate);
1022 if (h_summary.m_mean_summary_rate_distribution) Write_manager_in_key_dir( f , h_summary.m_mean_summary_rate_distribution);
1024 h_timeslice.Fill_mean_ToT_histograms();
1026 Write_manager_table_in_key_dir (f , h_timeslice.m_mean_ToT);
1027 Write_manager_table_in_key_dir (f , h_timeslice.m_mean_ToT_distribution);
1032 if (h_trigger.h_Trigger_bit_event) h_trigger.h_Trigger_bit_event -> Write();
1033 if (h_trigger.h_Trigger_bit_hit) h_trigger.h_Trigger_bit_hit -> Write();
1034 if (h_trigger.h_Triggered_hits) h_trigger.h_Triggered_hits -> Write();
1035 if (h_trigger.h_Triggered_hits_3dmuon) h_trigger.h_Triggered_hits_3dmuon -> Write();
1036 if (h_trigger.h_Triggered_hits_3dmuon_per_module) h_trigger.h_Triggered_hits_3dmuon_per_module -> Write();
1037 if (h_trigger.h_Snapshot_hits) h_trigger.h_Snapshot_hits -> Write();
1038 if (h_trigger.h_Triggered_over_Snapshot_hits) h_trigger.h_Triggered_over_Snapshot_hits -> Write();
1039 if (h_trigger.h_Number_of_overlays) h_trigger.h_Number_of_overlays -> Write();
1040 if (h_trigger.h_pmt_distribution_triggered_hits) {h_trigger.h_pmt_distribution_triggered_hits -> Write();}
1041 if (h_trigger.h_pmt_distribution_snapshot_hits) {h_trigger.h_pmt_distribution_snapshot_hits -> Write();}
1042 if (h_trigger.h_tot_distribution_triggered_hits) {
normalizeBW1D (h_trigger.h_tot_distribution_triggered_hits) ; h_trigger.h_tot_distribution_triggered_hits-> Write();}
1043 if (h_trigger.h_tot_distribution_snapshot_hits) {
normalizeBW1D (h_trigger.h_tot_distribution_snapshot_hits) ; h_trigger.h_tot_distribution_snapshot_hits -> Write();}
1044 if (h_trigger.h_Triggered_hits_per_module) { h_trigger.h_Triggered_hits_per_module-> Write();}
1045 if (h_trigger.h_Snapshot_hits_per_module) { h_trigger.h_Snapshot_hits_per_module -> Write();}
1046 if (h_trigger.m_Snapshot_hits_per_pmt) Write_manager_in_key_dir(f , h_trigger.m_Snapshot_hits_per_pmt);
TH1D * h_pmt_distribution_snapshot_hits
void init_h_dom_mean_rates(int ts_type, std::set< int > du_ids, int modules_per_string, std::string ts_name)
TH2D * h_Snapshot_hits_per_module
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
void init_h_rate_summary(set< int > &du_ids, int modules_per_string)
void init_h_fifo_per_dom(std::set< int > &du_ids, int modules_per_string)
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
void init_h_Trigger_bit_event()
TH1D * h_Number_of_overlays
void init_h_Triggered_hits_per_module(int modules_per_string, std::set< int > &du_ids)
TH2D * h_Triggered_hits_per_module
void init_h_Snapshot_hits_per_module(int modules_per_string, std::set< int > &du_ids)
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
o $QUALITY_ROOT d $DEBUG!JPlot1D f
void init_h_Triggered_hits_3dmuon()
void init_h_Triggered_over_Snapshot_hits()
void initialize(std::set< int > &du_ids, int modules_per_string)
TH2D * h_daq_status_per_dom
Dynamic ROOT object management.
void initialize_summary_histograms()
JManager< string, TH2D > * m_mean_summary_rate
void init_m_mean_ToT_distribution(int ts_type, string ts_name)
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.
void Fill_mean_ToT_histograms()
void init_h_pmt_distribution_snapshot_hits()
void Write_to_file(TFile &f)
void init_m_summary_rate_distribution()
void init_h_tot_distribution_triggered_hits()
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
TimesliceHistograms h_timeslice
void init_m_mean_summary_rate(int modules_per_string)
TH1D * h_tot_distribution_snapshot_hits
void init_h_Number_of_overlays()
TriggerHistograms h_trigger
do set_variable OUTPUT_DIRECTORY $WORKDIR T
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)
JRA_Histograms(const JDetector &detector)
void init_m_pmt_rate_distributions(int ts_type, string ts_name)
TH1D * h_pmt_rate_distribution
void init_h_Triggered_hits_3dmuon_per_module(int modules_per_string, std::set< int > &du_ids)
$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)
then JConvertDetectorFormat a $DETECTOR[1] o
TH1D * h_Trigger_bit_event
void init_h_Snapshot_hits()
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
void init_m_Snapshot_hits_per_pmt(int modules_per_string)
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
void init_h_Triggered_hits()
SummaryHistograms h_summary
Direct access to module in detector data structure.
void init_m_mean_ToT(int ts_type, int modules_per_string, string ts_name)
void init_h_dom_rate_distribution()
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.
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
void init_h_tot_distribution_snapshot_hits()
TH1D * h_tot_distribution_triggered_hits
void init_h_pmt_distribution_triggered_hits()
TH1D * h_Triggered_hits_3dmuon
void normalizeBW1D(TH1D *h)
void initialize(std::set< int > du_ids, int modules_per_string, int ts_type, std::string ts_name)
void init_m_mean_summary_rate_distribution()
TH2D * h_Triggered_hits_3dmuon_per_module
Indexing of data type in type list.
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
void init_h_daq_status_per_dom(std::set< int > &du_ids, int modules_per_string)
int getNumberOfModules(const JDetector &detector)
Get number of modules.
void init_h_Trigger_bit_hit()
void initialize_trigger_histograms()
void init_h_hrv_per_dom(set< int > &du_ids, int modules_per_string)
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
void init_h_pmt_rate_distribution()
void init_m_pmt_tot_distributions(int ts_type, string ts_name)