CMS 3D CMS Logo

SiStripApvGainsDQM Class Reference

#include <DQM/SiStripMonitorSummary/interface/SiStripApvGainsDQM.h>

Inheritance diagram for SiStripApvGainsDQM:

SiStripBaseCondObjDQM

List of all members.

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)
 SiStripApvGainsDQM (const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
virtual ~SiStripApvGainsDQM ()

Private Attributes

edm::ESHandle< SiStripApvGaingainHandle_


Detailed Description

Definition at line 13 of file SiStripApvGainsDQM.h.


Constructor & Destructor Documentation

SiStripApvGainsDQM::SiStripApvGainsDQM ( const edm::EventSetup eSetup,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet 
)

Definition at line 7 of file SiStripApvGainsDQM.cc.

00009                                                                     :SiStripBaseCondObjDQM(eSetup,hPSet, fPSet){
00010 }

SiStripApvGainsDQM::~SiStripApvGainsDQM (  )  [virtual]

Definition at line 14 of file SiStripApvGainsDQM.cc.

00014 {}


Member Function Documentation

void SiStripApvGainsDQM::fillMEsForDet ( ModMEs  selModME_,
uint32_t  selDetId_ 
)

Definition at line 44 of file SiStripApvGainsDQM.cc.

References SiStripBaseCondObjDQM::CondObj_fillId_, SiStripBaseCondObjDQM::ModMEs::CumulDistr, e, MonitorElement::Fill(), gainHandle_, SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), SiStripBaseCondObjDQM::ModMEs::ProfileDistr, SiStripBaseCondObjDQM::reader, and cms::Exception::what().

Referenced by fillModMEs().

00044                                                                           {
00045   
00046   std::vector<uint32_t> DetIds;
00047   gainHandle_->getDetIds(DetIds);
00048 
00049   SiStripApvGain::Range gainRange = gainHandle_->getRange(selDetId_);
00050   
00051   int nApv =  reader->getNumberOfApvsAndStripLength(selDetId_).first;
00052     
00053   getModMEs(selModME_,selDetId_);
00054  
00055   for( int iapv=0;iapv<nApv;++iapv){
00056     try{
00057       if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
00058         selModME_.ProfileDistr->Fill(iapv+1,gainHandle_->getApvGain(iapv,gainRange));
00059       }
00060       if( CondObj_fillId_ =="onlyCumul" || CondObj_fillId_ =="ProfileAndCumul"){
00061         selModME_.CumulDistr  ->Fill(gainHandle_->getApvGain(iapv,gainRange));
00062       }
00063     } 
00064     catch(cms::Exception& e){
00065       edm::LogError("SiStripApvGainsDQM")          
00066         << "[SiStripApvGainsDQM::fillMEsForDet] cms::Exception accessing gainHandle_->getApvGain(iapv,gainRange) for apv "  
00067         << iapv 
00068         << " and detid " 
00069         << selDetId_  
00070         << " :  " 
00071         << e.what() ;
00072     }
00073   }
00074 }

void SiStripApvGainsDQM::fillMEsForLayer ( std::map< uint32_t, ModMEs selModMEsMap_,
uint32_t  selDetId_ 
)

Definition at line 87 of file SiStripApvGainsDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, SiStripHistoId::createHistoLayer(), e, lat::endl(), MonitorElement::Fill(), first, gainHandle_, SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::hPSet_, i, SiStripBaseCondObjDQM::reader, edm::second(), SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, and cms::Exception::what().

Referenced by fillSummaryMEs().

