#include <EBBeamHodoClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (void) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
EBBeamHodoClient (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 | ~EBBeamHodoClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
TH1F * | hc01_ [3] |
TProfile * | he01_ [2] |
TH2F * | he02_ [2] |
TH1F * | he03_ [3] |
TH1F * | hm01_ |
TH1F * | ho01_ [4] |
TH1F * | hp01_ [2] |
TH2F * | hp02_ |
TH1F * | hq01_ [2] |
TH1F * | hr01_ [4] |
TH1F * | hs01_ [2] |
TH1F * | ht01_ |
int | ievt_ |
int | jevt_ |
std::string | prefixME_ |
std::vector< int > | superModules_ |
bool | verbose_ |
Definition at line 33 of file EBBeamHodoClient.h.
EBBeamHodoClient::EBBeamHodoClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 26 of file EBBeamHodoClient.cc.
References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, 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 (int i=0; i<4; i++) { ho01_[i] = 0; hr01_[i] = 0; } hp01_[0] = 0; hp01_[1] = 0; hp02_ = 0; hs01_[0] = 0; hs01_[1] = 0; hq01_[0] = 0; hq01_[1] = 0; ht01_ = 0; hc01_[0] = 0; hc01_[1] = 0; hc01_[2] = 0; hm01_ = 0; he01_[0] = 0; he01_[1] = 0; he02_[0] = 0; he02_[1] = 0; he03_[0] = 0; he03_[1] = 0; he03_[2] = 0; }
EBBeamHodoClient::~EBBeamHodoClient | ( | ) | [virtual] |
void EBBeamHodoClient::analyze | ( | void | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 227 of file EBBeamHodoClient.cc.
References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), getHisto(), hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, ievt_, jevt_, prefixME_, and Numbers::sEB().
{ ievt_++; jevt_++; if ( ievt_ % 10 == 0 ) { if ( debug_ ) std::cout << "EBBeamHodoClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl; } int smId = 1; std::stringstream ss; MonitorElement* me; for (int i=0; i<4; i++) { ss.str(""); ss << prefixME_ << "/EBBeamHodoTask/EBBHT occup " << Numbers::sEB(smId) << std::setfill('0') << std::setw(2) << i+1; me = dqmStore_->get(ss.str()); ho01_[i] = UtilsClient::getHisto( me, cloneME_, ho01_[i] ); ss.str(""); ss << prefixME_ << "/EBBeamHodoTask/EBBHT raw " << Numbers::sEB(smId) << std::setfill('0') << std::setw(2) << i+1; me = dqmStore_->get(ss.str()); hr01_[i] = UtilsClient::getHisto( me, cloneME_, hr01_[i] ); } me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT PosX rec " + Numbers::sEB(smId) ); hp01_[0] = UtilsClient::getHisto( me, cloneME_, hp01_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT PosY rec " + Numbers::sEB(smId) ); hp01_[1] = UtilsClient::getHisto( me, cloneME_, hp01_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT PosYX rec " + Numbers::sEB(smId) ); hp02_ = UtilsClient::getHisto( me, cloneME_, hp02_ ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT SloX " + Numbers::sEB(smId) ); hs01_[0] = UtilsClient::getHisto( me, cloneME_, hs01_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT SloY " + Numbers::sEB(smId) ); hs01_[1] = UtilsClient::getHisto( me, cloneME_, hs01_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT QualX " + Numbers::sEB(smId) ); hq01_[0] = UtilsClient::getHisto( me, cloneME_, hq01_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT QualY " + Numbers::sEB(smId) ); hq01_[1] = UtilsClient::getHisto( me, cloneME_, hq01_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT TDC rec " + Numbers::sEB(smId) ); ht01_ = UtilsClient::getHisto( me, cloneME_, ht01_ ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo X vs Cry " + Numbers::sEB(smId) ); hc01_[0] = UtilsClient::getHisto( me, cloneME_, hc01_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo Y vs Cry " + Numbers::sEB(smId) ); hc01_[1] = UtilsClient::getHisto( me, cloneME_, hc01_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT TDC-Calo vs Cry " + Numbers::sEB(smId) ); hc01_[2] = UtilsClient::getHisto( me, cloneME_, hc01_[2] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT Missing Collections " + Numbers::sEB(smId) ); hm01_ = UtilsClient::getHisto( me, cloneME_, hm01_ ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs X " + Numbers::sEB(smId) ); he01_[0] = UtilsClient::getHisto( me, cloneME_, he01_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs Y " + Numbers::sEB(smId) ); he01_[1] = UtilsClient::getHisto( me, cloneME_, he01_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs X " + Numbers::sEB(smId) ); he02_[0] = UtilsClient::getHisto( me, cloneME_, he02_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs Y " + Numbers::sEB(smId) ); he02_[1] = UtilsClient::getHisto( me, cloneME_, he02_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT PosX Hodo-Calo " + Numbers::sEB(smId) ); he03_[0] = UtilsClient::getHisto( me, cloneME_, he03_[0] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT PosY Hodo-Calo " + Numbers::sEB(smId) ); he03_[1] = UtilsClient::getHisto( me, cloneME_, he03_[1] ); me = dqmStore_->get( prefixME_ + "/EBBeamHodoTask/EBBHT TimeMax TDC-Calo " + Numbers::sEB(smId) ); he03_[2] = UtilsClient::getHisto( me, cloneME_, he03_[2] ); }
void EBBeamHodoClient::beginJob | ( | void | ) | [virtual] |
BeginJob.
Implements EBClient.
Definition at line 90 of file EBBeamHodoClient.cc.
References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules::cppFunctionSkipper::operator.
void EBBeamHodoClient::beginRun | ( | void | ) | [virtual] |
void EBBeamHodoClient::cleanup | ( | void | ) | [virtual] |
Cleanup.
Implements EBClient.
Definition at line 209 of file EBBeamHodoClient.cc.
References dqmStore_, enableCleanup_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by endJob(), and endRun().
{ if ( ! enableCleanup_ ) return; dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" ); }
void EBBeamHodoClient::endJob | ( | void | ) | [virtual] |
EndJob.
Implements EBClient.
Definition at line 111 of file EBBeamHodoClient.cc.
References cleanup(), cloneME_, gather_cfg::cout, debug_, hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, and ievt_.
{ if ( debug_ ) std::cout << "EBBeamHodoClient: endJob, ievt = " << ievt_ << std::endl; this->cleanup(); if ( cloneME_ ) { for (int i=0; i<4; i++) { if ( ho01_[i] ) delete ho01_[i]; if ( hr01_[i] ) delete hr01_[i]; } if ( hp01_[0] ) delete hp01_[0]; if ( hp01_[1] ) delete hp01_[1]; if ( hp02_ ) delete hp02_; if ( hs01_[0] ) delete hs01_[0]; if ( hs01_[1] ) delete hs01_[1]; if ( hq01_[0] ) delete hq01_[0]; if ( hq01_[1] ) delete hq01_[1]; if ( ht01_ ) delete ht01_; if ( hc01_[0] ) delete hc01_[0]; if ( hc01_[1] ) delete hc01_[1]; if ( hc01_[2] ) delete hc01_[2]; if ( hm01_ ) delete hm01_; if ( he01_[0] ) delete he01_[0]; if ( he01_[1] ) delete he01_[1]; if ( he02_[0] ) delete he02_[0]; if ( he02_[1] ) delete he02_[1]; if ( he03_[0] ) delete he03_[0]; if ( he03_[1] ) delete he03_[1]; if ( he03_[2] ) delete he03_[2]; } for (int i=0; i<4; i++) { ho01_[i] = 0; hr01_[i] = 0; } hp01_[0] = 0; hp01_[1] = 0; hp02_ = 0; hs01_[0] = 0; hs01_[1] = 0; hq01_[0] = 0; hq01_[1] = 0; ht01_ = 0; hc01_[0] = 0; hc01_[1] = 0; hc01_[2] = 0; hm01_ = 0; he01_[0] = 0; he01_[1] = 0; he02_[0] = 0; he02_[1] = 0; he03_[0] = 0; he03_[1] = 0; he03_[2] = 0; }
void EBBeamHodoClient::endRun | ( | void | ) | [virtual] |
int EBBeamHodoClient::getEvtPerJob | ( | void | ) | [inline, virtual] |
Get Functions.
Implements EBClient.
Definition at line 70 of file EBBeamHodoClient.h.
References ievt_.
{ return ievt_; }
int EBBeamHodoClient::getEvtPerRun | ( | void | ) | [inline, virtual] |
void EBBeamHodoClient::setup | ( | void | ) | [virtual] |
Setup.
Implements EBClient.
Definition at line 203 of file EBBeamHodoClient.cc.
References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
{ dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" ); }
bool EBBeamHodoClient::cloneME_ [private] |
Definition at line 78 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
bool EBBeamHodoClient::debug_ [private] |
Definition at line 81 of file EBBeamHodoClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBBeamHodoClient(), endJob(), and endRun().
DQMStore* EBBeamHodoClient::dqmStore_ [private] |
Definition at line 89 of file EBBeamHodoClient.h.
Referenced by analyze(), beginJob(), cleanup(), and setup().
bool EBBeamHodoClient::enableCleanup_ [private] |
Definition at line 85 of file EBBeamHodoClient.h.
Referenced by cleanup(), and EBBeamHodoClient().
TH1F* EBBeamHodoClient::hc01_[3] [private] |
Definition at line 103 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TProfile* EBBeamHodoClient::he01_[2] [private] |
Definition at line 107 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH2F* EBBeamHodoClient::he02_[2] [private] |
Definition at line 108 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::he03_[3] [private] |
Definition at line 110 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::hm01_ [private] |
Definition at line 105 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::ho01_[4] [private] |
Definition at line 91 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::hp01_[2] [private] |
Definition at line 94 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH2F* EBBeamHodoClient::hp02_ [private] |
Definition at line 95 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::hq01_[2] [private] |
Definition at line 99 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::hr01_[4] [private] |
Definition at line 92 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::hs01_[2] [private] |
Definition at line 97 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
TH1F* EBBeamHodoClient::ht01_ [private] |
Definition at line 101 of file EBBeamHodoClient.h.
Referenced by analyze(), EBBeamHodoClient(), and endJob().
int EBBeamHodoClient::ievt_ [private] |
Definition at line 75 of file EBBeamHodoClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBBeamHodoClient::jevt_ [private] |
Definition at line 76 of file EBBeamHodoClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
std::string EBBeamHodoClient::prefixME_ [private] |
Definition at line 83 of file EBBeamHodoClient.h.
Referenced by analyze(), cleanup(), EBBeamHodoClient(), and setup().
std::vector<int> EBBeamHodoClient::superModules_ [private] |
Definition at line 87 of file EBBeamHodoClient.h.
Referenced by EBBeamHodoClient().
bool EBBeamHodoClient::verbose_ [private] |
Definition at line 80 of file EBBeamHodoClient.h.
Referenced by EBBeamHodoClient().