33{
36
39
42 int Nmin;
47
48 try {
49
50 JParser<> zap(
"Auxiliary program to set disable status of transmission based on time-of-arrival histograms.");
51
52 zap[
'f'] =
make_field(inputFile,
"input file (output from JCanberra).");
59
61 }
62 catch(const exception &error) {
64 }
65
66
67 inputFile = getFilenames(inputFile);
68
70
73 }
74
76
78
81
83
85
86 TFile in(i->c_str(),
"read");
87
89
91
93
94 TH1* h1 =
dynamic_cast<TH1*
>(
key->ReadObj());
95
97
98 TString buffer(h1->GetName());
99
100 const char*
regexp =
"[^0-9][0-9]* [0-9]*[^0-9]";
101
103 buffer = buffer(1, buffer.Length() - 2);
104
105 if (buffer.Length() > 0 && buffer.IsDigit()) {
106
108
110
111 const int N = h1->GetEntries();
112
113 if (N > 0 && N < Nmin) {
114
115 NOTICE(
"disable: " <<
setw(2) <<
id.tx <<
' ' <<
setw(8) <<
id.rx <<
' ' <<
setw(6) << N <<
" < " <<
setw(6) << Nmin <<
endl);
116
118 }
119
121
122 if (N > 0) {
123
125
126 h1->GetQuantiles(Q.size(), R.data(), Q.data());
127
128 const double T_us = (*R.rbegin() - *R.begin()) * 1.0e6;
129
131
133
135
137
139 }
140 }
141
142 } else {
143
144 ERROR(
"Histogram name " << h1->GetName() <<
" not compatible with regular expression " <<
regexp <<
"." <<
endl);
145 }
146 }
147 }
148 }
149
150 in.Close();
151 }
152
155 }
156
157 out.Write();
158 out.Close();
159}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Acoustic transmission identifier.
void store(const char *file_name) const
Store to output file.
Auxiliary data structure for return type of make methods.