00087                                                                                                 {
00088     
00089   int subdetectorId_ = ((selDetId_>>25)&0x7);
00090   
00091   if( subdetectorId_<3 ||subdetectorId_>6 ){ 
00092     edm::LogError("SiStripApvGainsDQM")
00093       << "[SiStripApvGainsDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
00094       << subdetectorId_ << " no folder set!" 
00095       << std::endl;
00096     return;
00097   }
00098   // ----
00099          
00100   std::map<uint32_t, ModMEs>::iterator selMEsMapIter_  = selMEsMap_.find(getLayerNameAndId(selDetId_).second);
00101   ModMEs selME_;
00102   selME_ =selMEsMapIter_->second;
00103   getSummaryMEs(selME_,selDetId_);
00104   
00105   SiStripApvGain::Range gainRange = gainHandle_->getRange(selDetId_);
00106   int nApv =  reader->getNumberOfApvsAndStripLength(selDetId_).first;
00107 
00108   SiStripHistoId hidmanager;
00109 
00110   if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel")){
00111 
00112     // --> profile summary    
00113     std::string hSummaryOfProfile_description;
00114     hSummaryOfProfile_description  = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
00115   
00116     std::string hSummaryOfProfile_name; 
00117     hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, 
00118                                                          "layer", 
00119                                                          getLayerNameAndId(selDetId_).first, 
00120                                                          "") ;
00121   
00122     for( int iapv=0;iapv<nApv;++iapv){
00123     
00124       try{ 
00125         selME_.SummaryOfProfileDistr->Fill(iapv+1,gainHandle_->getApvGain(iapv,gainRange));
00126       } 
00127       catch(cms::Exception& e){
00128         edm::LogError("SiStripApvGainsDQM")          
00129           << "[SiStripApvGainsDQM::fillMEsForLayer] cms::Exception accessing gainHandle_->getApvGain(istrip,gainRange) for strip "  
00130           << iapv
00131           << " and detid " 
00132           << selDetId_  
00133           << " :  " 
00134           << e.what() ;
00135       }
00136     }// istrip
00137   }//if Fill ...
00138 
00139   if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")){
00140   
00141     // -->  summary    
00142     std::string hSummary_description;
00143     hSummary_description  = hPSet_.getParameter<std::string>("Summary_description");
00144   
00145     std::string hSummary_name; 
00146     hSummary_name = hidmanager.createHistoLayer(hSummary_description, 
00147                                                 "layer", 
00148                                                 getLayerNameAndId(selDetId_).first, 
00149                                                 "") ;
00150   
00151     // -----
00152     // get detIds belonging to same layer to fill X-axis with detId-number
00153   
00154     std::vector<uint32_t> sameLayerDetIds_;
00155   
00156     sameLayerDetIds_.clear();
00157 
00158     sameLayerDetIds_=GetSameLayerDetId(activeDetIds,selDetId_);
00159   
00160     unsigned int iBin=0;
00161     for(unsigned int i=0;i<sameLayerDetIds_.size();i++){
00162       if(sameLayerDetIds_[i]==selDetId_){iBin=i+1;}
00163     }  
00164   
00165     for( int iapv=0;iapv<nApv;++iapv){
00166       try{ 
00167         selME_.SummaryDistr->Fill(iBin,gainHandle_->getApvGain(iapv,gainRange));
00168       } 
00169       catch(cms::Exception& e){
00170         edm::LogError("SiStripApvGainsDQM")          
00171           << "[SiStripApvGainsDQM::fillMEsForLayer] cms::Exception accessing gainHandle_->getApvGain(iapv,gainRange) for apv "  
00172           << iapv 
00173           << "and detid " 
00174           << selDetId_  
00175           << " :  " 
00176           << e.what() ;
00177       }
00178     }// iapv
00179   }//if Fill ...
00180 }  

void SiStripApvGainsDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds  )  [virtual]

Implements SiStripBaseCondObjDQM.

Definition at line 32 of file SiStripApvGainsDQM.cc.

References fillMEsForDet().

00032                                                                              {
00033 
00034   ModMEs CondObj_ME;
00035 
00036   for(std::vector<uint32_t>::const_iterator detIter_ =selectedDetIds.begin();
00037       detIter_!=selectedDetIds.end();++detIter_){
00038     fillMEsForDet(CondObj_ME,*detIter_);
00039   }  
00040 }  

void SiStripApvGainsDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds  )  [virtual]

Implements SiStripBaseCondObjDQM.

Definition at line 77 of file SiStripApvGainsDQM.cc.

References fillMEsForLayer(), and SiStripBaseCondObjDQM::SummaryMEsMap_.

00077                                                                                   {
00078   
00079   for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
00080       detIter_!= selectedDetIds.end();detIter_++){
00081     fillMEsForLayer(SummaryMEsMap_, *detIter_);
00082     
00083   } 
00084 }  

void SiStripApvGainsDQM::getActiveDetIds ( const edm::EventSetup eSetup  )  [virtual]

Implements SiStripBaseCondObjDQM.

Definition at line 19 of file SiStripApvGainsDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, gainHandle_, getConditionObject(), and SiStripBaseCondObjDQM::selectModules().

00019                                                                     {
00020 
00021   getConditionObject(eSetup);
00022   gainHandle_->getDetIds(activeDetIds);
00023   selectModules(activeDetIds);
00024 
00025 }

unsigned long long SiStripApvGainsDQM::getCache ( const edm::EventSetup eSetup  )  [inline, virtual]

Implements SiStripBaseCondObjDQM.

Definition at line 32 of file SiStripApvGainsDQM.h.

References edm::EventSetup::get().

00032 { return eSetup.get<SiStripApvGainRcd>().cacheIdentifier();}

void SiStripApvGainsDQM::getConditionObject ( const edm::EventSetup eSetup  )  [inline, virtual]

Implements SiStripBaseCondObjDQM.

Definition at line 34 of file SiStripApvGainsDQM.h.

References SiStripBaseCondObjDQM::cacheID_current, SiStripBaseCondObjDQM::cacheID_memory, gainHandle_, and edm::EventSetup::get().

Referenced by getActiveDetIds().

00034                                                        {
00035     eSetup.get<SiStripApvGainRcd>().get(gainHandle_);
00036     cacheID_memory = cacheID_current;
00037   }


Member Data Documentation

edm::ESHandle<SiStripApvGain> SiStripApvGainsDQM::gainHandle_ [private]

Definition at line 40 of file SiStripApvGainsDQM.h.

Referenced by fillMEsForDet(), fillMEsForLayer(), getActiveDetIds(), and getConditionObject().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:11 2009 for CMSSW by  doxygen 1.5.4