QMonitorHistogramWriter Class Reference

List of all members.


Detailed Description

writes histograms and other quantities that are used for online measurement monitoring

Author:
Sergio Di Domizio Data written by this object is meant to be read by the corresponding reader contained in the apollogui package (QMonitorHistogramReader).
All pointers to histograms set to be written by this object need to be valid at the moment when the Write() method is called.
Bare variables are stored into a TH1D, after being casted to Double_t. The histogram is created internally when the Write() method is called.

Public Member Functions

 QMonitorHistogramWriter ()
 ctor
virtual ~QMonitorHistogramWriter ()
 dtor
bool Write (const std::string &fileName)
 write root file and call Reset()
const QErrorGetError () const
 get QError associated to the last failed operation
bool SetTimeSec (Double_t timeSec)
 set time from run start in s
bool SetTimeUnix (time_t timeUnix)
 set time of event in unix time format
bool SetSamplingRate (Int_t rate)
 set ADC sampling rate
bool SetLgChannel (Int_t channel)
 set logical channel
bool SetEventType (QApolloMonitorDefs::QMonitorEventType_t type)
 set event type
bool SetPulse (const TH1F *pulse)
 set histogram containing waveform
bool SetRateHistogram (const TH1F *rateHisto, QApolloMonitorDefs::QMonitorEventType_t type)
 set counting rate histogram for events of the given type
bool SetSpectrum (const TH1F *spectrum, QApolloMonitorDefs::QMonitorEventType_t type)
 set amplitude spectrum for events of the given type
void Reset ()
 reset maps containig object to be written to file

Private Member Functions

void ResetError ()

Private Attributes

QError fError
std::map
< QApolloMonitorDefs::QMonitorVariable_t,
Double_t > 
fBareVariables
std::map< std::string, const
TH1F * > 
fHistograms
TH1D fVariablesHisto

Member Function Documentation

void QMonitorHistogramWriter::ResetError (  )  [inline, private]


Member Data Documentation

error associated to last failed operation

Referenced by GetError(), ResetError(), SetPulse(), SetRateHistogram(), SetSpectrum(), and Write().

key: variable name, value: variable value

Referenced by Reset(), SetEventType(), SetLgChannel(), SetSamplingRate(), SetTimeSec(), SetTimeUnix(), and Write().

std::map<std::string, const TH1F*> QMonitorHistogramWriter::fHistograms [private]

key: name of histogram as it is known in the root file
value: pointer to histogram

Referenced by Reset(), SetPulse(), SetRateHistogram(), SetSpectrum(), and Write().

Histogram used to store bare variables.
The meaning of the i-th bin is defined by the QMonitorVariable_t enum.
Variables whose value was not set have the corresponding bin content set to Q_DOUBLE_DEFAULT.

Referenced by QMonitorHistogramWriter(), and Write().


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

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