MApolloHistoMaker Class Reference

Inheritance diagram for MApolloHistoMaker:

QModule QModule QBaseModule 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
  • Config example:
        module MApolloHistoMaker
        verbosity = info
        enable = true
        gh_rate = true
        ch_spectrum = true
        DataPath = /tmp/apollo
        LockFile = apollo.lock
        ConfigFile = apollo.config
        endmod
        
  • Parameters (with data type and default value)
    • gh_rate [bool = true] counting rate histogram
    • ch_spectrum [bool = true] channel based voltage amplitude spectrum
    • ch_pulse [bool = true] last pulse for each existing channel
    • DataPath [string = ""] path for the root file containing histograms, the config file and the lock file (see next items). If this variable is not set, MApolloHistoMaker tries to extract it from enironment variable named APOLLO_GUI_TMPFILES. Histograms won't be dumped if neither this variable nor config file variable are defined.
    • LockFile [string = apollo.lock] this is the file that is used for communication between this class and histogram display process
    • ConfigFile [string = apollo.config] this file (written by histogram display process) contains the channel number for which histograms will be dumped
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)
 ctor
virtual ~MApolloHistoMaker ()
 dtor
virtual void Init ()
 Init.
virtual QEventDo (QEvent *ev)
 do
virtual void Done ()
 Done.
 MApolloHistoMaker (QSequence *s)
 ctor
virtual ~MApolloHistoMaker ()
 dtor
virtual void Init ()
 Init.
virtual QEventDo (QEvent *ev)
 do
virtual void Done ()
 Done.

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
void UpdateFile ()
 update output file
void DeleteHistograms ()
 delete all existing histograms and clear maps
void GetListOfChannels (std::list< unsigned int > &channels)
 get (sorted) list of active channels from db
bool CreateHistograms ()
 create new histograms based on config file options
void FillHistograms (const QEvent *event)
 fill all existing histograms with informations from current event
void UpdateFile ()
 update output file
void DeleteHistograms ()
 delete all existing histograms and clear maps
void GetListOfChannels (std::list< unsigned int > &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
int fSpectrumMaxMv
double fSpectrumBinWidthMv
std::map
< QApolloMonitorDefs::QMonitorEventType_t,
TH1F * > 
fGhRate
Double_t fTimeOfLastEventSec
std::map< unsigned int,
std::map
< QApolloMonitorDefs::QMonitorEventType_t,
TH1F * > > 
fChSpectra
std::map< unsigned int,
QEventInfo_t
fChPulses
QMonitorHistogramWriterfWriter
QMonitorConfigHandlerfConfigHandler

Classes

struct  QEventInfo_t
 stores informations on the last event for each channel More...

Member Function Documentation

bool MApolloHistoMaker::CreateHistograms (  )  [private]

bool MApolloHistoMaker::CreateHistograms (  )  [private]

create new histograms based on config file options

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


Member Data Documentation

std::string MApolloHistoMaker::fPath [private]

output directory path

Referenced by Init(), and UpdateFile().

std::string MApolloHistoMaker::fCfgFile [private]

config file name

Referenced by Init().

std::string MApolloHistoMaker::fLockFile [private]

lockfile name

Referenced by Init().

true if at least one histogram exist

Referenced by Do(), Done(), and Init().

whether this is the 1st event to be processed

Referenced by Do(), and Init().

int MApolloHistoMaker::fRun [private]

current run number

Referenced by Do(), and GetListOfChannels().

logical channel requested by ApolloGui

Referenced by Do(), and UpdateFile().

upper bound of energy spectrum in mV

Referenced by CreateHistograms(), and Init().

bin width for energy spectrum in mV

Referenced by CreateHistograms(), and Init().

key: event type, value: ptr to histogram with event rate

Referenced by CreateHistograms(), DeleteHistograms(), FillHistograms(), and UpdateFile().

time of last event in seconds (used for event rate evaluation)

Referenced by FillHistograms(), and UpdateFile().

std::map< unsigned int, std::map< QApolloMonitorDefs::QMonitorEventType_t, TH1F * > > MApolloHistoMaker::fChSpectra [private]

key: logical channel value: another map

  • key: eventType
  • value: ptr to histogram with amplitude spectrum

Referenced by CreateHistograms(), DeleteHistograms(), FillHistograms(), and UpdateFile().

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

key: lg channel, value: struct containing info on last pulse

Referenced by CreateHistograms(), DeleteHistograms(), FillHistograms(), and UpdateFile().

root file handler

Referenced by Do(), UpdateFile(), and ~MApolloHistoMaker().

config file handler

Referenced by Do(), Init(), UpdateFile(), and ~MApolloHistoMaker().


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

Generated on Tue Nov 16 10:50:01 2010 for CUORE Software by  doxygen 1.5.6