#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 () |
const VFATFrame::word * | getData () const |
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 VFATFrame ©) | |
VFATFrame (const word *_data=nullptr) | |
virtual | ~VFATFrame () |
Static Public Member Functions | |
static word | calculateCRC (word crc_in, word dato) |
internaly used to check CRC More... | |
Protected Attributes | |
word | data [12] |
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 18 of file VFATFrame.h.
typedef uint16_t VFATFrame::word |
Definition at line 25 of file VFATFrame.h.
VFATFrame::VFATFrame | ( | const word * | _data = nullptr | ) |
Definition at line 15 of file VFATFrame.cc.
|
inline |
Definition at line 30 of file VFATFrame.h.
|
inlinevirtual |
Definition at line 37 of file VFATFrame.h.
References data.
|
static |
internaly used to check CRC
Definition at line 79 of file VFATFrame.cc.
References ztail::d, mps_fire::i, and findQualityFiles::v.
Referenced by checkCRC(), and CTPPSTotemDataFormatter::formatRawData().
|
inlinevirtual |
Checks if channel number 'channel' was active. Returns positive number if it was active, 0 otherwise.
Definition at line 99 of file VFATFrame.h.
|
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 61 of file VFATFrame.cc.
References calculateCRC(), daqErrorFlags, data, mps_fire::i, and isCRCPresent().
Referenced by Print().
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 48 of file VFATFrame.cc.
References data, isBCPresent(), isECPresent(), and isIDPresent().
Referenced by Print().
|
virtual |
Returns list of active channels. It's more efficient than the channelActive(char) for events with low channel occupancy.
Definition at line 28 of file VFATFrame.cc.
References ewkTauDQM_cfi::channels, data, mps_fire::i, and hltrates_dqm_sourceclient-live_cfg::offset.
|
inline |
Returns Bunch Crossing number (BC<11:0>).
Definition at line 47 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
Returns ChipID (ChipID<11:0>).
Definition at line 56 of file VFATFrame.h.
References presenceFlags, and findQualityFiles::v.
Referenced by VFATFrameCollection::GetFrameByIndexID(), and Print().
|
inline |
Returns the CRC.
Definition at line 59 of file VFATFrame.h.
References presenceFlags.
Referenced by Print().
|
inline |
Definition at line 42 of file VFATFrame.h.
Referenced by RawToDigiConverter::run().
|
inline |
Definition at line 44 of file VFATFrame.h.
References data.
|
inline |
Returns Event Counter (EV<7:0>).
Definition at line 50 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
|
inline |
Returns the number of clusters as given by the "0xD0 frame". Returns 0, if not available.
Definition at line 86 of file VFATFrame.h.
|
inline |
Returns true if the BC word is present in the frame.
Definition at line 65 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 74 of file VFATFrame.h.
References daqErrorFlags, and findQualityFiles::v.
Referenced by checkCRC().
|
inline |
Returns true if the EC word is present in the frame.
Definition at line 68 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the ID word is present in the frame.
Definition at line 71 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 77 of file VFATFrame.h.
References numberOfClusters, and findQualityFiles::v.
void VFATFrame::Print | ( | bool | binary = false | ) | const |
Prints the frame. If binary is true, binary format is used.
Definition at line 103 of file VFATFrame.cc.
References checkCRC(), checkFootprint(), daqErrorFlags, data, getBC(), getChipID(), getCRC(), getEC(), getFlags(), mps_fire::i, dqmiolumiharvest::j, presenceFlags, and w.
|
inline |
void VFATFrame::setData | ( | const word * | _data | ) |
Copies a memory block to data buffer.
Definition at line 26 of file VFATFrame.cc.
References data.
Referenced by VFATFrame().
|
inline |
|
inline |
|
private |
Error flag as given by certain versions of DAQ.
Definition at line 139 of file VFATFrame.h.
Referenced by checkCRC(), isCRCPresent(), and Print().
|
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 127 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(), checkCRC(), checkFootprint(), confdb.HLTProcess::customize(), confdb.HLTProcess::dump(), confdb.HLTProcess::fixPrescales(), data_sources.json_list::get_members(), getActiveChannels(), getBC(), 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::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(), VFATFrame(), and ~VFATFrame().
|
private |
Number of clusters. Only available in cluster mode and if the number of clusters exceeds a limit (10).
Definition at line 143 of file VFATFrame.h.
Referenced by isNumberOfClustersPresent(), and setNumberOfClusters().
|
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 136 of file VFATFrame.h.
Referenced by getChipID(), getCRC(), isBCPresent(), isECPresent(), isIDPresent(), Print(), and setPresenceFlags().