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
EBBeamHodoClient Class Reference

#include <EBBeamHodoClient.h>

Inheritance diagram for EBBeamHodoClient:
EBClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (void)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
 EBBeamHodoClient (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 ~EBBeamHodoClient ()
 Destructor. More...
 
- Public Member Functions inherited from EBClient
virtual ~EBClient (void)
 

Private Attributes

bool cloneME_
 
bool debug_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
TH1F * hc01_ [3]
 
TProfile * he01_ [2]
 
TH2F * he02_ [2]
 
TH1F * he03_ [3]
 
TH1F * hm01_
 
TH1F * ho01_ [4]
 
TH1F * hp01_ [2]
 
TH2F * hp02_
 
TH1F * hq01_ [2]
 
TH1F * hr01_ [4]
 
TH1F * hs01_ [2]
 
TH1F * ht01_
 
int ievt_
 
int jevt_
 
std::string prefixME_
 
std::vector< int > superModules_
 
bool verbose_
 

Detailed Description

Definition at line 33 of file EBBeamHodoClient.h.

Constructor & Destructor Documentation

EBBeamHodoClient::EBBeamHodoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 24 of file EBBeamHodoClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, prefixME_, superModules_, and verbose_.

24  {
25 
26  // cloneME switch
27  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
28 
29  // verbose switch
30  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
31 
32  // debug switch
33  debug_ = ps.getUntrackedParameter<bool>("debug", false);
34 
35  // prefixME path
36  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
37 
38  // enableCleanup_ switch
39  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
40 
41  // vector of selected Super Modules (Defaults to all 36).
42  superModules_.reserve(36);
43  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
44  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
45 
46  for (int i=0; i<4; i++) {
47 
48  ho01_[i] = 0;
49  hr01_[i] = 0;
50 
51  }
52 
53  hp01_[0] = 0;
54  hp01_[1] = 0;
55 
56  hp02_ = 0;
57 
58  hs01_[0] = 0;
59  hs01_[1] = 0;
60 
61  hq01_[0] = 0;
62  hq01_[1] = 0;
63 
64  ht01_ = 0;
65 
66  hc01_[0] = 0;
67  hc01_[1] = 0;
68  hc01_[2] = 0;
69 
70  hm01_ = 0;
71 
72  he01_[0] = 0;
73  he01_[1] = 0;
74 
75  he02_[0] = 0;
76  he02_[1] = 0;
77 
78  he03_[0] = 0;
79  he03_[1] = 0;
80  he03_[2] = 0;
81 
82 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
TProfile * he01_[2]
std::vector< int > superModules_
std::string prefixME_
EBBeamHodoClient::~EBBeamHodoClient ( )
virtual

Destructor.

Definition at line 84 of file EBBeamHodoClient.cc.

84  {
85 
86 }

Member Function Documentation

void EBBeamHodoClient::analyze ( void  )
virtual

Analyze.

Implements EBClient.

Definition at line 225 of file EBBeamHodoClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), hc01_, he01_, he02_, he03_, trackerHits::histo, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, ievt_, jevt_, prefixME_, and Numbers::sEB().

225  {
226 
227  ievt_++;
228  jevt_++;
229  if ( ievt_ % 10 == 0 ) {
230  if ( debug_ ) std::cout << "EBBeamHodoClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
231  }
232 
233  int smId = 1;
234 
235  char histo[200];
236 
237  MonitorElement* me;
238 
239  for (int i=0; i<4; i++) {
240 
241  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT occup %s %02d").c_str(), Numbers::sEB(smId).c_str(), i+1);
242  me = dqmStore_->get(histo);
243  ho01_[i] = UtilsClient::getHisto<TH1F*>( me, cloneME_, ho01_[i] );
244 
245  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT raw %s %02d").c_str(), Numbers::sEB(smId).c_str(), i+1);
246  me = dqmStore_->get(histo);
247  hr01_[i] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hr01_[i] );
248 
249  }
250 
251  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosX rec %s").c_str(), Numbers::sEB(smId).c_str());
252  me = dqmStore_->get(histo);
253  hp01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hp01_[0] );
254 
255  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosY rec %s").c_str(), Numbers::sEB(smId).c_str());
256  me = dqmStore_->get(histo);
257  hp01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hp01_[1] );
258 
259  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosYX rec %s").c_str(), Numbers::sEB(smId).c_str());
260  me = dqmStore_->get(histo);
261  hp02_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hp02_ );
262 
263  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT SloX %s").c_str(), Numbers::sEB(smId).c_str());
264  me = dqmStore_->get(histo);
265  hs01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hs01_[0] );
266 
267  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT SloY %s").c_str(), Numbers::sEB(smId).c_str());
268  me = dqmStore_->get(histo);
269  hs01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hs01_[1] );
270 
271  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT QualX %s").c_str(), Numbers::sEB(smId).c_str());
272  me = dqmStore_->get(histo);
273  hq01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hq01_[0] );
274 
275  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT QualY %s").c_str(), Numbers::sEB(smId).c_str());
276  me = dqmStore_->get(histo);
277  hq01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hq01_[1] );
278 
279  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TDC rec %s").c_str(), Numbers::sEB(smId).c_str());
280  me = dqmStore_->get(histo);
281  ht01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, ht01_ );
282 
283  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo X vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
284  me = dqmStore_->get(histo);
285  hc01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[0] );
286 
287  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Hodo-Calo Y vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
288  me = dqmStore_->get(histo);
289  hc01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[1] );
290 
291  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TDC-Calo vs Cry %s").c_str(), Numbers::sEB(smId).c_str());
292  me = dqmStore_->get(histo);
293  hc01_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hc01_[2] );
294 
295  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT Missing Collections %s").c_str(), Numbers::sEB(smId).c_str());
296  me = dqmStore_->get(histo);
297  hm01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hm01_ );
298 
299  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs X %s").c_str(), Numbers::sEB(smId).c_str());
300  me = dqmStore_->get(histo);
301  he01_[0] = UtilsClient::getHisto<TProfile*>( me, cloneME_, he01_[0] );
302 
303  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT prof E1 vs Y %s").c_str(), Numbers::sEB(smId).c_str());
304  me = dqmStore_->get(histo);
305  he01_[1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, he01_[1] );
306 
307  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs X %s").c_str(), Numbers::sEB(smId).c_str());
308  me = dqmStore_->get(histo);
309  he02_[0] = UtilsClient::getHisto<TH2F*>( me, cloneME_, he02_[0] );
310 
311  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT his E1 vs Y %s").c_str(), Numbers::sEB(smId).c_str());
312  me = dqmStore_->get(histo);
313  he02_[1] = UtilsClient::getHisto<TH2F*>( me, cloneME_, he02_[1] );
314 
315  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosX Hodo-Calo %s").c_str(), Numbers::sEB(smId).c_str());
316  me = dqmStore_->get(histo);
317  he03_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[0] );
318 
319  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT PosY Hodo-Calo %s").c_str(), Numbers::sEB(smId).c_str());
320  me = dqmStore_->get(histo);
321  he03_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[1] );
322 
323  sprintf(histo, (prefixME_ + "/EBBeamHodoTask/EBBHT TimeMax TDC-Calo %s").c_str(), Numbers::sEB(smId).c_str());
324  me = dqmStore_->get(histo);
325  he03_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, he03_[2] );
326 
327 }
int i
Definition: DBlmapReader.cc:9
static std::string sEB(const int ism)
Definition: Numbers.cc:81
DQMStore * dqmStore_
TProfile * he01_[2]
tuple histo
Definition: trackerHits.py:12
std::string prefixME_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
tuple cout
Definition: gather_cfg.py:41
void EBBeamHodoClient::beginJob ( void  )
virtual

