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

#include <EEBeamHodoClient.h>

Inheritance diagram for EEBeamHodoClient:
EEClient

Public Member Functions

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

Constructor & Destructor Documentation

EEBeamHodoClient::EEBeamHodoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 26 of file EEBeamHodoClient.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_.

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

Destructor.

Definition at line 86 of file EEBeamHodoClient.cc.

86  {
87 
88 }

Member Function Documentation

void EEBeamHodoClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

Definition at line 227 of file EEBeamHodoClient.cc.

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

227  {
228 
229  ievt_++;
230  jevt_++;
231  if ( ievt_ % 10 == 0 ) {
232  if ( debug_ ) std::cout << "EEBeamHodoClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
233  }
234 
235  int smId = 1;
236 
237  MonitorElement* me;
238 
239  std::stringstream ss;
240 
241  for (int i=0; i<4; i++) {
242 
243  ss.str("");
244  ss << prefixME_ << "/EEBeamHodoTask/EEBHT occup " << Numbers::sEE(smId).c_str() << " " << std::setfill('0') << std::setw(2) << i+1;
245  me = dqmStore_->get( ss.str() );
247 
248  ss.str("");
249  ss << prefixME_ << "/EEBeamHodoTask/EEBHT raw " << Numbers::sEE(smId) << " " << std::setfill('0') << std::setw(2) << i+1;
250  me = dqmStore_->get(ss.str());
252 
253  }
254 
255  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT PosX rec " + Numbers::sEE(smId) );
256  hp01_[0] = UtilsClient::getHisto( me, cloneME_, hp01_[0] );
257 
258  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT PosY rec " + Numbers::sEE(smId) );
259  hp01_[1] = UtilsClient::getHisto( me, cloneME_, hp01_[1] );
260 
261  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT PosYX rec " + Numbers::sEE(smId) );
263 
264  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT SloX " + Numbers::sEE(smId) );
265  hs01_[0] = UtilsClient::getHisto( me, cloneME_, hs01_[0] );
266 
267  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT SloY " + Numbers::sEE(smId) );
268  hs01_[1] = UtilsClient::getHisto( me, cloneME_, hs01_[1] );
269 
270  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT QualX " + Numbers::sEE(smId) );
271  hq01_[0] = UtilsClient::getHisto( me, cloneME_, hq01_[0] );
272 
273  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT QualY " + Numbers::sEE(smId) );
274  hq01_[1] = UtilsClient::getHisto( me, cloneME_, hq01_[1] );
275 
276  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT TDC rec " + Numbers::sEE(smId) );
278 
279  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT Hodo-Calo X vs Cry " + Numbers::sEE(smId) );
280  hc01_[0] = UtilsClient::getHisto( me, cloneME_, hc01_[0] );
281 
282  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT Hodo-Calo Y vs Cry " + Numbers::sEE(smId) );
283  hc01_[1] = UtilsClient::getHisto( me, cloneME_, hc01_[1] );
284 
285  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT TDC-Calo vs Cry " + Numbers::sEE(smId) );
286  hc01_[2] = UtilsClient::getHisto( me, cloneME_, hc01_[2] );
287 
288  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT Missing Collections " + Numbers::sEE(smId) );
290 
291  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT prof E1 vs X " + Numbers::sEE(smId) );
292  he01_[0] = UtilsClient::getHisto( me, cloneME_, he01_[0] );
293 
294  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT prof E1 vs Y " + Numbers::sEE(smId) );
295  he01_[1] = UtilsClient::getHisto( me, cloneME_, he01_[1] );
296 
297  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT his E1 vs X " + Numbers::sEE(smId) );
298  he02_[0] = UtilsClient::getHisto( me, cloneME_, he02_[0] );
299 
300  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT his E1 vs Y " + Numbers::sEE(smId) );
301  he02_[1] = UtilsClient::getHisto( me, cloneME_, he02_[1] );
302 
303  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT PosX Hodo-Calo " + Numbers::sEE(smId) );
304  he03_[0] = UtilsClient::getHisto( me, cloneME_, he03_[0] );
305 
306  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT PosY Hodo-Calo " + Numbers::sEE(smId) );
307  he03_[1] = UtilsClient::getHisto( me, cloneME_, he03_[1] );
308 
309  me = dqmStore_->get( prefixME_ + "/EEBeamHodoTask/EEBHT TimeMax TDC-Calo " + Numbers::sEE(smId) );
310  he03_[2] = UtilsClient::getHisto( me, cloneME_, he03_[2] );
311 
312 }
int i
Definition: DBlmapReader.cc:9
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
static std::string sEE(const int ism)
Definition: Numbers.cc:205
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:1265
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:41
TProfile * he01_[2]
void EEBeamHodoClient::beginJob ( void  )
virtual

