MApolloHistoMaker Class Reference

Inheritance diagram for MApolloHistoMaker:

QModule QBaseModule List of all members.

Detailed Description

create histograms for online measurement monitor. Histograms are saved into a temporary file.

Author:
sergio.didomizio@ge.infn.it

Histogram prefixed with "gh" are General Histograms, while those prefixed with "ch" are Channel-based Histogram (i.e. one separate histogram for each active channel. gh histograms are named as the config file variable name (e.g. gh_rate). ch histograms are named as the config file variable name with the channel number appended (e.g. ch_specturm_0023 for channel 23).


Public Member Functions

 MApolloHistoMaker (QSequence *s)
virtual void Init ()
 Init method is called before event loop.
virtual QEventDo (QEvent *ev)
 Doit method is called for each event, getting the event as argument.
virtual void Done ()
 Done method is called after event loop.

Private Member Functions

bool CreateHistograms ()
 create new histograms based on config file options
void FillHistograms (const QEvent *event)
 fill all existing histograms with informations from current event
bool CheckUpdate ()
 check wether someone is waiting for histograms update
void UpdateFile ()
 update output file
void DeleteHistograms ()
 delete all existing histograms and clear maps
void GetListOfChannels (std::list< unsigned short > &channels)
 get (sorted) list of active channels from db

Private Attributes

std::string fPath
std::string fCfgFile
std::string fLockFile
bool fDoHistos
bool fFirstEvent
int fRun
int fCurrentChannel
time_t fLastUpdate
std::vector< unsigned short > fLgList
TH1F * fGhRate
TH1D * fGhTime
 fake histogram to store timing informations
std::map< unsigned short,
TH1F * > 
fChSpectra
std::map< unsigned short,
QEventInfo_t > 
fChPulses

Classes

struct  QEventInfo_t


Member Function Documentation

bool MApolloHistoMaker::CreateHistograms (  )  [private]

create new histograms based on config file options

Returns:
true if at least one histogram has been created, false otherwise

bool MApolloHistoMaker::CheckUpdate (  )  [private]

check wether someone is waiting for histograms update

Returns:
true if histogram update is being requested, false if not
An update is requested if in the directory specified by fPath there is a file named fLockFile. If this file exist the following operations are performed:


Member Data Documentation

std::string MApolloHistoMaker::fPath [private]

output directory path

std::string MApolloHistoMaker::fCfgFile [private]

config file name

std::string MApolloHistoMaker::fLockFile [private]

lockfile name

bool MApolloHistoMaker::fDoHistos [private]

true if at least one histogram exist

TH1F* MApolloHistoMaker::fGhRate [private]

counting rate histogram

TH1D* MApolloHistoMaker::fGhTime [private]

fake histogram to store timing informations

The meaning of each bin is:

std::map<unsigned short,TH1F*> MApolloHistoMaker::fChSpectra [private]

amplitude specturm

std::map<unsigned short,QEventInfo_t> MApolloHistoMaker::fChPulses [private]

last pulse


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:41 2009 for CUORE Software by  doxygen 1.5.1