BeginJob.

Implements EBClient.

Definition at line 88 of file EBBeamHodoClient.cc.

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

88  {
89 
91 
92  if ( debug_ ) std::cout << "EBBeamHodoClient: beginJob" << std::endl;
93 
94  ievt_ = 0;
95  jevt_ = 0;
96 
97 }
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:41
void EBBeamHodoClient::beginRun ( void  )
virtual

BeginRun.

Implements EBClient.

Definition at line 99 of file EBBeamHodoClient.cc.

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

99  {
100 
101  if ( debug_ ) std::cout << "EBBeamHodoClient: beginRun" << std::endl;
102 
103  jevt_ = 0;
104 
105  this->setup();
106 
107 }
tuple cout
Definition: gather_cfg.py:41
void setup(void)
Setup.
void EBBeamHodoClient::cleanup ( void  )
virtual

Cleanup.

Implements EBClient.

Definition at line 207 of file EBBeamHodoClient.cc.

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

Referenced by endJob(), and endRun().

207  {
208 
209  if ( ! enableCleanup_ ) return;
210 
211  dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" );
212 
213 }
DQMStore * dqmStore_
std::string prefixME_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void EBBeamHodoClient::endJob ( void  )
virtual

EndJob.

Implements EBClient.

Definition at line 109 of file EBBeamHodoClient.cc.

References cleanup(), cloneME_, gather_cfg::cout, debug_, hc01_, he01_, he02_, he03_, hm01_, ho01_, hp01_, hp02_, hq01_, hr01_, hs01_, ht01_, i, and ievt_.