BeginJob.

Implements EEClient.

Definition at line 90 of file EEBeamHodoClient.cc.

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

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

BeginRun.

Implements EEClient.

Definition at line 101 of file EEBeamHodoClient.cc.

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

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

Cleanup.

Implements EEClient.

Definition at line 209 of file EEBeamHodoClient.cc.

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

Referenced by endJob(), and endRun().

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

EndJob.

Implements EEClient.

Definition at line 111 of file EEBeamHodoClient.cc.

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

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

EndRun.

Implements EEClient.

Definition at line 195 of file EEBeamHodoClient.cc.

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

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

Get Functions.

Implements EEClient.

Definition at line 70 of file EEBeamHodoClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 71 of file EEBeamHodoClient.h.

References jevt_.

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

Setup.

Implements EEClient.

Definition at line 203 of file EEBeamHodoClient.cc.

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

Referenced by beginRun().

203  {
204 
205  dqmStore_->setCurrentFolder( prefixME_ + "/EEBeamHodoClient" );
206 
207 }
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232

Member Data Documentation

bool EEBeamHodoClient::cloneME_
private

Definition at line 78 of file EEBeamHodoClient.h.

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

bool EEBeamHodoClient::debug_
private

Definition at line 81 of file EEBeamHodoClient.h.

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

DQMStore* EEBeamHodoClient::dqmStore_
private

Definition at line 89 of file EEBeamHodoClient.h.

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

bool EEBeamHodoClient::enableCleanup_
private

Definition at line 85 of file EEBeamHodoClient.h.

Referenced by cleanup(), and EEBeamHodoClient().

TH1F* EEBeamHodoClient::hc01_[3]
private

Definition at line 103 of file EEBeamHodoClient.h.

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

TProfile* EEBeamHodoClient::he01_[2]
private

Definition at line 107 of file EEBeamHodoClient.h.

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

TH2F* EEBeamHodoClient::he02_[2]
private

Definition at line 108 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::he03_[3]
private

Definition at line 110 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::hm01_
private

Definition at line 105 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::ho01_[4]
private

Definition at line 91 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::hp01_[2]
private

Definition at line 94 of file EEBeamHodoClient.h.

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

TH2F* EEBeamHodoClient::hp02_
private

Definition at line 95 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::hq01_[2]
private

Definition at line 99 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::hr01_[4]
private

Definition at line 92 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::hs01_[2]
private

Definition at line 97 of file EEBeamHodoClient.h.

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

TH1F* EEBeamHodoClient::ht01_
private

Definition at line 101 of file EEBeamHodoClient.h.

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

int EEBeamHodoClient::ievt_
private

Definition at line 75 of file EEBeamHodoClient.h.

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

int EEBeamHodoClient::jevt_
private

Definition at line 76 of file EEBeamHodoClient.h.

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

std::string EEBeamHodoClient::prefixME_
private

Definition at line 83 of file EEBeamHodoClient.h.

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

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

Definition at line 87 of file EEBeamHodoClient.h.

Referenced by EEBeamHodoClient().

bool EEBeamHodoClient::verbose_
private

Definition at line 80 of file EEBeamHodoClient.h.

Referenced by EEBeamHodoClient().