#include <DQM/SiStripMonitorSummary/interface/SiStripPedestalsDQM.h>
Public Member Functions | |
void | fillMEsForDet (ModMEs selModME_, uint32_t selDetId_) |
void | fillMEsForLayer (std::map< uint32_t, ModMEs > selModMEsMap_, uint32_t selDetId_) |
void | fillModMEs (const std::vector< uint32_t > &selectedDetIds) |
void | fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds) |
void | getActiveDetIds (const edm::EventSetup &eSetup) |
unsigned long long | getCache (const edm::EventSetup &eSetup) |
void | getConditionObject (const edm::EventSetup &eSetup) |
SiStripPedestalsDQM (const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet) | |
virtual | ~SiStripPedestalsDQM () |
Private Attributes | |
edm::ESHandle< SiStripPedestals > | pedestalHandle_ |
Definition at line 13 of file SiStripPedestalsDQM.h.
SiStripPedestalsDQM::SiStripPedestalsDQM | ( | const edm::EventSetup & | eSetup, | |
edm::ParameterSet const & | hPSet, | |||
edm::ParameterSet const & | fPSet | |||
) |
Definition at line 5 of file SiStripPedestalsDQM.cc.
00007 :SiStripBaseCondObjDQM(eSetup, hPSet, fPSet){ 00008 00009 }
SiStripPedestalsDQM::~SiStripPedestalsDQM | ( | ) | [virtual] |
Definition at line 49 of file SiStripPedestalsDQM.cc.
References SiStripBaseCondObjDQM::CondObj_fillId_, e, MonitorElement::Fill(), SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), pedestalHandle_, SiStripBaseCondObjDQM::ModMEs::ProfileDistr, SiStripBaseCondObjDQM::reader, and cms::Exception::what().
Referenced by fillModMEs().
00049 { 00050 00051 getModMEs(selModME_,selDetId_); 00052 00053 SiStripPedestals::Range pedRange = pedestalHandle_->getRange(selDetId_); 00054 int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first*128; 00055 00056 for( int istrip=0;istrip<nStrip;++istrip){ 00057 try{ 00058 if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){ 00059 selModME_.ProfileDistr->Fill(istrip+1,pedestalHandle_->getPed(istrip,pedRange)); 00060 } 00061 } 00062 catch(cms::Exception& e){ 00063 edm::LogError("SiStripPedestalsDQM") 00064 << "[SiStripPedestalsDQM::fillMEsForDet] cms::Exception accessing pedestalHandle_->getPed(istrip,pedRange) for strip " 00065 << istrip 00066 << " and detid " 00067 << selDetId_ 00068 << " : " 00069 << e.what() ; 00070 } 00071 }// istrip 00072 00073 }
void SiStripPedestalsDQM::fillMEsForLayer | ( | std::map< uint32_t, ModMEs > | selModMEsMap_, | |
uint32_t | selDetId_ | |||
) |
Definition at line 92 of file SiStripPedestalsDQM.cc.
References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), e, lat::endl(), MonitorElement::Fill(), first, SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::hPSet_, i, pedestalHandle_, SiStripBaseCondObjDQM::reader, edm::second(), SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, and cms::Exception::what().
Referenced by fillSummaryMEs().
00092 { 00093 00094 // ---- 00095 int subdetectorId_ = ((selDetId_>>25)&0x7); 00096 00097 if( subdetectorId_<3 || subdetectorId_>6 ){ 00098 edm::LogError("SiStripPedestalsDQM") 00099 << "[SiStripPedestalsDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : " 00100 << subdetectorId_ << " no folder set!" 00101 << std::endl; 00102 return; 00103 } 00104 // ---- 00105 00106 std::map<uint32_t, ModMEs>::iterator selMEsMapIter_ = selMEsMap_.find(getLayerNameAndId(selDetId_).second); 00107 ModMEs selME_; 00108 selME_ =selMEsMapIter_->second; 00109 getSummaryMEs(selME_,selDetId_); 00110 00111 SiStripPedestals::Range pedRange = pedestalHandle_->getRange(selDetId_); 00112 00113 int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first*128; 00114 00115 SiStripHistoId hidmanager; 00116 00117 if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel")){ 00118 00119 // --> profile summary 00120 00121 std::string hSummaryOfProfile_description; 00122 hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description"); 00123 00124 std::string hSummaryOfProfile_name; 00125 00126 00127 hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, 00128 "layer", 00129 getLayerNameAndId(selDetId_).first, 00130 "") ; 00131 00132 00133 for( int istrip=0;istrip<nStrip;++istrip){ 00134 00135 try{ 00136 if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){ 00137 selME_.SummaryOfProfileDistr->Fill(istrip+1,pedestalHandle_->getPed(istrip,pedRange)); 00138 } 00139 } 00140 catch(cms::Exception& e){ 00141 edm::LogError("SiStripPedestalsDQM") 00142 << "[SiStripPedestalsDQM::fillMEsForLayer] cms::Exception accessing pedestalHandle_->getPed(istrip,pedRange) for strip " 00143 << istrip 00144 << " and detid " 00145 << selDetId_ 00146 << " : " 00147 << e.what() ; 00148 } 00149 }// istrip 00150 }//if Fill ... 00151 00152 if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")){ 00153 00154 // --> summary 00155 00156 std::string hSummary_description; 00157 hSummary_description = hPSet_.getParameter<std::string>("Summary_description"); 00158 00159 std::string hSummary_name; 00160 hSummary_name = hidmanager.createHistoLayer(hSummary_description, 00161 "layer", 00162 getLayerNameAndId(selDetId_).first, 00163 "") ; 00164 float meanPedestal=0; 00165 00166 for( int istrip=0;istrip<nStrip;++istrip){ 00167 00168 try{ 00169 meanPedestal = meanPedestal + pedestalHandle_->getPed(istrip,pedRange); 00170 } 00171 catch(cms::Exception& e){ 00172 edm::LogError("SiStripNoisesDQM") 00173 << "[SiStripNoisesDQM::fillMEsForLayer] cms::Exception accessing pedestalHandle_->getPed(istrip,pedRange) for strip " 00174 << istrip 00175 << "and detid " 00176 << selDetId_ 00177 << " : " 00178 << e.what() ; 00179 } 00180 00181 }//istrip 00182 00183 meanPedestal = meanPedestal/nStrip; 00184 00185 00186 // ----- 00187 // get detIds belonging to same layer to fill X-axis with detId-number 00188 00189 std::vector<uint32_t> sameLayerDetIds_; 00190 00191 sameLayerDetIds_.clear(); 00192 00193 sameLayerDetIds_=GetSameLayerDetId(activeDetIds,selDetId_); 00194 00195 00196 unsigned int iBin=0; 00197 for(unsigned int i=0;i<sameLayerDetIds_.size();i++){ 00198 if(sameLayerDetIds_[i]==selDetId_){iBin=i+1;} 00199 } 00200 00201 selME_.SummaryDistr->Fill(iBin,meanPedestal); 00202 00203 }//if Fill ... 00204 00205 00206 00207 }
void SiStripPedestalsDQM::fillModMEs | ( | const std::vector< uint32_t > & | selectedDetIds | ) | [virtual] |
Implements SiStripBaseCondObjDQM.
Definition at line 31 of file SiStripPedestalsDQM.cc.
References fillMEsForDet().
00031 { 00032 00033 ModMEs CondObj_ME; 00034 00035 00036 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); 00037 detIter_!= selectedDetIds.end();detIter_++){ 00038 00039 fillMEsForDet(CondObj_ME,*detIter_); 00040 00041 } 00042 }
void SiStripPedestalsDQM::fillSummaryMEs | ( | const std::vector< uint32_t > & | selectedDetIds | ) | [virtual] |
Implements SiStripBaseCondObjDQM.
Definition at line 79 of file SiStripPedestalsDQM.cc.
References fillMEsForLayer(), and SiStripBaseCondObjDQM::SummaryMEsMap_.
00079 { 00080 00081 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); 00082 detIter_!= selectedDetIds.end();detIter_++){ 00083 fillMEsForLayer(SummaryMEsMap_, *detIter_); 00084 } 00085 }
void SiStripPedestalsDQM::getActiveDetIds | ( | const edm::EventSetup & | eSetup | ) | [virtual] |
Implements SiStripBaseCondObjDQM.
Definition at line 20 of file SiStripPedestalsDQM.cc.
References SiStripBaseCondObjDQM::activeDetIds, getConditionObject(), pedestalHandle_, and SiStripBaseCondObjDQM::selectModules().
00020 { 00021 00022 getConditionObject(eSetup); 00023 pedestalHandle_->getDetIds(activeDetIds); 00024 selectModules(activeDetIds); 00025 00026 }
unsigned long long SiStripPedestalsDQM::getCache | ( | const edm::EventSetup & | eSetup | ) | [inline, virtual] |
Implements SiStripBaseCondObjDQM.
Definition at line 31 of file SiStripPedestalsDQM.h.
References edm::EventSetup::get().
00031 { return eSetup.get<SiStripPedestalsRcd>().cacheIdentifier();}
void SiStripPedestalsDQM::getConditionObject | ( | const edm::EventSetup & | eSetup | ) | [inline, virtual] |
Implements SiStripBaseCondObjDQM.
Definition at line 33 of file SiStripPedestalsDQM.h.
References SiStripBaseCondObjDQM::cacheID_current, SiStripBaseCondObjDQM::cacheID_memory, edm::EventSetup::get(), and pedestalHandle_.
Referenced by getActiveDetIds().
00033 { 00034 eSetup.get<SiStripPedestalsRcd>().get(pedestalHandle_); 00035 cacheID_memory = cacheID_current; 00036 }
Definition at line 39 of file SiStripPedestalsDQM.h.
Referenced by fillMEsForDet(), fillMEsForLayer(), getActiveDetIds(), and getConditionObject().