38 inline 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()          << 
' ' 
   56 int main(
int argc, 
char **argv)
 
   60   using namespace KM3NETDAQ;
 
   70     JParser<> zap(
"Auxiliary program to histogram and print trigger statistics.");
 
   74     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   80   catch(
const exception &error) {
 
   81     FATAL(error.what() << endl);
 
   88   TH1D 
h1(
"Event    ", NULL, 100, 0.0, 1.0e1);
 
   89   TH1D h2(
"Summary  ", NULL, 100, 0.0, 1.0e1);
 
   92   TH1D hn(
"Trigger  hits ", NULL, 1000, -0.5,  1000 - 0.5);
 
   93   TH1D hs(
"Snapshot hits ", NULL, 1000, -0.5, 10000 - 0.5);
 
   94   TH1D hr(
"PMT rate [kHz]", NULL,  100,  0.0,    50.0);
 
   99   NOTICE(trigger_parameters << endl);
 
  104     STATUS(
"entry: " << setw(10) << input.getCounter() << 
'\r'); 
DEBUG(endl);
 
  108     h1.Fill((Double_t) 
getSizeof(*
object) * 1e-6);
 
  115         hm.Fill((Double_t) i);
 
  138   long long int numberOfSummaryslices = 0;
 
  142     STATUS(
"entry: " << setw(10) << input.getCounter() << 
'\r'); 
DEBUG(endl);
 
  146     h2.Fill((Double_t) 
getSizeof(*
object) * 1e-6);
 
  148     for (JDAQSummaryslice::const_iterator i = object->begin(); i != 
object->end(); ++i) {
 
  150         hr.Fill(i->getRate(
pmt) * 1.0e-3);
 
  165   NOTICE(
"Background rate estimate from snapshot hits " << setprecision(2) 
 
  166          << (hs.GetMean() - hn.GetMean()) * numberOfSummaryslices / (hr.GetEntries() * 2e-6 * trigger_parameters.TMaxEvent_ns)
 
  167          << 
" [kHz]" << endl);
 
  171   const double T = numberOfSummaryslices * 1.0e-9 * 
getFrameTime();    
 
  173   NOTICE(setw(
WIDTH) << left << 
"Total run duration (based on time slices) [s] " << 
FIXED(7,1) << 
T << endl);
 
  176   for (Int_t i = 1; i <= hm.GetNbinsX(); ++i) {
 
  179     const Double_t      y = (Double_t)      hm.GetBinContent(i);
 
  183     if (name != NULL || y != 0.0) {
 
  186              << 
"[" << setw(2) << x << 
"]"                      << 
' ' 
  187              << setw(16) << left << (name != NULL ? name : 
"?") << 
' ' 
  190       if (numberOfSummaryslices != 0) {
 
  199          << setw(4)  << 
" " << 
' ' 
  200          << setw(16) << 
" " << 
' ' 
  201          << 
FIXED(7,0) << h1.GetEntries());
 
  203   if (numberOfSummaryslices != 0) {
 
  214     out << hm << hn << hs << hr;
 
  221   for (Int_t i = 1; i <= hm.GetNbinsX(); ++i) {
 
  224     const Double_t      y = (Double_t)      hm.GetBinContent(i);
 
Auxiliary class to set-up Hit. 
 
Utility class to parse command line options. 
 
Auxiliary data structure for alignment of data. 
 
bool hasTriggerBit(const unsigned int bit) const 
Check trigger bit. 
 
ROOT TTree parameter settings. 
 
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits. 
 
then for HISTOGRAM in h0 h1
 
Auxiliary data structure for floating point format specification. 
 
unsigned int size() const 
Get number of hits. 
 
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
 
static JTriggerMask_t getTriggerMask(const JDAQTriggeredHit &hit)
Get trigger mask of given hit. 
 
Auxiliary class for defining the range of iterations of objects. 
 
const_iterator< T > end() const 
Get end of data. 
 
I/O formatting auxiliaries. 
 
const_iterator< T > begin() const 
Get begin of data. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
double getFrameTime()
Get frame time duration. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
General purpose messaging. 
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
virtual bool hasNext()
Check availability of next element. 
 
Utility class to parse command line options. 
 
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name. 
 
#define QAQC(A)
QA/QC output macro. 
 
alias put_queue eval echo n
 
const JLimit & getLimit() const 
Get limit. 
 
KM3NeT DAQ constants, bit handling, etc. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
 
size_t getSizeof(const JDAQEvent &object)
Get size of object. 
 
int qaqc
QA/QC file descriptor. 
 
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters. 
 
JTriggerCounter_t next()
Increment trigger counter. 
 
#define DEBUG(A)
Message macros. 
 
int main(int argc, char *argv[])
 
unsigned int JTriggerbit_t
Type definition of trigger bit.