#include <string>
#include <iostream>
#include <iomanip>
#include <limits>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "km3net-dataformat/online/JDAQPMTIdentifier.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JGizmo/JManager.hh"
#include "Jeep/JeepToolkit.hh"
#include "JLang/JObjectMultiplexer.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to histogram KM3NETDAQ::JDAQTimeslice. 
- Author
 - mdejong 
 
Definition in file examples/JDAQ/JDAQTimeslice.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 31 of file examples/JDAQ/JDAQTimeslice.cc.
   38   JLimit_t&         numberOfEvents = inputFile.getLimit();
 
   45     JParser<> zap(
"Example program to histogram timeslice data.");
 
   49     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   55   catch(
const exception& error) {
 
   56     FATAL(error.what() << endl);
 
   63   JManager<string, TH1D> h0(
new TH1D(
"h0[%]", NULL, numeric_limits<JDAQHit::JPMT_t>::max(), -0.5, numeric_limits<JDAQHit::JPMT_t>::max() - 0.5));
 
   64   JManager<string, TH1D> h1(
new TH1D(
"h1[%]", NULL, numeric_limits<JDAQHit::JTOT_t>::max(), -0.5, numeric_limits<JDAQHit::JTOT_t>::max() - 0.5));
 
   73   for (
counter_type counter = 0; in.hasNext(); ++counter) {
 
   75     STATUS(
"event: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
   79     for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
 
   83           h0[
getClassname(timeslice->GetName())]->Fill(hit->getPMT());
 
   84           h1[
getClassname(timeslice->GetName())]->Fill(hit->getToT());
 
   85           h2[
getClassname(timeslice->GetName())]->Fill(hit->getT());