#include <DQM/SiPixelCommon/interface/SiPixelHistogramId.h>
Public Member Functions | |
std::string | getDataCollection (std::string histogramId) |
Get data Collection. | |
uint32_t | getRawId (std::string histogramId) |
Get Detector Raw Id. | |
std::string | setHistoId (std::string variable, uint32_t &rawId) |
Set Histogram Id. | |
SiPixelHistogramId (std::string dataCollection) | |
Constructor. | |
SiPixelHistogramId () | |
Constructor. | |
virtual | ~SiPixelHistogramId () |
Destructor. | |
Private Member Functions | |
std::string | returnIdPart (std::string histoid, uint32_t whichpart) |
get Part | |
Private Attributes | |
std::string | dataCollection_ |
std::string | separator_ |
Description: Creates and returns DQM Histogram Id's
Usage: <usage>
Definition at line 25 of file SiPixelHistogramId.h.
SiPixelHistogramId::SiPixelHistogramId | ( | ) |
Constructor.
Definition at line 23 of file SiPixelHistogramId.cc.
: dataCollection_("defaultData"), separator_("_") { }
SiPixelHistogramId::SiPixelHistogramId | ( | std::string | dataCollection | ) |
Constructor.
Constructor with collection.
Definition at line 29 of file SiPixelHistogramId.cc.
: dataCollection_(dataCollection), separator_("_") { }
SiPixelHistogramId::~SiPixelHistogramId | ( | ) | [virtual] |
std::string SiPixelHistogramId::getDataCollection | ( | std::string | histogramId | ) |
Get data Collection.
get Data Collection
Definition at line 50 of file SiPixelHistogramId.cc.
References returnIdPart().
{ return returnIdPart(histoid,2); }
uint32_t SiPixelHistogramId::getRawId | ( | std::string | histogramId | ) |
Get Detector Raw Id.
get Raw Id
Definition at line 54 of file SiPixelHistogramId.cc.
References LaserDQM_cfg::input, and returnIdPart().
{ uint32_t local_component_id; std::istringstream input(returnIdPart(histoid,3)); input >> local_component_id; return local_component_id; }
std::string SiPixelHistogramId::returnIdPart | ( | std::string | histoid, |
uint32_t | whichpart | ||
) | [private] |
get Part
Definition at line 60 of file SiPixelHistogramId.cc.
References separator_.
Referenced by getDataCollection(), and getRawId().
{ size_t length1=histoid.find(separator_,0); if(length1==std::string::npos){ // no separator1 found LogWarning("PixelDQM")<<"SiPixelHistogramId::returnIdPart - no regular histoid. Returning 0"; return "0"; } std::string part1 = histoid.substr(0,length1); // part of 'histoid' up to 'separator1' if(whichpart==1) return part1; std::string remain1 = histoid.substr(length1+separator_.size()); // rest of 'histoid' starting at end of 'separator1' size_t length2=remain1.find(separator_,0); if(length2==std::string::npos){ // no separator2 found LogWarning("PixelDQM")<<"SiPixelHistogramId::returnIdPart - no regular histoid. Returning 0"; return "0"; } std::string part2 = remain1.substr(0,length2); // part of 'remain1' up to 'separator2' if(whichpart==2) return part2; std::string part3 = remain1.substr(length2+separator_.size()); // rest of remain1 starting at end of 'separator2' if(whichpart==3) return part3; LogWarning("PixelDQM")<<"SiPixelHistogramId::returnIdPart - no such whichpart="<<whichpart<<" returning 0"; return "0"; }
std::string SiPixelHistogramId::setHistoId | ( | std::string | variable, |
uint32_t & | rawId | ||
) |
Set Histogram Id.
Create Histogram Id.
Definition at line 40 of file SiPixelHistogramId.cc.
References dataCollection_, and separator_.
Referenced by SiPixelHitEfficiencyModule::book(), SiPixelClusterModule::book(), SiPixelTrackResidualModule::book(), SiPixelRecHitModule::book(), SiPixelDigiModule::book(), SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D(), SiPixelErrorsDigisToCalibDigis::bookDQMHistogram2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistogram2D(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), and SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D().
{ std::string histoId; std::ostringstream rawIdString; rawIdString<<rawId; histoId = variable + separator_ + dataCollection_ + separator_ + rawIdString.str(); return histoId; }
std::string SiPixelHistogramId::dataCollection_ [private] |
Definition at line 45 of file SiPixelHistogramId.h.
Referenced by setHistoId().
std::string SiPixelHistogramId::separator_ [private] |
Definition at line 46 of file SiPixelHistogramId.h.
Referenced by returnIdPart(), and setHistoId().