AlcapDAQ
1
|
#include <TWFDBankReader.h>
Public Member Functions | |
TWFDBankReader (Int_t dbc, Int_t personality, std::string bankname) | |
Int_t | GetDBC () |
Int_t | GetPersonality () |
std::string | GetBankName () |
Int_t | GetNIslands () |
Int_t | GetNBlocks () |
Int_t | GetBlockLength_Words () |
Block length in 4-byte words is 2*DBC + 2 time words. More... | |
Int_t | GetNBlockSamples () |
Number of ADC samples in the block, which is 8*DBC;. More... | |
Int_t | GetNRequestedWords () |
Int_t | GetNReceivedWords () |
Int_t | GetStatus () |
TWFDRawIsland & | at (int index) |
void | ProcessEvent (EVENT_HEADER *pheader, void *pevent) |
void | ClearEvent () |
Protected Member Functions | |
TWFDBankReader () | |
Private Member Functions | |
Bool_t | CheckStatus () |
Bool_t | ReadIslandsLoop () |
Private Attributes | |
Int_t | fDBC |
Int_t | fPersonality |
std::string | fBankName |
DWORD * | fBankPtr |
void * | fEventPtr |
Int_t | fSize |
Int_t | fNRequestedWords |
Int_t | fNReceivedWords |
Int_t | fStatus |
Bool_t | fIsOK |
std::vector< TWFDRawIsland > | fData |
Int_t | fNBlocks |
This class is meant to wrap all dealings with MIDAS Banks for WFDs. No class that needs WFD islands will need to include midas.h This class should not be specific to the TPC or Gondola WFDs. Reusability is the goal. It would be good if this class could avoid accessing the ODB as well.
Definition at line 17 of file TWFDBankReader.h.
|
protected |
Definition at line 10 of file TWFDBankReader.cpp.
TWFDBankReader::TWFDBankReader | ( | Int_t | dbc, |
Int_t | personality, | ||
std::string | bankname | ||
) |
Definition at line 16 of file TWFDBankReader.cpp.
TWFDRawIsland & TWFDBankReader::at | ( | int | index) |
Access the islands after they've been read. Returns a reference like std::vector.
Definition at line 43 of file TWFDBankReader.cpp.
References fData.
|
private |
Performs some status checks on the bank. Returns false and flags fIsOK=false if bank is corrupt.
Definition at line 90 of file TWFDBankReader.cpp.
References fBankName, fIsOK, fNReceivedWords, fNRequestedWords, fSize, fStatus, and GetBlockLength_Words().
Referenced by ProcessEvent().
void TWFDBankReader::ClearEvent | ( | ) |
Clears fData and resets things like fSize. The vector is smart enough to not actually deallocate memory, so no worries about efficiency
Definition at line 191 of file TWFDBankReader.cpp.
References fBankPtr, fData, fEventPtr, fIsOK, fNBlocks, fNReceivedWords, fNRequestedWords, fSize, and fStatus.
Referenced by ProcessEvent().
string TWFDBankReader::GetBankName | ( | ) |
|
inline |
Block length in 4-byte words is 2*DBC + 2 time words.
Definition at line 31 of file TWFDBankReader.cpp.
References fDBC.
Referenced by CheckStatus(), ProcessEvent(), and ReadIslandsLoop().
Int_t TWFDBankReader::GetDBC | ( | ) |
Int_t TWFDBankReader::GetNBlocks | ( | ) |
|
inline |
Number of ADC samples in the block, which is 8*DBC;.
Definition at line 34 of file TWFDBankReader.cpp.
References fDBC.
Referenced by ReadIslandsLoop().
Int_t TWFDBankReader::GetNIslands | ( | ) |
Int_t TWFDBankReader::GetNReceivedWords | ( | ) |
Int_t TWFDBankReader::GetNRequestedWords | ( | ) |
Int_t TWFDBankReader::GetPersonality | ( | ) |
Int_t TWFDBankReader::GetStatus | ( | ) |
void TWFDBankReader::ProcessEvent | ( | EVENT_HEADER * | pheader, |
void * | pevent | ||
) |
Definition at line 45 of file TWFDBankReader.cpp.
References CheckStatus(), ClearEvent(), fBankName, fBankPtr, fEventPtr, fIsOK, fNBlocks, fNReceivedWords, fNRequestedWords, fPersonality, fSize, fStatus, GetBlockLength_Words(), and ReadIslandsLoop().
|
private |
Loops through the bank to accumulate WFD Blocks into fData. Returns false on failure or corruption and flags fIsOK as false.
Definition at line 133 of file TWFDBankReader.cpp.
References adc, blocktime, fBankName, fBankPtr, fData, fIsOK, fNBlocks, GetBlockLength_Words(), and GetNBlockSamples().
Referenced by ProcessEvent().
|
private |
Definition at line 21 of file TWFDBankReader.h.
Referenced by CheckStatus(), GetBankName(), ProcessEvent(), and ReadIslandsLoop().
|
private |
Definition at line 23 of file TWFDBankReader.h.
Referenced by ClearEvent(), ProcessEvent(), and ReadIslandsLoop().
|
private |
Definition at line 32 of file TWFDBankReader.h.
Referenced by at(), ClearEvent(), GetNIslands(), and ReadIslandsLoop().
|
private |
Definition at line 19 of file TWFDBankReader.h.
Referenced by GetBlockLength_Words(), GetDBC(), and GetNBlockSamples().
|
private |
Definition at line 24 of file TWFDBankReader.h.
Referenced by ClearEvent(), and ProcessEvent().
|
private |
Definition at line 30 of file TWFDBankReader.h.
Referenced by CheckStatus(), ClearEvent(), ProcessEvent(), and ReadIslandsLoop().
|
private |
Definition at line 34 of file TWFDBankReader.h.
Referenced by ClearEvent(), GetNBlocks(), ProcessEvent(), and ReadIslandsLoop().
|
private |
Definition at line 28 of file TWFDBankReader.h.
Referenced by CheckStatus(), ClearEvent(), GetNReceivedWords(), and ProcessEvent().
|
private |
Definition at line 27 of file TWFDBankReader.h.
Referenced by CheckStatus(), ClearEvent(), GetNRequestedWords(), and ProcessEvent().
|
private |
Definition at line 20 of file TWFDBankReader.h.
Referenced by GetPersonality(), and ProcessEvent().
|
private |
Definition at line 26 of file TWFDBankReader.h.
Referenced by CheckStatus(), ClearEvent(), and ProcessEvent().
|
private |
Definition at line 29 of file TWFDBankReader.h.
Referenced by CheckStatus(), ClearEvent(), GetStatus(), and ProcessEvent().