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