Diana Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MQinoDataReader Class Reference

Milano-DAQ binary data reader. More...

Inheritance diagram for MQinoDataReader:
QReader QBaseModule QModuleTimeProfiling

Public Member Functions

 MQinoDataReader ()
 
virtual ~MQinoDataReader ()
 
void Init (QEventAssembler &evi)
 Init method is called before event loop, getting the QEventAssembler as argument This method must be implemented by inheriting classes. More...
 
bool Do (QEventAssembler &evi)
 Do method is called for each event, getting the QEventAssembler as argument. This method must be implemented by inheriting classes. More...
 
void Done ()
 Done method is called after event loop. This method must be implemented by inheriting classes. More...
 
const QErrorJumpToEvent (Long64_t event)
 Called when another module ask for a specific eventnumber in the next Do(). Implementation of this method is optional. More...
 
- Public Member Functions inherited from QReader
 QReader ()
 constructor More...
 
virtual ~QReader ()
 destructor More...
 
const int & GetFileNumber ()
 Get Current file number, used by QWriter (throug QSequence) More...
 
bool DoBase (QEventAssembler &eva)
 DoBase executes Do, and is called by QNeighboursFiller. More...
 
bool NeighboursOn ()
 
- Public Member Functions inherited from QBaseModule
 QBaseModule (Type type)
 constructor More...
 
virtual ~QBaseModule ()
 constructor More...
 
double GetDouble (const std::string &parname, double defVal, bool warnCfg=true) const
 Get a double parameter from config file. More...
 
std::vector< double > GetVectorDouble (const std::string &parname, std::vector< double > defVal, bool warnCfg=true) const
 Get a std::vector<double> parameter from config file with syntax "{x,y,z}". More...
 
int GetInt (const std::string &parname, int defVal, bool warnCfg=true) const
 Get an int parameter from config file ( see GetDouble() ) More...
 
std::vector< int > GetVectorInt (const std::string &parname, std::vector< int > defVal, bool warnCfg=true) const
 Get an vector<int> parameter from config file ( see GetVectorDouble() ) More...
 
bool GetBool (const std::string &parname, bool defVal, bool warnCfg=true) const
 Get a bool parameter from config file ( see GetDouble() ) More...
 
std::vector< bool > GetVectorBool (const std::string &parname, std::vector< bool > defVal, bool warnCfg=true) const
 Get a vector<bool> parameter from config file ( see GetVectorDouble() ) More...
 
const std::string & GetString (const std::string &parname, const std::string &defVal, bool warnCfg=true) const
 Get a string parameter from config file ( see GetDouble() ) More...
 
std::vector< std::string > GetVectorString (const std::string &parname, std::vector< std::string > defVal, bool warnCfg=true) const
 Get a vector<string> parameter from config file ( see GetVectorDouble() ) More...
 
void Debug (const char *descr,...) const
 Send a debug message (used to debug the module) with printf syntax. More...
 
void Info (const char *descr,...) const
 Send an info message (information) with printf syntax. More...
 
void Warn (const char *descr,...) const
 Send a warning message (an error that the framework can recover) with printf syntax. More...
 
void Error (const char *descr,...) const
 Send an error message (an error that the framework cannot recover) with printf syntax. More...
 
void Panic (const char *descr,...) const
 Send a panic message (stops the framework) with printf syntax. More...
 
const QGlobalDataManagerGlobalData () const
 interface for saving and loading global QObjects More...
 
bool GetRunAgain () const
 Check if the sequence will be reiterated. More...
 
void SetRunAgain (bool b)
 Set that the sequence will be reiterated. More...
 
unsigned int GetIteration () const
 Get Current sequence iteration. More...
 
unsigned int GetOccurrence () const
 get the number of times the same module is loaded inside a QSequence More...
 
bool isEnabled () const
 check if module is enabled More...
 
std::string GetFullPath () const
 Get Full Path of module "GetName() + "." + GetOccurrence". More...
 
const std::string & GetName () const
 Get Module name. More...
 
const std::string & GetLabel () const
 Get Module name + the optional ExtraLabel ("name_extralabel") More...
 
MsgLevel GetVerbosity ()
 get verbosity level set from config file More...
 
const QSequenceGetSequence () const
 get reference to this sequence More...
 
void Update (QSequence *s, unsigned int occurrence)
 set the occurrence in the same sequence. MV FIXME: should not be public More...
 
bool NeedNeighbours ()
 check wheter this module needs neighbours (available after the first event is processed) More...
 
void BeginBase (QEventAssembler &ev)
 Begin Base method is called before event loop. More...
 
bool ProcessBase (QEventAssembler &ev, QEventList &evl, const bool exec, QEventList &ovl)
 ProcessBase method is called for each event, getting the event and as argument. More...
 
void EndBase ()
 EndBase method is called after event loop. More...
 
