#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. | |
uint32_t | delaysSize () const |
Get the total number of delays stored (should equal the total number of modules in the SiStripTracker) | |
void | detIds (std::vector< uint32_t > &detIdVector) const |
Get the list of all detIds for which a delay is stored. | |
uint16_t | fineDelay (const uint32_t detId) const |
void | printDebug (std::stringstream &ss) const |
Prints the delays for all the detIds. | |
void | printSummary (std::stringstream &ss) const |
Prints the average value of the delays for all layers and wheels in the SiStripTracker. | |
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 |
Private Attributes | |
std::vector< Delay > | delays_ |
Author: M. De Mattia (demattia@pd.infn.it) 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 22 of file SiStripBaseDelay.h.
typedef std::vector<Delay>::const_iterator SiStripBaseDelay::delayConstIt |
Definition at line 47 of file SiStripBaseDelay.h.
typedef std::vector<Delay>::iterator SiStripBaseDelay::delayIt |
Definition at line 46 of file SiStripBaseDelay.h.
SiStripBaseDelay::SiStripBaseDelay | ( | ) | [inline] |
Definition at line 26 of file SiStripBaseDelay.h.
{}
uint16_t SiStripBaseDelay::coarseDelay | ( | const uint32_t | detId | ) |
Definition at line 14 of file SiStripBaseDelay.cc.
References delays_, and SiStripBaseDelay::Delay::detId.
{ delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId); if( it != delays_.end() ) { return it->coarseDelay; } return 0; }
double SiStripBaseDelay::delay | ( | const uint32_t | detId | ) | const |
Definition at line 32 of file SiStripBaseDelay.cc.
References delays_, SiStripBaseDelay::Delay::detId, and makeDelay().
{ delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId); if( it != delays_.end() ) { return makeDelay(it->coarseDelay, it->fineDelay); } return 0; }
void SiStripBaseDelay::delays | ( | std::vector< Delay > & | delays | ) | const [inline] |
Fill the input container with all the delays.
Definition at line 55 of file SiStripBaseDelay.h.
References delays_.
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 64 of file SiStripBaseDelay.h.
References delays_.
{ return delays_.size(); }
void SiStripBaseDelay::detIds | ( | std::vector< uint32_t > & | detIdVector | ) | const |
Get the list of all detIds for which a delay is stored.
Definition at line 41 of file SiStripBaseDelay.cc.
References delays_.
uint16_t SiStripBaseDelay::fineDelay | ( | const uint32_t | detId | ) | const |
Definition at line 23 of file SiStripBaseDelay.cc.
References delays_, and SiStripBaseDelay::Delay::detId.
{ delayConstIt it = std::find_if(delays_.begin(), delays_.end(), boost::bind(&Delay::detId, _1) == detId); if( it != delays_.end() ) { return it->fineDelay; } return 0; }
double SiStripBaseDelay::makeDelay | ( | const uint16_t | coarseDelay, |
const uint16_t | fineDelay | ||
) | const [inline, private] |
Definition at line 76 of file SiStripBaseDelay.h.
Referenced by delay(), printDebug(), and printSummary().
{ return( coarseDelay*25 + fineDelay*(25/24.) ); }
void SiStripBaseDelay::printDebug | ( | std::stringstream & | ss | ) | const |
Prints the delays for all the detIds.
Definition at line 61 of file SiStripBaseDelay.cc.
References delays_, makeDelay(), and printSummary().
{ printSummary(ss); delayConstIt it = delays_.begin(); ss << std::endl << "All pedestal values:" << std::endl; for( ; it != delays_.end(); ++it ) { ss << "detId = " << it->detId << " delay = " << makeDelay(it->coarseDelay, it->fineDelay) << std::endl; } }
void SiStripBaseDelay::printSummary | ( | std::stringstream & | ss | ) | const |
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
Definition at line 49 of file SiStripBaseDelay.cc.
References SiStripDetSummary::add(), delays_, makeDelay(), and SiStripDetSummary::print().
Referenced by printDebug().
{ ss << "Total number of delays = " << delays_.size() << std::endl; SiStripDetSummary summaryDelays; delayConstIt it = delays_.begin(); for( ; it != delays_.end(); ++it ) { summaryDelays.add(it->detId, makeDelay(it->coarseDelay, it->fineDelay)); } ss << std::endl << "Summary:" << std::endl; summaryDelays.print(ss); }
bool SiStripBaseDelay::put | ( | const uint32_t | detId, |
const uint16_t | coarseDelay, | ||
const uint16_t | fineDelay | ||
) |
Definition at line 8 of file SiStripBaseDelay.cc.
References delays_.
Referenced by SiStripBaseDelayGenerator::createObject().
{ delays_.push_back(Delay(detId, coarseDelay, fineDelay)); return true; }
std::vector<Delay> SiStripBaseDelay::delays_ [private] |
Definition at line 81 of file SiStripBaseDelay.h.
Referenced by coarseDelay(), delay(), delays(), delaysSize(), detIds(), fineDelay(), printDebug(), printSummary(), and put().