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