#include <DQM/EcalBarrelMonitorClient/interface/EBOccupancyClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (DQMStore *dqmStore) |
BeginJob. | |
void | beginRun (void) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
EBOccupancyClient (const edm::ParameterSet &ps) | |
Constructor. | |
void | endJob (void) |
EndJob. | |
void | endRun (void) |
EndRun. | |
int | getEvtPerJob () |
Get Functions. | |
int | getEvtPerRun () |
Returns the number of processed events in this Run. | |
void | htmlOutput (int run, std::string &htmlDir, std::string &htmlName) |
HtmlOutput. | |
void | setup (void) |
Setup. | |
void | softReset (bool flag) |
SoftReset. | |
bool | writeDb (EcalCondDBInterface *econn, RunIOV *runiov, MonRunIOV *moniov, bool &status, bool flag) |
WriteDB. | |
virtual | ~EBOccupancyClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
TH2F * | h01_ [3] |
TH1F * | h01ProjEta_ [3] |
TH1F * | h01ProjPhi_ [3] |
TH2F * | h02_ [2] |
TH1F * | h02ProjEta_ [2] |
TH1F * | h02ProjPhi_ [2] |
int | ievt_ |
int | jevt_ |
std::string | prefixME_ |
std::vector< int > | superModules_ |
bool | verbose_ |
Friends | |
class | EBSummaryClient |
Definition at line 31 of file EBOccupancyClient.h.
EBOccupancyClient::EBOccupancyClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 32 of file EBOccupancyClient.cc.
References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, i, prefixME_, superModules_, and verbose_.
00032 { 00033 00034 // cloneME switch 00035 cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true); 00036 00037 // verbose switch 00038 verbose_ = ps.getUntrackedParameter<bool>("verbose", true); 00039 00040 // debug switch 00041 debug_ = ps.getUntrackedParameter<bool>("debug", false); 00042 00043 // prefixME path 00044 prefixME_ = ps.getUntrackedParameter<string>("prefixME", ""); 00045 00046 // enableCleanup_ switch 00047 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); 00048 00049 // vector of selected Super Modules (Defaults to all 36). 00050 superModules_.reserve(36); 00051 for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i); 00052 superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_); 00053 00054 for ( int i=0; i<3; i++) { 00055 h01_[i] = 0; 00056 h01ProjEta_[i] = 0; 00057 h01ProjPhi_[i] = 0; 00058 } 00059 00060 for ( int i=0; i<2; i++) { 00061 h02_[i] = 0; 00062 h02ProjEta_[i] = 0; 00063 h02ProjPhi_[i] = 0; 00064 } 00065 00066 }
EBOccupancyClient::~EBOccupancyClient | ( | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 159 of file EBOccupancyClient.cc.
References cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), DQMStore::get(), h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, histo, ievt_, jevt_, me, and prefixME_.
00159 { 00160 00161 ievt_++; 00162 jevt_++; 00163 if ( ievt_ % 10 == 0 ) { 00164 if ( debug_ ) cout << "EBOccupancyClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl; 00165 } 00166 00167 char histo[200]; 00168 00169 MonitorElement* me; 00170 00171 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy").c_str()); 00172 me = dqmStore_->get(histo); 00173 h01_[0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[0] ); 00174 00175 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy projection eta").c_str()); 00176 me = dqmStore_->get(histo); 00177 h01ProjEta_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[0] ); 00178 00179 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy projection phi").c_str()); 00180 me = dqmStore_->get(histo); 00181 h01ProjPhi_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[0] ); 00182 00183 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy").c_str()); 00184 me = dqmStore_->get(histo); 00185 h01_[1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[1] ); 00186 00187 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy projection eta").c_str()); 00188 me = dqmStore_->get(histo); 00189 h01ProjEta_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[1] ); 00190 00191 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy projection phi").c_str()); 00192 me = dqmStore_->get(histo); 00193 h01ProjPhi_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[1] ); 00194 00195 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy").c_str()); 00196 me = dqmStore_->get(histo); 00197 h01_[2] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[2] ); 00198 00199 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy projection eta").c_str()); 00200 me = dqmStore_->get(histo); 00201 h01ProjEta_[2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[2] ); 00202 00203 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy projection phi").c_str()); 00204 me = dqmStore_->get(histo); 00205 h01ProjPhi_[2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[2] ); 00206 00207 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy").c_str()); 00208 me = dqmStore_->get(histo); 00209 h02_[0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[0] ); 00210 00211 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy projection eta").c_str()); 00212 me = dqmStore_->get(histo); 00213 h02ProjEta_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjEta_[0] ); 00214 00215 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy projection phi").c_str()); 00216 me = dqmStore_->get(histo); 00217 h02ProjPhi_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[0] ); 00218 00219 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy").c_str()); 00220 me = dqmStore_->get(histo); 00221 h02_[1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[1] ); 00222 00223 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy projection eta").c_str()); 00224 me = dqmStore_->get(histo); 00225 h02ProjEta_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjEta_[1] ); 00226 00227 sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy projection phi").c_str()); 00228 me = dqmStore_->get(histo); 00229 h02ProjPhi_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[1] ); 00230 00231 }
BeginJob.
Implements EBClient.
Definition at line 72 of file EBOccupancyClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), ievt_, and jevt_.
00072 { 00073 00074 dqmStore_ = dqmStore; 00075 00076 if ( debug_ ) cout << "EBOccupancyClient: beginJob" << endl; 00077 00078 ievt_ = 0; 00079 jevt_ = 0; 00080 00081 }
BeginRun.
Implements EBClient.
Definition at line 83 of file EBOccupancyClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), jevt_, and setup().
00083 { 00084 00085 if ( debug_ ) cout << "EBOccupancyClient: beginRun" << endl; 00086 00087 jevt_ = 0; 00088 00089 this->setup(); 00090 00091 }
Cleanup.
Implements EBClient.
Definition at line 115 of file EBOccupancyClient.cc.
References cloneME_, enableCleanup_, h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, and i.
Referenced by endJob(), and endRun().
00115 { 00116 00117 if ( ! enableCleanup_ ) return; 00118 00119 if ( cloneME_ ) { 00120 00121 for ( int i=0; i<3; ++i ) { 00122 if ( h01_[i] ) delete h01_[i]; 00123 if ( h01ProjEta_[i] ) delete h01ProjEta_[i]; 00124 if ( h01ProjPhi_[i] ) delete h01ProjPhi_[i]; 00125 } 00126 00127 for ( int i=0; i<2; ++i ) { 00128 if ( h02_[i] ) delete h02_[i]; 00129 if ( h02ProjEta_[i] ) delete h02ProjEta_[i]; 00130 if ( h02ProjPhi_[i] ) delete h02ProjPhi_[i]; 00131 } 00132 00133 } 00134 00135 for ( int i=0; i<3; ++i ) { 00136 h01_[i] = 0; 00137 h01ProjEta_[i] = 0; 00138 h01ProjPhi_[i] = 0; 00139 } 00140 00141 for ( int i=0; i<2; ++i ) { 00142 h02_[i] = 0; 00143 h02ProjEta_[i] = 0; 00144 h02ProjPhi_[i] = 0; 00145 } 00146 00147 }
EndJob.
Implements EBClient.
Definition at line 93 of file EBOccupancyClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and ievt_.
00093 { 00094 00095 if ( debug_ ) cout << "EBOccupancyClient: endJob, ievt = " << ievt_ << endl; 00096 00097 this->cleanup(); 00098 00099 }
EndRun.
Implements EBClient.
Definition at line 101 of file EBOccupancyClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and jevt_.
00101 { 00102 00103 if ( debug_ ) cout << "EBOccupancyClient: endRun, jevt = " << jevt_ << endl; 00104 00105 this->cleanup(); 00106 00107 }
Get Functions.
Implements EBClient.
Definition at line 74 of file EBOccupancyClient.h.
References ievt_.
00074 { return ievt_; }
Setup.
Implements EBClient.
Definition at line 109 of file EBOccupancyClient.cc.
References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
00109 { 00110 00111 dqmStore_->setCurrentFolder( prefixME_ + "/EBOccupancyClient" ); 00112 00113 }
bool EBOccupancyClient::writeDb | ( | EcalCondDBInterface * | econn, | |
RunIOV * | runiov, | |||
MonRunIOV * | moniov, | |||
bool & | status, | |||
bool | flag | |||
) | [virtual] |
WriteDB.
Implements EBClient.
Definition at line 149 of file EBOccupancyClient.cc.
00149 { 00150 00151 status = true; 00152 00153 if ( ! flag ) return false; 00154 00155 return true; 00156 00157 }
friend class EBSummaryClient [friend] |
Definition at line 33 of file EBOccupancyClient.h.
bool EBOccupancyClient::cloneME_ [private] |
Definition at line 82 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
bool EBOccupancyClient::debug_ [private] |
Definition at line 85 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBOccupancyClient(), endJob(), and endRun().
DQMStore* EBOccupancyClient::dqmStore_ [private] |
Definition at line 93 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), and setup().
bool EBOccupancyClient::enableCleanup_ [private] |
Definition at line 89 of file EBOccupancyClient.h.
Referenced by cleanup(), and EBOccupancyClient().
TH2F* EBOccupancyClient::h01_[3] [private] |
Definition at line 95 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h01ProjEta_[3] [private] |
Definition at line 96 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h01ProjPhi_[3] [private] |
Definition at line 97 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH2F* EBOccupancyClient::h02_[2] [private] |
Definition at line 99 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h02ProjEta_[2] [private] |
Definition at line 100 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h02ProjPhi_[2] [private] |
Definition at line 101 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
int EBOccupancyClient::ievt_ [private] |
Definition at line 79 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBOccupancyClient::jevt_ [private] |
Definition at line 80 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
std::string EBOccupancyClient::prefixME_ [private] |
Definition at line 87 of file EBOccupancyClient.h.
Referenced by analyze(), EBOccupancyClient(), and setup().
std::vector<int> EBOccupancyClient::superModules_ [private] |
bool EBOccupancyClient::verbose_ [private] |