109  {
110 
111  if ( debug_ ) std::cout << "EBBeamHodoClient: endJob, ievt = " << ievt_ << std::endl;
112 
113  this->cleanup();
114 
115  if ( cloneME_ ) {
116 
117  for (int i=0; i<4; i++) {
118 
119  if ( ho01_[i] ) delete ho01_[i];
120  if ( hr01_[i] ) delete hr01_[i];
121 
122  }
123 
124  if ( hp01_[0] ) delete hp01_[0];
125  if ( hp01_[1] ) delete hp01_[1];
126 
127  if ( hp02_ ) delete hp02_;
128 
129  if ( hs01_[0] ) delete hs01_[0];
130  if ( hs01_[1] ) delete hs01_[1];
131 
132  if ( hq01_[0] ) delete hq01_[0];
133  if ( hq01_[1] ) delete hq01_[1];
134 
135  if ( ht01_ ) delete ht01_;
136 
137  if ( hc01_[0] ) delete hc01_[0];
138  if ( hc01_[1] ) delete hc01_[1];
139  if ( hc01_[2] ) delete hc01_[2];
140 
141  if ( hm01_ ) delete hm01_;
142 
143  if ( he01_[0] ) delete he01_[0];
144  if ( he01_[1] ) delete he01_[1];
145 
146  if ( he02_[0] ) delete he02_[0];
147  if ( he02_[1] ) delete he02_[1];
148 
149  if ( he03_[0] ) delete he03_[0];
150  if ( he03_[1] ) delete he03_[1];
151  if ( he03_[2] ) delete he03_[2];
152 
153  }
154 
155  for (int i=0; i<4; i++) {
156 
157  ho01_[i] = 0;
158  hr01_[i] = 0;
159 
160  }
161 
162  hp01_[0] = 0;
163  hp01_[1] = 0;
164 
165  hp02_ = 0;
166 
167  hs01_[0] = 0;
168  hs01_[1] = 0;
169 
170  hq01_[0] = 0;
171  hq01_[1] = 0;
172 
173  ht01_ = 0;
174 
175  hc01_[0] = 0;
176  hc01_[1] = 0;
177  hc01_[2] = 0;
178 
179  hm01_ = 0;
180 
181  he01_[0] = 0;
182  he01_[1] = 0;
183 
184  he02_[0] = 0;
185  he02_[1] = 0;
186 
187  he03_[0] = 0;
188  he03_[1] = 0;
189  he03_[2] = 0;
190 
191 }
int i
Definition: DBlmapReader.cc:9
TProfile * he01_[2]
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:41
void EBBeamHodoClient::endRun ( void  )
virtual

EndRun.

Implements EBClient.

Definition at line 193 of file EBBeamHodoClient.cc.

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

193  {
194 
195  if ( debug_ ) std::cout << "EBBeamHodoClient: endRun, jevt = " << jevt_ << std::endl;
196 
197  this->cleanup();
198 
199 }
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:41
int EBBeamHodoClient::getEvtPerJob ( void  )
inlinevirtual

Get Functions.

Implements EBClient.

Definition at line 70 of file EBBeamHodoClient.h.

References ievt_.

70 { return ievt_; }
int EBBeamHodoClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EBClient.

Definition at line 71 of file EBBeamHodoClient.h.

References jevt_.

71 { return jevt_; }
void EBBeamHodoClient::setup ( void  )
virtual

Setup.

Implements EBClient.

Definition at line 201 of file EBBeamHodoClient.cc.

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

Referenced by beginRun().

201  {
202 
203  dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamHodoClient" );
204 
205 }
DQMStore * dqmStore_
std::string prefixME_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237

Member Data Documentation

bool EBBeamHodoClient::cloneME_
private

Definition at line 78 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

bool EBBeamHodoClient::debug_
private

Definition at line 81 of file EBBeamHodoClient.h.

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

DQMStore* EBBeamHodoClient::dqmStore_
private

Definition at line 89 of file EBBeamHodoClient.h.

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

bool EBBeamHodoClient::enableCleanup_
private

Definition at line 85 of file EBBeamHodoClient.h.

Referenced by cleanup(), and EBBeamHodoClient().

TH1F* EBBeamHodoClient::hc01_[3]
private

Definition at line 103 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TProfile* EBBeamHodoClient::he01_[2]
private

Definition at line 107 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH2F* EBBeamHodoClient::he02_[2]
private

Definition at line 108 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::he03_[3]
private

Definition at line 110 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hm01_
private

Definition at line 105 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::ho01_[4]
private

Definition at line 91 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hp01_[2]
private

Definition at line 94 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH2F* EBBeamHodoClient::hp02_
private

Definition at line 95 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hq01_[2]
private

Definition at line 99 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hr01_[4]
private

Definition at line 92 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::hs01_[2]
private

Definition at line 97 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

TH1F* EBBeamHodoClient::ht01_
private

Definition at line 101 of file EBBeamHodoClient.h.

Referenced by analyze(), EBBeamHodoClient(), and endJob().

int EBBeamHodoClient::ievt_
private

Definition at line 75 of file EBBeamHodoClient.h.

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

int EBBeamHodoClient::jevt_
private

Definition at line 76 of file EBBeamHodoClient.h.

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

std::string EBBeamHodoClient::prefixME_
private

Definition at line 83 of file EBBeamHodoClient.h.

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

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

Definition at line 87 of file EBBeamHodoClient.h.

Referenced by EBBeamHodoClient().

bool EBBeamHodoClient::verbose_
private

Definition at line 80 of file EBBeamHodoClient.h.

Referenced by EBBeamHodoClient().