QMonitorHistogramReader Class Reference

List of all members.


Detailed Description

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

Author:
Sergio Di Domizio Data read by this object is written by the corresponding writer contained in the moddaq package (QMonitorHistogramWriter)

Public Member Functions

 QMonitorHistogramReader ()
 ctor
virtual ~QMonitorHistogramReader ()
 dtor
bool Read (const std::string &fileName)
 read root file
void Close ()
const QErrorGetError () const
 get QError associated to the last failed operation
bool GetTimeSec (Double_t &timeSec)
 get time from run start in s
bool GetTimeUnix (time_t &timeUnix)
 get time of run start in unix time format
bool GetSamplingRate (UInt_t &rate)
 get ADC sampling rate
bool GetLgChannel (Int_t &channel)
 get logical channel
bool GetEventType (QApolloMonitorDefs::QMonitorEventType_t &type)
 get event type
bool GetPulse (TH1F &pulse)
 get histogram containing waveform
bool GetRateHistogram (TH1F &rateHisto, QApolloMonitorDefs::QMonitorEventType_t type)
 get counting rate histogram for events of the given type
bool GetSpectrum (TH1F &spectrum, QApolloMonitorDefs::QMonitorEventType_t type)
 get amplitude spectrum for events of the given type

Private Member Functions

bool CheckOpen ()
 check whether file is open
void ResetError ()
bool GetVariable (QApolloMonitorDefs::QMonitorVariable_t var, Double_t &val)
const TH1 * GetHistogram (const std::string &hName)
 read histogram whose key in root file is hName

Private Attributes

QError fError
TFile * fFile
TH1D fVariablesHisto

Member Function Documentation

bool QMonitorHistogramReader::CheckOpen (  )  [private]

check whether file is open

Returns:
true on success. On failure fError is set.

References fError, fFile, ResetError(), and QError::Set().

Referenced by GetHistogram(), and GetVariable().

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

reset internal error

References fError, and QError::Set().

Referenced by CheckOpen(), GetHistogram(), GetVariable(), and Read().

bool QMonitorHistogramReader::GetVariable ( QApolloMonitorDefs::QMonitorVariable_t  var,
Double_t &  val 
) [private]

get varible named var from fVariablesHisto

References CheckOpen(), fError, fVariablesHisto, ResetError(), and QError::Set().

Referenced by GetEventType(), GetLgChannel(), GetSamplingRate(), GetTimeSec(), and GetTimeUnix().

const TH1 * QMonitorHistogramReader::GetHistogram ( const std::string &  hName  )  [private]

read histogram whose key in root file is hName

Returns:
valid pointer on success or NULL on failure

References CheckOpen(), fError, fFile, ResetError(), and QError::Set().

Referenced by GetPulse(), GetRateHistogram(), GetSpectrum(), and Read().


Member Data Documentation

error associated to last failed operation

Referenced by CheckOpen(), GetError(), GetHistogram(), GetRateHistogram(), GetSpectrum(), GetVariable(), Read(), and ResetError().

input file handler

Referenced by CheckOpen(), GetHistogram(), and Read().

Histogram used to store bare variables.
This histogram is read once when the Read() method is called and is used to extract bare variables until the file is closed or Read() is called again.

Referenced by GetVariable(), and Read().


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