#include <EEStatusFlagsClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (void) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
EEStatusFlagsClient (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 | ~EEStatusFlagsClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
TH2F * | h01_ [18] |
TH1F * | h02_ [18] |
TH2F * | 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 32 of file EEStatusFlagsClient.h.
EEStatusFlagsClient::EEStatusFlagsClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 33 of file EEStatusFlagsClient.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; meh01_[ism-1] = 0; h02_[ism-1] = 0; meh02_[ism-1] = 0; h03_[ism-1] = 0; meh03_[ism-1] = 0; } }
EEStatusFlagsClient::~EEStatusFlagsClient | ( | ) | [virtual] |
void EEStatusFlagsClient::analyze | ( | void | ) | [virtual] |
Analyze.
Implements EEClient.
Definition at line 176 of file EEStatusFlagsClient.cc.
References cloneME_, gather_cfg::cout, debug_, dqmStore_, EcalEndcap, DQMStore::get(), h01_, h02_, h03_, trackerHits::histo, i, ievt_, jevt_, Masks::maskChannel(), Masks::maskPn(), meh01_, meh02_, meh03_, prefixME_, Numbers::sEE(), MonitorElement::setBinError(), EcalDQMStatusHelper::STATUS_FLAG_ERROR, and superModules_.
{ ievt_++; jevt_++; if ( ievt_ % 10 == 0 ) { if ( debug_ ) std::cout << "EEStatusFlagsClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl; } uint32_t bits01 = 0; bits01 |= 1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR; char histo[200]; MonitorElement* me; for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; sprintf(histo, (prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status %s").c_str(), Numbers::sEE(ism).c_str()); me = dqmStore_->get(histo); h01_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] ); meh01_[ism-1] = me; sprintf(histo, (prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status bits %s").c_str(), Numbers::sEE(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_ + "/EEStatusFlagsTask/FEStatus/EESFT MEM front-end status %s").c_str(), Numbers::sEE(ism).c_str()); me = dqmStore_->get(histo); h03_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] ); meh03_[ism-1] = me; for ( int ix = 1; ix <= 50; ix++ ) { for ( int iy = 1; iy <= 50; iy++ ) { if ( Masks::maskChannel(ism, ix, iy, bits01, EcalEndcap) ) { if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( ix, iy, 0.01 ); } } } for ( int i = 1; i <= 10; i++ ) { if ( Masks::maskPn(ism, i, bits01, EcalEndcap) ) { int it = (i-1)/5 + 1; if ( meh03_[ism-1] ) meh03_[ism-1]->setBinError( it, 1, 0.01 ); } } } }
void EEStatusFlagsClient::beginJob | ( | void | ) | [virtual] |
BeginJob.
Implements EEClient.
Definition at line 79 of file EEStatusFlagsClient.cc.
References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules::cppFunctionSkipper::operator.
void EEStatusFlagsClient::beginRun | ( | void | ) | [virtual] |
void EEStatusFlagsClient::cleanup | ( | void | ) | [virtual] |
Cleanup.
Implements EEClient.
Definition at line 122 of file EEStatusFlagsClient.cc.
References cloneME_, dqmStore_, enableCleanup_, h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, prefixME_, DQMStore::setCurrentFolder(), 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; } dqmStore_->setCurrentFolder( prefixME_ + "/EEStatusFlagsClient" ); }
void EEStatusFlagsClient::endJob | ( | void | ) | [virtual] |
void EEStatusFlagsClient::endRun | ( | void | ) | [virtual] |
int EEStatusFlagsClient::getEvtPerJob | ( | void | ) | [inline, virtual] |
Get Functions.
Implements EEClient.
Definition at line 71 of file EEStatusFlagsClient.h.
References ievt_.
{ return ievt_; }
int EEStatusFlagsClient::getEvtPerRun | ( | void | ) | [inline, virtual] |
void EEStatusFlagsClient::setup | ( | void | ) | [virtual] |
Setup.
Implements EEClient.
Definition at line 116 of file EEStatusFlagsClient.cc.
References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
{ dqmStore_->setCurrentFolder( prefixME_ + "/EEStatusFlagsClient" ); }
friend class EESummaryClient [friend] |
Definition at line 34 of file EEStatusFlagsClient.h.
bool EEStatusFlagsClient::cloneME_ [private] |
Definition at line 79 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
bool EEStatusFlagsClient::debug_ [private] |
Definition at line 82 of file EEStatusFlagsClient.h.
Referenced by analyze(), beginJob(), beginRun(), EEStatusFlagsClient(), endJob(), and endRun().
DQMStore* EEStatusFlagsClient::dqmStore_ [private] |
Definition at line 90 of file EEStatusFlagsClient.h.
Referenced by analyze(), beginJob(), cleanup(), and setup().
bool EEStatusFlagsClient::enableCleanup_ [private] |
Definition at line 86 of file EEStatusFlagsClient.h.
Referenced by cleanup(), and EEStatusFlagsClient().
TH2F* EEStatusFlagsClient::h01_[18] [private] |
Definition at line 94 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
TH1F* EEStatusFlagsClient::h02_[18] [private] |
Definition at line 98 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
TH2F* EEStatusFlagsClient::h03_[18] [private] |
Definition at line 102 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
int EEStatusFlagsClient::ievt_ [private] |
Definition at line 76 of file EEStatusFlagsClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EEStatusFlagsClient::jevt_ [private] |
Definition at line 77 of file EEStatusFlagsClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
MonitorElement* EEStatusFlagsClient::meh01_[18] [private] |
Definition at line 92 of file EEStatusFlagsClient.h.
Referenced by EESummaryClient::analyze(), analyze(), cleanup(), and EEStatusFlagsClient().
MonitorElement* EEStatusFlagsClient::meh02_[18] [private] |
Definition at line 96 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
MonitorElement* EEStatusFlagsClient::meh03_[18] [private] |
Definition at line 100 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
std::string EEStatusFlagsClient::prefixME_ [private] |
Definition at line 84 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), EEStatusFlagsClient(), and setup().
std::vector<int> EEStatusFlagsClient::superModules_ [private] |
Definition at line 88 of file EEStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EEStatusFlagsClient().
bool EEStatusFlagsClient::verbose_ [private] |
Definition at line 81 of file EEStatusFlagsClient.h.
Referenced by EEStatusFlagsClient().