CMS 3D CMS Logo

SiStripBaseDelay.h
Go to the documentation of this file.
1 #ifndef SiStripBaseDelay_h
2 #define SiStripBaseDelay_h
3 
5 
6 #include <algorithm>
7 #include <cstdint>
8 #include <sstream>
9 #include <vector>
10 
12 
24 public:
26 
27  // Defined as public for genreflex
28  struct Delay {
29  Delay(const uint32_t inputDetId, const uint16_t inputCoarseDelay, const uint16_t inputFineDelay)
30  : detId(inputDetId), coarseDelay(inputCoarseDelay), fineDelay(inputFineDelay) {}
32  Delay() : detId(0), coarseDelay(255), fineDelay(255) {}
33  uint32_t detId;
34  unsigned char coarseDelay;
35  unsigned char fineDelay;
36 
38  };
39  typedef std::vector<Delay>::iterator delayIt;
40  typedef std::vector<Delay>::const_iterator delayConstIt;
41 
42  bool put(const uint32_t detId, const uint16_t coarseDelay, const uint16_t fineDelay);
43  uint16_t coarseDelay(const uint32_t detId);
44  uint16_t fineDelay(const uint32_t detId) const;
45  double delay(const uint32_t detId) const;
46 
48  void delays(std::vector<Delay>& delays) const { delays = delays_; }
49 
51  void detIds(std::vector<uint32_t>& detIdVector) const;
52 
54  inline uint32_t delaysSize() const { return delays_.size(); }
55 
57  void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
59  void printDebug(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
60 
61 private:
62  inline double makeDelay(const uint16_t coarseDelay, const uint16_t fineDelay) const {
63  return (coarseDelay * 25 + fineDelay * (25 / 24.));
64  }
65 
66  std::vector<Delay> delays_;
67 
69 };
70 
71 #endif
SiStripBaseDelay::Delay::coarseDelay
unsigned char coarseDelay
Definition: SiStripBaseDelay.h:34
SiStripDetSummary.h
SiStripBaseDelay::Delay::fineDelay
unsigned char fineDelay
Definition: SiStripBaseDelay.h:35
TrackerTopology
Definition: TrackerTopology.h:16
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiStripBaseDelay::coarseDelay
uint16_t coarseDelay(const uint32_t detId)
Definition: SiStripBaseDelay.cc:13
SiStripBaseDelay
Definition: SiStripBaseDelay.h:23
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripBaseDelay::makeDelay
double makeDelay(const uint16_t coarseDelay, const uint16_t fineDelay) const
Definition: SiStripBaseDelay.h:62
SiStripBaseDelay::SiStripBaseDelay
SiStripBaseDelay()
Definition: SiStripBaseDelay.h:25
SiStripBaseDelay::Delay::detId
uint32_t detId
Definition: SiStripBaseDelay.h:33
SiStripBaseDelay::delaysSize
uint32_t delaysSize() const
Get the total number of delays stored (should equal the total number of modules in the SiStripTracker...
Definition: SiStripBaseDelay.h:54
SiStripBaseDelay::Delay::Delay
Delay()
Default constructor needed by genreflex.
Definition: SiStripBaseDelay.h:32
SiStripBaseDelay::delays_
std::vector< Delay > delays_
Definition: SiStripBaseDelay.h:66
Serializable.h
SiStripBaseDelay::Delay::Delay
Delay(const uint32_t inputDetId, const uint16_t inputCoarseDelay, const uint16_t inputFineDelay)
Definition: SiStripBaseDelay.h:29
SiStripBaseDelay::delayConstIt
std::vector< Delay >::const_iterator delayConstIt
Definition: SiStripBaseDelay.h:40
SiStripBaseDelay::fineDelay
uint16_t fineDelay(const uint32_t detId) const
Definition: SiStripBaseDelay.cc:21
SiStripBaseDelay::delay
double delay(const uint32_t detId) const
Definition: SiStripBaseDelay.cc:29
SiStripBaseDelay::detIds
void detIds(std::vector< uint32_t > &detIdVector) const
Get the list of all detIds for which a delay is stored.
Definition: SiStripBaseDelay.cc:37
SiStripBaseDelay::put
bool put(const uint32_t detId, const uint16_t coarseDelay, const uint16_t fineDelay)
Definition: SiStripBaseDelay.cc:8
SiStripBaseDelay::delays
void delays(std::vector< Delay > &delays) const
Fill the input container with all the delays.
Definition: SiStripBaseDelay.h:48
SiStripBaseDelay::printDebug
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints the delays for all the detIds.
Definition: SiStripBaseDelay.cc:55
SiStripBaseDelay::delayIt
std::vector< Delay >::iterator delayIt
Definition: SiStripBaseDelay.h:39
SiStripBaseDelay::printSummary
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
Definition: SiStripBaseDelay.cc:44
SiStripBaseDelay::Delay
Definition: SiStripBaseDelay.h:28