CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
SiStripBaseDelay Class Reference

#include <SiStripBaseDelay.h>

Classes

struct  Delay
 

Public Types

typedef std::vector< Delay >::const_iterator delayConstIt
 
typedef std::vector< Delay >::iterator delayIt
 

Public Member Functions

uint16_t coarseDelay (const uint32_t detId)
 
double delay (const uint32_t detId) const
 
void delays (std::vector< Delay > &delays) const
 Fill the input container with all the delays. More...
 
uint32_t delaysSize () const
 Get the total number of delays stored (should equal the total number of modules in the SiStripTracker) More...
 
void detIds (std::vector< uint32_t > &detIdVector) const
 Get the list of all detIds for which a delay is stored. More...
 
uint16_t fineDelay (const uint32_t detId) const
 
void printDebug (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 Prints the delays for all the detIds. More...
 
void printSummary (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 Prints the average value of the delays for all layers and wheels in the SiStripTracker. More...
 
bool put (const uint32_t detId, const uint16_t coarseDelay, const uint16_t fineDelay)
 
 SiStripBaseDelay ()
 

Private Member Functions

double makeDelay (const uint16_t coarseDelay, const uint16_t fineDelay) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< Delaydelays_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Author: M. De Mattia (demat.nosp@m.tia@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t) 25/10/2010:

Base Delay object containing the PLL or time of flight delays.
It stores the values in a vector<Delay>, which is not sorted.
This object can be used directly to access the information on the delays for each detId. However, it is recommended to use the SiStripDelay dependent record which is able to combine multiple BaseDelays and provides a much faster access to the information.

Definition at line 24 of file SiStripBaseDelay.h.

Member Typedef Documentation

◆ delayConstIt

typedef std::vector<Delay>::const_iterator SiStripBaseDelay::delayConstIt

Definition at line 41 of file SiStripBaseDelay.h.

◆ delayIt

typedef std::vector<Delay>::iterator SiStripBaseDelay::delayIt

Definition at line 40 of file SiStripBaseDelay.h.

Constructor & Destructor Documentation

◆ SiStripBaseDelay()

SiStripBaseDelay::SiStripBaseDelay ( )
inline

Definition at line 26 of file SiStripBaseDelay.h.

26 {}

Member Function Documentation

◆ coarseDelay()

uint16_t SiStripBaseDelay::coarseDelay ( const uint32_t  detId)

Definition at line 15 of file SiStripBaseDelay.cc.

15  {
16  delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId);
17  if (it != delays_.end()) {
18  return it->coarseDelay;
19  }
20  return 0;
21 }

References delays_, and SiStripBaseDelay::Delay::detId.

Referenced by makeDelay(), and put().

◆ delay()

double SiStripBaseDelay::delay ( const uint32_t  detId) const

Definition at line 31 of file SiStripBaseDelay.cc.

31  {
32  delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId);
33  if (it != delays_.end()) {
34  return makeDelay(it->coarseDelay, it->fineDelay);
35  }
36  return 0;
37 }

References delays_, SiStripBaseDelay::Delay::detId, and makeDelay().

◆ delays()

void SiStripBaseDelay::delays ( std::vector< Delay > &  delays) const
inline

Fill the input container with all the delays.

Definition at line 49 of file SiStripBaseDelay.h.

49 { delays = delays_; }

References delays_.

◆ delaysSize()

uint32_t SiStripBaseDelay::delaysSize ( ) const
inline

Get the total number of delays stored (should equal the total number of modules in the SiStripTracker)

Definition at line 55 of file SiStripBaseDelay.h.

55 { return delays_.size(); }

References delays_.

◆ detIds()

void SiStripBaseDelay::detIds ( std::vector< uint32_t > &  detIdVector) const

Get the list of all detIds for which a delay is stored.

Definition at line 39 of file SiStripBaseDelay.cc.

39  {
40  std::vector<Delay>::const_iterator it = delays_.begin();
41  for (; it != delays_.end(); ++it) {
42  detIdVector.push_back(it->detId);
43  }
44 }

References delays_.

◆ fineDelay()

uint16_t SiStripBaseDelay::fineDelay ( const uint32_t  detId) const

Definition at line 23 of file SiStripBaseDelay.cc.

23  {
24  delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId);
25  if (it != delays_.end()) {
26  return it->fineDelay;
27  }
28  return 0;
29 }

References delays_, and SiStripBaseDelay::Delay::detId.

Referenced by makeDelay(), and put().

◆ makeDelay()

double SiStripBaseDelay::makeDelay ( const uint16_t  coarseDelay,
const uint16_t  fineDelay 
) const
inlineprivate

Definition at line 63 of file SiStripBaseDelay.h.

63  {
64  return (coarseDelay * 25 + fineDelay * (25 / 24.));
65  }

References coarseDelay(), and fineDelay().

Referenced by delay(), printDebug(), and printSummary().

◆ printDebug()

void SiStripBaseDelay::printDebug ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints the delays for all the detIds.

Definition at line 57 of file SiStripBaseDelay.cc.

57  {
58  printSummary(ss, trackerTopo);
59  delayConstIt it = delays_.begin();
60  ss << std::endl << "All pedestal values:" << std::endl;
61  for (; it != delays_.end(); ++it) {
62  ss << "detId = " << it->detId << " delay = " << makeDelay(it->coarseDelay, it->fineDelay) << std::endl;
63  }
64 }

References delays_, makeDelay(), printSummary(), and contentValuesCheck::ss.

◆ printSummary()

void SiStripBaseDelay::printSummary ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints the average value of the delays for all layers and wheels in the SiStripTracker.

Definition at line 46 of file SiStripBaseDelay.cc.

46  {
47  ss << "Total number of delays = " << delays_.size() << std::endl;
48  SiStripDetSummary summaryDelays{trackerTopo};
49  delayConstIt it = delays_.begin();
50  for (; it != delays_.end(); ++it) {
51  summaryDelays.add(it->detId, makeDelay(it->coarseDelay, it->fineDelay));
52  }
53  ss << std::endl << "Summary:" << std::endl;
54  summaryDelays.print(ss);
55 }

References delays_, makeDelay(), and contentValuesCheck::ss.

Referenced by printDebug().

◆ put()

bool SiStripBaseDelay::put ( const uint32_t  detId,
const uint16_t  coarseDelay,
const uint16_t  fineDelay 
)

Definition at line 10 of file SiStripBaseDelay.cc.

10  {
11  delays_.push_back(Delay(detId, coarseDelay, fineDelay));
12  return true;
13 }

References coarseDelay(), delays_, and fineDelay().

◆ serialize()

template<class Archive >
void SiStripBaseDelay::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 69 of file SiStripBaseDelay.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 69 of file SiStripBaseDelay.h.

Member Data Documentation

◆ delays_

std::vector<Delay> SiStripBaseDelay::delays_
private
SiStripBaseDelay::coarseDelay
uint16_t coarseDelay(const uint32_t detId)
Definition: SiStripBaseDelay.cc:15
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::Delay::detId
uint32_t detId
Definition: SiStripBaseDelay.h:34
SiStripBaseDelay::delays_
std::vector< Delay > delays_
Definition: SiStripBaseDelay.h:67
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::delays
void delays(std::vector< Delay > &delays) const
Fill the input container with all the delays.
Definition: SiStripBaseDelay.h:49
SiStripDetSummary
Definition: SiStripDetSummary.h:28
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