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

#include <EEClusterClient.h>

Inheritance diagram for EEClusterClient:
EEClient

Public Member Functions

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

Private Attributes

bool cloneME_
 
bool debug_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
TH1F * h01_ [3]
 
TProfile * h02ProjEta_ [3][2]
 
TProfile * h02ProjPhi_ [3][2]
 
TH2F * h03_ [2]
 
TH1F * h03ProjEta_ [2]
 
TH1F * h03ProjPhi_ [2]
 
TProfile2D * h04_ [3][2]
 
TH1F * i01_ [3]
 
int ievt_
 
int jevt_
 
std::string prefixME_
 
TH1F * s01_ [3]
 
std::vector< int > superModules_
 
bool verbose_
 

Friends

class EESummaryClient
 

Detailed Description

Definition at line 34 of file EEClusterClient.h.

Constructor & Destructor Documentation

EEClusterClient::EEClusterClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 25 of file EEClusterClient.cc.

References cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i, i01_, prefixME_, s01_, superModules_, and verbose_.

25  {
26 
27  // cloneME switch
28  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
29 
30  // verbose switch
31  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
32 
33  // debug switch
34  debug_ = ps.getUntrackedParameter<bool>("debug", false);
35 
36  // prefixME path
37  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
38 
39  // enableCleanup_ switch
40  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
41 
42  // vector of selected Super Modules (Defaults to all 18).
43  superModules_.reserve(18);
44  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
45  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
46 
47  h01_[0] = 0;
48  h01_[1] = 0;
49  h01_[2] = 0;
50 
51  for(int iEE=0;iEE<2;iEE++) {
52  for(int i=0;i<3;++i) {
53  h04_[i][iEE] = 0;
54  h02ProjEta_[i][iEE] = 0;
55  h02ProjPhi_[i][iEE] = 0;
56  }
57  }
58 
59  h03_[0] = 0;
60  h03ProjEta_[0] = 0;
61  h03ProjPhi_[0] = 0;
62 
63  h03_[1] = 0;
64  h03ProjEta_[1] = 0;
65  h03ProjPhi_[1] = 0;
66 
67  i01_[0] = 0;
68  i01_[1] = 0;
69  i01_[2] = 0;
70 
71  s01_[0] = 0;
72  s01_[1] = 0;
73  s01_[2] = 0;
74 
75 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< int > superModules_
TProfile * h02ProjPhi_[3][2]
TProfile * h02ProjEta_[3][2]
TProfile2D * h04_[3][2]
TH1F * h03ProjPhi_[2]
TH1F * h03ProjEta_[2]
std::string prefixME_
EEClusterClient::~EEClusterClient ( )
virtual

Destructor.

Definition at line 77 of file EEClusterClient.cc.

77  {
78 
79 }

Member Function Documentation

void EEClusterClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

Definition at line 199 of file EEClusterClient.cc.

References cloneME_, gather_cfg::cout, debug_, dqmStore_, DQMStore::get(), UtilsClient::getHisto(), h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i01_, ievt_, jevt_, prefixME_, and s01_.

199  {
200 
201  ievt_++;
202  jevt_++;
203  if ( ievt_ % 10 == 0 ) {
204  if ( debug_ ) std::cout << "EEClusterClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
205  }
206 
207  MonitorElement* me;
208 
209  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy" );
210  h01_[0] = UtilsClient::getHisto( me, cloneME_, h01_[0] );
211 
212  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size" );
213  h01_[1] = UtilsClient::getHisto( me, cloneME_, h01_[1] );
214 
215  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number" );
216  h01_[2] = UtilsClient::getHisto( me, cloneME_, h01_[2] );
217 
218  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE -" );
219  h04_[0][0] = UtilsClient::getHisto( me, cloneME_, h04_[0][0] );
220 
221  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE -" );
222  h03_[0] = UtilsClient::getHisto( me, cloneME_, h03_[0] );
223 
224  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE -" );
225  h04_[1][0] = UtilsClient::getHisto( me, cloneME_, h04_[1][0] );
226 
227  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE -" );
228  h04_[2][0] = UtilsClient::getHisto( me, cloneME_, h04_[2][0] );
229 
230  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE -" );
232 
233  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE -" );
235 
236  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE -" );
238 
239  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE -" );
241 
242  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE -" );
244 
245  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE -" );
247 
248  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE -" );
250 
251  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE -" );
253 
254  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE +" );
255  h04_[0][1] = UtilsClient::getHisto( me, cloneME_, h04_[0][1] );
256 
257  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE +" );
258  h03_[1] = UtilsClient::getHisto( me, cloneME_, h03_[1] );
259 
260  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE +" );
261  h04_[1][1] = UtilsClient::getHisto( me, cloneME_, h04_[1][1] );
262 
263  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE +" );
264  h04_[2][1] = UtilsClient::getHisto( me, cloneME_, h04_[2][1] );
265 
266  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE +" );
268 
269  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE +" );
271 
272  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE +" );
274 
275  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE +" );
277 
278  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE +" );
280 
281  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE +" );
283 
284  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE +" );
286 
287  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE +" );
289 
290  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC energy" );
291  i01_[0] = UtilsClient::getHisto( me, cloneME_, i01_[0] );
292 
293  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC size" );
294  i01_[1] = UtilsClient::getHisto( me, cloneME_, i01_[1] );
295 
296  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC number" );
297  i01_[2] = UtilsClient::getHisto( me, cloneME_, i01_[2] );
298 
299  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s1s9" );
300  s01_[0] = UtilsClient::getHisto( me, cloneME_, s01_[0] );
301 
302  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s9s25" );
303  s01_[1] = UtilsClient::getHisto( me, cloneME_, s01_[1] );
304 
305  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT dicluster invariant mass Pi0" );
306  s01_[2] = UtilsClient::getHisto( me, cloneME_, s01_[2] );
307 
308 }
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
TProfile * h02ProjPhi_[3][2]
TProfile * h02ProjEta_[3][2]
TProfile2D * h04_[3][2]
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
TH1F * h03ProjPhi_[2]
TH1F * h03ProjEta_[2]
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:121
std::string prefixME_
void EEClusterClient::beginJob ( void  )
virtual

BeginJob.

Implements EEClient.

Definition at line 81 of file EEClusterClient.cc.

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

81  {
82 
84 
85  if ( debug_ ) std::cout << "EEClusterClient: beginJob" << std::endl;
86 
87  ievt_ = 0;
88  jevt_ = 0;
89 
90 }
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:121
void EEClusterClient::beginRun ( void  )
virtual

BeginRun.

Implements EEClient.

Definition at line 92 of file EEClusterClient.cc.

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

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

Cleanup.

Implements EEClient.

Definition at line 124 of file EEClusterClient.cc.

References cloneME_, enableCleanup_, h01_, h02ProjEta_, h02ProjPhi_, h03_, h03ProjEta_, h03ProjPhi_, h04_, i, i01_, and s01_.

Referenced by endJob(), and endRun().

124  {
125 
126  if ( ! enableCleanup_ ) return;
127 
128  if ( cloneME_ ) {
129  if ( h01_[0] ) delete h01_[0];
130  if ( h01_[1] ) delete h01_[1];
131  if ( h01_[2] ) delete h01_[2];
132 
133  for(int iEE=0;iEE<2;iEE++) {
134  for(int i=0;i<3;++i) {
135  if(h04_[i][iEE]) delete h04_[i][iEE];
136  if(h02ProjEta_[i][iEE]) delete h02ProjEta_[i][iEE];
137  if(h02ProjPhi_[i][iEE]) delete h02ProjPhi_[i][iEE];
138  }
139  }
140 
141  if(h03_[0]) delete h03_[0];
142  if(h03ProjEta_[0]) delete h03ProjEta_[0];
143  if(h03ProjPhi_[0]) delete h03ProjPhi_[0];
144 
145  if(h03_[1]) delete h03_[1];
146  if(h03ProjEta_[1]) delete h03ProjEta_[1];
147  if(h03ProjPhi_[1]) delete h03ProjPhi_[1];
148 
149  if(i01_[0]) delete i01_[0];
150  if(i01_[1]) delete i01_[1];
151  if(i01_[2]) delete i01_[2];
152 
153  if(s01_[0]) delete s01_[0];
154  if(s01_[1]) delete s01_[1];
155  if(s01_[2]) delete s01_[2];
156 
157  }
158 
159  h01_[0] = 0;
160  h01_[1] = 0;
161  h01_[2] = 0;
162 
163  for(int iEE=0;iEE<2;iEE++) {
164  for(int i=0;i<3;++i) {
165  h04_[i][iEE] = 0;
166  h02ProjEta_[i][iEE] = 0;
167  h02ProjPhi_[i][iEE] = 0;
168  }
169  }
170 
171  h03_[0] = 0;
172  h03ProjEta_[0] = 0;
173  h03ProjPhi_[0] = 0;
174 
175  h03_[1] = 0;
176  h03ProjEta_[1] = 0;
177  h03ProjPhi_[1] = 0;
178 
179  i01_[0] = 0;
180  i01_[1] = 0;
181  i01_[2] = 0;
182 
183  s01_[0] = 0;
184  s01_[1] = 0;
185  s01_[2] = 0;
186 
187 }
int i
Definition: DBlmapReader.cc:9
TProfile * h02ProjPhi_[3][2]
TProfile * h02ProjEta_[3][2]
TProfile2D * h04_[3][2]
TH1F * h03ProjPhi_[2]
TH1F * h03ProjEta_[2]
void EEClusterClient::endJob ( void  )
virtual

EndJob.

Implements EEClient.

Definition at line 102 of file EEClusterClient.cc.

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

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

EndRun.

Implements EEClient.

Definition at line 110 of file EEClusterClient.cc.

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

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

Get Functions.

Implements EEClient.

Definition at line 73 of file EEClusterClient.h.

References ievt_.

73 { return ievt_; }
int EEClusterClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 74 of file EEClusterClient.h.

References jevt_.

74 { return jevt_; }
void EEClusterClient::setup ( void  )
virtual

Setup.

Implements EEClient.

Definition at line 118 of file EEClusterClient.cc.

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

Referenced by beginRun().

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

Friends And Related Function Documentation

friend class EESummaryClient
friend

Definition at line 36 of file EEClusterClient.h.

Member Data Documentation

bool EEClusterClient::cloneME_
private

Definition at line 81 of file EEClusterClient.h.

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

bool EEClusterClient::debug_
private

Definition at line 84 of file EEClusterClient.h.

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

DQMStore* EEClusterClient::dqmStore_
private

Definition at line 92 of file EEClusterClient.h.

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

bool EEClusterClient::enableCleanup_
private

Definition at line 88 of file EEClusterClient.h.

Referenced by cleanup(), and EEClusterClient().

TH1F* EEClusterClient::h01_[3]
private

Definition at line 94 of file EEClusterClient.h.

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

TProfile* EEClusterClient::h02ProjEta_[3][2]
private

Definition at line 96 of file EEClusterClient.h.

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

TProfile* EEClusterClient::h02ProjPhi_[3][2]
private

Definition at line 97 of file EEClusterClient.h.

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

TH2F* EEClusterClient::h03_[2]
private

Definition at line 98 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjEta_[2]
private

Definition at line 99 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjPhi_[2]
private

Definition at line 100 of file EEClusterClient.h.

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

TProfile2D* EEClusterClient::h04_[3][2]
private

Definition at line 95 of file EEClusterClient.h.

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

TH1F* EEClusterClient::i01_[3]
private

Definition at line 101 of file EEClusterClient.h.

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

int EEClusterClient::ievt_
private

Definition at line 78 of file EEClusterClient.h.

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

int EEClusterClient::jevt_
private

Definition at line 79 of file EEClusterClient.h.

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

std::string EEClusterClient::prefixME_
private

Definition at line 86 of file EEClusterClient.h.

Referenced by analyze(), EEClusterClient(), and setup().

TH1F* EEClusterClient::s01_[3]
private

Definition at line 102 of file EEClusterClient.h.

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

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

Definition at line 90 of file EEClusterClient.h.

Referenced by EEClusterClient().

bool EEClusterClient::verbose_
private

Definition at line 83 of file EEClusterClient.h.

Referenced by EEClusterClient().