const std::vector< QEventLabel > & GetRequiredLabels () const
 Get labels of objects required by this module. More...
 

Private Member Functions

void NewRun ()
 read header whenever tha run is changed More...
 

Private Attributes

float fMinAdcRange
 
float fMaxAdcRange
 
int fNumSamples
 
float fSamplingFrequency
 
Int_t frecord_size
 
std::string fRunNumber
 
std::vector< QFile_tfiles
 
std::vector< QFile_t >::iterator filesIter
 points to the current partial file of the current measurement More...
 
std::vector< QFile_t >::iterator filesEnd
 points next to the last partial file of the current measurement More...
 
std::vector< std::string >::iterator fIter
 iterator on QReader file list. It it incremented whenever the run is changed More...
 
std::string fFileUName
 file name in the file list of QReader. Modified whenever the run (not the partial measurement!) changes More...
 
gzFile fCurrentFile
 current partial measurement file More...
 
int fRunEventNumber
 number of events read for the current run More...
 
struct QFile_t f
 
std::string fName
 
std::string fDate
 
size_t fPreTriggerSamples
 
size_t fIsNoise
 
bool fDebugOn
 Add variables for debug to the event. More...
 
DetectorName fDetector
 Current detector. More...
 
char * fTimeZone
 Time zone from TZ environment variable. More...
 
unsigned int fEventNumber
 
int fPartialToJump
 

Friends

class MQinoCompleteDataReader
 
class MQinoMiCompleteDataReader
 

Additional Inherited Members

- Public Types inherited from QBaseModule
enum  Type {
  Module , Filter , Reader , Writer ,
  Driver
}
 
- Static Public Member Functions inherited from QReader
static std::list< std::string > GetFilesList ()
 list of input files More...
 
- Protected Member Functions inherited from QReader
void InitFileManager ()
 Initialize multiple and single file management. More...
 
void OpenNewFile (const std::string &fileName)
 Call it when opening new file. More...
 
- Protected Member Functions inherited from QBaseModule
QModuleConfigGetConfig ()
 Get module config. More...
 
void SetNeedNeighbours (bool need)
 set wheter this module needs neighbours More...
 
- Protected Member Functions inherited from QModuleTimeProfiling
 QModuleTimeProfiling ()
 ctor initialized internal variables More...
 
virtual ~QModuleTimeProfiling ()
 dtor does nothing More...
 
void SetTimeProfilingOn (bool val)
 Set the time profiling on/off. More...
 
bool GetTimeProfilingOn () const
 Check if the time profiling is on. More...
 
void ResetTimer ()
 Reset the timer to now. More...
 
double GetTimer () const
 return the time since the last reset More...
 
virtual void StartProcessCall ()
 Start of a process call. More...
 
virtual void EndProcessCall ()
 End a process call and increment time and calls. More...
 
unsigned long long GetProcessCalls () const
 Return the total number of process calls. More...
 
double GetTotalProcessTime () const
 Return the total processing time. More...
 
double GetProcessCallTime () const
 Return the average time of a single process call. More...
 
std::string GetTimeProfileReport (const std::string &prefix="") const
 Report the time profiling. More...
 
- Protected Attributes inherited from QReader
int fFileNumber
 current file number read More...
 
std::vector< std::string > fFileList
 list of files More...
 
bool fReadFileList
 read file list More...
 
std::string fFileListPath
 file list path More...
 
unsigned int fProcessedNumber
 events processed More...
 
int fEventNumberPrintStep
 print event number step More...
 
QError fErr
 Error returned by methods. More...
 
QRWCommonfRWCommon
 object to share file names with QWriter More...
 
- Protected Attributes inherited from QBaseModule
bool fExecuted
 
- Protected Attributes inherited from QModuleTimeProfiling
bool fTimeProfilingOn
 Report the time profiling. More...
 
unsigned long long int fProcessCalls
 NUmber of calls to the process. More...
 
double fProcessTime
 Total time spent running the process. More...
 
- Static Protected Attributes inherited from QReader
static std::list< std::string > fFullPathFilesList
 list of files More...
 

Detailed Description

Milano-DAQ binary data reader.

Reads single or multiple ROOT data files

Definition at line 57 of file MQinoDataReader.hh.

Constructor & Destructor Documentation

◆ MQinoDataReader()

MQinoDataReader::MQinoDataReader ( )

Definition at line 23 of file MQinoDataReader.cc.

◆ ~MQinoDataReader()

MQinoDataReader::~MQinoDataReader ( )
virtual

Definition at line 31 of file MQinoDataReader.cc.

Member Function Documentation

◆ Do()

bool MQinoDataReader::Do ( QEventAssembler eva)
virtual

◆ Done()

void MQinoDataReader::Done ( )
virtual

Done method is called after event loop. This method must be implemented by inheriting classes.

Implements QReader.

Definition at line 306 of file MQinoDataReader.cc.

