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

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.

[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 ( )

A destructor.

Definition at line 55 of file THcPeriodicReport.cxx.

Member Function Documentation

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

Definition at line 68 of file THcPeriodicReport.cxx.

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

Definition at line 76 of file THcPeriodicReport.cxx.

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

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 )

Definition at line 83 of file THcPeriodicReport.cxx.

void THcPeriodicReport::SetEventPeriod ( Int_t  ev)

Set report print out periodicity.

[in]evPrint out report every ev events

Definition at line 33 of file THcPeriodicReport.h.

void THcPeriodicReport::SetTimePeriod ( UInt_t  t)

Set report print out periodicity.

[in]tPrint out report ever t seconds

Definition at line 41 of file THcPeriodicReport.h.

Member Data Documentation

THcAnalyzer* THcPeriodicReport::fAnalyzer

Definition at line 49 of file THcPeriodicReport.h.

Bool_t THcPeriodicReport::fDoPrint

Definition at line 48 of file THcPeriodicReport.h.

Int_t THcPeriodicReport::fEventPeriod

Definition at line 47 of file THcPeriodicReport.h.

Int_t THcPeriodicReport::fEventsSincePrint

Definition at line 45 of file THcPeriodicReport.h.

UInt_t THcPeriodicReport::fLastPrintTime

Definition at line 44 of file THcPeriodicReport.h.

TString THcPeriodicReport::fOutputFilename

Definition at line 51 of file THcPeriodicReport.h.

TString THcPeriodicReport::fTemplateFilename

Definition at line 50 of file THcPeriodicReport.h.

UInt_t THcPeriodicReport::fTimePeriod

Definition at line 46 of file THcPeriodicReport.h.

Collaboration diagram for THcPeriodicReport:

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