#include <EBStatusFlagsClient.h>
Public Member Functions | |
void | analyze (void) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (void) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
EBStatusFlagsClient (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 | ~EBStatusFlagsClient () |
Destructor. | |
Private Attributes | |
bool | cloneME_ |
bool | debug_ |
DQMStore * | dqmStore_ |
bool | enableCleanup_ |
TH2F * | h01_ [36] |
TH1F * | h02_ [36] |
TH2F * | 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 32 of file EBStatusFlagsClient.h.
EBStatusFlagsClient::EBStatusFlagsClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 32 of file EBStatusFlagsClient.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; meh01_[ism-1] = 0; h02_[ism-1] = 0; meh02_[ism-1] = 0; h03_[ism-1] = 0; meh03_[ism-1] = 0; } }
EBStatusFlagsClient::~EBStatusFlagsClient | ( | ) | [virtual] |
void EBStatusFlagsClient::analyze | ( | void | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 175 of file EBStatusFlagsClient.cc.
References cloneME_, gather_cfg::cout, debug_, dqmStore_, EcalBarrel, DQMStore::get(), getHisto(), h01_, h02_, h03_, i, ievt_, jevt_, Masks::maskChannel(), Masks::maskPn(), meh01_, meh02_, meh03_, prefixME_, Numbers::sEB(), MonitorElement::setBinError(), EcalDQMStatusHelper::STATUS_FLAG_ERROR, and superModules_.
{ ievt_++; jevt_++; if ( ievt_ % 10 == 0 ) { if ( debug_ ) std::cout << "EBStatusFlagsClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl; } uint32_t bits01 = 0; bits01 |= 1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR; MonitorElement* me; for ( unsigned int i=0; i<superModules_.size(); i++ ) { int ism = superModules_[i]; me = dqmStore_->get( prefixME_ + "/EBStatusFlagsTask/FEStatus/EBSFT front-end status " + Numbers::sEB(ism) ); h01_[ism-1] = UtilsClient::getHisto( me, cloneME_, h01_[ism-1] ); meh01_[ism-1] = me; me = dqmStore_->get( prefixME_ + "/EBStatusFlagsTask/FEStatus/EBSFT front-end status bits " + Numbers::sEB(ism) ); h02_[ism-1] = UtilsClient::getHisto( me, cloneME_, h02_[ism-1] ); meh02_[ism-1] = me; me = dqmStore_->get( prefixME_ + "/EBStatusFlagsTask/FEStatus/EBSFT MEM front-end status " + Numbers::sEB(ism) ); h03_[ism-1] = UtilsClient::getHisto( me, cloneME_, h01_[ism-1] ); meh03_[ism-1] = me; for ( int ie = 1; ie <= 85; ie++ ) { for ( int ip = 1; ip <= 20; ip++ ) { if ( Masks::maskChannel(ism, ie, ip, bits01, EcalBarrel) ) { int iet = (ie-1)/5 + 1; int ipt = (ip-1)/5 + 1; if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( iet, ipt, 0.01 ); } } } for ( int i = 1; i <= 10; i++ ) { if ( Masks::maskPn(ism, i, bits01, EcalBarrel) ) { int it = (i-1)/5 + 1; if ( meh03_[ism-1] ) meh03_[ism-1]->setBinError( it, 1, 0.01 ); } } } }
void EBStatusFlagsClient::beginJob | ( | void | ) | [virtual] |
BeginJob.
Implements EBClient.
Definition at line 78 of file EBStatusFlagsClient.cc.
References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cppFunctionSkipper::operator.
void EBStatusFlagsClient::beginRun | ( | void | ) | [virtual] |
void EBStatusFlagsClient::cleanup | ( | void | ) | [virtual] |
Cleanup.
Implements EBClient.
Definition at line 121 of file EBStatusFlagsClient.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_ + "/EBStatusFlagsClient" ); }
void EBStatusFlagsClient::endJob | ( | void | ) | [virtual] |
void EBStatusFlagsClient::endRun | ( | void | ) | [virtual] |
int EBStatusFlagsClient::getEvtPerJob | ( | void | ) | [inline, virtual] |
Get Functions.
Implements EBClient.
Definition at line 71 of file EBStatusFlagsClient.h.
References ievt_.
{ return ievt_; }
int EBStatusFlagsClient::getEvtPerRun | ( | void | ) | [inline, virtual] |
void EBStatusFlagsClient::setup | ( | void | ) | [virtual] |
Setup.
Implements EBClient.
Definition at line 115 of file EBStatusFlagsClient.cc.
References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
{ dqmStore_->setCurrentFolder( prefixME_ + "/EBStatusFlagsClient" ); }
friend class EBSummaryClient [friend] |
Definition at line 34 of file EBStatusFlagsClient.h.
bool EBStatusFlagsClient::cloneME_ [private] |
Definition at line 79 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
bool EBStatusFlagsClient::debug_ [private] |
Definition at line 82 of file EBStatusFlagsClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBStatusFlagsClient(), endJob(), and endRun().
DQMStore* EBStatusFlagsClient::dqmStore_ [private] |
Definition at line 90 of file EBStatusFlagsClient.h.
Referenced by analyze(), beginJob(), cleanup(), and setup().
bool EBStatusFlagsClient::enableCleanup_ [private] |
Definition at line 86 of file EBStatusFlagsClient.h.
Referenced by cleanup(), and EBStatusFlagsClient().
TH2F* EBStatusFlagsClient::h01_[36] [private] |
Definition at line 94 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
TH1F* EBStatusFlagsClient::h02_[36] [private] |
Definition at line 98 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
TH2F* EBStatusFlagsClient::h03_[36] [private] |
Definition at line 102 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
int EBStatusFlagsClient::ievt_ [private] |
Definition at line 76 of file EBStatusFlagsClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBStatusFlagsClient::jevt_ [private] |
Definition at line 77 of file EBStatusFlagsClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
MonitorElement* EBStatusFlagsClient::meh01_[36] [private] |
Definition at line 92 of file EBStatusFlagsClient.h.
Referenced by analyze(), EBSummaryClient::analyze(), cleanup(), and EBStatusFlagsClient().
MonitorElement* EBStatusFlagsClient::meh02_[36] [private] |
Definition at line 96 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
MonitorElement* EBStatusFlagsClient::meh03_[36] [private] |
Definition at line 100 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
std::string EBStatusFlagsClient::prefixME_ [private] |
Definition at line 84 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), EBStatusFlagsClient(), and setup().
std::vector<int> EBStatusFlagsClient::superModules_ [private] |
Definition at line 88 of file EBStatusFlagsClient.h.
Referenced by analyze(), cleanup(), and EBStatusFlagsClient().
bool EBStatusFlagsClient::verbose_ [private] |
Definition at line 81 of file EBStatusFlagsClient.h.
Referenced by EBStatusFlagsClient().