CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
SiPixelPerformanceSummary Class Reference

#include <SiPixelPerformanceSummary.h>

Classes

struct  DetSummary
 
class  MatchDetSummaryDetId
 
class  StrictWeakOrdering
 

Public Member Functions

void clear ()
 
std::vector< uint32_t > getAllDetIds () const
 
std::vector< DetSummarygetAllDetSummaries () 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< DetSummaryallDetSummaries_
 
unsigned int luminosityBlock_
 
unsigned int numberOfEvents_
 
unsigned int runNumber_
 
unsigned long long timeStamp_
 

Detailed Description

Definition at line 15 of file SiPixelPerformanceSummary.h.

Constructor & Destructor Documentation

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_.

15  {
16  timeStamp_ = performanceSummary.getTimeStamp();
17  runNumber_ = performanceSummary.getRunNumber();
18  luminosityBlock_ = performanceSummary.getLuminosityBlock();
19  numberOfEvents_ = performanceSummary.getNumberOfEvents();
20  allDetSummaries_ = performanceSummary.getAllDetSummaries();
21 }
std::vector< DetSummary > getAllDetSummaries() const
unsigned int getRunNumber() const
std::vector< DetSummary > allDetSummaries_
unsigned int getNumberOfEvents() const
unsigned int getLuminosityBlock() const
unsigned long long getTimeStamp() const
SiPixelPerformanceSummary::SiPixelPerformanceSummary ( )
SiPixelPerformanceSummary::~SiPixelPerformanceSummary ( )

Definition at line 24 of file SiPixelPerformanceSummary.cc.

24 {}

Member Function Documentation

void SiPixelPerformanceSummary::clear ( void  )
vector< uint32_t > SiPixelPerformanceSummary::getAllDetIds ( ) const

Definition at line 181 of file SiPixelPerformanceSummary.cc.

References allDetSummaries_.

181  {
182  vector<uint32_t> allDetIds;
183  for (vector<DetSummary>::const_iterator iDetSumm = allDetSummaries_.begin();
184  iDetSumm!=allDetSummaries_.end(); ++iDetSumm) allDetIds.push_back(iDetSumm->detId_);
185  return allDetIds;
186 }
std::vector< DetSummary > allDetSummaries_
std::vector<DetSummary> SiPixelPerformanceSummary::getAllDetSummaries ( ) const
inline

Definition at line 63 of file SiPixelPerformanceSummary.h.

References allDetSummaries_.

Referenced by SiPixelPerformanceSummary().

63 { return allDetSummaries_; }
std::vector< DetSummary > 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().

189  {
190  vector<DetSummary>::const_iterator iDetSumm = find_if(allDetSummaries_.begin(),
191  allDetSummaries_.end(),
192  MatchDetSummaryDetId(detId));
193  if (iDetSumm==allDetSummaries_.end()) {
194  vector<float> performanceValues;
195  cout << "cannot get DetSummary for detId = "<< detId;
196  return performanceValues;
197  }
198  else return iDetSumm->performanceValues_;
199 }
std::vector< DetSummary > allDetSummaries_
tuple cout
Definition: gather_cfg.py:121
unsigned int SiPixelPerformanceSummary::getLuminosityBlock ( ) const
inline

Definition at line 56 of file SiPixelPerformanceSummary.h.

References luminosityBlock_.

Referenced by SiPixelPerformanceSummary().

56 { return luminosityBlock_; };
unsigned int SiPixelPerformanceSummary::getNumberOfEvents ( ) const
inline

Definition at line 53 of file SiPixelPerformanceSummary.h.

References numberOfEvents_.

Referenced by SiPixelPerformanceSummary().

53 { return numberOfEvents_; }
unsigned int SiPixelPerformanceSummary::getRunNumber ( ) const
inline

Definition at line 50 of file SiPixelPerformanceSummary.h.

References runNumber_.

Referenced by SiPixelPerformanceSummary().

50 { return runNumber_; }
unsigned long long SiPixelPerformanceSummary::getTimeStamp ( ) const
inline

Definition at line 47 of file SiPixelPerformanceSummary.h.

References timeStamp_.

