CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
EEStatusFlagsClient Class Reference

#include <EEStatusFlagsClient.h>

Inheritance diagram for EEStatusFlagsClient:
EEClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (void)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
 EEStatusFlagsClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void endJob (void)
 EndJob. More...
 
void endRun (void)
 EndRun. More...
 
int getEvtPerJob ()
 Get Functions. More...
 
int getEvtPerRun ()
 Returns the number of processed events in this Run. More...
 
void setup (void)
 Setup. More...
 
virtual ~EEStatusFlagsClient ()
 Destructor. More...
 
- Public Member Functions inherited from EEClient
virtual ~EEClient (void)
 

Private Attributes

bool cloneME_
 
bool debug_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
TH2F * h01_ [18]
 
TH1F * h02_ [18]
 
TH2F * h03_ [18]
 
int ievt_
 
int jevt_
 
MonitorElementmeh01_ [18]
 
MonitorElementmeh02_ [18]
 
MonitorElementmeh03_ [18]
 
std::string prefixME_
 
std::vector< int > superModules_
 
bool verbose_
 

Friends

class EESummaryClient
 

Detailed Description

Definition at line 30 of file EEStatusFlagsClient.h.

Constructor & Destructor Documentation

EEStatusFlagsClient::EEStatusFlagsClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file EEStatusFlagsClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h02_, h03_, i, ecalpyutils::ism(), meh01_, meh02_, meh03_, prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, superModules_, and verbose_.

32  {
33 
34  // cloneME switch
35  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
36 
37  // verbose switch
38  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
39 
40  // debug switch
41  debug_ = ps.getUntrackedParameter<bool>("debug", false);
42 
43  // prefixME path
44  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
45 
46  // enableCleanup_ switch
47  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
48 
49  // vector of selected Super Modules (Defaults to all 18).
50  superModules_.reserve(18);
51  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
52  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
53 
54  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
55 
56  int ism = superModules_[i];
57 
58  h01_[ism-1] = 0;
59 
60  meh01_[ism-1] = 0;
61 
62  h02_[ism-1] = 0;
63 
64  meh02_[ism-1] = 0;
65 
66  h03_[ism-1] = 0;
67 
68  meh03_[ism-1] = 0;
69 
70  }
71 
72 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< int > superModules_
MonitorElement * meh01_[18]
MonitorElement * meh03_[18]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
MonitorElement * meh02_[18]
EEStatusFlagsClient::~EEStatusFlagsClient ( )
virtual

Destructor.

Definition at line 74 of file EEStatusFlagsClient.cc.

74  {
75 
76 }

Member Function Documentation

void EEStatusFlagsClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

Definition at line 175 of file EEStatusFlagsClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, EcalEndcap, DQMStore::get(), h01_, h02_, h03_, i, ievt_, jevt_, Masks::maskChannel(), Masks::maskPn(), meh01_, meh02_, meh03_, prefixME_, Numbers::sEE(), MonitorElement::setBinError(), EcalDQMStatusHelper::STATUS_FLAG_ERROR, and superModules_.

175  {
176 
177  ievt_++;
178  jevt_++;
179  if ( ievt_ % 10 == 0 ) {
180  if ( debug_ ) std::cout << "EEStatusFlagsClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
181  }
182 
183  uint32_t bits01 = 0;
185 
186  MonitorElement* me;
187 
188  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
189 
190  int ism = superModules_[i];
191 
192  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status " + Numbers::sEE(ism) );
193  h01_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
194  meh01_[ism-1] = me;
195 
196  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status bits " + Numbers::sEE(ism) );
197  h02_[ism-1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h02_[ism-1] );
198  meh02_[ism-1] = me;
199 
200  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT MEM front-end status " + Numbers::sEE(ism) );
201  h03_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
202  meh03_[ism-1] = me;
203 
204  for ( int ix = 1; ix <= 50; ix++ ) {
205  for ( int iy = 1; iy <= 50; iy++ ) {
206  if ( Masks::maskChannel(ism, ix, iy, bits01, EcalEndcap) ) {
207  if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( ix, iy, 0.01 );
208  }
209  }
210  }
211 
212  for ( int i = 1; i <= 10; i++ ) {
213  if ( Masks::maskPn(ism, i, bits01, EcalEndcap) ) {
214  int it = (i-1)/5 + 1;
215  if ( meh03_[ism-1] ) meh03_[ism-1]->setBinError( it, 1, 0.01 );
216  }
217  }
218 
219  }
220 
221 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:57
std::vector< int > superModules_
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:109
MonitorElement * meh01_[18]
static const int STATUS_FLAG_ERROR
MonitorElement * meh03_[18]
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
tuple cout
Definition: gather_cfg.py:121
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
MonitorElement * meh02_[18]
void EEStatusFlagsClient::beginJob ( void  )
virtual

BeginJob.

Implements EEClient.

Definition at line 78 of file EEStatusFlagsClient.cc.

References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cppFunctionSkipper::operator.

78  {
79 
81 
82  if ( debug_ ) std::cout << "EEStatusFlagsClient: beginJob" << std::endl;
83 
84  ievt_ = 0;
85  jevt_ = 0;
86 
87 }
tuple cout
Definition: gather_cfg.py:121
void EEStatusFlagsClient::beginRun ( void  )
virtual

