#include <VFATFrame.h>
Public Types | |
typedef uint16_t | word |
Public Member Functions | |
virtual bool | channelActive (unsigned char channel) const |
virtual bool | checkCRC () const |
virtual bool | checkCRCT2 () const |
bool | checkFootprint () const |
bool | checkFootprintT2 () 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 | getCRCT2 () const |
Returns the CRC, for non-reversed TOTEM T2. 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 | PrintT2 (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=nullptr) | |
VFATFrame (const VFATFrame ©) | |
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 19 of file VFATFrame.h.
typedef uint16_t VFATFrame::word |
Definition at line 21 of file VFATFrame.h.
VFATFrame::VFATFrame | ( | const word * | _data = nullptr | ) |
Definition at line 16 of file VFATFrame.cc.
References data, and setData().
|
inline |
Definition at line 26 of file VFATFrame.h.
References filterCSVwithJSON::copy, daqErrorFlags, numberOfClusters, presenceFlags, and setData().
|
inlinevirtual |
Definition at line 33 of file VFATFrame.h.
|
static |
internaly used to check CRC
Definition at line 107 of file VFATFrame.cc.
References ztail::d, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, and findQualityFiles::v.
Referenced by checkCRC(), checkCRCT2(), CTPPSTotemDataFormatter::formatRawData(), and PrintT2().
|
inlinevirtual |
Checks if channel number 'channel' was active. Returns positive number if it was active, 0 otherwise.
Definition at line 106 of file VFATFrame.h.
References data, and funct::true.
|
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 75 of file VFATFrame.cc.
References calculateCRC(), daqErrorFlags, data, mps_fire::i, and isCRCPresent().
Referenced by Print().
|
virtual |
Checks the validity of Totem T2 non-reversed CRC. Returns false if the CRC is present and invalid.
Definition at line 93 of file VFATFrame.cc.
References calculateCRC(), data, mps_fire::i, and isCRCPresent().
Referenced by PrintT2().
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 49 of file VFATFrame.cc.
References data, isBCPresent(), isECPresent(), and isIDPresent().
Referenced by Print().
bool VFATFrame::checkFootprintT2 | ( | ) | const |
Checks the fixed bits in the frame, for the TOTEM T2 non-inverse word ordering. 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 PrintT2().
|
virtual |
Returns list of active channels. It's more efficient than the channelActive(char) for events with low channel occupancy.
Definition at line 29 of file VFATFrame.cc.
References ewkTauDQM_cfi::channels, data, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, and hltrates_dqm_sourceclient-live_cfg::offset.
|
inline |
Returns Bunch Crossing number (BC<11:0>).
Definition at line 43 of file VFATFrame.h.
References data.
Referenced by Print().
|
inline |
Returns ChipID (ChipID<11:0>).
Definition at line 52 of file VFATFrame.h.
References data.
Referenced by VFATFrameCollection::GetFrameByIndexID(), and Print().
|
inline |
|
inline |
Returns the CRC, for non-reversed TOTEM T2.
Definition at line 58 of file VFATFrame.h.
References data.
Referenced by PrintT2().
|
inline |
Definition at line 38 of file VFATFrame.h.
References data.
Referenced by pps::RawDataUnpacker::processOptoRxFrameSerial(), and RawToDigiConverter::run().
|
inline |
|
inline |
Returns Event Counter (EV<7:0>).
Definition at line 46 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 85 of file VFATFrame.h.
References numberOfClusters.
|
inline |
Returns true if the BC word is present in the frame.
Definition at line 64 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint(), and checkFootprintT2().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 73 of file VFATFrame.h.
References presenceFlags.
Referenced by checkCRC(), and checkCRCT2().
|
inline |
Returns true if the EC word is present in the frame.
Definition at line 67 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint(), and checkFootprintT2().
|
inline |
Returns true if the ID word is present in the frame.
Definition at line 70 of file VFATFrame.h.
References presenceFlags.
Referenced by checkFootprint(), and checkFootprintT2().
|
inline |
Returns true if the CRC word is present in the frame.
Definition at line 76 of file VFATFrame.h.
References presenceFlags.
void VFATFrame::Print | ( | bool | binary = false | ) | const |
Prints the frame. If binary is true, binary format is used.
Definition at line 131 of file VFATFrame.cc.
References checkCRC(), checkFootprint(), daqErrorFlags, data, getBC(), getChipID(), getCRC(), getEC(), getFlags(), mps_fire::i, dqmiolumiharvest::j, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, presenceFlags, and w().
void VFATFrame::PrintT2 | ( | bool | binary = false | ) | const |
Definition at line 177 of file VFATFrame.cc.
References calculateCRC(), checkCRCT2(), checkFootprintT2(), data, getCRCT2(), mps_fire::i, dqmiolumiharvest::j, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, and w().
|
inline |
Sets DAQ error flags.
Definition at line 79 of file VFATFrame.h.
References daqErrorFlags, and findQualityFiles::v.
void VFATFrame::setData | ( | const word * | _data | ) |
Copies a memory block to data buffer.
Definition at line 27 of file VFATFrame.cc.
References data.
Referenced by VFATFrame().
|
inline |
|
inline |
Sets presence flags.
Definition at line 61 of file VFATFrame.h.
References presenceFlags, and findQualityFiles::v.
|
private |
Error flag as given by certain versions of DAQ.
Definition at line 149 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 137 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(), checkCRCT2(), checkFootprint(), checkFootprintT2(), confdb.HLTProcess::customize(), confdb.HLTProcess::dump(), confdb.HLTProcess::fixPrescales(), data_sources.json_list::get_members(), getActiveChannels(), getBC(), getChipID(), getCRC(), getCRCT2(), 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(), PrintT2(), confdb.HLTProcess::removeElementFromSequencesTasksAndPaths(), 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 153 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 146 of file VFATFrame.h.
Referenced by isBCPresent(), isCRCPresent(), isECPresent(), isIDPresent(), isNumberOfClustersPresent(), Print(), setPresenceFlags(), and VFATFrame().