#include <SiPixelPerformanceSummary.h>
Classes | |
struct | DetSummary |
class | MatchDetSummaryDetId |
class | StrictWeakOrdering |
Public Member Functions | |
void | clear () |
std::vector< uint32_t > | getAllDetIds () const |
std::vector< DetSummary > | getAllDetSummaries () const |
std::vector< float > | getDetSummary (uint32_t detId) const |
unsigned int | getLuminosityBlock () const |
unsigned int | getNumberOfEvents () const |
unsigned int | getRunNumber () const |
unsigned long long | getTimeStamp () const |
void | print () const |
void | print (const uint32_t detId) const |
void | printAll () const |
bool | setADC (uint32_t detId, float mean, float rms, float emPtn) |
bool | setClusterCharge (uint32_t detId, float mean, float rms, float emPtn) |
bool | setClusterChargeOffTrack (uint32_t detId, float mean, float rms) |
bool | setClusterChargeOnTrack (uint32_t detId, float mean, float rms) |
bool | setClusterSize (uint32_t detId, float mean, float rms, float emPtn) |
bool | setClusterSizeOffTrack (uint32_t detId, float mean, float rms) |
bool | setClusterSizeOnTrack (uint32_t detId, float mean, float rms) |
bool | setClusterSizeX (uint32_t detId, float mean, float rms, float emPtn) |
bool | setClusterSizeY (uint32_t detId, float mean, float rms, float emPtn) |
bool | setFractionOfTracks (uint32_t detId, float mean, float rms) |
void | setLuminosityBlock (unsigned int lumBlock) |
bool | setNumberOfClusters (uint32_t detId, float mean, float rms, float emPtn) |
bool | setNumberOfDeadCells (uint32_t detId, float nNpixCells) |
bool | setNumberOfDigis (uint32_t detId, float mean, float rms, float emPtn) |
void | setNumberOfEvents (unsigned int numberOfEvents) |
bool | setNumberOfNoisCells (uint32_t detId, float nNpixCells) |
bool | setNumberOfOffTrackClusters (uint32_t detId, float nClusters) |
bool | setNumberOfOnTrackClusters (uint32_t detId, float nClusters) |
bool | setNumberOfPixelHitsInTrackFit (uint32_t detId, float nPixelHits) |
bool | setNumberOfRecHits (uint32_t detId, float mean, float rms, float emPtn) |
bool | setRawDataErrorType (uint32_t detId, int bin, float nErrors) |
bool | setResidualX (uint32_t detId, float mean, float rms, float emPtn) |
bool | setResidualY (uint32_t detId, float mean, float rms, float emPtn) |
void | setRunNumber (unsigned int runNumber) |
void | setTimeStamp (unsigned long long timeStamp) |
SiPixelPerformanceSummary (const SiPixelPerformanceSummary &) | |
SiPixelPerformanceSummary () | |
unsigned int | size () |
~SiPixelPerformanceSummary () | |
Private Member Functions | |
float | getValue (uint32_t detId, int index) |
std::pair< bool, std::vector < DetSummary >::iterator > | initDet (const uint32_t detId) |
std::pair< bool, std::vector < DetSummary >::iterator > | setDet (const uint32_t detId, const std::vector< float > &performanceValues) |
bool | setValue (uint32_t detId, int index, float performanceValue) |
Private Attributes | |
std::vector< DetSummary > | allDetSummaries_ |
unsigned int | luminosityBlock_ |
unsigned int | numberOfEvents_ |
unsigned int | runNumber_ |
unsigned long long | timeStamp_ |
Definition at line 15 of file SiPixelPerformanceSummary.h.
SiPixelPerformanceSummary::SiPixelPerformanceSummary | ( | const SiPixelPerformanceSummary & | performanceSummary | ) |
Definition at line 15 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, getAllDetSummaries(), getLuminosityBlock(), getNumberOfEvents(), getRunNumber(), getTimeStamp(), luminosityBlock_, numberOfEvents_, runNumber_, and timeStamp_.
{ timeStamp_ = performanceSummary.getTimeStamp(); runNumber_ = performanceSummary.getRunNumber(); luminosityBlock_ = performanceSummary.getLuminosityBlock(); numberOfEvents_ = performanceSummary.getNumberOfEvents(); allDetSummaries_ = performanceSummary.getAllDetSummaries(); }
SiPixelPerformanceSummary::SiPixelPerformanceSummary | ( | ) |
Definition at line 11 of file SiPixelPerformanceSummary.cc.
: timeStamp_(0), runNumber_(0), luminosityBlock_(0), numberOfEvents_(0) {}
SiPixelPerformanceSummary::~SiPixelPerformanceSummary | ( | ) |
Definition at line 24 of file SiPixelPerformanceSummary.cc.
{}
void SiPixelPerformanceSummary::clear | ( | void | ) |
Definition at line 27 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, luminosityBlock_, numberOfEvents_, runNumber_, and timeStamp_.
{ timeStamp_=0; runNumber_=0; luminosityBlock_=0; numberOfEvents_=0; allDetSummaries_.clear(); }
vector< uint32_t > SiPixelPerformanceSummary::getAllDetIds | ( | ) | const |
Definition at line 181 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_.
{ vector<uint32_t> allDetIds; for (vector<DetSummary>::const_iterator iDetSumm = allDetSummaries_.begin(); iDetSumm!=allDetSummaries_.end(); ++iDetSumm) allDetIds.push_back(iDetSumm->detId_); return allDetIds; }
std::vector<DetSummary> SiPixelPerformanceSummary::getAllDetSummaries | ( | ) | const [inline] |
Definition at line 63 of file SiPixelPerformanceSummary.h.
References allDetSummaries_.
Referenced by SiPixelPerformanceSummary().
{ return allDetSummaries_; }
vector< float > SiPixelPerformanceSummary::getDetSummary | ( | uint32_t | detId | ) | const |
Definition at line 189 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, and gather_cfg::cout.
Referenced by getValue(), and print().
{ vector<DetSummary>::const_iterator iDetSumm = find_if(allDetSummaries_.begin(), allDetSummaries_.end(), MatchDetSummaryDetId(detId)); if (iDetSumm==allDetSummaries_.end()) { vector<float> performanceValues; cout << "cannot get DetSummary for detId = "<< detId; return performanceValues; } else return iDetSumm->performanceValues_; }
unsigned int SiPixelPerformanceSummary::getLuminosityBlock | ( | ) | const [inline] |
Definition at line 56 of file SiPixelPerformanceSummary.h.
References luminosityBlock_.
Referenced by SiPixelPerformanceSummary().
{ return luminosityBlock_; };
unsigned int SiPixelPerformanceSummary::getNumberOfEvents | ( | ) | const [inline] |
Definition at line 53 of file SiPixelPerformanceSummary.h.
References numberOfEvents_.
Referenced by SiPixelPerformanceSummary().
{ return numberOfEvents_; }
unsigned int SiPixelPerformanceSummary::getRunNumber | ( | ) | const [inline] |
Definition at line 50 of file SiPixelPerformanceSummary.h.
References runNumber_.
Referenced by SiPixelPerformanceSummary().
{ return runNumber_; }
unsigned long long SiPixelPerformanceSummary::getTimeStamp | ( | ) | const [inline] |
Definition at line 47 of file SiPixelPerformanceSummary.h.
References timeStamp_.
Referenced by SiPixelPerformanceSummary().
{ return timeStamp_; }
float SiPixelPerformanceSummary::getValue | ( | uint32_t | detId, |
int | index | ||
) | [private] |
Definition at line 81 of file SiPixelPerformanceSummary.cc.
References gather_cfg::cout, getDetSummary(), kDefaultValue, and kDetSummarySize.
{ if (index>kDetSummarySize) { cout << "cannot get value for detId = "<< detId <<" index = "<< index <<" > "<< kDetSummarySize; return kDefaultValue; } vector<float> performanceValues = getDetSummary(detId); if (performanceValues.size()==kDetSummarySize) return performanceValues[index]; else return kDefaultValue; }
pair< bool, vector< SiPixelPerformanceSummary::DetSummary >::iterator > SiPixelPerformanceSummary::initDet | ( | const uint32_t | detId | ) | [private] |
Definition at line 33 of file SiPixelPerformanceSummary.cc.
References i, kDefaultValue, kDetSummarySize, and setDet().
Referenced by setValue().
{ vector<float> performanceValues; for (int i=0; i<kDetSummarySize; ++i) performanceValues.push_back(kDefaultValue); return setDet(detId, performanceValues); }
void SiPixelPerformanceSummary::print | ( | void | ) | const |
Definition at line 210 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, gather_cfg::cout, luminosityBlock_, numberOfEvents_, runNumber_, and timeStamp_.
Referenced by printAll().
{ cout << "SiPixelPerformanceSummary size (allDets) = "<< allDetSummaries_.size() << ", " << "time stamp = "<< timeStamp_ << ", " << "run number = "<< runNumber_ << ", " << "luminosity section = "<< luminosityBlock_ << ", " << "number of events = "<< numberOfEvents_ << endl; }
void SiPixelPerformanceSummary::print | ( | const uint32_t | detId | ) | const |
Definition at line 202 of file SiPixelPerformanceSummary.cc.
References gather_cfg::cout, getDetSummary(), and v.
void SiPixelPerformanceSummary::printAll | ( | ) | const |
Definition at line 219 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, and print().
{ print(); for (vector<DetSummary>::const_iterator iDetSumm = allDetSummaries_.begin(); iDetSumm!=allDetSummaries_.end(); ++iDetSumm) print(iDetSumm->detId_); }
bool SiPixelPerformanceSummary::setADC | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 101 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterCharge | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 110 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterChargeOffTrack | ( | uint32_t | detId, |
float | mean, | ||
float | rms | ||
) |
Definition at line 169 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterChargeOnTrack | ( | uint32_t | detId, |
float | mean, | ||
float | rms | ||
) |
Definition at line 165 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterSize | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 114 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterSizeOffTrack | ( | uint32_t | detId, |
float | mean, | ||
float | rms | ||
) |
Definition at line 177 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterSizeOnTrack | ( | uint32_t | detId, |
float | mean, | ||
float | rms | ||
) |
Definition at line 173 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterSizeX | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 118 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setClusterSizeY | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 122 of file SiPixelPerformanceSummary.cc.
References setValue().
pair< bool, vector< SiPixelPerformanceSummary::DetSummary >::iterator > SiPixelPerformanceSummary::setDet | ( | const uint32_t | detId, |
const std::vector< float > & | performanceValues | ||
) | [private] |
Definition at line 41 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, gather_cfg::cout, SiPixelPerformanceSummary::DetSummary::detId_, kDetSummarySize, and SiPixelPerformanceSummary::DetSummary::performanceValues_.
Referenced by initDet().
{ vector<DetSummary>::iterator iDetSumm = allDetSummaries_.end(); if (performanceValues.size()!=kDetSummarySize) { // for inappropriate input cout << "not adding these "<< performanceValues.size() << " values; " << "SiPixelPerformanceSummary can only add "<< kDetSummarySize <<" values per DetSummary"; return make_pair(false, iDetSumm); } iDetSumm = lower_bound(allDetSummaries_.begin(), allDetSummaries_.end(), detId, SiPixelPerformanceSummary::StrictWeakOrdering()); if (iDetSumm!=allDetSummaries_.end() && // for an existong entry iDetSumm->detId_==detId) return make_pair(false, iDetSumm); DetSummary newDetSumm; // for a new entry, put at (position-1) returned by StrictWeakOrdering newDetSumm.detId_ = detId; newDetSumm.performanceValues_ = performanceValues; return make_pair(true, allDetSummaries_.insert(iDetSumm, newDetSumm)); }
bool SiPixelPerformanceSummary::setFractionOfTracks | ( | uint32_t | detId, |
float | mean, | ||
float | rms | ||
) |
Definition at line 153 of file SiPixelPerformanceSummary.cc.
References setValue().
void SiPixelPerformanceSummary::setLuminosityBlock | ( | unsigned int | lumBlock | ) | [inline] |
Definition at line 55 of file SiPixelPerformanceSummary.h.
References luminosityBlock_.
{ luminosityBlock_ = lumBlock; }
bool SiPixelPerformanceSummary::setNumberOfClusters | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 106 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setNumberOfDeadCells | ( | uint32_t | detId, |
float | nNpixCells | ||
) |
Definition at line 145 of file SiPixelPerformanceSummary.cc.
References setValue().
{ return setValue(detId, 46, nNpixCells); }
bool SiPixelPerformanceSummary::setNumberOfDigis | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 97 of file SiPixelPerformanceSummary.cc.
References setValue().
void SiPixelPerformanceSummary::setNumberOfEvents | ( | unsigned int | numberOfEvents | ) | [inline] |
Definition at line 52 of file SiPixelPerformanceSummary.h.
References numberOfEvents_.
{ numberOfEvents_ = numberOfEvents; }
bool SiPixelPerformanceSummary::setNumberOfNoisCells | ( | uint32_t | detId, |
float | nNpixCells | ||
) |
Definition at line 141 of file SiPixelPerformanceSummary.cc.
References setValue().
{ return setValue(detId, 45, nNpixCells); }
bool SiPixelPerformanceSummary::setNumberOfOffTrackClusters | ( | uint32_t | detId, |
float | nClusters | ||
) |
Definition at line 161 of file SiPixelPerformanceSummary.cc.
References setValue().
{ return setValue(detId, 51, nClusters); }
bool SiPixelPerformanceSummary::setNumberOfOnTrackClusters | ( | uint32_t | detId, |
float | nClusters | ||
) |
Definition at line 157 of file SiPixelPerformanceSummary.cc.
References setValue().
{ return setValue(detId, 50, nClusters); }
bool SiPixelPerformanceSummary::setNumberOfPixelHitsInTrackFit | ( | uint32_t | detId, |
float | nPixelHits | ||
) |
Definition at line 149 of file SiPixelPerformanceSummary.cc.
References setValue().
{ return setValue(detId, 47, nPixelHits); }
bool SiPixelPerformanceSummary::setNumberOfRecHits | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 127 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setRawDataErrorType | ( | uint32_t | detId, |
int | bin, | ||
float | nErrors | ||
) |
Definition at line 92 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setResidualX | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 132 of file SiPixelPerformanceSummary.cc.
References setValue().
bool SiPixelPerformanceSummary::setResidualY | ( | uint32_t | detId, |
float | mean, | ||
float | rms, | ||
float | emPtn | ||
) |
Definition at line 136 of file SiPixelPerformanceSummary.cc.
References setValue().
void SiPixelPerformanceSummary::setRunNumber | ( | unsigned int | runNumber | ) | [inline] |
Definition at line 49 of file SiPixelPerformanceSummary.h.
References convertSQLiteXML::runNumber, and runNumber_.
{ runNumber_ = runNumber; }
void SiPixelPerformanceSummary::setTimeStamp | ( | unsigned long long | timeStamp | ) | [inline] |
Definition at line 46 of file SiPixelPerformanceSummary.h.
References stor::utils::timeStamp(), and timeStamp_.
{ timeStamp_ = timeStamp; }
bool SiPixelPerformanceSummary::setValue | ( | uint32_t | detId, |
int | index, | ||
float | performanceValue | ||
) | [private] |
Definition at line 63 of file SiPixelPerformanceSummary.cc.
References allDetSummaries_, gather_cfg::cout, getHLTprescales::index, initDet(), and kDetSummarySize.
Referenced by setADC(), setClusterCharge(), setClusterChargeOffTrack(), setClusterChargeOnTrack(), setClusterSize(), setClusterSizeOffTrack(), setClusterSizeOnTrack(), setClusterSizeX(), setClusterSizeY(), setFractionOfTracks(), setNumberOfClusters(), setNumberOfDeadCells(), setNumberOfDigis(), setNumberOfNoisCells(), setNumberOfOffTrackClusters(), setNumberOfOnTrackClusters(), setNumberOfPixelHitsInTrackFit(), setNumberOfRecHits(), setRawDataErrorType(), setResidualX(), and setResidualY().
{ if (index>kDetSummarySize) { cout << "cannot set the performance value for index = "<< index <<" > "<< kDetSummarySize; return false; } pair<bool, vector<DetSummary>::iterator> initResult = initDet(detId); if (initResult.first || initResult.second!=allDetSummaries_.end()) { initResult.second->performanceValues_[index] = performanceValue; return true; } else { cout << "cannot set the performance value; cannot create new entry for detId = "<< detId; return false; } return true; }
unsigned int SiPixelPerformanceSummary::size | ( | void | ) | [inline] |
Definition at line 44 of file SiPixelPerformanceSummary.h.
References allDetSummaries_.
{ return allDetSummaries_.size(); }
std::vector<DetSummary> SiPixelPerformanceSummary::allDetSummaries_ [private] |
Definition at line 108 of file SiPixelPerformanceSummary.h.
Referenced by clear(), getAllDetIds(), getAllDetSummaries(), getDetSummary(), print(), printAll(), setDet(), setValue(), SiPixelPerformanceSummary(), and size().
unsigned int SiPixelPerformanceSummary::luminosityBlock_ [private] |
Definition at line 105 of file SiPixelPerformanceSummary.h.
Referenced by clear(), getLuminosityBlock(), print(), setLuminosityBlock(), and SiPixelPerformanceSummary().
unsigned int SiPixelPerformanceSummary::numberOfEvents_ [private] |
Definition at line 106 of file SiPixelPerformanceSummary.h.
Referenced by clear(), getNumberOfEvents(), print(), setNumberOfEvents(), and SiPixelPerformanceSummary().
unsigned int SiPixelPerformanceSummary::runNumber_ [private] |
Definition at line 104 of file SiPixelPerformanceSummary.h.
Referenced by clear(), getRunNumber(), print(), setRunNumber(), and SiPixelPerformanceSummary().
unsigned long long SiPixelPerformanceSummary::timeStamp_ [private] |
Definition at line 103 of file SiPixelPerformanceSummary.h.
Referenced by clear(), getTimeStamp(), print(), setTimeStamp(), and SiPixelPerformanceSummary().