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

Constructor & Destructor Documentation

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

Constructor.

Definition at line 23 of file EEClusterClient.cc.

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

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

75  {
76 
77 }

Member Function Documentation

void EEClusterClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

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

197  {
198 
199  ievt_++;
200  jevt_++;
201  if ( ievt_ % 10 == 0 ) {
202  if ( debug_ ) std::cout << "EEClusterClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
203  }
204 
205  MonitorElement* me;
206 
207  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy" );
208  h01_[0] = UtilsClient::getHisto( me, cloneME_, h01_[0] );
209 
210  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size" );
211  h01_[1] = UtilsClient::getHisto( me, cloneME_, h01_[1] );
212 
213  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number" );
214  h01_[2] = UtilsClient::getHisto( me, cloneME_, h01_[2] );
215 
216  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE -" );
217  h04_[0][0] = UtilsClient::getHisto( me, cloneME_, h04_[0][0] );
218 
219  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE -" );
220  h03_[0] = UtilsClient::getHisto( me, cloneME_, h03_[0] );
221 
222  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE -" );
223  h04_[1][0] = UtilsClient::getHisto( me, cloneME_, h04_[1][0] );
224 
225  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE -" );
226  h04_[2][0] = UtilsClient::getHisto( me, cloneME_, h04_[2][0] );
227 
228  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE -" );
230 
231  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE -" );
233 
234  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE -" );
236 
237  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE -" );
239 
240  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE -" );
242 
243  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE -" );
245 
246  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE -" );
248 
249  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE -" );
251 
252  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy map EE +" );
253  h04_[0][1] = UtilsClient::getHisto( me, cloneME_, h04_[0][1] );
254 
255  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number map EE +" );
256  h03_[1] = UtilsClient::getHisto( me, cloneME_, h03_[1] );
257 
258  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET map EE +" );
259  h04_[1][1] = UtilsClient::getHisto( me, cloneME_, h04_[1][1] );
260 
261  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size map EE +" );
262  h04_[2][1] = UtilsClient::getHisto( me, cloneME_, h04_[2][1] );
263 
264  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection eta EE +" );
266 
267  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC energy projection phi EE +" );
269 
270  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection eta EE +" );
272 
273  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC number projection phi EE +" );
275 
276  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection eta EE +" );
278 
279  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC ET projection phi EE +" );
281 
282  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection eta EE +" );
284 
285  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT BC size projection phi EE +" );
287 
288  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC energy" );
289  i01_[0] = UtilsClient::getHisto( me, cloneME_, i01_[0] );
290 
291  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC size" );
292  i01_[1] = UtilsClient::getHisto( me, cloneME_, i01_[1] );
293 
294  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT SC number" );
295  i01_[2] = UtilsClient::getHisto( me, cloneME_, i01_[2] );
296 
297  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s1s9" );
298  s01_[0] = UtilsClient::getHisto( me, cloneME_, s01_[0] );
299 
300  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT s9s25" );
301  s01_[1] = UtilsClient::getHisto( me, cloneME_, s01_[1] );
302 
303  me = dqmStore_->get( prefixME_ + "/EEClusterTask/EECLT dicluster invariant mass Pi0" );
304  s01_[2] = UtilsClient::getHisto( me, cloneME_, s01_[2] );
305 
306 }
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:89
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:1623
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 79 of file EEClusterClient.cc.

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

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

BeginRun.

Implements EEClient.

Definition at line 90 of file EEClusterClient.cc.

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

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

Cleanup.

Implements EEClient.

Definition at line 122 of file EEClusterClient.cc.

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

Referenced by endJob(), and endRun().

