#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... | |
uint8_t | getNumberOfClusters () const |
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... | |
bool | isNumberOfClustersPresent () const |
Returns true if the CRC word is present in the frame. More... | |
void | Print (bool binary=false) const |
void | setDAQErrorFlags (uint8_t v) |
Sets DAQ error flags. More... | |
void | setData (const word *_data) |
Copies a memory block to data buffer. More... | |
void | setNumberOfClusters (uint8_t v) |
void | setPresenceFlags (uint8_t v) |
Sets presence flags. More... | |
VFATFrame (const word *_data=NULL) | |
VFATFrame (const VFATFrame ©) | |
virtual | ~VFATFrame () |
Protected Attributes | |
word | data [12] |
Static Private Member Functions | |
static word | calculateCRC (word crc_in, word dato) |
internaly used to check CRC More... | |
Private Attributes | |
uint8_t | daqErrorFlags |
Error flag as given by certain versions of DAQ. More... | |
uint8_t | numberOfClusters |
uint8_t | 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 26 of file VFATFrame.h.
References daqErrorFlags, data, numberOfClusters, presenceFlags, and setData().
|
inlinevirtual |
|
staticprivate |
internaly used to check CRC
Definition at line 100 of file VFATFrame.cc.
References edmIntegrityCheck::d, mps_fire::i, RecoTauDiscriminantConfiguration::mask, 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 142 of file VFATFrame.h.
References data, getActiveChannels(), and Print().
|
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 79 of file VFATFrame.cc.
References calculateCRC(), daqErrorFlags, data, mps_fire::i, and isCRCPresent().
Referenced by getNumberOfClusters(), 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 63 of file VFATFrame.cc.
References data, isBCPresent(), isECPresent(), and isIDPresent().
Referenced by getNumberOfClusters(), 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 38 of file VFATFrame.cc.
References data, mps_fire::i, RecoTauDiscriminantConfiguration::mask, and PFRecoTauDiscriminationByIsolation_cfi::offset.
Referenced by channelActive(), and RawToDigiConverter::Run().
|
inline |
Returns Bunch Crossing number (BC<11:0>).
Definition at line 46 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
Returns ChipID (ChipID<11:0>).
Definition at line 64 of file VFATFrame.h.
References data.
Referenced by VFATFrameCollection::GetFrameByIndexID(), Print(), and RawToDigiConverter::RunCommon().
|
inline |
|
inline |
Definition at line 40 of file VFATFrame.h.
References data.
Referenced by ctpps::RawDataUnpacker::ProcessOptoRxFrameSerial(), and ctpps::RawDataUnpacker::ProcessVFATDataParallel().
|
inline |
Returns Event Counter (EV<7:0>).
Definition at line 52 of file VFATFrame.h.
References data.
Referenced by Print(), and RawToDigiConverter::Run().
|
inline |
|
inline |
Returns the number of clusters as given by the "0xD0 frame". Returns 0, if not available.
Definition at line 125 of file VFATFrame.h.
References checkCRC(), checkFootprint(), and numberOfClusters.
Referenced by RawToDigiConverter::RunCommon().
|
inline |
Returns true if the BC word is present in the frame.
Definition at line 83 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 101 of file VFATFrame.h.
References presenceFlags.
Referenced by checkCRC().
|
inline |
Returns true if the EC word is present in the frame.
Definition at line 89 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the ID word is present in the frame.
Definition at line 95 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint(), and RawToDigiConverter::RunCommon().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 107 of file VFATFrame.h.
References presenceFlags.
Referenced by RawToDigiConverter::RunCommon().
void VFATFrame::Print | ( | bool | binary = false | ) | const |
Prints the frame. If binary is true, binary format is used.
Definition at line 128 of file VFATFrame.cc.
References checkCRC(), checkFootprint(), daqErrorFlags, data, getBC(), getChipID(), getCRC(), getEC(), getFlags(), mps_fire::i, RecoTauDiscriminantConfiguration::mask, presenceFlags, and w.
Referenced by channelActive().
|
inline |
Sets DAQ error flags.
Definition at line 113 of file VFATFrame.h.
References daqErrorFlags, and findQualityFiles::v.
Referenced by ctpps::RawDataUnpacker::ProcessVFATDataParallel().
void VFATFrame::setData | ( | const word * | _data | ) |
Copies a memory block to data buffer.
Definition at line 31 of file VFATFrame.cc.
References data.
Referenced by VFATFrame(), and ~VFATFrame().
|
inline |
Definition at line 118 of file VFATFrame.h.
References numberOfClusters, and findQualityFiles::v.
Referenced by ctpps::RawDataUnpacker::ProcessVFATDataParallel().
|
inline |
Sets presence flags.
Definition at line 77 of file VFATFrame.h.
References presenceFlags, and findQualityFiles::v.
Referenced by ctpps::RawDataUnpacker::ProcessVFATDataParallel().
|
private |
Error flag as given by certain versions of DAQ.
Definition at line 179 of file VFATFrame.h.
Referenced by checkCRC(), Print(), setDAQErrorFlags(), and VFATFrame().
|
protected |
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 168 of file VFATFrame.h.
Referenced by data_sources.node::__str__(), confdb.HLTProcess::_fix_parameter(), confdb.HLTProcess::addEras(), 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(), data_sources.json_list::get_members(), getActiveChannels(), getBC(), getChipID(), getCRC(), getData(), getEC(), getFlags(), DiamondVFATFrame::getHptdcErrorFlag(), DiamondVFATFrame::getLeadingEdgeTime(), DiamondVFATFrame::getMultihit(), confdb.HLTProcess::getRawConfigurationFromDB(), DiamondVFATFrame::getThresholdVoltage(), DiamondVFATFrame::getTrailingEdgeTime(), confdb.HLTProcess::instrumentDQM(), confdb.HLTProcess::instrumentOpenMode(), confdb.HLTProcess::instrumentTiming(), data_sources.json_list::last(), confdb.HLTProcess::loadAdditionalConditions(), confdb.HLTProcess::loadCff(), confdb.HLTProcess::loadSetupCff(), confdb.HLTProcess::overrideGlobalTag(), confdb.HLTProcess::overrideL1MenuXml(), confdb.HLTProcess::overrideOutput(), confdb.HLTProcess::overrideParameters(), confdb.HLTProcess::overrideProcessName(), Print(), confdb.HLTProcess::runL1Emulator(), setData(), confdb.HLTProcess::specificCustomize(), cuy.FindIssue::startElement(), edmStreamStallGrapher.Stack::update(), confdb.HLTProcess::updateMessageLogger(), and VFATFrame().
|
private |
Number of clusters. Only available in cluster mode and if the number of clusters exceeds a limit (10).
Definition at line 183 of file VFATFrame.h.
Referenced by getNumberOfClusters(), setNumberOfClusters(), and VFATFrame().
|
private |
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) bit 5: "number of clusters word" (prefix 0xD0)
Definition at line 176 of file VFATFrame.h.
Referenced by isBCPresent(), isCRCPresent(), isECPresent(), isIDPresent(), isNumberOfClustersPresent(), Print(), setPresenceFlags(), and VFATFrame().