#include <SiStripDelay.h>
Public Member Functions | |
void | clear () |
Empty all the containers. More... | |
void | fillNewDelay (const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair) |
const SiStripBaseDelay * | getBaseDelay (const uint32_t index) const |
float | getDelay (const uint32_t detId) const |
Return the delay combining all the baseDelays. More... | |
std::string | getLabelName (const uint32_t index) const |
size_t | getNumberOfTags () const |
std::string | getRcdName (const uint32_t index) const |
int | getTagSign (const uint32_t index) const |
bool | makeDelay () |
Builds the boost::unordered_map. More... | |
void | printDebug (std::stringstream &ss) const |
Prints the delays for all the detIds. More... | |
void | printSummary (std::stringstream &ss) const |
Prints the average value of the delays for all layers and wheels in the SiStripTracker. More... | |
SiStripDelay () | |
SiStripDelay (const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair) | |
virtual | ~SiStripDelay () |
Private Member Functions | |
const SiStripDelay & | operator= (const SiStripDelay &) |
SiStripDelay (const SiStripDelay &) | |
Private Attributes | |
std::vector< const SiStripBaseDelay * > | baseDelayVector_ |
boost::unordered_map< uint32_t, double > | delays_ |
std::vector< std::pair < std::string, std::string > > | recordLabelPair_ |
std::vector< int > | sumSignVector_ |
Author: M. De Mattia (demat) 25/10/2010: tia@ pd.in fn.i t
Dependent record used to combine the SiStripBaseDelays and provide the reconstruction with a single delay value.
When the object is built the list of values is stored in boost::unordered_map which, for the number of modules in the Tracker (~15000) resulted much faster (more than a factor 2) than a std::map or a lower_bound search in a sorted vector.
The base delays must be filled in together with the sign they will get in the summation: baseDelay1*sign1 + baseDelay2*sign2 + ...
Pointers to the baseDelays are stored and after the fill is complete the method "makeDelay" must be called to build the internal map.
This additional step is required such that we don't build the map anytime a new baseDelay is inserted and we don't make checks anytime the getDelay method is called.
NOTE: Even if the code does not rely on the presence of the same detIds in all the baseDelays, this condition should be fullfilled for consistency. The code checks only that the number of detIds is the same in all baseDelays.
Definition at line 32 of file SiStripDelay.h.
|
inline |
Definition at line 35 of file SiStripDelay.h.
|
inlinevirtual |
Definition at line 36 of file SiStripDelay.h.
|
inline |
Definition at line 38 of file SiStripDelay.h.
References fillNewDelay().
|
private |
void SiStripDelay::clear | ( | void | ) |
Empty all the containers.
Definition at line 110 of file SiStripDelay.cc.
References baseDelayVector_, delays_, recordLabelPair_, and sumSignVector_.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().
void SiStripDelay::fillNewDelay | ( | const SiStripBaseDelay & | baseDelay, |
const int | sumSign, | ||
const std::pair< std::string, std::string > & | recordLabelPair | ||
) |
Definition at line 19 of file SiStripDelay.cc.
References baseDelayVector_, recordLabelPair_, and sumSignVector_.
Referenced by SiStripDelay().
|
inline |
The second parameter allows to specify which delay to retrieve, considering that they are in input order. NOTE that no protection is inside the method (because we want to keep it very light) therefore it is the caller duty to check that the index is in the correct range.
Definition at line 62 of file SiStripDelay.h.
References baseDelayVector_, and getHLTprescales::index.
float SiStripDelay::getDelay | ( | const uint32_t | detId | ) | const |
Return the delay combining all the baseDelays.
Definition at line 27 of file SiStripDelay.cc.
References delays_.
|
inline |
Definition at line 75 of file SiStripDelay.h.
References getHLTprescales::index, and recordLabelPair_.
|
inline |
Definition at line 67 of file SiStripDelay.h.
References baseDelayVector_.
|
inline |
Definition at line 71 of file SiStripDelay.h.
References getHLTprescales::index, and recordLabelPair_.
|
inline |
Definition at line 79 of file SiStripDelay.h.
References getHLTprescales::index, and sumSignVector_.
bool SiStripDelay::makeDelay | ( | ) |
Builds the boost::unordered_map.
Definition at line 36 of file SiStripDelay.cc.
References baseDelayVector_, gather_cfg::cout, delays_, and sumSignVector_.
|
private |
void SiStripDelay::printDebug | ( | std::stringstream & | ss | ) | const |
Prints the delays for all the detIds.
Definition at line 118 of file SiStripDelay.cc.
References delays_.
void SiStripDelay::printSummary | ( | std::stringstream & | ss | ) | const |
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
Definition at line 126 of file SiStripDelay.cc.
References SiStripDetSummary::add(), delays_, and SiStripDetSummary::print().
|
private |
Definition at line 96 of file SiStripDelay.h.
Referenced by clear(), fillNewDelay(), getBaseDelay(), getNumberOfTags(), and makeDelay().
|
private |
Definition at line 99 of file SiStripDelay.h.
Referenced by clear(), getDelay(), makeDelay(), printDebug(), and printSummary().
|
private |
Definition at line 98 of file SiStripDelay.h.
Referenced by clear(), fillNewDelay(), getLabelName(), and getRcdName().
|
private |
Definition at line 97 of file SiStripDelay.h.
Referenced by clear(), fillNewDelay(), getTagSign(), and makeDelay().