#include <SiStripLatency.h>
Classes | |
struct | EqualByLatencyAndMode |
struct | Latency |
struct | OrderByDetIdAndApv |
struct | OrderByLatencyAndMode |
Public Types | |
typedef std::vector< Latency > ::const_iterator | latConstIt |
typedef std::vector< Latency > ::iterator | latIt |
Public Member Functions | |
void | allLatencies (std::vector< uint16_t > &allLatenciesVector) const |
Fills the passed vector with all the possible latencies in the Tracker. More... | |
std::vector< Latency > | allLatencyAndModes () const |
void | allModes (std::vector< uint16_t > &allModesVector) const |
Fills the passed vector with all the possible modes in the Tracker. More... | |
std::vector< Latency > | allUniqueLatencyAndModes () |
void | compress () |
uint16_t | latency (const uint32_t detId, const uint16_t apv) const |
std::pair< uint16_t, uint16_t > | latencyAndMode (const uint32_t detId, const uint16_t apv) const |
uint16_t | mode (const uint32_t detId, const uint16_t apv) const |
void | printDebug (std::stringstream &ss) const |
Prints the full list of all ranges and corresponding values of latency and mode. More... | |
void | printSummary (std::stringstream &ss) const |
Prints the number of ranges as well as the value of singleLatency and singleMode. More... | |
bool | put (const uint32_t detId, const uint16_t apv, const uint16_t latency, const uint16_t mode) |
uint16_t | singleLatency () const |
If all the latency values stored are equal return that value, otherwise return -1. More... | |
uint16_t | singleMode () const |
int16_t | singleReadOutMode () const |
SiStripLatency () | |
Private Member Functions | |
const latConstIt | position (const uint32_t detId, const uint16_t apv) const |
Used to compute the position with the lower_bound binary search. More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
std::vector< Latency > | latencies_ |
Friends | |
class | boost::serialization::access |
template<typename CondSerializationT , typename Enabled > | |
struct | cond::serialization::access |
Holds the latency and the mode of the run.
The latency is stored per apv and the information is compressed by reducing sequences of apvs with the same latency to a single value plus information on the start and end of the sequence.
The mode is a single value, stored as a char. The actual operation mode bit is bit number 3 starting from 0. The bitmask to retrieve the information in the number 8 (1000).
Definition at line 57 of file SiStripLatency.h.
typedef std::vector<Latency>::const_iterator SiStripLatency::latConstIt |
Definition at line 84 of file SiStripLatency.h.
typedef std::vector<Latency>::iterator SiStripLatency::latIt |
Definition at line 83 of file SiStripLatency.h.
|
inline |
Definition at line 61 of file SiStripLatency.h.
void SiStripLatency::allLatencies | ( | std::vector< uint16_t > & | allLatenciesVector | ) | const |
Fills the passed vector with all the possible latencies in the Tracker.
Definition at line 153 of file SiStripLatency.cc.
References latencies_, and FrontierCondition_GT_autoExpress_cfi::unique().
Referenced by printSummary().
|
inline |
void SiStripLatency::allModes | ( | std::vector< uint16_t > & | allModesVector | ) | const |
Fills the passed vector with all the possible modes in the Tracker.
Definition at line 114 of file SiStripLatency.cc.
References latencies_, and FrontierCondition_GT_autoExpress_cfi::unique().
Referenced by singleReadOutMode().
std::vector< SiStripLatency::Latency > SiStripLatency::allUniqueLatencyAndModes | ( | ) |
Definition at line 165 of file SiStripLatency.cc.
References latencies_, and FrontierCondition_GT_autoExpress_cfi::unique().
void SiStripLatency::compress | ( | ) |
Reduce ranges of consecutive detIdsAndApvs with the same latency and mode to one value (the latest) so that lower_bound will return the correct value for latency and mode.
Definition at line 37 of file SiStripLatency.cc.
References latencies_.
Referenced by SiStripCondObjBuilderFromDb::buildFECRelatedObjects(), and SiStripLatencyGenerator::createObject().
uint16_t SiStripLatency::latency | ( | const uint32_t | detId, |
const uint16_t | apv | ||
) | const |
Definition at line 51 of file SiStripLatency.cc.
References latencies_, and position().
std::pair< uint16_t, uint16_t > SiStripLatency::latencyAndMode | ( | const uint32_t | detId, |
const uint16_t | apv | ||
) | const |
Definition at line 69 of file SiStripLatency.cc.
References latencies_, and position().
uint16_t SiStripLatency::mode | ( | const uint32_t | detId, |
const uint16_t | apv | ||
) | const |
Definition at line 60 of file SiStripLatency.cc.
References latencies_, and position().
Referenced by singleReadOutMode().
|
inlineprivate |
Used to compute the position with the lower_bound binary search.
Definition at line 149 of file SiStripLatency.h.
References latencies_.
Referenced by latency(), latencyAndMode(), and mode().
void SiStripLatency::printDebug | ( | std::stringstream & | ss | ) | const |
Prints the full list of all ranges and corresponding values of latency and mode.
Definition at line 202 of file SiStripLatency.cc.
References latencies_.
Referenced by SiStripCondObjBuilderFromDb::buildFECRelatedObjects(), and printSummary().
void SiStripLatency::printSummary | ( | std::stringstream & | ss | ) | const |
Prints the number of ranges as well as the value of singleLatency and singleMode.
Definition at line 173 of file SiStripLatency.cc.
References allLatencies(), latencies_, printDebug(), singleLatency(), and singleReadOutMode().
Referenced by SiStripCondObjBuilderFromDb::buildFECRelatedObjects().
bool SiStripLatency::put | ( | const uint32_t | detId, |
const uint16_t | apv, | ||
const uint16_t | latency, | ||
const uint16_t | mode | ||
) |
Saves the detIdAndApv and latency values in the vector of Latency objects. At the end of the filling phase, the compress method should be called to collapse all ranges in single values. Note that everything would work even if the compress method is not called, only the space used would be more than needed.
Definition at line 10 of file SiStripLatency.cc.
References gather_cfg::cout, relativeConstraints::error, Exception, and latencies_.
Referenced by SiStripLatencyGenerator::createObject(), SiStripCondObjBuilderFromDb::setDefaultValuesApvLatency(), and SiStripCondObjBuilderFromDb::setValuesApvLatency().
|
private |
uint16_t SiStripLatency::singleLatency | ( | ) | const |
If all the latency values stored are equal return that value, otherwise return -1.
Definition at line 78 of file SiStripLatency.cc.
References latencies_.
Referenced by printSummary().
uint16_t SiStripLatency::singleMode | ( | ) | const |
Definition at line 96 of file SiStripLatency.cc.
References latencies_.
Referenced by singleReadOutMode().
int16_t SiStripLatency::singleReadOutMode | ( | ) | const |
Definition at line 124 of file SiStripLatency.cc.
References allModes(), mode(), READMODEMASK, and singleMode().
Referenced by printSummary().
|
friend |
Definition at line 161 of file SiStripLatency.h.
|
friend |
Definition at line 161 of file SiStripLatency.h.
|
private |
Definition at line 159 of file SiStripLatency.h.
Referenced by allLatencies(), allLatencyAndModes(), allModes(), allUniqueLatencyAndModes(), compress(), latency(), latencyAndMode(), mode(), position(), printDebug(), printSummary(), put(), singleLatency(), and singleMode().