|
BmnRoot
|
Singleton buffer class for BMN raw data. More...
#include <BmnDaqBuffer.h>
Public Member Functions | |
| ~BmnDaqBuffer () | |
| Double_t | GetFirstTime () const |
| Double_t | GetFirstTime (Int_t iDet) const |
| Double_t | GetLastTime () const |
| Double_t | GetLastTime (Int_t iDet) const |
| BmnDigi * | GetNextData (Int_t iDet) |
| Pointer to next raw data object for a given detector. | |
| BmnDigi * | GetNextData (Int_t iDet, Double_t time) |
| Int_t | GetSize () const |
| Int_t | GetSize (Int_t det) const |
| void | InsertData (BmnDigi *digi) |
| void | PrintStatus () const |
| std::string | ToString () const |
Static Public Member Functions | |
| static BmnDaqBuffer * | Instance () |
Singleton buffer class for BMN raw data.
This class manages and provides access to buffers of type BmnMCPointBuffer - one for each detector.
The BmnDaqBuffer stores and sorts (w.r.t. time) BMN raw data (currently: BmnDigi) transiently. Data can be send to the buffer by the method InsertData. They can be retrieved by GetNextData, which delivers a time-ordered sequence of raw data objects for each detector.
The buffer handles objects only by pointer, i.e. the data have to be instantiated by the sending task (digitiser) and deleted by the receiving class (BmnDaq).
Definition at line 33 of file BmnDaqBuffer.h.
| BmnDaqBuffer::~BmnDaqBuffer | ( | ) |
Destructor
Definition at line 40 of file BmnDaqBuffer.cxx.
| Double_t BmnDaqBuffer::GetFirstTime | ( | ) | const |
Time of first data for all detectors
Definition at line 47 of file BmnDaqBuffer.cxx.
References GetFirstTime(), GetSize(), kNOFDETS, and kREF.
Referenced by GetFirstTime(), PrintStatus(), and ToString().
| Double_t BmnDaqBuffer::GetFirstTime | ( | Int_t | iDet | ) | const |
Time of first data for a given detector
| iDet | detector type (e.g. kSSD) |
Definition at line 66 of file BmnDaqBuffer.cxx.
| Double_t BmnDaqBuffer::GetLastTime | ( | ) | const |
Time of last data for all detectors
Definition at line 77 of file BmnDaqBuffer.cxx.
References GetLastTime(), GetSize(), kNOFDETS, and kREF.
Referenced by GetLastTime(), PrintStatus(), and ToString().
| Double_t BmnDaqBuffer::GetLastTime | ( | Int_t | iDet | ) | const |
Time of last data for a given detector
| iDet | detector type (e.g. kSSD) |
Definition at line 96 of file BmnDaqBuffer.cxx.
| BmnDigi * BmnDaqBuffer::GetNextData | ( | Int_t | iDet | ) |
Pointer to next raw data object for a given detector.
| iDet | detector type (DetectorId) |
Definition at line 107 of file BmnDaqBuffer.cxx.
References kNOFDETS.
| BmnDigi * BmnDaqBuffer::GetNextData | ( | Int_t | iDet, |
| Double_t | time | ||
| ) |
Pointer to next raw data object for a given detector up to given time
| iDet | detector type (e.g. kSSD) |
| time | maximal time [ns] |
If the argument time is negative, no time limit is set.
Definition at line 132 of file BmnDaqBuffer.cxx.
References BmnDigi::GetTime(), and kNOFDETS.
| Int_t BmnDaqBuffer::GetSize | ( | ) | const |
Current buffer size
Definition at line 160 of file BmnDaqBuffer.cxx.
References kNOFDETS, and kREF.
Referenced by GetFirstTime(), GetFirstTime(), GetLastTime(), GetLastTime(), PrintStatus(), and ToString().
| Int_t BmnDaqBuffer::GetSize | ( | Int_t | det | ) | const |
Current buffer size for given detector
| det | Detector system (e.g. kSSD) |
Definition at line 173 of file BmnDaqBuffer.cxx.
References kNOFDETS.
| void BmnDaqBuffer::InsertData | ( | BmnDigi * | digi | ) |
Insert data into the buffer
| digi | pointer to data object to be inserted |
Definition at line 182 of file BmnDaqBuffer.cxx.
References BmnDigi::GetAddress(), BmnDigi::GetSystemId(), BmnDigi::GetTime(), and kNOFDETS.
Referenced by BmnDigitize::SendDigi().
|
static |
Access to singleton instance
Definition at line 204 of file BmnDaqBuffer.cxx.
| void BmnDaqBuffer::PrintStatus | ( | ) | const |
Print buffer status
Definition at line 213 of file BmnDaqBuffer.cxx.
References GetFirstTime(), GetLastTime(), BmnModuleList::GetModuleNameCaps(), GetSize(), kNOFDETS, and kREF.
| string BmnDaqBuffer::ToString | ( | ) | const |
Status string
Definition at line 236 of file BmnDaqBuffer.cxx.
References GetFirstTime(), GetLastTime(), BmnModuleList::GetModuleNameCaps(), GetSize(), kNOFDETS, and kREF.