Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcPeriodicReport.cxx
Go to the documentation of this file.
1
53#include "THcPeriodicReport.h"
54
55#include <iostream>
56
57using namespace std;
58
59//_____________________________________________________________________________
60THcPeriodicReport::THcPeriodicReport(const char *name, const char *description,
61 const char *templatefile,
62 const char *ofile)
63 : THaPhysicsModule(name, description), fTimePeriod(2), fEventPeriod(0),
64 fDoPrint(kFALSE), fAnalyzer(0) {
65 // Constructor
66 fTemplateFilename = templatefile;
67 fOutputFilename = ofile;
68}
69//_____________________________________________________________________________
73//_____________________________________________________________________________
75 // Standard initialization. Calls this object's DefineVariables().
76 if (THaPhysicsModule::Init(run_time) != kOK)
77 return fStatus;
78
80 return fStatus = kOK;
81}
82//_____________________________________________________________________________
84 fDoPrint = kTRUE; // Generate report on first event
87
88 return 0;
89}
90//_____________________________________________________________________________
92 // Print out the report a final time
94
95 return 0;
96}
97//_____________________________________________________________________________
99 UInt_t now = TDatime().Convert();
101 if (!fDoPrint && (fTimePeriod > 0) &&
102 ((now - fLastPrintTime) >= fTimePeriod)) {
103 fDoPrint = kTRUE;
104 }
105 if (!fDoPrint && (fEventPeriod > 0) && (fEventsSincePrint >= fEventPeriod)) {
106 fDoPrint = kTRUE;
107 }
108 if (fDoPrint) {
109 fLastPrintTime = now;
111 PrintReport();
113 }
114 return (0);
115}
116//_____________________________________________________________________________
int Int_t
unsigned int UInt_t
const Bool_t kFALSE
const Bool_t kTRUE
ClassImp(VDC::AnalyticTTDConv) using namespace std
UInt_t Convert(Bool_t toGMT=kFALSE) const
static THaAnalyzer * GetInstance()
Hall C analyzer class.
Definition THcAnalyzer.h:12
void PrintReport(const char *templatefile, const char *ofile)
A physics module to generate periodic reports from a template.
THcPeriodicReport(const char *name, const char *description, const char *templatefile, const char *ofile)
A constructor.
virtual Int_t Process(const THaEvData &)
virtual ~THcPeriodicReport()
A destructor.
THcAnalyzer * fAnalyzer
virtual Int_t Begin(THaRunBase *r=0)
virtual Int_t End(THaRunBase *r=0)
STL namespace.