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 32 of file EEStatusFlagsClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 34 of file EEStatusFlagsClient.cc.

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

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

76  {
77 
78 }

Member Function Documentation

void EEStatusFlagsClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

Definition at line 177 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_.

177  {
178 
179  ievt_++;
180  jevt_++;
181  if ( ievt_ % 10 == 0 ) {
182  if ( debug_ ) std::cout << "EEStatusFlagsClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
183  }
184 
185  uint32_t bits01 = 0;
187 
188  MonitorElement* me;
189 
190  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
191 
192  int ism = superModules_[i];
193 
194  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status " + Numbers::sEE(ism) );
195  h01_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
196  meh01_[ism-1] = me;
197 
198  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT front-end status bits " + Numbers::sEE(ism) );
199  h02_[ism-1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h02_[ism-1] );
200  meh02_[ism-1] = me;
201 
202  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT MEM front-end status " + Numbers::sEE(ism) );
203  h03_[ism-1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, h01_[ism-1] );
204  meh03_[ism-1] = me;
205 
206  for ( int ix = 1; ix <= 50; ix++ ) {
207  for ( int iy = 1; iy <= 50; iy++ ) {
208  if ( Masks::maskChannel(ism, ix, iy, bits01, EcalEndcap) ) {
209  if ( meh01_[ism-1] ) meh01_[ism-1]->setBinError( ix, iy, 0.01 );
210  }
211  }
212  }
213 
214  for ( int i = 1; i <= 10; i++ ) {
215  if ( Masks::maskPn(ism, i, bits01, EcalEndcap) ) {
216  int it = (i-1)/5 + 1;
217  if ( meh03_[ism-1] ) meh03_[ism-1]->setBinError( it, 1, 0.01 );
218  }
219  }
220 
221  }
222 
223 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:226
int i
Definition: DBlmapReader.cc:9
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
std::vector< int > superModules_
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:112
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:1468
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 80 of file EEStatusFlagsClient.cc.

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

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

BeginRun.

Implements EEClient.

Definition at line 91 of file EEStatusFlagsClient.cc.

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

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

Cleanup.

Implements EEClient.

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

123  {
124 
125  if ( ! enableCleanup_ ) return;
126 
127  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
128 
129  int ism = superModules_[i];
130 
131  if ( cloneME_ ) {
132  if ( h01_[ism-1] ) delete h01_[ism-1];
133  if ( h02_[ism-1] ) delete h02_[ism-1];
134  if ( h03_[ism-1] ) delete h03_[ism-1];
135  }
136 
137  h01_[ism-1] = 0;
138  h02_[ism-1] = 0;
139  h03_[ism-1] = 0;
140 
141  meh01_[ism-1] = 0;
142  meh02_[ism-1] = 0;
143  meh03_[ism-1] = 0;
144 
145  }
146 
147  dqmStore_->setCurrentFolder( prefixME_ + "/EEStatusFlagsClient" );
148 
149 }
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:429
MonitorElement * meh02_[18]
void EEStatusFlagsClient::endJob ( void  )
virtual

EndJob.

Implements EEClient.

Definition at line 101 of file EEStatusFlagsClient.cc.

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

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

EndRun.

Implements EEClient.

Definition at line 109 of file EEStatusFlagsClient.cc.

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

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

Get Functions.

Implements EEClient.

Definition at line 71 of file EEStatusFlagsClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 72 of file EEStatusFlagsClient.h.

References jevt_.

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

Setup.

Implements EEClient.

Definition at line 117 of file EEStatusFlagsClient.cc.

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

Referenced by beginRun().

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

Friends And Related Function Documentation

friend class EESummaryClient
friend

Definition at line 34 of file EEStatusFlagsClient.h.

Member Data Documentation

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
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().