122  {
123 
124  if ( ! enableCleanup_ ) return;
125 
126  if ( cloneME_ ) {
127  if ( h01_[0] ) delete h01_[0];
128  if ( h01_[1] ) delete h01_[1];
129  if ( h01_[2] ) delete h01_[2];
130 
131  for(int iEE=0;iEE<2;iEE++) {
132  for(int i=0;i<3;++i) {
133  if(h04_[i][iEE]) delete h04_[i][iEE];
134  if(h02ProjEta_[i][iEE]) delete h02ProjEta_[i][iEE];
135  if(h02ProjPhi_[i][iEE]) delete h02ProjPhi_[i][iEE];
136  }
137  }
138 
139  if(h03_[0]) delete h03_[0];
140  if(h03ProjEta_[0]) delete h03ProjEta_[0];
141  if(h03ProjPhi_[0]) delete h03ProjPhi_[0];
142 
143  if(h03_[1]) delete h03_[1];
144  if(h03ProjEta_[1]) delete h03ProjEta_[1];
145  if(h03ProjPhi_[1]) delete h03ProjPhi_[1];
146 
147  if(i01_[0]) delete i01_[0];
148  if(i01_[1]) delete i01_[1];
149  if(i01_[2]) delete i01_[2];
150 
151  if(s01_[0]) delete s01_[0];
152  if(s01_[1]) delete s01_[1];
153  if(s01_[2]) delete s01_[2];
154 
155  }
156 
157  h01_[0] = 0;
158  h01_[1] = 0;
159  h01_[2] = 0;
160 
161  for(int iEE=0;iEE<2;iEE++) {
162  for(int i=0;i<3;++i) {
163  h04_[i][iEE] = 0;
164  h02ProjEta_[i][iEE] = 0;
165  h02ProjPhi_[i][iEE] = 0;
166  }
167  }
168 
169  h03_[0] = 0;
170  h03ProjEta_[0] = 0;
171  h03ProjPhi_[0] = 0;
172 
173  h03_[1] = 0;
174  h03ProjEta_[1] = 0;
175  h03ProjPhi_[1] = 0;
176 
177  i01_[0] = 0;
178  i01_[1] = 0;
179  i01_[2] = 0;
180 
181  s01_[0] = 0;
182  s01_[1] = 0;
183  s01_[2] = 0;
184 
185 }
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 100 of file EEClusterClient.cc.

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

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

EndRun.

Implements EEClient.

Definition at line 108 of file EEClusterClient.cc.

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

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

Get Functions.

Implements EEClient.

Definition at line 71 of file EEClusterClient.h.

References ievt_.

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

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 72 of file EEClusterClient.h.

References jevt_.

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

Setup.

Implements EEClient.

Definition at line 116 of file EEClusterClient.cc.

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

Referenced by beginRun().

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

Friends And Related Function Documentation

friend class EESummaryClient
friend

Definition at line 34 of file EEClusterClient.h.

Member Data Documentation

bool EEClusterClient::cloneME_
private

Definition at line 79 of file EEClusterClient.h.

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

bool EEClusterClient::debug_
private

Definition at line 82 of file EEClusterClient.h.

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

DQMStore* EEClusterClient::dqmStore_
private

Definition at line 90 of file EEClusterClient.h.

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

bool EEClusterClient::enableCleanup_
private

Definition at line 86 of file EEClusterClient.h.

Referenced by cleanup(), and EEClusterClient().

TH1F* EEClusterClient::h01_[3]
private

Definition at line 92 of file EEClusterClient.h.

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

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

Definition at line 94 of file EEClusterClient.h.

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

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

Definition at line 95 of file EEClusterClient.h.

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

TH2F* EEClusterClient::h03_[2]
private

Definition at line 96 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjEta_[2]
private

Definition at line 97 of file EEClusterClient.h.

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

TH1F* EEClusterClient::h03ProjPhi_[2]
private

Definition at line 98 of file EEClusterClient.h.

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

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

Definition at line 93 of file EEClusterClient.h.

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

TH1F* EEClusterClient::i01_[3]
private

Definition at line 99 of file EEClusterClient.h.

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

int EEClusterClient::ievt_
private

Definition at line 76 of file EEClusterClient.h.

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

int EEClusterClient::jevt_
private

Definition at line 77 of file EEClusterClient.h.

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

std::string EEClusterClient::prefixME_
private

Definition at line 84 of file EEClusterClient.h.

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

TH1F* EEClusterClient::s01_[3]
private

Definition at line 100 of file EEClusterClient.h.

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

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

Definition at line 88 of file EEClusterClient.h.

Referenced by EEClusterClient().

bool EEClusterClient::verbose_
private

Definition at line 81 of file EEClusterClient.h.

Referenced by EEClusterClient().