◆ Init()

void MQinoDataReader::Init ( QEventAssembler eva)
virtual

Init method is called before event loop, getting the QEventAssembler as argument This method must be implemented by inheriting classes.

Implements QReader.

Definition at line 43 of file MQinoDataReader.cc.

References QEventAssembler::Add(), QEvent::Add(), DN_UNKNOWN, fSamplingFrequency, and QEventAssembler::GetEvent().

◆ JumpToEvent()

const QError & MQinoDataReader::JumpToEvent ( Long64_t  eventnumber)
virtual

Called when another module ask for a specific eventnumber in the next Do(). Implementation of this method is optional.

Reimplemented from QReader.

Definition at line 68 of file MQinoDataReader.cc.

References QERR_OUT_OF_RANGE, and QERR_SUCCESS.

◆ NewRun()

void MQinoDataReader::NewRun ( )
private

read header whenever tha run is changed

Definition at line 309 of file MQinoDataReader.cc.

References fSamplingFrequency.

Friends And Related Function Documentation

◆ MQinoCompleteDataReader

friend class MQinoCompleteDataReader
friend

Definition at line 137 of file MQinoDataReader.hh.

◆ MQinoMiCompleteDataReader

friend class MQinoMiCompleteDataReader
friend

Definition at line 138 of file MQinoDataReader.hh.

Member Data Documentation

◆ f

struct QFile_t MQinoDataReader::f
private

Definition at line 106 of file MQinoDataReader.hh.

◆ fCurrentFile

gzFile MQinoDataReader::fCurrentFile
private

current partial measurement file

Definition at line 103 of file MQinoDataReader.hh.

◆ fDate

std::string MQinoDataReader::fDate
private

Definition at line 115 of file MQinoDataReader.hh.

◆ fDebugOn

bool MQinoDataReader::fDebugOn
private

Add variables for debug to the event.

Definition at line 124 of file MQinoDataReader.hh.

◆ fDetector

DetectorName MQinoDataReader::fDetector
private

Current detector.

Definition at line 127 of file MQinoDataReader.hh.

◆ fEventNumber

unsigned int MQinoDataReader::fEventNumber
private

Definition at line 132 of file MQinoDataReader.hh.

◆ fFileUName

std::string MQinoDataReader::fFileUName
private

file name in the file list of QReader. Modified whenever the run (not the partial measurement!) changes

Definition at line 100 of file MQinoDataReader.hh.

◆ files

std::vector<QFile_t> MQinoDataReader::files
private

Definition at line 87 of file MQinoDataReader.hh.

◆ filesEnd

std::vector<QFile_t>::iterator MQinoDataReader::filesEnd
private

points next to the last partial file of the current measurement

Definition at line 93 of file MQinoDataReader.hh.

◆ filesIter

std::vector<QFile_t>::iterator MQinoDataReader::filesIter
private

points to the current partial file of the current measurement

Definition at line 90 of file MQinoDataReader.hh.

◆ fIsNoise

size_t MQinoDataReader::fIsNoise
private

Definition at line 121 of file MQinoDataReader.hh.

◆ fIter

std::vector<std::string>::iterator MQinoDataReader::fIter
private

iterator on QReader file list. It it incremented whenever the run is changed

Definition at line 96 of file MQinoDataReader.hh.

◆ fMaxAdcRange

float MQinoDataReader::fMaxAdcRange
private

Definition at line 82 of file MQinoDataReader.hh.

◆ fMinAdcRange

float MQinoDataReader::fMinAdcRange
private

Definition at line 82 of file MQinoDataReader.hh.

◆ fName

std::string MQinoDataReader::fName
private

Definition at line 112 of file MQinoDataReader.hh.

◆ fNumSamples

int MQinoDataReader::fNumSamples
private

Definition at line 83 of file MQinoDataReader.hh.

◆ fPartialToJump

int MQinoDataReader::fPartialToJump
private

Definition at line 135 of file MQinoDataReader.hh.

◆ fPreTriggerSamples

size_t MQinoDataReader::fPreTriggerSamples
private

Definition at line 118 of file MQinoDataReader.hh.

◆ frecord_size

Int_t MQinoDataReader::frecord_size
private

Definition at line 85 of file MQinoDataReader.hh.

◆ fRunEventNumber

int MQinoDataReader::fRunEventNumber
private

number of events read for the current run

Definition at line 106 of file MQinoDataReader.hh.

◆ fRunNumber

std::string MQinoDataReader::fRunNumber
private

Definition at line 86 of file MQinoDataReader.hh.

◆ fSamplingFrequency

float MQinoDataReader::fSamplingFrequency
private

Definition at line 84 of file MQinoDataReader.hh.

◆ fTimeZone

char* MQinoDataReader::fTimeZone
private

Time zone from TZ environment variable.

Definition at line 130 of file MQinoDataReader.hh.


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