#include <EBCosmicClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (void) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
EBCosmicClient (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 | ~EBCosmicClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
TProfile2D * | h01_ [36] |
TH1F * | h02_ [36] |
TH1F * | h03_ [36] |
int | ievt_ |
int | jevt_ |
MonitorElement * | meh01_ [36] |
MonitorElement * | meh02_ [36] |
MonitorElement * | meh03_ [36] |
std::string | prefixME_ |
std::vector< int > | superModules_ |
bool | verbose_ |
Friends | |
class | EBSummaryClient |
Definition at line 33 of file EBCosmicClient.h.
EBCosmicClient::EBCosmicClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 32 of file EBCosmicClient.cc.
References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, 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]; h01_[ism-1] = 0; h02_[ism-1] = 0; h03_[ism-1] = 0; meh01_[ism-1] = 0; meh02_[ism-1] = 0; meh03_[ism-1] = 0; } }
EBCosmicClient::~EBCosmicClient | ( | ) | [virtual] |
void EBCosmicClient::analyze | ( | void | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 151 of file EBCosmicClient.cc.
References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), h01_, h02_, h03_, trackerHits::histo, i, ievt_, ecalpyutils::ism(), jevt_, meh01_, meh02_, meh03_, prefixME_, Numbers::sEB(), and superModules_.
{ ievt_++; jevt_++; if ( ievt_ % 10 == 0 ) { if ( debug_ ) std::cout << "EBCosmicClient: 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_ + "/EBCosmicTask/Sel/EBCT energy sel %s").c_str(), Numbers::sEB(ism).c_str()); me = dqmStore_->get(histo); h01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h01_[ism-1] ); meh01_[ism-1] = me; sprintf(histo, (prefixME_ + "/EBCosmicTask/Spectrum/EBCT 1x1 energy spectrum %s").c_str(), Numbers::sEB(ism).c_str()); me = dqmStore_->get(histo); h02_[ism-1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h02_[ism-1] ); meh02_[ism-1] = me; sprintf(histo, (prefixME_ + "/EBCosmicTask/Spectrum/EBCT 3x3 energy spectrum %s").c_str(), Numbers::sEB(ism).c_str()); me = dqmStore_->get(histo); h03_[ism-1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h03_[ism-1] ); meh03_[ism-1] = me; } }
void EBCosmicClient::beginJob | ( | void | ) | [virtual] |
BeginJob.
Implements EBClient.
Definition at line 74 of file EBCosmicClient.cc.
References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules::cppFunctionSkipper::operator.
void EBCosmicClient::beginRun | ( | void | ) | [virtual] |
void EBCosmicClient::cleanup | ( | void | ) | [virtual] |
Cleanup.
Implements EBClient.
Definition at line 115 of file EBCosmicClient.cc.
References cloneME_, enableCleanup_, h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, and superModules_.
Referenced by endJob(), and endRun().
{ if ( ! enableCleanup_ ) return; for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; if ( cloneME_ ) { if ( h01_[ism-1] ) delete h01_[ism-1]; if ( h02_[ism-1] ) delete h02_[ism-1]; if ( h03_[ism-1] ) delete h03_[ism-1]; } h01_[ism-1] = 0; h02_[ism-1] = 0; h03_[ism-1] = 0; meh01_[ism-1] = 0; meh02_[ism-1] = 0; meh03_[ism-1] = 0; } }
void EBCosmicClient::endJob | ( | void | ) | [virtual] |
void EBCosmicClient::endRun | ( | void | ) | [virtual] |
int EBCosmicClient::getEvtPerJob | ( | void | ) | [inline, virtual] |
Get Functions.
Implements EBClient.
Definition at line 72 of file EBCosmicClient.h.
References ievt_.
{ return ievt_; }
int EBCosmicClient::getEvtPerRun | ( | void | ) | [inline, virtual] |
void EBCosmicClient::setup | ( | void | ) | [virtual] |
Setup.
Implements EBClient.
Definition at line 111 of file EBCosmicClient.cc.
Referenced by beginRun().
{ }
friend class EBSummaryClient [friend] |
Definition at line 35 of file EBCosmicClient.h.
bool EBCosmicClient::cloneME_ [private] |
Definition at line 80 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
bool EBCosmicClient::debug_ [private] |
Definition at line 83 of file EBCosmicClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBCosmicClient(), endJob(), and endRun().
DQMStore* EBCosmicClient::dqmStore_ [private] |
Definition at line 91 of file EBCosmicClient.h.
Referenced by analyze(), and beginJob().
bool EBCosmicClient::enableCleanup_ [private] |
Definition at line 87 of file EBCosmicClient.h.
Referenced by cleanup(), and EBCosmicClient().
TProfile2D* EBCosmicClient::h01_[36] [private] |
Definition at line 97 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
TH1F* EBCosmicClient::h02_[36] [private] |
Definition at line 98 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
TH1F* EBCosmicClient::h03_[36] [private] |
Definition at line 99 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
int EBCosmicClient::ievt_ [private] |
Definition at line 77 of file EBCosmicClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBCosmicClient::jevt_ [private] |
Definition at line 78 of file EBCosmicClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
MonitorElement* EBCosmicClient::meh01_[36] [private] |
Definition at line 93 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
MonitorElement* EBCosmicClient::meh02_[36] [private] |
Definition at line 94 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
MonitorElement* EBCosmicClient::meh03_[36] [private] |
Definition at line 95 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
std::string EBCosmicClient::prefixME_ [private] |
Definition at line 85 of file EBCosmicClient.h.
Referenced by analyze(), and EBCosmicClient().
std::vector<int> EBCosmicClient::superModules_ [private] |
Definition at line 89 of file EBCosmicClient.h.
Referenced by analyze(), cleanup(), and EBCosmicClient().
bool EBCosmicClient::verbose_ [private] |
Definition at line 82 of file EBCosmicClient.h.
Referenced by EBCosmicClient().