38inline void print(
const TH1& h1, std::ostream& out)
42 out <<
setw(
WIDTH) << left << h1.GetName() <<
' '
43 <<
FIXED(8,0) << h1.GetEntries() <<
' '
44 <<
FIXED(8,2) << h1.GetMean() <<
' '
45 <<
FIXED(8,2) << h1.GetRMS() <<
' '
63 JLimit_t& numberOfEvents = inputFile.getLimit();
70 JParser<> zap(
"Auxiliary program to histogram and print trigger statistics.");
80 catch(
const exception &error) {
85 TH1D h1(
"Event ",
NULL, 100, 0.0, 1.0e1);
86 TH1D h2(
"Summary ",
NULL, 100, 0.0, 1.0e1);
88 TH1D hm(
"Trigger mask ",
NULL, NUMBER_OF_TRIGGER_BITS, -0.5, NUMBER_OF_TRIGGER_BITS - 0.5);
89 TH1D hn(
"Trigger hits ",
NULL, 1000, -0.5, 1000 - 0.5);
90 TH1D hs(
"Snapshot hits ",
NULL, 1000, -0.5, 10000 - 0.5);
91 TH1D hr(
"PMT rate [kHz]",
NULL, 100, 0.0, 50.0);
111 if (object->hasTriggerBit(i)) {
123 if (object->getTriggerMask(*i) != 0) {
135 long long int numberOfSummaryslices = 0;
145 for (JDAQSummaryslice::const_iterator i = object->begin(); i !=
object->end(); ++i) {
147 hr.Fill(i->getRate(pmt) * 1.0e-3);
162 << (
hs.GetMean() -
hn.GetMean()) * numberOfSummaryslices / (
hr.GetEntries() * 2e-6 * parameters.TMaxEvent_ns)
163 <<
" [kHz]" <<
endl);
167 const double T = numberOfSummaryslices * 1.0e-9 *
getFrameTime();
172 for (
Int_t i = 1; i <=
hm.GetNbinsX(); ++i) {
179 if (name !=
NULL || y != 0.0) {
182 <<
"[" <<
setw(2) << x <<
"]" <<
' '
183 <<
setw(16) << left << (name !=
NULL ? name :
"?") <<
' '
186 if (numberOfSummaryslices != 0) {
195 <<
setw(4) <<
" " <<
' '
196 <<
setw(16) <<
" " <<
' '
197 <<
FIXED(9,0) << h1.GetEntries());
199 if (numberOfSummaryslices != 0) {
200 NOTICE(
FIXED(12,2) << h1.GetEntries() / T <<
" [Hz]");
217 for (
Int_t i = 1; i <=
hm.GetNbinsX(); ++i) {
KM3NeT DAQ constants, bit handling, etc.
General purpose messaging.
#define DEBUG(A)
Message macros.
#define QAQC(A)
QA/QC output macro.
int qaqc
QA/QC file descriptor.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
ROOT TTree parameter settings of various packages.
int main(int argc, char **argv)
Template definition of a multi-dimensional oscillation probability interpolation table.
virtual bool hasNext() override
Check availability of next element.
JTriggerCounter_t next()
Increment trigger counter.
std::ostream & print(std::ostream &out, const JTestSummary &summary, T __begin, T __end, const bool useColors=true, const JFormat_t &formatting=JFormat_t(18, 3, std::ios::fixed))
Print test summary.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
unsigned int JTriggerbit_t
Type definition of trigger bit.
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
size_t getSizeof()
Definition of method to get size of data type.
Auxiliary data structure for floating point format specification.
Auxiliary class to set-up Hit.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for alignment of data.