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 <vector>
7 #include <algorithm>
8 #include <cstdint>
9 #include <sstream>
10 #include <boost/bind/bind.hpp>
11 
13 
25 public:
27 
28  // Defined as public for genreflex
29  struct Delay {
30  Delay(const uint32_t inputDetId, const uint16_t inputCoarseDelay, const uint16_t inputFineDelay)
31  : detId(inputDetId), coarseDelay(inputCoarseDelay), fineDelay(inputFineDelay) {}
33  Delay() : detId(0), coarseDelay(255), fineDelay(255) {}
34  uint32_t detId;
35  unsigned char coarseDelay;
36  unsigned char fineDelay;
37 
39  };
40  typedef std::vector<Delay>::iterator delayIt;
41  typedef std::vector<Delay>::const_iterator delayConstIt;
42 
43  bool put(const uint32_t detId, const uint16_t coarseDelay, const uint16_t fineDelay);
44  uint16_t coarseDelay(const uint32_t detId);
45  uint16_t fineDelay(const uint32_t detId) const;
46  double delay(const uint32_t detId) const;
47 
49  void delays(std::vector<Delay>& delays) const { delays = delays_; }
50 
52  void detIds(std::vector<uint32_t>& detIdVector) const;
53 
55  inline uint32_t delaysSize() const { return delays_.size(); }
56 
58  void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
60  void printDebug(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
61 
62 private:
63  inline double makeDelay(const uint16_t coarseDelay, const uint16_t fineDelay) const {
64  return (coarseDelay * 25 + fineDelay * (25 / 24.));
65  }
66 
67  std::vector<Delay> delays_;
68 
70 };
71 
72 #endif
SiStripBaseDelay::Delay::coarseDelay
unsigned char coarseDelay
Definition: SiStripBaseDelay.h:35
SiStripDetSummary.h
SiStripBaseDelay::Delay::fineDelay
unsigned char fineDelay
Definition: SiStripBaseDelay.h:36
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:15
SiStripBaseDelay
Definition: SiStripBaseDelay.h:24
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripBaseDelay::makeDelay
double makeDelay(const uint16_t coarseDelay, const uint16_t fineDelay) const
Definition: SiStripBaseDelay.h:63
SiStripBaseDelay::SiStripBaseDelay
SiStripBaseDelay()
Definition: SiStripBaseDelay.h:26
SiStripBaseDelay::Delay::detId
uint32_t detId
Definition: SiStripBaseDelay.h:34
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:55
SiStripBaseDelay::Delay::Delay
Delay()
Default constructor needed by genreflex.
Definition: SiStripBaseDelay.h:33
SiStripBaseDelay::delays_
std::vector< Delay > delays_
Definition: SiStripBaseDelay.h:67
Serializable.h
SiStripBaseDelay::Delay::Delay
Delay(const uint32_t inputDetId, const uint16_t inputCoarseDelay, const uint16_t inputFineDelay)
Definition: SiStripBaseDelay.h:30
SiStripBaseDelay::delayConstIt
std::vector< Delay >::const_iterator delayConstIt
Definition: SiStripBaseDelay.h:41
SiStripBaseDelay::fineDelay
uint16_t fineDelay(const uint32_t detId) const
Definition: SiStripBaseDelay.cc:23
SiStripBaseDelay::delay
double delay(const uint32_t detId) const
Definition: SiStripBaseDelay.cc:31
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:39
SiStripBaseDelay::put
bool put(const uint32_t detId, const uint16_t coarseDelay, const uint16_t fineDelay)
Definition: SiStripBaseDelay.cc:10
SiStripBaseDelay::delays
void delays(std::vector< Delay > &delays) const
Fill the input container with all the delays.
Definition: SiStripBaseDelay.h:49
SiStripBaseDelay::printDebug
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints the delays for all the detIds.
Definition: SiStripBaseDelay.cc:57
SiStripBaseDelay::delayIt
std::vector< Delay >::iterator delayIt
Definition: SiStripBaseDelay.h:40
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:46
SiStripBaseDelay::Delay
Definition: SiStripBaseDelay.h:29