Referenced by SiPixelPerformanceSummary().

47 { 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.

81  {
82  if (index>kDetSummarySize) {
83  cout << "cannot get value for detId = "<< detId <<" index = "<< index <<" > "<< kDetSummarySize;
84  return kDefaultValue;
85  }
86  vector<float> performanceValues = getDetSummary(detId);
87  if (performanceValues.size()==kDetSummarySize) return performanceValues[index];
88  else return kDefaultValue;
89 }
std::vector< float > getDetSummary(uint32_t detId) const
#define kDefaultValue
#define kDetSummarySize
tuple cout
Definition: gather_cfg.py:121
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().

33  {
34  vector<float> performanceValues;
35  for (int i=0; i<kDetSummarySize; ++i) performanceValues.push_back(kDefaultValue);
36  return setDet(detId, performanceValues);
37 }
int i
Definition: DBlmapReader.cc:9
std::pair< bool, std::vector< DetSummary >::iterator > setDet(const uint32_t detId, const std::vector< float > &performanceValues)
#define kDefaultValue
#define kDetSummarySize
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().

210  {
211  cout << "SiPixelPerformanceSummary size (allDets) = "<< allDetSummaries_.size() << ", "
212  << "time stamp = "<< timeStamp_ << ", "
213  << "run number = "<< runNumber_ << ", "
214  << "luminosity section = "<< luminosityBlock_ << ", "
215  << "number of events = "<< numberOfEvents_ << endl;
216 }
std::vector< DetSummary > allDetSummaries_
tuple cout
Definition: gather_cfg.py:121
void SiPixelPerformanceSummary::print ( const uint32_t  detId) const

Definition at line 202 of file SiPixelPerformanceSummary.cc.

References gather_cfg::cout, getDetSummary(), and v.

202  {
203  vector<float> performanceValues = getDetSummary(detId);
204  cout << "DetSummary for detId "<< detId <<" : ";
205  for (vector<float>::const_iterator v = performanceValues.begin(); v!=performanceValues.end(); ++v) cout <<" "<< *v;
206  cout << endl;
207 }
std::vector< float > getDetSummary(uint32_t detId) const
tuple cout
Definition: gather_cfg.py:121
mathSSE::Vec4< T > v
void SiPixelPerformanceSummary::printAll ( ) const

Definition at line 219 of file SiPixelPerformanceSummary.cc.

References allDetSummaries_, and print().

219  {
220  print();
221  for (vector<DetSummary>::const_iterator iDetSumm = allDetSummaries_.begin();
222  iDetSumm!=allDetSummaries_.end(); ++iDetSumm) print(iDetSumm->detId_);
223 }
std::vector< DetSummary > allDetSummaries_
bool SiPixelPerformanceSummary::setADC ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 101 of file SiPixelPerformanceSummary.cc.

References setValue().

101  {
102  return (setValue(detId, 18, mean) && setValue(detId, 19, rms) && setValue(detId, 20, emPtn));
103 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterCharge ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 110 of file SiPixelPerformanceSummary.cc.

References setValue().

110  {
111  return (setValue(detId, 24, mean) && setValue(detId, 25, rms) && setValue(detId, 26, emPtn));
112 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterChargeOffTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 169 of file SiPixelPerformanceSummary.cc.

References setValue().

169  {
170  return (setValue(detId, 54, mean) && setValue(detId, 55, rms));
171 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterChargeOnTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 165 of file SiPixelPerformanceSummary.cc.

References setValue().

165  {
166  return (setValue(detId, 52, mean) && setValue(detId, 53, rms));
167 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterSize ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 114 of file SiPixelPerformanceSummary.cc.

References setValue().

114  {
115  return (setValue(detId, 27, mean) && setValue(detId, 28, rms) && setValue(detId, 29, emPtn));
116 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterSizeOffTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 177 of file SiPixelPerformanceSummary.cc.

References setValue().

177  {
178  return (setValue(detId, 58, mean) && setValue(detId, 59, rms));
179 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterSizeOnTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 173 of file SiPixelPerformanceSummary.cc.

References setValue().

173  {
174  return (setValue(detId, 56, mean) && setValue(detId, 57, rms));
175 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterSizeX ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 118 of file SiPixelPerformanceSummary.cc.

References setValue().

118  {
119  return (setValue(detId, 30, mean) && setValue(detId, 31, rms) && setValue(detId, 32, emPtn));
120 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setClusterSizeY ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 122 of file SiPixelPerformanceSummary.cc.

References setValue().

122  {
123  return (setValue(detId, 33, mean) && setValue(detId, 34, rms) && setValue(detId, 35, emPtn));
124 }
bool setValue(uint32_t detId, int index, float performanceValue)
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().

42  {
43  vector<DetSummary>::iterator iDetSumm = allDetSummaries_.end();
44 
45  if (performanceValues.size()!=kDetSummarySize) { // for inappropriate input
46  cout << "not adding these "<< performanceValues.size() << " values; "
47  << "SiPixelPerformanceSummary can only add "<< kDetSummarySize <<" values per DetSummary";
48  return make_pair(false, iDetSumm);
49  }
50  iDetSumm = lower_bound(allDetSummaries_.begin(), allDetSummaries_.end(),
52 
53  if (iDetSumm!=allDetSummaries_.end() && // for an existong entry
54  iDetSumm->detId_==detId) return make_pair(false, iDetSumm);
55 
56  DetSummary newDetSumm; // for a new entry, put at (position-1) returned by StrictWeakOrdering
57  newDetSumm.detId_ = detId;
58  newDetSumm.performanceValues_ = performanceValues;
59  return make_pair(true, allDetSummaries_.insert(iDetSumm, newDetSumm));
60 }
std::vector< DetSummary > allDetSummaries_
#define kDetSummarySize
tuple cout
Definition: gather_cfg.py:121
bool SiPixelPerformanceSummary::setFractionOfTracks ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 153 of file SiPixelPerformanceSummary.cc.

References setValue().

153  {
154  return (setValue(detId, 48, mean) && setValue(detId, 49, rms));
155 }
bool setValue(uint32_t detId, int index, float performanceValue)
void SiPixelPerformanceSummary::setLuminosityBlock ( unsigned int  lumBlock)
inline

Definition at line 55 of file SiPixelPerformanceSummary.h.

References luminosityBlock_.

55 { luminosityBlock_ = lumBlock; }
bool SiPixelPerformanceSummary::setNumberOfClusters ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 106 of file SiPixelPerformanceSummary.cc.

References setValue().

106  {
107  return (setValue(detId, 21, mean) && setValue(detId, 22, rms) && setValue(detId, 23, emPtn));
108 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfDeadCells ( uint32_t  detId,
float  nNpixCells 
)

Definition at line 145 of file SiPixelPerformanceSummary.cc.

References setValue().

145  {
146  return setValue(detId, 46, nNpixCells);
147 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfDigis ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 97 of file SiPixelPerformanceSummary.cc.

References setValue().

97  {
98  return (setValue(detId, 15, mean) && setValue(detId, 16, rms) && setValue(detId, 17, emPtn));
99 }
bool setValue(uint32_t detId, int index, float performanceValue)
void SiPixelPerformanceSummary::setNumberOfEvents ( unsigned int  numberOfEvents)
inline

Definition at line 52 of file SiPixelPerformanceSummary.h.

References numberOfEvents_.

52 { numberOfEvents_ = numberOfEvents; }
bool SiPixelPerformanceSummary::setNumberOfNoisCells ( uint32_t  detId,
float  nNpixCells 
)

Definition at line 141 of file SiPixelPerformanceSummary.cc.

References setValue().

141  {
142  return setValue(detId, 45, nNpixCells);
143 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfOffTrackClusters ( uint32_t  detId,
float  nClusters 
)

Definition at line 161 of file SiPixelPerformanceSummary.cc.

References setValue().

161  {
162  return setValue(detId, 51, nClusters);
163 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfOnTrackClusters ( uint32_t  detId,
float  nClusters 
)

Definition at line 157 of file SiPixelPerformanceSummary.cc.

References setValue().

157  {
158  return setValue(detId, 50, nClusters);
159 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfPixelHitsInTrackFit ( uint32_t  detId,
float  nPixelHits 
)

Definition at line 149 of file SiPixelPerformanceSummary.cc.

References setValue().

149  {
150  return setValue(detId, 47, nPixelHits);
151 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setNumberOfRecHits ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 127 of file SiPixelPerformanceSummary.cc.

References setValue().

127  {
128  return (setValue(detId, 36, mean) && setValue(detId, 37, rms) && setValue(detId, 38, emPtn));
129 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setRawDataErrorType ( uint32_t  detId,
int  bin,
float  nErrors 
)

Definition at line 92 of file SiPixelPerformanceSummary.cc.

References setValue().

92  {
93  return setValue(detId, bin, nErrors);
94 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setResidualX ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 132 of file SiPixelPerformanceSummary.cc.

References setValue().

132  {
133  return (setValue(detId, 39, mean) && setValue(detId, 40, rms) && setValue(detId, 41, emPtn));
134 }
bool setValue(uint32_t detId, int index, float performanceValue)
bool SiPixelPerformanceSummary::setResidualY ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 136 of file SiPixelPerformanceSummary.cc.

References setValue().

136  {
137  return (setValue(detId, 42, mean) && setValue(detId, 43, rms) && setValue(detId, 44, emPtn));
138 }
bool setValue(uint32_t detId, int index, float performanceValue)
void SiPixelPerformanceSummary::setRunNumber ( unsigned int  runNumber)
inline
void SiPixelPerformanceSummary::setTimeStamp ( unsigned long long  timeStamp)
inline

Definition at line 46 of file SiPixelPerformanceSummary.h.

References stor::utils::timeStamp(), and timeStamp_.

46 { timeStamp_ = timeStamp; }
std::string timeStamp(TimePoint_t)
Definition: Utils.cc:23
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 Vispa.Views.PropertyView.StringProperty::buttonClicked(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Vispa.Views.PropertyView.FileVectorProperty::buttonClicked(), Vispa.Views.PropertyView.TextEditWithButtonProperty::keyPressEvent(), setADC(), setClusterCharge(), setClusterChargeOffTrack(), setClusterChargeOnTrack(), setClusterSize(), setClusterSizeOffTrack(), setClusterSizeOnTrack(), setClusterSizeX(), setClusterSizeY(), setFractionOfTracks(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setMultiline(), setNumberOfClusters(), setNumberOfDeadCells(), setNumberOfDigis(), setNumberOfNoisCells(), setNumberOfOffTrackClusters(), setNumberOfOnTrackClusters(), setNumberOfPixelHitsInTrackFit(), setNumberOfRecHits(), setRawDataErrorType(), setResidualX(), and setResidualY().

63  {
64  if (index>kDetSummarySize) {
65  cout << "cannot set the performance value for index = "<< index <<" > "<< kDetSummarySize;
66  return false;
67  }
68  pair<bool, vector<DetSummary>::iterator> initResult = initDet(detId);
69  if (initResult.first || initResult.second!=allDetSummaries_.end()) {
70  initResult.second->performanceValues_[index] = performanceValue;
71  return true;
72  }
73  else {
74  cout << "cannot set the performance value; cannot create new entry for detId = "<< detId;
75  return false;
76  }
77  return true;
78 }
std::pair< bool, std::vector< DetSummary >::iterator > initDet(const uint32_t detId)
std::vector< DetSummary > allDetSummaries_
#define kDetSummarySize
tuple cout
Definition: gather_cfg.py:121
unsigned int SiPixelPerformanceSummary::size ( void  )
inline

Definition at line 44 of file SiPixelPerformanceSummary.h.

References allDetSummaries_.

44 { return allDetSummaries_.size(); }
std::vector< DetSummary > allDetSummaries_

Member Data Documentation

std::vector<DetSummary> SiPixelPerformanceSummary::allDetSummaries_
private
unsigned int SiPixelPerformanceSummary::luminosityBlock_
private
unsigned int SiPixelPerformanceSummary::numberOfEvents_
private
unsigned int SiPixelPerformanceSummary::runNumber_
private
unsigned long long SiPixelPerformanceSummary::timeStamp_
private