#include <EBOccupancyClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (void) |
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 | setup (void) |
Setup. | |
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] |
TH2F * | i01_ [36] |
TProfile2D * | i02_ [36] |
int | ievt_ |
int | jevt_ |
std::string | prefixME_ |
std::vector< int > | superModules_ |
bool | verbose_ |
Friends | |
class | EBSummaryClient |
Definition at line 33 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, i01_, i02_, ecalpyutils::ism(), prefixME_, superModules_, and verbose_.
{ // cloneME switch cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true); // verbose switch verbose_ = ps.getUntrackedParameter<bool>("verbose", true); // debug switch debug_ = ps.getUntrackedParameter<bool>("debug", false); // prefixME path prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", ""); // enableCleanup_ switch enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); // vector of selected Super Modules (Defaults to all 36). superModules_.reserve(36); for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i); superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_); for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; i01_[ism-1] = 0; i02_[ism-1] = 0; } for ( int i=0; i<3; i++) { h01_[i] = 0; h01ProjEta_[i] = 0; h01ProjPhi_[i] = 0; } for ( int i=0; i<2; i++) { h02_[i] = 0; h02ProjEta_[i] = 0; h02ProjPhi_[i] = 0; } }
EBOccupancyClient::~EBOccupancyClient | ( | ) | [virtual] |
void EBOccupancyClient::analyze | ( | void | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 256 of file EBOccupancyClient.cc.
References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, trackerHits::histo, i, i01_, i02_, ievt_, jevt_, prefixME_, Numbers::sEB(), and superModules_.
{ ievt_++; jevt_++; if ( ievt_ % 10 == 0 ) { if ( debug_ ) std::cout << "EBOccupancyClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl; } char histo[200]; MonitorElement* me; for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy %s").c_str(), Numbers::sEB(ism).c_str()); me = dqmStore_->get(histo); i01_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, i01_[ism-1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit energy %s").c_str(), Numbers::sEB(ism).c_str()); me = dqmStore_->get(histo); i02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, i02_[ism-1] ); } sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy").c_str()); me = dqmStore_->get(histo); h01_[0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy projection eta").c_str()); me = dqmStore_->get(histo); h01ProjEta_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT digi occupancy projection phi").c_str()); me = dqmStore_->get(histo); h01ProjPhi_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy").c_str()); me = dqmStore_->get(histo); h01_[1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy projection eta").c_str()); me = dqmStore_->get(histo); h01ProjEta_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit occupancy projection phi").c_str()); me = dqmStore_->get(histo); h01ProjPhi_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy").c_str()); me = dqmStore_->get(histo); h01_[2] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h01_[2] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy projection eta").c_str()); me = dqmStore_->get(histo); h01ProjEta_[2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjEta_[2] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi occupancy projection phi").c_str()); me = dqmStore_->get(histo); h01ProjPhi_[2] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h01ProjPhi_[2] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy").c_str()); me = dqmStore_->get(histo); h02_[0] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy projection eta").c_str()); me = dqmStore_->get(histo); h02ProjEta_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjEta_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit thr occupancy projection phi").c_str()); me = dqmStore_->get(histo); h02ProjPhi_[0] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[0] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy").c_str()); me = dqmStore_->get(histo); h02_[1] = UtilsClient::getHisto<TH2F*> ( me, cloneME_, h02_[1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy projection eta").c_str()); me = dqmStore_->get(histo); h02ProjEta_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjEta_[1] ); sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT TP digi thr occupancy projection phi").c_str()); me = dqmStore_->get(histo); h02ProjPhi_[1] = UtilsClient::getHisto<TH1F*> ( me, cloneME_, h02ProjPhi_[1] ); }
void EBOccupancyClient::beginJob | ( | void | ) | [virtual] |
BeginJob.
Implements EBClient.
Definition at line 78 of file EBOccupancyClient.cc.
References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules::cppFunctionSkipper::operator.
void EBOccupancyClient::beginRun | ( | void | ) | [virtual] |
void EBOccupancyClient::cleanup | ( | void | ) | [virtual] |
Cleanup.
Implements EBClient.
Definition at line 121 of file EBOccupancyClient.cc.
References cloneME_, enableCleanup_, h01_, h01ProjEta_, h01ProjPhi_, h02_, h02ProjEta_, h02ProjPhi_, i, i01_, i02_, ecalpyutils::ism(), and superModules_.
Referenced by endJob(), and endRun().
{ if ( ! enableCleanup_ ) return; if ( cloneME_ ) { for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; if ( i01_[ism-1] ) delete i01_[ism-1]; if ( i02_[ism-1] ) delete i02_[ism-1]; } for ( int i=0; i<3; ++i ) { if ( h01_[i] ) delete h01_[i]; if ( h01ProjEta_[i] ) delete h01ProjEta_[i]; if ( h01ProjPhi_[i] ) delete h01ProjPhi_[i]; } for ( int i=0; i<2; ++i ) { if ( h02_[i] ) delete h02_[i]; if ( h02ProjEta_[i] ) delete h02ProjEta_[i]; if ( h02ProjPhi_[i] ) delete h02ProjPhi_[i]; } } for ( int i=0; i<3; ++i ) { h01_[i] = 0; h01ProjEta_[i] = 0; h01ProjPhi_[i] = 0; } for ( int i=0; i<2; ++i ) { h02_[i] = 0; h02ProjEta_[i] = 0; h02ProjPhi_[i] = 0; } }
void EBOccupancyClient::endJob | ( | void | ) | [virtual] |
void EBOccupancyClient::endRun | ( | void | ) | [virtual] |
int EBOccupancyClient::getEvtPerJob | ( | void | ) | [inline, virtual] |
Get Functions.
Implements EBClient.
Definition at line 72 of file EBOccupancyClient.h.
References ievt_.
{ return ievt_; }
int EBOccupancyClient::getEvtPerRun | ( | void | ) | [inline, virtual] |
void EBOccupancyClient::setup | ( | void | ) | [virtual] |
Setup.
Implements EBClient.
Definition at line 115 of file EBOccupancyClient.cc.
References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
{ dqmStore_->setCurrentFolder( prefixME_ + "/EBOccupancyClient" ); }
friend class EBSummaryClient [friend] |
Definition at line 35 of file EBOccupancyClient.h.
bool EBOccupancyClient::cloneME_ [private] |
Definition at line 80 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
bool EBOccupancyClient::debug_ [private] |
Definition at line 83 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBOccupancyClient(), endJob(), and endRun().
DQMStore* EBOccupancyClient::dqmStore_ [private] |
Definition at line 91 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), and setup().
bool EBOccupancyClient::enableCleanup_ [private] |
Definition at line 87 of file EBOccupancyClient.h.
Referenced by cleanup(), and EBOccupancyClient().
TH2F* EBOccupancyClient::h01_[3] [private] |
Definition at line 96 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h01ProjEta_[3] [private] |
Definition at line 97 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h01ProjPhi_[3] [private] |
Definition at line 98 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH2F* EBOccupancyClient::h02_[2] [private] |
Definition at line 100 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h02ProjEta_[2] [private] |
Definition at line 101 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH1F* EBOccupancyClient::h02ProjPhi_[2] [private] |
Definition at line 102 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TH2F* EBOccupancyClient::i01_[36] [private] |
Definition at line 93 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
TProfile2D* EBOccupancyClient::i02_[36] [private] |
Definition at line 94 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
int EBOccupancyClient::ievt_ [private] |
Definition at line 77 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBOccupancyClient::jevt_ [private] |
Definition at line 78 of file EBOccupancyClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
std::string EBOccupancyClient::prefixME_ [private] |
Definition at line 85 of file EBOccupancyClient.h.
Referenced by analyze(), EBOccupancyClient(), and setup().
std::vector<int> EBOccupancyClient::superModules_ [private] |
Definition at line 89 of file EBOccupancyClient.h.
Referenced by analyze(), cleanup(), and EBOccupancyClient().
bool EBOccupancyClient::verbose_ [private] |
Definition at line 82 of file EBOccupancyClient.h.
Referenced by EBOccupancyClient().