A container class for generic run and event-related info, information required by the commissioning analyses (such as hardware parameters), event quality flags, error conditions, etc... More...
#include <SiStripFedKey.h>
Public Member Functions | |
const uint16_t & | feChan () const |
const uint16_t & | fedApv () const |
uint16_t | fedChannel () const |
const uint16_t & | fedId () const |
const uint16_t & | feUnit () const |
bool | isConsistent (const SiStripKey &) const |
bool | isEqual (const SiStripKey &) const |
bool | isInvalid () const |
bool | isInvalid (const sistrip::Granularity &) const |
bool | isValid () const |
bool | isValid (const sistrip::Granularity &) const |
virtual void | print (std::stringstream &ss) const |
SiStripFedKey (const uint16_t &fed_id, const uint16_t &fe_unit=0, const uint16_t &fe_chan=0, const uint16_t &fed_apv=0) | |
SiStripFedKey (const uint32_t &fed_key) | |
SiStripFedKey (const std::string &directory_path) | |
SiStripFedKey (const SiStripFedKey &) | |
SiStripFedKey (const SiStripKey &) | |
SiStripFedKey () | |
virtual void | terse (std::stringstream &ss) const |
Public Member Functions inherited from SiStripKey | |
const uint16_t & | channel () const |
const sistrip::Granularity & | granularity () const |
const uint32_t & | key () const |
const SiStripKey & | operator= (const SiStripKey &) |
const std::string & | path () const |
SiStripKey (const uint32_t &key) | |
SiStripKey (const std::string &directory_path) | |
SiStripKey (const SiStripKey &) | |
SiStripKey () | |
virtual | ~SiStripKey () |
Static Public Member Functions | |
static uint16_t | feChan (const uint16_t &fed_ch) |
static uint16_t | fedCh (const uint16_t &fe_unit, const uint16_t &fe_chan) |
static uint32_t | fedIndex (const uint16_t &fed_id, const uint16_t &fed_ch) |
static uint16_t | feUnit (const uint16_t &fed_ch) |
Private Member Functions | |
void | initFromKey () |
void | initFromPath () |
void | initFromValue () |
void | initGranularity () |
Private Attributes | |
uint16_t | feChan_ |
uint16_t | fedApv_ |
uint16_t | fedId_ |
uint16_t | feUnit_ |
Static Private Attributes | |
static const uint16_t | feChanMask_ = 0x00F |
static const uint16_t | feChanOffset_ = 2 |
static const uint16_t | fedApvMask_ = 0x003 |
static const uint16_t | fedApvOffset_ = 0 |
static const uint16_t | fedCrateMask_ = 0x03F |
static const uint16_t | fedCrateOffset_ = 24 |
static const uint16_t | fedIdMask_ = 0x1FF |
static const uint16_t | fedIdOffset_ = 10 |
static const uint16_t | fedSlotMask_ = 0x01F |
static const uint16_t | fedSlotOffset_ = 19 |
static const uint16_t | feUnitMask_ = 0x00F |
static const uint16_t | feUnitOffset_ = 6 |
Additional Inherited Members | |
Protected Member Functions inherited from SiStripKey | |
void | channel (const uint16_t &) |
void | granularity (const sistrip::Granularity &) |
void | key (const uint32_t &) |
void | path (const std::string &) |
A container class for generic run and event-related info, information required by the commissioning analyses (such as hardware parameters), event quality flags, error conditions, etc...
Utility class that identifies a position within the strip tracker readout structure, down to the level of an APV25 chip.
The class allows to encode the position within a 32-bit "key" and, conversely, unpack a 32-bit key to provide the position.
The class provides the following member data:
Member data (integer in type only) with values of 0xFFFF signifies "invalid" (ie, FedId = 0xFFFF means "invalid FED id"). Data with null values signifies "all" (ie, FedId = 0 means "all FEDs").
The class generates a "directory path" string according to the member data. This can be used to organise histograms / other data types when using DQM / root. Conversely, the member data can also be built using the directory path when provided as a constructor argument.
The class also provides the "granularity" to which the FED key is unambiguous (ie, not "invalid" or "null") in defining a position within the readout system.
In addition, the class provides static methods that allow to convert between the two "FED channel" numbering schema in place. The class member data hold values that respect the "external" numbering scheme used by the optical links group. Front-End units are numbered from 1 to 8, bottom to top. Channels with the FE units are numbered 1 to 12, bottom to top. The "internal" numbering scheme is used by the DAQ software, which numbers FED channels consecutively from 0 to 95, top to bottom.
Definition at line 56 of file SiStripFedKey.h.
SiStripFedKey::SiStripFedKey | ( | const uint16_t & | fed_id, |
const uint16_t & | fe_unit = 0 , |
||
const uint16_t & | fe_chan = 0 , |
||
const uint16_t & | fed_apv = 0 |
||
) |
Constructor using FED id, FE unit, FE channel, and APV.
Definition at line 12 of file SiStripFedKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
SiStripFedKey::SiStripFedKey | ( | const uint32_t & | fed_key | ) |
Constructor using 32-bit "FED key".
Definition at line 31 of file SiStripFedKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
SiStripFedKey::SiStripFedKey | ( | const std::string & | directory_path | ) |
Constructor using directory path.
Definition at line 47 of file SiStripFedKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
SiStripFedKey::SiStripFedKey | ( | const SiStripFedKey & | input | ) |
Copy constructor.
Definition at line 63 of file SiStripFedKey.cc.
References SiStripKey::granularity(), SiStripKey::key(), and SiStripKey::path().
SiStripFedKey::SiStripFedKey | ( | const SiStripKey & | input | ) |
Copy constructor using base class.
Definition at line 77 of file SiStripFedKey.cc.
References feChan(), feChan_, fedApv(), fedApv_, fedId(), fedId_, feUnit(), feUnit_, SiStripKey::granularity(), input, SiStripKey::key(), and SiStripKey::path().
SiStripFedKey::SiStripFedKey | ( | ) |
|
inline |
Returns chan of FE unit (according to "external" numbering).
Definition at line 196 of file SiStripFedKey.h.
References feChan_.
Referenced by CommissioningHistosUsingDb::addDcuDetIds(), FedCablingAlgorithm::analyse(), ViewTranslator::buildMaps(), CommissioningTask::CommissioningTask(), SiStripCommissioningSource::createTasks(), SummaryGeneratorReadoutView::fill(), sistrip::FEDBuffer::findChannels(), CommissioningAnalysis::header(), FastFedCablingAnalysis::header(), isConsistent(), isEqual(), FedChannelConnection::print(), print(), SiStripFedKey(), FastFedCablingAnalysis::summary(), FedChannelConnection::terse(), terse(), PedestalsHistosUsingDb::update(), NoiseHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and FastFedCablingHistosUsingDb::update().
|
static |
Returns Front-End channel ("external" numbering scheme) for given FED channel ("internal" numbering scheme).
Definition at line 130 of file SiStripFedKey.cc.
References sistrip::FEDCH_PER_FED, and sistrip::invalid_.
|
inline |
Returns APV within FED channel.
Definition at line 197 of file SiStripFedKey.h.
References fedApv_.
Referenced by SummaryGeneratorReadoutView::fill(), isConsistent(), isEqual(), print(), SiStripFedKey(), and terse().
|
static |
Returns FED channel ("internal" numbering scheme) for given Front-End unit and channel ("external" numbering scheme).
Definition at line 108 of file SiStripFedKey.cc.
References sistrip::FEDCH_PER_FEUNIT, sistrip::FEUNITS_PER_FED, and sistrip::invalid_.
Referenced by fedChannel(), and SiStripCondObjBuilderFromDb::setValuesApvTiming().
|
inline |
Returns FED channel (according to "internal" numbering).
Definition at line 198 of file SiStripFedKey.h.
References feChan_, fedCh(), and feUnit_.
Referenced by CommissioningHistosUsingDb::addDcuDetIds(), CommissioningAnalysis::header(), FastFedCablingAnalysis::header(), FedCablingAnalysis::print(), print(), PedestalsHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), and ApvTimingHistosUsingDb::update().
|
inline |
Returns FED id.
Definition at line 194 of file SiStripFedKey.h.
References fedId_.
Referenced by CommissioningHistosUsingDb::addDcuDetIds(), SummaryGeneratorReadoutView::fill(), CommissioningAnalysis::header(), FastFedCablingAnalysis::header(), isConsistent(), isEqual(), FedCablingAnalysis::print(), print(), SiStripFedKey(), FastFedCablingAnalysis::summary(), terse(), PedsFullNoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), and ApvTimingHistosUsingDb::update().
|
static |
Returns number that encodes FED id and FED channel, which can be used to index vectors containing event and non-event data. Users should check if returned value is valid for indexing vector!
Definition at line 139 of file SiStripFedKey.cc.
References sistrip::FED_ID_MAX, sistrip::FED_ID_MIN, sistrip::FEDCH_PER_FED, and sistrip::invalid32_.
Referenced by SiStripSpyDisplayModule::analyze(), sistrip::SpyUnpacker::createDigis(), and sistrip::SpyDigiConverter::mergeModuleChannels().
|
inline |
Returns Front-End unit (according to "external" numbering).
Definition at line 195 of file SiStripFedKey.h.
References feUnit_.
Referenced by CommissioningHistosUsingDb::addDcuDetIds(), FedCablingAlgorithm::analyse(), ViewTranslator::buildMaps(), CommissioningTask::CommissioningTask(), SiStripCommissioningSource::createTasks(), SummaryGeneratorReadoutView::fill(), sistrip::FEDBuffer::findChannels(), CommissioningAnalysis::header(), FastFedCablingAnalysis::header(), isConsistent(), isEqual(), FedChannelConnection::print(), print(), SiStripFedCabling::printSummary(), SiStripFedKey(), FastFedCablingAnalysis::summary(), FedChannelConnection::terse(), terse(), PedsFullNoiseHistosUsingDb::update(), NoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and FastFedCablingHistosUsingDb::update().
|
static |
Returns Front-End unit ("external" numbering scheme) for given FED channel ("internal" numbering scheme).
Definition at line 121 of file SiStripFedKey.cc.
References sistrip::FEDCH_PER_FED, and sistrip::invalid_.
|
privatevirtual |
Reimplemented from SiStripKey.
Definition at line 256 of file SiStripFedKey.cc.
References sistrip::APVS_PER_FEDCH, feChan_, feChanMask_, feChanOffset_, sistrip::FED_ID_MAX, sistrip::FED_ID_MIN, fedApv_, fedApvMask_, fedApvOffset_, sistrip::FEDCH_PER_FEUNIT, fedId_, fedIdMask_, fedIdOffset_, feUnit_, feUnitMask_, feUnitOffset_, sistrip::FEUNITS_PER_FED, sistrip::invalid32_, sistrip::invalid_, and SiStripKey::key().
Referenced by SiStripFedKey().
|
privatevirtual |
Reimplemented from SiStripKey.
Definition at line 333 of file SiStripFedKey.cc.
References dir, sistrip::dir_, sistrip::feChan_, feChan_, sistrip::fedApv_, fedApv_, fedId_, sistrip::feDriver_, sistrip::feUnit_, feUnit_, spr::find(), GetRecoTauVFromDQM_MC_cff::next, sistrip::null_, SiStripKey::path(), sistrip::readoutView_, sistrip::root_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.
Referenced by SiStripFedKey().
|
privatevirtual |
Reimplemented from SiStripKey.
Definition at line 232 of file SiStripFedKey.cc.
References sistrip::APVS_PER_FEDCH, feChan_, sistrip::FED_ID_MAX, sistrip::FED_ID_MIN, fedApv_, sistrip::FEDCH_PER_FEUNIT, fedId_, feUnit_, sistrip::FEUNITS_PER_FED, and sistrip::invalid_.
Referenced by SiStripFedKey().
|
privatevirtual |
Reimplemented from SiStripKey.
Definition at line 448 of file SiStripFedKey.cc.
References SiStripKey::channel(), sistrip::FE_CHAN, sistrip::FE_DRIVER, sistrip::FE_UNIT, feChan_, sistrip::FED_APV, sistrip::FED_SYSTEM, fedApv_, fedId_, feUnit_, SiStripKey::granularity(), sistrip::invalid_, and sistrip::UNKNOWN_GRAN.
Referenced by SiStripFedKey().
|
virtual |
"Consistent" means identical and/or null (ie, "all") data.
Reimplemented from SiStripKey.
Definition at line 162 of file SiStripFedKey.cc.
References feChan(), feChan_, fedApv(), fedApv_, fedId(), fedId_, feUnit(), feUnit_, input, isEqual(), and SiStripKey::key().
|
virtual |
Identifies key objects with identical member data.
Reimplemented from SiStripKey.
Definition at line 149 of file SiStripFedKey.cc.
References feChan(), feChan_, fedApv(), fedApv_, fedId(), fedId_, feUnit(), feUnit_, input, and SiStripKey::key().
Referenced by isConsistent().
|
virtual |
Identifies all member data as being invalid.
Reimplemented from SiStripKey.
Definition at line 204 of file SiStripFedKey.cc.
References sistrip::FED_APV.
|
virtual |
All member data to level of "Granularity" are invalid. If sistrip::Granularity is "undefined", returns true.
Reimplemented from SiStripKey.
Definition at line 210 of file SiStripFedKey.cc.
References sistrip::FE_CHAN, sistrip::FE_DRIVER, sistrip::FE_UNIT, feChan_, sistrip::FED_APV, sistrip::FED_SYSTEM, fedApv_, fedId_, feUnit_, sistrip::invalid_, sistrip::UNDEFINED_GRAN, and sistrip::UNKNOWN_GRAN.
|
virtual |
Identifies all member data as being "valid" or null ("all").
Reimplemented from SiStripKey.
Definition at line 176 of file SiStripFedKey.cc.
References sistrip::FED_APV.
Referenced by SummaryGeneratorReadoutView::fill(), and print().
|
virtual |
All member data to level of "Granularity" are valid. If sistrip::Granularity is "undefined", returns false.
Reimplemented from SiStripKey.
Definition at line 182 of file SiStripFedKey.cc.
References sistrip::FE_CHAN, sistrip::FE_DRIVER, sistrip::FE_UNIT, feChan_, sistrip::FED_APV, sistrip::FED_SYSTEM, fedApv_, fedId_, feUnit_, sistrip::invalid_, sistrip::UNDEFINED_GRAN, and sistrip::UNKNOWN_GRAN.
|
virtual |
Print member data of the key
Reimplemented from SiStripKey.
Definition at line 510 of file SiStripFedKey.cc.
References SiStripKey::channel(), feChan(), fedApv(), fedChannel(), fedId(), feUnit(), SiStripEnumsAndStrings::granularity(), SiStripKey::granularity(), isValid(), SiStripKey::key(), and SiStripKey::path().
Referenced by operator<<(), and CommissioningHistograms::printHistosMap().
|
virtual |
A terse summary of the key
Reimplemented from SiStripKey.
Definition at line 485 of file SiStripFedKey.cc.
References feChan(), fedApv(), fedId(), and feUnit().
|
private |
FE channel [0,1-12,invalid].
Definition at line 169 of file SiStripFedKey.h.
Referenced by feChan(), fedChannel(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFedKey().
|
staticprivate |
Definition at line 187 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 179 of file SiStripFedKey.h.
Referenced by initFromKey().
|
private |
APV [0,1-2,invalid].
Definition at line 172 of file SiStripFedKey.h.
Referenced by fedApv(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFedKey().
|
staticprivate |
Definition at line 188 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 180 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 183 of file SiStripFedKey.h.
|
staticprivate |
Definition at line 175 of file SiStripFedKey.h.
|
private |
FED id [0,50-489,invalid].
Definition at line 163 of file SiStripFedKey.h.
Referenced by fedId(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFedKey().
|
staticprivate |
Definition at line 185 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 177 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 184 of file SiStripFedKey.h.
|
staticprivate |
Definition at line 176 of file SiStripFedKey.h.
|
private |
FE unit [0,1-8,invalid].
Definition at line 166 of file SiStripFedKey.h.
Referenced by fedChannel(), feUnit(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFedKey().
|
staticprivate |
Definition at line 186 of file SiStripFedKey.h.
Referenced by initFromKey().
|
staticprivate |
Definition at line 178 of file SiStripFedKey.h.
Referenced by initFromKey().