BeginRun.

Implements EEClient.

Definition at line 89 of file EEStatusFlagsClient.cc.

References gather_cfg::cout, debug_, jevt_, and setup().

89  {
90 
91  if ( debug_ ) std::cout << "EEStatusFlagsClient: beginRun" << std::endl;
92 
93  jevt_ = 0;
94 
95  this->setup();
96 
97 }
void setup(void)
Setup.
tuple cout
Definition: gather_cfg.py:121
void EEStatusFlagsClient::cleanup ( void  )
virtual

Cleanup.

Implements EEClient.

Definition at line 121 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().

121  {
122 
123  if ( ! enableCleanup_ ) return;
124 
125  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
126 
127  int ism = superModules_[i];
128 
129  if ( cloneME_ ) {
130  if ( h01_[ism-1] ) delete h01_[ism-1];
131  if ( h02_[ism-1] ) delete h02_[ism-1];
132  if ( h03_[ism-1] ) delete h03_[ism-1];
133  }
134 
135  h01_[ism-1] = 0;
136  h02_[ism-1] = 0;
137  h03_[ism-1] = 0;
138 
139  meh01_[ism-1] = 0;
140  meh02_[ism-1] = 0;
141  meh03_[ism-1] = 0;
142 
143  }
144 
145  dqmStore_->setCurrentFolder( prefixME_ + "/EEStatusFlagsClient" );
146 
147 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > superModules_
MonitorElement * meh01_[18]
MonitorElement * meh03_[18]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * meh02_[18]
void EEStatusFlagsClient::endJob ( void  )
virtual

EndJob.

Implements EEClient.

Definition at line 99 of file EEStatusFlagsClient.cc.

References cleanup(), gather_cfg::cout, debug_, and ievt_.

99  {
100 
101  if ( debug_ ) std::cout << "EEStatusFlagsClient: endJob, ievt = " << ievt_ << std::endl;
102 
103  this->cleanup();
104 
105 }
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:121
void EEStatusFlagsClient::endRun ( void  )
virtual

EndRun.

Implements EEClient.

Definition at line 107 of file EEStatusFlagsClient.cc.

References cleanup(), gather_cfg::cout, debug_, and jevt_.

107  {
108 
109  if ( debug_ ) std::cout << "EEStatusFlagsClient: endRun, jevt = " << jevt_ << std::endl;
110 
111  this->cleanup();
112 
113 }
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:121
int EEStatusFlagsClient::getEvtPerJob ( void  )
inlinevirtual

Get Functions.

Implements EEClient.

Definition at line 69 of file EEStatusFlagsClient.h.

References ievt_.

69 { return ievt_; }
int EEStatusFlagsClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 70 of file EEStatusFlagsClient.h.

References jevt_.

70 { return jevt_; }
void EEStatusFlagsClient::setup ( void  )
virtual

Setup.

Implements EEClient.

Definition at line 115 of file EEStatusFlagsClient.cc.

References dqmStore_, prefixME_, and DQMStore::setCurrentFolder().

Referenced by beginRun().

115  {
116 
117  dqmStore_->setCurrentFolder( prefixME_ + "/EEStatusFlagsClient" );
118 
119 }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584

Friends And Related Function Documentation

friend class EESummaryClient
friend

Definition at line 32 of file EEStatusFlagsClient.h.

Member Data Documentation

bool EEStatusFlagsClient::cloneME_
private

Definition at line 77 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

bool EEStatusFlagsClient::debug_
private

Definition at line 80 of file EEStatusFlagsClient.h.

Referenced by analyze(), beginJob(), beginRun(), EEStatusFlagsClient(), endJob(), and endRun().

DQMStore* EEStatusFlagsClient::dqmStore_
private

Definition at line 88 of file EEStatusFlagsClient.h.

Referenced by analyze(), beginJob(), cleanup(), and setup().

bool EEStatusFlagsClient::enableCleanup_
private

Definition at line 84 of file EEStatusFlagsClient.h.

Referenced by cleanup(), and EEStatusFlagsClient().

TH2F* EEStatusFlagsClient::h01_[18]
private

Definition at line 92 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

TH1F* EEStatusFlagsClient::h02_[18]
private

Definition at line 96 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

TH2F* EEStatusFlagsClient::h03_[18]
private

Definition at line 100 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

int EEStatusFlagsClient::ievt_
private

Definition at line 74 of file EEStatusFlagsClient.h.

Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().

int EEStatusFlagsClient::jevt_
private

Definition at line 75 of file EEStatusFlagsClient.h.

Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().

MonitorElement* EEStatusFlagsClient::meh01_[18]
private
MonitorElement* EEStatusFlagsClient::meh02_[18]
private

Definition at line 94 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

MonitorElement* EEStatusFlagsClient::meh03_[18]
private

Definition at line 98 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

std::string EEStatusFlagsClient::prefixME_
private

Definition at line 82 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), EEStatusFlagsClient(), and setup().

std::vector<int> EEStatusFlagsClient::superModules_
private

Definition at line 86 of file EEStatusFlagsClient.h.

Referenced by analyze(), cleanup(), and EEStatusFlagsClient().

bool EEStatusFlagsClient::verbose_
private

Definition at line 79 of file EEStatusFlagsClient.h.

Referenced by EEStatusFlagsClient().