CMS 3D CMS Logo

SiStripMonitorCondDataOnDemandExample.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     SiStripMonitorSummary
00004 // Class  :     SiStripMonitorCondDataOnDemandExample
00005 // 
00006 // Original Author:  Evelyne Delmeire
00007 //
00008 
00009 
00010 #include "FWCore/Framework/interface/ESHandle.h"
00011 #include "FWCore/ServiceRegistry/interface/Service.h"
00012 #include "FWCore/Framework/interface/Event.h"
00013 #include "FWCore/Framework/interface/EventSetup.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00016 
00017 #include "DQM/SiStripMonitorSummary/interface/SiStripMonitorCondDataOnDemandExample.h"
00018 #include "DQM/SiStripMonitorSummary/interface/SiStripClassToMonitorCondData.h"
00019 
00020 #include "TH1F.h"
00021 #include "TH2F.h"
00022 #include "TProfile.h"
00023 
00024 // std
00025 #include <cstdlib>
00026 #include <string>
00027 #include <cmath>
00028 #include <numeric>
00029 #include <algorithm>
00030 
00031 
00032 //
00033 // ----- Constructor
00034 //
00035 SiStripMonitorCondDataOnDemandExample::SiStripMonitorCondDataOnDemandExample(edm::ParameterSet const& iConfig):conf_(iConfig){}
00036 // -----
00037 
00038 
00039 
00040 //
00041 // ----- Destructor
00042 // 
00043 SiStripMonitorCondDataOnDemandExample::~SiStripMonitorCondDataOnDemandExample(){}
00044 // -----
00045 
00046 
00047 
00048 
00049 //
00050 // ----- beginRun
00051 //    
00052 void SiStripMonitorCondDataOnDemandExample::beginRun(edm::Run const& run, edm::EventSetup const& eSetup) {  
00053   eventCounter_=0;
00054   condDataMonitoring_ = new SiStripClassToMonitorCondData(conf_);
00055   condDataMonitoring_->beginRun(eSetup);
00056 
00057 } // beginRun
00058 // -----
00059 
00060 
00061 
00062 //
00063 // ----- beginJob
00064 //
00065 void SiStripMonitorCondDataOnDemandExample::beginJob(void){} //beginJob
00066 
00067 
00068 
00069 //
00070 // ----- Analyze
00071 //
00072 void SiStripMonitorCondDataOnDemandExample::analyze(edm::Event const& iEvent, edm::EventSetup const& eSetup){
00073 
00074   eventCounter_++; 
00075 
00076   // on demand type I : eventSetup and detId to be passed
00077   // output : ME's corresponding to that detId
00078   
00079   
00080   if(eventCounter_==1){ condDataMonitoring_ -> getModMEsOnDemand(eSetup,369125542);}
00081   
00082   // on demand type II : eventSetup, subdetector-type(TIB/TOB/TEC/TID), 
00083   //                                 subdetector-side for TEC/TID
00084   //                                 layer_number
00085  
00086   if(eventCounter_==2){ condDataMonitoring_ -> getLayerMEsOnDemand(eSetup,"TOB",0,1);}
00087 
00088   
00089   
00090 } // analyze
00091 // -----
00092 
00093 
00094 
00095 //
00096 // ----- endRun
00097 //    
00098 void SiStripMonitorCondDataOnDemandExample::endRun(edm::Run const& run, edm::EventSetup const& eSetup) {
00099 
00100   condDataMonitoring_->endRun(eSetup);       
00101 
00102 } // endRun
00103 // -----
00104 
00105 
00106 
00107 //
00108 // ----- endJob
00109 //
00110 void SiStripMonitorCondDataOnDemandExample::endJob(void){} //endJob
00111 
00112 
00113 #include "FWCore/Framework/interface/MakerMacros.h"
00114   DEFINE_FWK_MODULE(SiStripMonitorCondDataOnDemandExample);
00115 
00116   

Generated on Tue Jun 9 17:33:40 2009 for CMSSW by  doxygen 1.5.4