CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

SiPixelPerformanceSummary Class Reference

#include <SiPixelPerformanceSummary.h>

List of all members.

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)
SiPixelPerformanceSummary::SiPixelPerformanceSummary ( )

Definition at line 11 of file SiPixelPerformanceSummary.cc.

SiPixelPerformanceSummary::~SiPixelPerformanceSummary ( )

Definition at line 24 of file SiPixelPerformanceSummary.cc.

{}

Member Function Documentation

void SiPixelPerformanceSummary::clear ( void  )
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 findQualityFiles::v.

                                                                {
  vector<float> performanceValues = getDetSummary(detId);   
  cout << "DetSummary for detId "<< detId <<" : ";
  for (vector<float>::const_iterator v = performanceValues.begin(); v!=performanceValues.end(); ++v) cout <<" "<< *v; 
  cout << endl;
}
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().

                                                                                         {
  return (setValue(detId, 18, mean) && setValue(detId, 19, rms) && setValue(detId, 20, emPtn)); 
}
bool SiPixelPerformanceSummary::setClusterCharge ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 110 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                                   {
  return (setValue(detId, 24, mean) && setValue(detId, 25, rms) && setValue(detId, 26, emPtn)); 
}
bool SiPixelPerformanceSummary::setClusterChargeOffTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 169 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                              {
  return (setValue(detId, 54, mean) && setValue(detId, 55, rms)); 
}
bool SiPixelPerformanceSummary::setClusterChargeOnTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 165 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                             {
  return (setValue(detId, 52, mean) && setValue(detId, 53, rms)); 
}
bool SiPixelPerformanceSummary::setClusterSize ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 114 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                                 {
  return (setValue(detId, 27, mean) && setValue(detId, 28, rms) && setValue(detId, 29, emPtn)); 
}
bool SiPixelPerformanceSummary::setClusterSizeOffTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 177 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                            {
  return (setValue(detId, 58, mean) && setValue(detId, 59, rms)); 
}
bool SiPixelPerformanceSummary::setClusterSizeOnTrack ( uint32_t  detId,
float  mean,
float  rms 
)

Definition at line 173 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                           {
  return (setValue(detId, 56, mean) && setValue(detId, 57, rms)); 
}
bool SiPixelPerformanceSummary::setClusterSizeX ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 118 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                                  {
  return (setValue(detId, 30, mean) && setValue(detId, 31, rms) && setValue(detId, 32, emPtn)); 
}
bool SiPixelPerformanceSummary::setClusterSizeY ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 122 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                                  {
  return (setValue(detId, 33, mean) && setValue(detId, 34, rms) && setValue(detId, 35, emPtn)); 
}
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().

                                                                                         {
  return (setValue(detId, 48, mean) && setValue(detId, 49, rms)); 
}
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().

                                                                                                      {
  return (setValue(detId, 21, mean) && setValue(detId, 22, rms) && setValue(detId, 23, emPtn)); 
}
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().

                                                                                                   {
  return (setValue(detId, 15, mean) && setValue(detId, 16, rms) && setValue(detId, 17, emPtn)); 
}
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().

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

Definition at line 92 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                          {
  return  setValue(detId, bin, nErrors);
}
bool SiPixelPerformanceSummary::setResidualX ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 132 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                               {
  return (setValue(detId, 39, mean) && setValue(detId, 40, rms) && setValue(detId, 41, emPtn)); 
}
bool SiPixelPerformanceSummary::setResidualY ( uint32_t  detId,
float  mean,
float  rms,
float  emPtn 
)

Definition at line 136 of file SiPixelPerformanceSummary.cc.

References setValue().

                                                                                               {
  return (setValue(detId, 42, mean) && setValue(detId, 43, rms) && setValue(detId, 44, emPtn)); 
}
void SiPixelPerformanceSummary::setRunNumber ( unsigned int  runNumber) [inline]

Definition at line 49 of file SiPixelPerformanceSummary.h.

References convertSQLiteXML::runNumber, and runNumber_.

void SiPixelPerformanceSummary::setTimeStamp ( unsigned long long  timeStamp) [inline]

Definition at line 46 of file SiPixelPerformanceSummary.h.

References stor::utils::timeStamp(), and 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(); }

Member Data Documentation

unsigned int SiPixelPerformanceSummary::runNumber_ [private]
unsigned long long SiPixelPerformanceSummary::timeStamp_ [private]