Hall C ROOT/C++ Analyzer (hcana)
THcPeriodicReport Class Reference

A physics module to generate periodic reports from a template.

This class is a physics module, but does not do analysis. It repeatedly outputs a report file from a template using an event count or time based period. This report file could be displayed or used by a GUI to show a realtime status of an analysis.

The THcAnalyzer::PrintReport method is used to generate the report. By default this report is generated every two seconds.

Definition at line 13 of file THcPeriodicReport.h.

Public Member Functions

virtual Int_t Begin (THaRunBase *r=0)
 
virtual Int_t End (THaRunBase *r=0)
 
virtual EStatus Init (const TDatime &run_time)
 
void PrintReport ()
 
virtual Int_t Process (const THaEvData &)
 
virtual void SetEventPeriod (Int_t ev)
 Set report print out periodicity. More...
 
virtual void SetTimePeriod (UInt_t t)
 Set report print out periodicity. More...
 
 THcPeriodicReport (const char *name, const char *description, const char *templatefile, const char *ofile)
 Construct the period report generator. More...
 
virtual ~THcPeriodicReport ()
 A destructor. More...
 

Protected Attributes

THcAnalyzerfAnalyzer
 
Bool_t fDoPrint
 
Int_t fEventPeriod
 
Int_t fEventsSincePrint
 
UInt_t fLastPrintTime
 
TString fOutputFilename
 
TString fTemplateFilename
 
UInt_t fTimePeriod
 

#include <THcPeriodicReport.h>

Inheritance diagram for THcPeriodicReport:

Constructor & Destructor Documentation

THcPeriodicReport::THcPeriodicReport ( const char *  name,
const char *  description = "",
const char *  templatefile,
const char *  ofile 
)

Construct the period report generator.

Parameters
[in]nameName of the apparatus. Is typically named after spectrometer whose trigger data is collecting; like "HMS".
[in]descriptionDescription of the report
[in]templatefileName of file containing report templte
[in]ofileFile to write the report to

Definition at line 45 of file THcPeriodicReport.cxx.

THcPeriodicReport::~THcPeriodicReport ( )
virtual

A destructor.

Definition at line 55 of file THcPeriodicReport.cxx.

Member Function Documentation

Int_t THcPeriodicReport::Begin ( THaRunBase *  r = 0)
virtual

Definition at line 68 of file THcPeriodicReport.cxx.

Int_t THcPeriodicReport::End ( THaRunBase *  r = 0)
virtual

Definition at line 76 of file THcPeriodicReport.cxx.

THaAnalysisObject::EStatus THcPeriodicReport::Init ( const TDatime run_time)
virtual

Definition at line 59 of file THcPeriodicReport.cxx.

void THcPeriodicReport::PrintReport ( )

Definition at line 102 of file THcPeriodicReport.cxx.

Int_t THcPeriodicReport::Process ( const THaEvData )
virtual

Definition at line 83 of file THcPeriodicReport.cxx.

void THcPeriodicReport::SetEventPeriod ( Int_t  ev)
inlinevirtual

Set report print out periodicity.

Parameters
[in]evPrint out report every ev events

Definition at line 33 of file THcPeriodicReport.h.

void THcPeriodicReport::SetTimePeriod ( UInt_t  t)
inlinevirtual

Set report print out periodicity.

Parameters
[in]tPrint out report ever t seconds

Definition at line 41 of file THcPeriodicReport.h.

Member Data Documentation

THcAnalyzer* THcPeriodicReport::fAnalyzer
protected

Definition at line 49 of file THcPeriodicReport.h.

Bool_t THcPeriodicReport::fDoPrint
protected

Definition at line 48 of file THcPeriodicReport.h.

Int_t THcPeriodicReport::fEventPeriod
protected

Definition at line 47 of file THcPeriodicReport.h.

Int_t THcPeriodicReport::fEventsSincePrint
protected

Definition at line 45 of file THcPeriodicReport.h.

UInt_t THcPeriodicReport::fLastPrintTime
protected

Definition at line 44 of file THcPeriodicReport.h.

TString THcPeriodicReport::fOutputFilename
protected

Definition at line 51 of file THcPeriodicReport.h.

TString THcPeriodicReport::fTemplateFilename
protected

Definition at line 50 of file THcPeriodicReport.h.

UInt_t THcPeriodicReport::fTimePeriod
protected

Definition at line 46 of file THcPeriodicReport.h.

Collaboration diagram for THcPeriodicReport:

The documentation for this class was generated from the following files: