#include <VFATFrame.h>
Public Types | |
typedef uint16_t | word |
Public Member Functions | |
virtual bool | channelActive (unsigned char channel) const |
virtual bool | checkCRC () const |
bool | checkFootprint () const |
virtual std::vector< unsigned char > | getActiveChannels () const |
VFATFrame::word | getBC () const |
Returns Bunch Crossing number (BC<11:0>). More... | |
VFATFrame::word | getChipID () const |
Returns ChipID (ChipID<11:0>). More... | |
VFATFrame::word | getCRC () const |
Returns the CRC. More... | |
VFATFrame::word * | getData () |
VFATFrame::word | getEC () const |
Returns Event Counter (EV<7:0>). More... | |
VFATFrame::word | getFlags () const |
Returns flags. More... | |
bool | isBCPresent () const |
Returns true if the BC word is present in the frame. More... | |
bool | isCRCPresent () const |
Returns true if the CRC word is present in the frame. More... | |
bool | isECPresent () const |
Returns true if the EC word is present in the frame. More... | |
bool | isIDPresent () const |
Returns true if the ID word is present in the frame. More... | |
void | Print (bool binary=false) const |
void | setData (const word *_data) |
Copies a memory block to data buffer. More... | |
VFATFrame (const word *_data=NULL) | |
VFATFrame (const VFATFrame ©) | |
virtual | ~VFATFrame () |
Static Public Member Functions | |
static word | calculateCRC (word crc_in, word dato) |
internaly used to check CRC More... | |
Public Attributes | |
word | daqErrorFlags |
Error flag as given by certain versions of DAQ. More... | |
word | data [12] |
word | presenceFlags |
Representation of VFAT frame plus extra info added by DAQ.
Definition at line 19 of file VFATFrame.h.
typedef uint16_t VFATFrame::word |
Definition at line 22 of file VFATFrame.h.
Definition at line 18 of file VFATFrame.cc.
References data, and setData().
|
inline |
Definition at line 27 of file VFATFrame.h.
References daqErrorFlags, data, presenceFlags, and setData().
|
inlinevirtual |
Definition at line 34 of file VFATFrame.h.
|
static |
internaly used to check CRC
Definition at line 99 of file VFATFrame.cc.
References ztail::d, i, and findQualityFiles::v.
Referenced by checkCRC().
|
inlinevirtual |
Checks if channel number 'channel' was active. Returns positive number if it was active, 0 otherwise.
Definition at line 109 of file VFATFrame.h.
References data.
|
virtual |
Checks the validity of frame (CRC and daqErrorFlags). Returns false if daqErrorFlags is non-zero. Returns false if the CRC is present and invalid.
Definition at line 78 of file VFATFrame.cc.
References calculateCRC(), daqErrorFlags, data, i, and isCRCPresent().
Referenced by Print(), and RawToDigiConverter::RunCommon().
bool VFATFrame::checkFootprint | ( | ) | const |
Checks the fixed bits in the frame. Returns false if any of the groups (in BC, EC and ID words) is present but wrong.
Definition at line 62 of file VFATFrame.cc.
References data, isBCPresent(), isECPresent(), and isIDPresent().
Referenced by Print(), and RawToDigiConverter::RunCommon().
|
virtual |
Returns list of active channels. It's more efficient than the channelActive(char) for events with low channel occupancy.
Definition at line 37 of file VFATFrame.cc.
References data, i, and hltrates_dqm_sourceclient-live_cfg::offset.
Referenced by RawToDigiConverter::Run().
|
inline |
Returns Bunch Crossing number (BC<11:0>).
Definition at line 45 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
Returns ChipID (ChipID<11:0>).
Definition at line 63 of file VFATFrame.h.
References data.
Referenced by VFATFrameCollection::GetFrameByIndexID(), Print(), and RawToDigiConverter::RunCommon().
|
inline |
|
inline |
Definition at line 39 of file VFATFrame.h.
References data.
Referenced by RawDataUnpacker::ProcessOptoRxFrameSerial(), and RawDataUnpacker::ProcessVFATDataParallel().
|
inline |
Returns Event Counter (EV<7:0>).
Definition at line 51 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
|
inline |
Returns true if the BC word is present in the frame.
Definition at line 75 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 93 of file VFATFrame.h.
References presenceFlags.
Referenced by checkCRC().
|
inline |
Returns true if the EC word is present in the frame.
Definition at line 81 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the ID word is present in the frame.
Definition at line 87 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint(), and RawToDigiConverter::RunCommon().
void VFATFrame::Print | ( | bool | binary = false | ) | const |
Prints the frame. If binary is true, binary format is used.
Definition at line 127 of file VFATFrame.cc.
References checkCRC(), checkFootprint(), daqErrorFlags, data, getBC(), getChipID(), getCRC(), getEC(), getFlags(), i, j, presenceFlags, and w.
void VFATFrame::setData | ( | const word * | _data | ) |
Copies a memory block to data buffer.
Definition at line 30 of file VFATFrame.cc.
References data.
Referenced by VFATFrame().
word VFATFrame::daqErrorFlags |
Error flag as given by certain versions of DAQ.
Definition at line 145 of file VFATFrame.h.
Referenced by checkCRC(), Print(), RawDataUnpacker::ProcessVFATDataParallel(), and VFATFrame().
word VFATFrame::data[12] |
Raw data frame as sent by electronics.
The container is organized as follows (reversed Figure 8 at page 23 of VFAT2 manual):
* buffer index content size * --------------------------------------------------------------- * 0 CRC 16 bits * 1->8 Channel data 128 bits, channel 0 first * 9 ChipID 4 constant bits (1110) + 12 bits * 10 EC, Flags 4 constant bits (1100) + 8, 4 bits * 11 BC 4 constant bits (1010) + 12 bits *
Definition at line 135 of file VFATFrame.h.
Referenced by cuy.FindIssue::__init__(), data_sources.node::__str__(), confdb.HLTProcess::_fix_parameter(), confdb.HLTProcess::addGlobalOptions(), confdb.HLTProcess::append_filenames(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), confdb.HLTProcess::build_source(), channelActive(), checkCRC(), checkFootprint(), confdb.HLTProcess::customize(), confdb.HLTProcess::dump(), confdb.HLTProcess::fixPrescales(), getActiveChannels(), getBC(), getChipID(), getCRC(), getData(), getEC(), getFlags(), confdb.HLTProcess::getRawConfigurationFromDB(), confdb.HLTProcess::instrumentDQM(), confdb.HLTProcess::instrumentOpenMode(), confdb.HLTProcess::instrumentTiming(), data_sources.json_list::last(), confdb.HLTProcess::loadAdditionalConditions(), confdb.HLTProcess::loadCff(), confdb.HLTProcess::overrideGlobalTag(), confdb.HLTProcess::overrideL1MenuXml(), confdb.HLTProcess::overrideOutput(), confdb.HLTProcess::overrideParameters(), confdb.HLTProcess::overrideProcessName(), Print(), confdb.HLTProcess::runL1Emulator(), setData(), confdb.HLTProcess::specificCustomize(), confdb.HLTProcess::updateMessageLogger(), and VFATFrame().
word VFATFrame::presenceFlags |
Flag indicating the presence of various components. bit 1: "BC word" (buffer index 11) bit 2: "EC word" (buffer index 10) bit 3: "ID word" (buffer index 9) bit 4: "CRC word" (buffer index 0)
Definition at line 142 of file VFATFrame.h.
Referenced by isBCPresent(), isCRCPresent(), isECPresent(), isIDPresent(), Print(), RawDataUnpacker::ProcessVFATDataParallel(), and VFATFrame().