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

#include <EcalBarrelMonitorClient.h>

Inheritance diagram for EcalBarrelMonitorClient:
edm::EDAnalyzer EcalBarrelMonitorDbClient EcalBarrelMonitorXdaqClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 BeginLumiBlock. More...
 
void beginRun (void)
 BeginRun. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void beginRunDb (void)
 BeginRunDB. More...
 
void cleanup (void)
 Cleanup. More...
 
 EcalBarrelMonitorClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 EndLumiBlock. More...
 
void endRun (void)
 EndRun. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 
void endRunDb (void)
 EndRunDB. More...
 
const char * getRunType (void)
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
void softReset (bool flag)
 SoftReset. More...
 
void writeDb (void)
 WriteDB. More...
 
virtual ~EcalBarrelMonitorClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

bool begin_run_
 
std::vector< EBClient * > clients_
 
std::vector< std::string > clientsNames_
 
std::multimap< EBClient *, int > clientsRuns_
 
std::map< std::string, int > clientsStatus_
 
bool cloneME_
 
time_t current_time_
 
std::string dbHostName_
 
int dbHostPort_
 
std::string dbName_
 
std::string dbPassword_
 
std::string dbTagName_
 
time_t dbUpdateTime_
 
std::string dbUserName_
 
bool debug_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
std::vector< std::string > enabledClients_
 
bool end_run_
 
int evt_
 
int evtType_
 
bool forced_status_
 
bool forced_update_
 
TH1F * h_
 
int ievt_
 
std::string inputFile_
 
int jevt_
 
int last_run_
 
time_t last_time_reset_
 
time_t last_time_update_
 
std::string location_
 
bool mergeRuns_
 
std::string prefixME_
 
int prescaleFactor_
 
std::string resetFile_
 
int run_
 
int runType_
 
std::vector< std::string > runTypes_
 
std::string status_
 
int subrun_
 
EBSummaryClientsummaryClient_
 
std::vector< int > superModules_
 
time_t updateTime_
 
bool verbose_
 

Friends

class EcalBarrelMonitorXdaqClient
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 36 of file EcalBarrelMonitorClient.h.

Constructor & Destructor Documentation

EcalBarrelMonitorClient::EcalBarrelMonitorClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 62 of file EcalBarrelMonitorClient.cc.

References EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, EcalDCCHeaderBlock::CALIB_LOCAL, clients_, clientsNames_, clientsRuns_, clientsStatus_, cloneME_, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, gather_cfg::cout, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbTagName_, dbUpdateTime_, dbUserName_, debug_, enableCleanup_, enabledClients_, spr::find(), edm::ParameterSet::getUntrackedParameter(), EcalDCCHeaderBlock::HALO_GLOBAL, EcalDCCHeaderBlock::HALO_LOCAL, i, inputFile_, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, location_, mergeRuns_, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, EcalDCCHeaderBlock::PEDESTAL_STD, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, prefixME_, prescaleFactor_, resetFile_, runTypes_, EBSummaryClient::setFriends(), summaryClient_, superModules_, EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, updateTime_, and verbose_.

62  {
63 
64  // verbose switch
65 
66  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
67 
68  if ( verbose_ ) {
69  std::cout << std::endl;
70  std::cout << " *** Ecal Barrel Generic Monitor Client ***" << std::endl;
71  std::cout << std::endl;
72  }
73 
74  // DQM ROOT input file
75 
76  inputFile_ = ps.getUntrackedParameter<std::string>("inputFile", "");
77 
78  if ( verbose_ ) {
79  if ( inputFile_.size() != 0 ) {
80  std::cout << " Reading DQM data from inputFile '" << inputFile_ << "'" << std::endl;
81  }
82  }
83 
84  // Ecal Cond DB
85 
86  dbName_ = ps.getUntrackedParameter<std::string>("dbName", "");
87  dbHostName_ = ps.getUntrackedParameter<std::string>("dbHostName", "");
88  dbHostPort_ = ps.getUntrackedParameter<int>("dbHostPort", 1521);
89  dbUserName_ = ps.getUntrackedParameter<std::string>("dbUserName", "");
90  dbPassword_ = ps.getUntrackedParameter<std::string>("dbPassword", "");
91 
92  dbTagName_ = ps.getUntrackedParameter<std::string>("dbTagName", "CMSSW");
93 
94  if ( verbose_ ) {
95  if ( dbName_.size() != 0 ) {
96  std::cout << " Ecal Cond DB: " << std::endl;
97  std::cout << " dbName = '" << dbName_ << "'" << std::endl;
98  std::cout << " dbUserName = '" << dbUserName_ << "'" << std::endl;
99  if ( dbHostName_.size() != 0 ) {
100  std::cout << " dbHostName = '" << dbHostName_ << "'" << std::endl;
101  std::cout << " dbHostPort = '" << dbHostPort_ << "'" << std::endl;
102  }
103  std::cout << " dbTagName = '" << dbTagName_ << "'" << std::endl;
104 #ifndef WITH_ECAL_COND_DB
105  std::cout << std::endl;
106  std::cout << "WARNING: DB access is NOT available" << std::endl;
107  std::cout << std::endl;
108 #endif
109  } else {
110  std::cout << " Ecal Cond DB is OFF" << std::endl;
111  }
112  }
113 
114  // mergeRuns switch
115 
116  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
117 
118  if ( verbose_ ) {
119  if ( mergeRuns_ ) {
120  std::cout << " mergeRuns switch is ON" << std::endl;
121  } else {
122  std::cout << " mergeRuns switch is OFF" << std::endl;
123  }
124  }
125 
126  // resetFile
127 
128  resetFile_ = ps.getUntrackedParameter<std::string>("resetFile", "");
129 
130  if ( verbose_ ) {
131  if ( resetFile_.size() != 0 ) {
132  std::cout << " resetFile is '" << resetFile_ << "'" << std::endl;
133  }
134  }
135 
136  // updateTime
137 
138  updateTime_ = ps.getUntrackedParameter<int>("updateTime", 0);
139 
140  if ( verbose_ ) {
141  std::cout << " updateTime is " << updateTime_ << " minute(s)" << std::endl;
142  }
143 
144  // dbUpdateTime
145 
146  dbUpdateTime_ = ps.getUntrackedParameter<int>("dbUpdateTime", 0);
147 
148  if ( verbose_ ) {
149  std::cout << " dbUpdateTime is " << dbUpdateTime_ << " minute(s)" << std::endl;
150  }
151 
152  // location
153 
154  location_ = ps.getUntrackedParameter<std::string>("location", "H4");
155 
156  if ( verbose_ ) {
157  std::cout << " location is '" << location_ << "'" << std::endl;
158  }
159 
160  // cloneME switch
161 
162  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
163 
164  if ( verbose_ ) {
165  if ( cloneME_ ) {
166  std::cout << " cloneME switch is ON" << std::endl;
167  } else {
168  std::cout << " cloneME switch is OFF" << std::endl;
169  }
170  }
171 
172  // debug switch
173 
174  debug_ = ps.getUntrackedParameter<bool>("debug", false);
175 
176  if ( verbose_ ) {
177  if ( debug_ ) {
178  std::cout << " debug switch is ON" << std::endl;
179  } else {
180  std::cout << " debug switch is OFF" << std::endl;
181  }
182  }
183 
184  // prescaleFactor
185 
186  prescaleFactor_ = ps.getUntrackedParameter<int>("prescaleFactor", 1);
187 
188  if ( verbose_ ) {
189  std::cout << " prescaleFactor is " << prescaleFactor_ << std::endl;
190  }
191 
192  // prefixME path
193 
194  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
195 
196  if ( verbose_ ) {
197  std::cout << " prefixME path is '" << prefixME_ << "'" << std::endl;
198  }
199 
200  // enableCleanup switch
201 
202  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
203 
204  if ( verbose_ ) {
205  if ( enableCleanup_ ) {
206  std::cout << " enableCleanup switch is ON" << std::endl;
207  } else {
208  std::cout << " enableCleanup switch is OFF" << std::endl;
209  }
210  }
211 
212  // vector of selected Super Modules (Defaults to all 36).
213 
214  superModules_.reserve(36);
215  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
216 
217  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
218 
219  if ( verbose_ ) {
220  std::cout << " Selected SMs:" << std::endl;
221  for ( unsigned int i = 0; i < superModules_.size(); i++ ) {
222  std::cout << " " << std::setw(2) << std::setfill('0') << superModules_[i];
223  }
224  std::cout << std::endl;
225  }
226 
227  // vector of enabled Clients (defaults)
228 
229  enabledClients_.push_back("Integrity");
230  enabledClients_.push_back("StatusFlags");
231  enabledClients_.push_back("PedestalOnline");
232  enabledClients_.push_back("Summary");
233 
234  enabledClients_ = ps.getUntrackedParameter<std::vector<std::string> >("enabledClients", enabledClients_);
235 
236  if ( verbose_ ) {
237  std::cout << " Enabled Clients:" << std::endl;
238  for ( unsigned int i = 0; i < enabledClients_.size(); i++ ) {
239  std::cout << " " << enabledClients_[i];
240  }
241  std::cout << std::endl;
242  }
243 
244  // set runTypes (use resize() on purpose!)
245 
246  runTypes_.resize(30);
247  for ( unsigned int i = 0; i < runTypes_.size(); i++ ) runTypes_[i] = "UNKNOWN";
248 
258 
265 
270 
272 
273  // clients' constructors
274 
275  clients_.reserve(12);
276  clientsNames_.reserve(12);
277 
278  if ( find(enabledClients_.begin(), enabledClients_.end(), "Integrity" ) != enabledClients_.end() ) {
279 
280  clients_.push_back( new EBIntegrityClient(ps) );
281  clientsNames_.push_back( "Integrity" );
282 
283  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
284  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
285  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
286  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ));
287  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
288  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
289  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
290  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
291 
292  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
293  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
294  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
295  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
296  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
297  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
298  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
299 
300  }
301 
302  if ( find(enabledClients_.begin(), enabledClients_.end(), "StatusFlags" ) != enabledClients_.end() ) {
303 
304  clients_.push_back( new EBStatusFlagsClient(ps) );
305  clientsNames_.push_back( "StatusFlags" );
306 
307  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
308  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
309  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
310  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ));
311  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
312  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
313  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
314  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
315 
316  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
317  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
318  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
319  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
320  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
321  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
322  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
323 
324  }
325 
326  if ( find(enabledClients_.begin(), enabledClients_.end(), "Occupancy" ) != enabledClients_.end() ) {
327 
328  clients_.push_back( new EBOccupancyClient(ps) );
329  clientsNames_.push_back( "Occupancy" );
330 
331  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
332  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
333  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
334  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ));
335  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
336  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
337  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
338  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
339 
340  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
341  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
342  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
343  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
344  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
345  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
346  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
347 
348  }
349 
350  if ( find(enabledClients_.begin(), enabledClients_.end(), "Cosmic" ) != enabledClients_.end() ) {
351 
352  clients_.push_back( new EBCosmicClient(ps) );
353  clientsNames_.push_back( "Cosmic" );
354 
355  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
356  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
357  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
358  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
359  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
360 
361  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
362  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
363  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
364  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
365  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
366  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
367  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
368 
369  }
370 
371  if ( find(enabledClients_.begin(), enabledClients_.end(), "Laser" ) != enabledClients_.end() ) {
372 
373  clients_.push_back( new EBLaserClient(ps) );
374  clientsNames_.push_back( "Laser" );
375 
376  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
377  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
378  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
379  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
380  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
381  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
382  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
383 
384  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
385  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
386  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
387  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
388  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
389  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
390  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
391 
392  }
393 
394  if ( find(enabledClients_.begin(), enabledClients_.end(), "Pedestal" ) != enabledClients_.end() ) {
395 
396  clients_.push_back( new EBPedestalClient(ps) );
397  clientsNames_.push_back( "Pedestal" );
398 
399  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
400  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
401  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
402  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
403  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
404  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
405  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
406 
407  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
408  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
409  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
410  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
411  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
412  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
413  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
414 
415  }
416 
417  if ( find(enabledClients_.begin(), enabledClients_.end(), "PedestalOnline" ) != enabledClients_.end() ) {
418 
419  clients_.push_back( new EBPedestalOnlineClient(ps) );
420  clientsNames_.push_back( "PedestalOnline" );
421 
422  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
423  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
424  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
425  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
426  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
427  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
428  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
429 
430  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
431  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
432  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
433  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
434  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
435  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
436  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
437 
438  }
439 
440  if ( find(enabledClients_.begin(), enabledClients_.end(), "TestPulse" ) != enabledClients_.end() ) {
441 
442  clients_.push_back( new EBTestPulseClient(ps) );
443  clientsNames_.push_back( "TestPulse" );
444 
445  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
446  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
447  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
448  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
449  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
450  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
451  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
452 
453  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
454  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
455  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
456  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
457  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
458  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
459  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
460 
461  }
462 
463  if ( find(enabledClients_.begin(), enabledClients_.end(), "BeamCalo" ) != enabledClients_.end() ) {
464 
465  clients_.push_back( new EBBeamCaloClient(ps) );
466  clientsNames_.push_back( "BeamCalo" );
467 
468  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
469  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
470 
471  }
472 
473  if ( find(enabledClients_.begin(), enabledClients_.end(), "BeamHodo" ) != enabledClients_.end() ) {
474 
475  clients_.push_back( new EBBeamHodoClient(ps) );
476  clientsNames_.push_back( "BeamHodo" );
477 
478  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
479  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
480 
481  }
482 
483  if ( find(enabledClients_.begin(), enabledClients_.end(), "TriggerTower" ) != enabledClients_.end() ) {
484 
485  clients_.push_back( new EBTriggerTowerClient(ps) );
486  clientsNames_.push_back( "TriggerTower" );
487 
488  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
489  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
490  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
491  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
492  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
493  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
494  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
495 
496  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
497  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
498  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
499  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
500  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
501  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
502  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
503 
504  }
505 
506  if ( find(enabledClients_.begin(), enabledClients_.end(), "Cluster" ) != enabledClients_.end() ) {
507 
508  clients_.push_back( new EBClusterClient(ps) );
509  clientsNames_.push_back( "Cluster" );
510 
511  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
512  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
513  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
514  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
515  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
516  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
517  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
518 
519  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
520  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
521  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
522  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
523  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
524  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
525  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
526 
527  }
528 
529  if ( find(enabledClients_.begin(), enabledClients_.end(), "Timing" ) != enabledClients_.end() ) {
530 
531  clients_.push_back( new EBTimingClient(ps) );
532  clientsNames_.push_back( "Timing" );
533 
534  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMIC ));
535  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_STD ));
536  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_STD ));
537  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_MGPA ));
538  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH4 ));
539  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::BEAMH2 ));
540  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::MTCC ));
541 
542  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_GLOBAL ));
543  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_GLOBAL ));
544  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::COSMICS_LOCAL ));
545  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PHYSICS_LOCAL ));
546  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::LASER_GAP ));
547  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::TESTPULSE_GAP ));
548  clientsRuns_.insert(std::pair<EBClient*,int>( clients_.back(), EcalDCCHeaderBlock::PEDESTAL_GAP ));
549 
550  }
551 
552  // define status bits
553 
554  clientsStatus_.insert(std::pair<std::string,int>( "Integrity", 0 ));
555  clientsStatus_.insert(std::pair<std::string,int>( "Cosmic", 1 ));
556  clientsStatus_.insert(std::pair<std::string,int>( "Laser", 2 ));
557  clientsStatus_.insert(std::pair<std::string,int>( "Pedestal", 3 ));
558  clientsStatus_.insert(std::pair<std::string,int>( "PedestalOnline", 4 ));
559  clientsStatus_.insert(std::pair<std::string,int>( "TestPulse", 5 ));
560  clientsStatus_.insert(std::pair<std::string,int>( "BeamCalo", 6 ));
561  clientsStatus_.insert(std::pair<std::string,int>( "BeamHodo", 7 ));
562  clientsStatus_.insert(std::pair<std::string,int>( "TriggerTower", 8 ));
563  clientsStatus_.insert(std::pair<std::string,int>( "Cluster", 9 ));
564  clientsStatus_.insert(std::pair<std::string,int>( "Timing", 10 ));
565  clientsStatus_.insert(std::pair<std::string,int>( "Led", 11 ));
566  clientsStatus_.insert(std::pair<std::string,int>( "StatusFlags", 12 ));
567  clientsStatus_.insert(std::pair<std::string,int>( "Occupancy", 13 ));
568 
569  if ( find(enabledClients_.begin(), enabledClients_.end(), "Summary" ) != enabledClients_.end() ) {
570 
572 
573  }
574 
576 
577  if ( verbose_ ) std::cout << std::endl;
578 
579 }
std::multimap< EBClient *, int > clientsRuns_
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > clientsNames_
std::vector< std::string > enabledClients_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void setFriends(std::vector< EBClient * > clients)
Set Clients.
std::vector< EBClient * > clients_
std::map< std::string, int > clientsStatus_
std::vector< std::string > runTypes_
tuple cout
Definition: gather_cfg.py:41
EcalBarrelMonitorClient::~EcalBarrelMonitorClient ( )
virtual

Destructor.

Definition at line 581 of file EcalBarrelMonitorClient.cc.

References clients_, gather_cfg::cout, i, summaryClient_, and verbose_.

581  {
582 
583  if ( verbose_ ) std::cout << "Exit ..." << std::endl;
584 
585  for ( unsigned int i=0; i<clients_.size(); i++ ) {
586  delete clients_[i];
587  }
588 
589  if ( summaryClient_ ) delete summaryClient_;
590 
591 }
int i
Definition: DBlmapReader.cc:9
std::vector< EBClient * > clients_
tuple cout
Definition: gather_cfg.py:41

Member Function Documentation

void EcalBarrelMonitorClient::analyze ( void  )

Analyze.

Definition at line 1404 of file EcalBarrelMonitorClient.cc.

References EBSummaryClient::analyze(), EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, begin_run_, beginRun(), clients_, clientsRuns_, cloneME_, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, gather_cfg::cout, current_time_, dbUpdateTime_, debug_, generateEDF::done, dqmStore_, end_run_, endRun(), evt_, evtType_, forced_status_, forced_update_, DQMStore::get(), getRunType(), h_, i, ievt_, inputFile_, j, jevt_, last_run_, last_time_reset_, location_, mergeRuns_, NULL, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, prefixME_, prescaleFactor_, reset(), resetFile_, run_, runType_, runTypes_, asciidump::s, softReset(), status_, summaryClient_, cond::rpcobgas::time, update, MonitorElement::valueString(), verbose_, and writeDb().

Referenced by analyze(), endJob(), endLuminosityBlock(), and endRun().

1404  {
1405 
1406  current_time_ = time(NULL);
1407 
1408  ievt_++;
1409  jevt_++;
1410 
1411  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
1412 
1413  MonitorElement* me;
1414  std::string s;
1415 
1416  me = dqmStore_->get(prefixME_ + "/EcalInfo/STATUS");
1417  if ( me ) {
1418  status_ = "unknown";
1419  s = me->valueString();
1420  if ( strcmp(s.c_str(), "i=0") == 0 ) status_ = "begin-of-run";
1421  if ( strcmp(s.c_str(), "i=1") == 0 ) status_ = "running";
1422  if ( strcmp(s.c_str(), "i=2") == 0 ) status_ = "end-of-run";
1423  if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/STATUS'" << std::endl;
1424  }
1425 
1426  if ( inputFile_.size() != 0 ) {
1427  if ( ievt_ == 1 ) {
1428  if ( verbose_ ) {
1429  std::cout << std::endl;
1430  std::cout << " Reading DQM from file, forcing 'begin-of-run'" << std::endl;
1431  std::cout << std::endl;
1432  }
1433  status_ = "begin-of-run";
1434  }
1435  }
1436 
1437  int ecal_run = -1;
1438  me = dqmStore_->get(prefixME_ + "/EcalInfo/RUN");
1439  if ( me ) {
1440  s = me->valueString();
1441  sscanf(s.c_str(), "i=%d", &ecal_run);
1442  if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/RUN'" << std::endl;
1443  }
1444 
1445  int ecal_evt = -1;
1446  me = dqmStore_->get(prefixME_ + "/EcalInfo/EVT");
1447  if ( me ) {
1448  s = me->valueString();
1449  sscanf(s.c_str(), "i=%d", &ecal_evt);
1450  if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/EVT'" << std::endl;
1451  }
1452 
1453  me = dqmStore_->get(prefixME_ + "/EcalInfo/EVTTYPE");
1454  h_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, h_ );
1455 
1456  me = dqmStore_->get(prefixME_ + "/EcalInfo/RUNTYPE");
1457  if ( me ) {
1458  s = me->valueString();
1459  sscanf(s.c_str(), "i=%d", &evtType_);
1460  if ( runType_ == -1 ) runType_ = evtType_;
1461  if ( debug_ ) std::cout << "Found '" << prefixME_ << "/EcalInfo/RUNTYPE'" << std::endl;
1462  }
1463 
1464  // if the run number from the Event is less than zero,
1465  // use the run number from the ECAL DCC header
1466  if ( run_ <= 0 ) run_ = ecal_run;
1467 
1468  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1469  if ( ! mergeRuns_ && run_ != last_run_ ) forced_update_ = true;
1470  }
1471 
1472  bool update = ( forced_update_ ) ||
1473  ( prescaleFactor_ != 1 ) ||
1474  ( jevt_ < 10 ) ||
1475  ( jevt_ < 100 && jevt_ % 10 == 0 ) ||
1476  ( jevt_ < 1000 && jevt_ % 100 == 0 ) ||
1477  ( jevt_ % 1000 == 0 );
1478 
1479  if ( update || strcmp(status_.c_str(), "begin-of-run") == 0 || strcmp(status_.c_str(), "end-of-run") == 0 ) {
1480 
1481  if ( verbose_ ) {
1482  std::cout << " RUN status = \"" << status_ << "\"" << std::endl;
1483  std::cout << " CMS run/event number = " << run_ << "/" << evt_ << std::endl;
1484  std::cout << " EB run/event number = " << ecal_run << "/" << ecal_evt << std::endl;
1485  std::cout << " EB location = " << location_ << std::endl;
1486  std::cout << " EB run/event type = " << this->getRunType() << "/" << ( evtType_ == -1 ? "UNKNOWN" : runTypes_[evtType_] ) << std::flush;
1487 
1488  if ( h_ ) {
1489  if ( h_->GetSumOfWeights() != 0 ) {
1490  std::cout << " ( " << std::flush;
1491  for ( unsigned int i = 0; i < runTypes_.size(); i++ ) {
1492  if ( strcmp(runTypes_[i].c_str(), "UNKNOWN") != 0 && h_->GetBinContent(2+i) != 0 ) {
1493  std::string s = runTypes_[i];
1494  transform( s.begin(), s.end(), s.begin(), (int(*)(int))tolower );
1495  std::cout << s << " ";
1496  }
1497  }
1498  std::cout << ")" << std::flush;
1499  }
1500  }
1501  std::cout << std::endl;
1502  }
1503 
1504  }
1505 
1506  if ( strcmp(status_.c_str(), "begin-of-run") == 0 ) {
1507 
1508  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1509 
1510  if ( ! begin_run_ ) {
1511 
1512  forced_status_ = false;
1513  this->beginRun();
1514 
1515  }
1516 
1517  }
1518 
1519  }
1520 
1521  if ( strcmp(status_.c_str(), "begin-of-run") == 0 || strcmp(status_.c_str(), "running") == 0 || strcmp(status_.c_str(), "end-of-run") == 0 ) {
1522 
1523  if ( begin_run_ && ! end_run_ ) {
1524 
1525  bool update = ( forced_update_ ) ||
1526  ( prescaleFactor_ != 1 ) ||
1527  ( jevt_ < 3 ) ||
1528  ( jevt_ < 1000 && jevt_ % 100 == 0 ) ||
1529  ( jevt_ < 10000 && jevt_ % 1000 == 0 ) ||
1530  ( jevt_ % 10000 == 0 );
1531 
1532  if ( update || strcmp(status_.c_str(), "begin-of-run") == 0 || strcmp(status_.c_str(), "end-of-run") == 0 ) {
1533 
1534  for ( int i=0; i<int(clients_.size()); i++ ) {
1535  bool done = false;
1536  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
1537  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
1538  done = true;
1539  clients_[i]->analyze();
1540  }
1541  }
1542  }
1543 
1545 
1546  }
1547 
1548  forced_update_ = false;
1549 
1550  bool reset = false;
1551 
1552  if ( resetFile_.size() != 0 ) {
1553  if ( access(resetFile_.c_str(), W_OK) == 0 ) {
1554  if ( unlink(resetFile_.c_str()) == 0 ) {
1555  reset |= true;
1556  }
1557  }
1558  }
1559 
1560  if ( dbUpdateTime_ > 0 ) {
1561  reset |= (current_time_ - last_time_reset_) > 60 * dbUpdateTime_;
1562  }
1563 
1564  if ( reset ) {
1572  this->softReset(true);
1574  }
1575 
1576  }
1577 
1578  }
1579 
1580  if ( strcmp(status_.c_str(), "end-of-run") == 0 ) {
1581 
1582  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1583 
1584  if ( begin_run_ && ! end_run_ ) {
1585 
1586  forced_status_ = false;
1587  this->endRun();
1588 
1589  }
1590 
1591  }
1592 
1593  }
1594 
1595  // BEGIN: run-time fixes for missing state transitions
1596 
1597  // run number transition
1598 
1599  if ( strcmp(status_.c_str(), "running") == 0 ) {
1600 
1601  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1602 
1603  if ( ! mergeRuns_ ) {
1604 
1605  int new_run_ = run_;
1606  int old_run_ = last_run_;
1607 
1608  if ( new_run_ != old_run_ ) {
1609 
1610  if ( begin_run_ && ! end_run_ ) {
1611 
1612  if ( verbose_ ) {
1613  std::cout << std::endl;
1614  std::cout << " Old run has finished, issuing endRun() ... " << std::endl;
1615  std::cout << std::endl;
1616  }
1617 
1618  // end old_run_
1619  run_ = old_run_;
1620 
1621  forced_status_ = false;
1622  this->endRun();
1623 
1624  }
1625 
1626  if ( ! begin_run_ ) {
1627 
1628  if ( verbose_ ) {
1629  std::cout << std::endl;
1630  std::cout << " New run has started, issuing beginRun() ... " << std::endl;
1631  std::cout << std::endl;
1632  }
1633 
1634  // start new_run_
1635  run_ = new_run_;
1636 
1637  forced_status_ = false;
1638  this->beginRun();
1639 
1640  }
1641 
1642  }
1643 
1644  }
1645 
1646  }
1647 
1648  }
1649 
1650  // 'running' state without a previous 'begin-of-run' state
1651 
1652  if ( strcmp(status_.c_str(), "running") == 0 ) {
1653 
1654  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1655 
1656  if ( ! forced_status_ ) {
1657 
1658  if ( ! begin_run_ ) {
1659 
1660  if ( verbose_ ) {
1661  std::cout << std::endl;
1662  std::cout << "Forcing beginRun() ... NOW !" << std::endl;
1663  std::cout << std::endl;
1664  }
1665 
1666  forced_status_ = true;
1667  this->beginRun();
1668 
1669  }
1670 
1671  }
1672 
1673  }
1674 
1675  }
1676 
1677  // 'end-of-run' state without a previous 'begin-of-run' or 'running' state
1678 
1679  if ( strcmp(status_.c_str(), "end-of-run") == 0 ) {
1680 
1681  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
1682 
1683  if ( ! forced_status_ ) {
1684 
1685  if ( ! begin_run_ ) {
1686 
1687  if ( verbose_ ) {
1688  std::cout << std::endl;
1689  std::cout << "Forcing beginRun() ... NOW !" << std::endl;
1690  std::cout << std::endl;
1691  }
1692 
1693  forced_status_ = true;
1694  this->beginRun();
1695 
1696  }
1697 
1698  }
1699 
1700  }
1701 
1702  }
1703 
1704  // END: run-time fixes for missing state transitions
1705 
1706 }
std::multimap< EBClient *, int > clientsRuns_
int i
Definition: DBlmapReader.cc:9
#define NULL
Definition: scimark2.h:8
void softReset(bool flag)
SoftReset.
int j
Definition: DBlmapReader.cc:9
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
std::vector< EBClient * > clients_
std::string valueString(void) const
std::vector< std::string > runTypes_
#define update(a, b)
tuple cout
Definition: gather_cfg.py:41
string s
Definition: asciidump.py:422
void analyze(void)
Analyze.
void EcalBarrelMonitorClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 1708 of file EcalBarrelMonitorClient.cc.

References analyze(), edm::EventID::event(), evt_, edm::EventBase::id(), jevt_, prescaleFactor_, edm::EventID::run(), and run_.

1708  {
1709 
1710  run_ = e.id().run();
1711  evt_ = e.id().event();
1712 
1713  if ( prescaleFactor_ > 0 ) {
1714  if ( jevt_ % prescaleFactor_ == 0 ) this->analyze();
1715  }
1716 
1717 }
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
edm::EventID id() const
Definition: EventBase.h:56
void EcalBarrelMonitorClient::beginJob ( void  )
virtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 593 of file EcalBarrelMonitorClient.cc.

References begin_run_, EBSummaryClient::beginJob(), DQMStore::book2D(), DQMStore::bookFloat(), clients_, gather_cfg::cout, current_time_, debug_, dqmStore_, end_run_, evt_, evtType_, MonitorElement::Fill(), forced_status_, forced_update_, DQMStore::get(), MonitorElement::getName(), h_, i, ievt_, inputFile_, jevt_, last_run_, last_time_reset_, last_time_update_, mergeVDriftHistosByStation::name, NULL, DQMStore::open(), cmsCodeRules.cppFunctionSkipper::operator, prefixME_, DQMStore::removeElement(), run_, runType_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), status_, subrun_, summaryClient_, and cond::rpcobgas::time.

593  {
594 
595  begin_run_ = false;
596  end_run_ = false;
597 
598  forced_status_ = false;
599  forced_update_ = false;
600 
601  h_ = 0;
602 
603  status_ = "unknown";
604 
605  run_ = -1;
606  evt_ = -1;
607 
608  runType_ = -1;
609  evtType_ = -1;
610 
611  last_run_ = -1;
612 
613  subrun_ = -1;
614 
615  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: beginJob" << std::endl;
616 
617  ievt_ = 0;
618  jevt_ = 0;
619 
623 
624  // get hold of back-end interface
625 
627 
628  if ( inputFile_.size() != 0 ) {
629  if ( dqmStore_ ) {
631  }
632  }
633 
634  for ( unsigned int i=0; i<clients_.size(); i++ ) {
635  clients_[i]->beginJob();
636  }
637 
639 
640  // summary for DQM GUI
641 
642  MonitorElement* me;
643 
644  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo" );
645 
646  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
647  if ( me ) {
649  }
650  me = dqmStore_->bookFloat("reportSummary");
651  me->Fill(-1.0);
652 
653  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo/reportSummaryContents" );
654 
655  std::string name;
656  for (int i = 0; i < 36; i++) {
657  name = "EcalBarrel_" + Numbers::sEB(i+1);
658  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/" + name);
659  if ( me ) {
661  }
662  me = dqmStore_->bookFloat(name);
663  me->Fill(-1.0);
664  }
665 
666  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo" );
667 
668  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
669  if ( me ) {
671  }
672  me = dqmStore_->book2D("reportSummaryMap","reportSummaryMap", 72, 0., 72., 34, 0., 34);
673  for ( int iettx = 0; iettx < 34; iettx++ ) {
674  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
675  me->setBinContent( ipttx+1, iettx+1, -1.0 );
676  }
677  }
678  me->setAxisTitle("jphi", 1);
679  me->setAxisTitle("jeta", 2);
680 
681 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
static std::string sEB(const int ism)
Definition: Numbers.cc:87
#define NULL
Definition: scimark2.h:8
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:451
void Fill(long long x)
void beginJob(void)
BeginJob.
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
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
std::vector< EBClient * > clients_
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2213
tuple cout
Definition: gather_cfg.py:41
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EcalBarrelMonitorClient::beginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
virtual

BeginLumiBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 891 of file EcalBarrelMonitorClient.cc.

References gather_cfg::cout, edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), edm::LuminosityBlockID::run(), and verbose_.

891  {
892 
893  if ( verbose_ ) {
894  std::cout << std::endl;
895  std::cout << "Standard beginLuminosityBlock() for luminosity block " << l.id().luminosityBlock() << " of run " << l.id().run() << std::endl;
896  std::cout << std::endl;
897  }
898 
899 }
LuminosityBlockID id() const
RunNumber_t run() const
LuminosityBlockNumber_t luminosityBlock() const
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::beginRun ( void  )

BeginRun.

Definition at line 683 of file EcalBarrelMonitorClient.cc.

References begin_run_, EBSummaryClient::beginRun(), beginRunDb(), clients_, clientsRuns_, gather_cfg::cout, current_time_, debug_, generateEDF::done, end_run_, i, j, jevt_, last_run_, last_time_reset_, last_time_update_, NULL, run_, runType_, setup(), summaryClient_, and cond::rpcobgas::time.

Referenced by analyze().

683  {
684 
685  begin_run_ = true;
686  end_run_ = false;
687 
688  last_run_ = run_;
689 
690  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: beginRun" << std::endl;
691 
692  jevt_ = 0;
693 
697 
698  this->setup();
699 
700  this->beginRunDb();
701 
702  for ( int i=0; i<int(clients_.size()); i++ ) {
703  clients_[i]->cleanup();
704  bool done = false;
705  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
706  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
707  done = true;
708  clients_[i]->beginRun();
709  }
710  }
711  }
712 
714 
715 }
std::multimap< EBClient *, int > clientsRuns_
int i
Definition: DBlmapReader.cc:9
#define NULL
Definition: scimark2.h:8
int j
Definition: DBlmapReader.cc:9
std::vector< EBClient * > clients_
void beginRunDb(void)
BeginRunDB.
tuple cout
Definition: gather_cfg.py:41
void beginRun(void)
BeginRun.
void EcalBarrelMonitorClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 717 of file EcalBarrelMonitorClient.cc.

References gather_cfg::cout, evt_, edm::RunBase::id(), Numbers::initGeometry(), Masks::initMasking(), jevt_, edm::RunID::run(), run_, and verbose_.

717  {
718 
720 
721  if ( verbose_ ) std::cout << std::endl;
722 
724 
725  if ( verbose_ ) {
726  std::cout << std::endl;
727  std::cout << "Standard beginRun() for run " << r.id().run() << std::endl;
728  std::cout << std::endl;
729  }
730 
731  run_ = r.id().run();
732  evt_ = 0;
733 
734  jevt_ = 0;
735 
736 }
RunID const & id() const
Definition: RunBase.h:43
RunNumber_t run() const
Definition: RunID.h:44
static void initMasking(const edm::EventSetup &setup, bool verbose=false)
Definition: Masks.cc:34
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:45
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::beginRunDb ( void  )

BeginRunDB.

Definition at line 947 of file EcalBarrelMonitorClient.cc.

References benchmark_cfg::cerr, gather_cfg::cout, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbUserName_, EcalCondDBInterface::fetchRunIOV(), getRunType(), i, EcalCondDBInterface::insertRunIOV(), location_, run_, runType_, runTypes_, RunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), RunTypeDef::setRunType(), RunTag::setRunTypeDef(), Tm::setToCurrentGMTime(), subrun_, and verbose_.

Referenced by beginRun().

947  {
948 
949  subrun_ = 0;
950 
951 #ifdef WITH_ECAL_COND_DB
952  EcalCondDBInterface* econn;
953 
954  econn = 0;
955 
956  if ( dbName_.size() != 0 ) {
957  try {
958  if ( verbose_ ) std::cout << "Opening DB connection with TNS_ADMIN ..." << std::endl;
960  if ( verbose_ ) std::cout << "done." << std::endl;
961  } catch (std::runtime_error &e) {
962  std::cerr << e.what() << std::endl;
963  if ( dbHostName_.size() != 0 ) {
964  try {
965  if ( verbose_ ) std::cout << "Opening DB connection without TNS_ADMIN ..." << std::endl;
967  if ( verbose_ ) std::cout << "done." << std::endl;
968  } catch (std::runtime_error &e) {
969  std::cerr << e.what() << std::endl;
970  }
971  }
972  }
973  }
974 
975  // create the objects necessary to identify a dataset
976 
977  LocationDef locdef;
978 
979  locdef.setLocation(location_);
980 
981  RunTypeDef rundef;
982 
983  rundef.setRunType( this->getRunType() );
984 
985  RunTag runtag;
986 
987  runtag.setLocationDef(locdef);
988  runtag.setRunTypeDef(rundef);
989 
990  runtag.setGeneralTag( this->getRunType() );
991 
992  // fetch the RunIOV from the DB
993 
994  bool foundRunIOV = false;
995 
996  if ( econn ) {
997  try {
998  if ( verbose_ ) std::cout << "Fetching RunIOV ..." << std::endl;
999 // runiov_ = econn->fetchRunIOV(&runtag, run_);
1000  runiov_ = econn->fetchRunIOV(location_, run_);
1001  if ( verbose_ ) std::cout << "done." << std::endl;
1002  foundRunIOV = true;
1003  } catch (std::runtime_error &e) {
1004  std::cerr << e.what() << std::endl;
1005  foundRunIOV = false;
1006  }
1007  }
1008 
1009  // begin - setup the RunIOV (on behalf of the DAQ)
1010 
1011  if ( ! foundRunIOV ) {
1012 
1013  Tm startRun;
1014 
1015  startRun.setToCurrentGMTime();
1016 
1017  runiov_.setRunNumber(run_);
1018  runiov_.setRunStart(startRun);
1019  runiov_.setRunTag(runtag);
1020 
1021  if ( econn ) {
1022  try {
1023  if ( verbose_ ) std::cout << "Inserting RunIOV ..." << std::endl;
1024  econn->insertRunIOV(&runiov_);
1025 // runiov_ = econn->fetchRunIOV(&runtag, run_);
1026  runiov_ = econn->fetchRunIOV(location_, run_);
1027  if ( verbose_ ) std::cout << "done." << std::endl;
1028  } catch (std::runtime_error &e) {
1029  std::cerr << e.what() << std::endl;
1030  try {
1031  if ( verbose_ ) std::cout << "Fetching RunIOV (again) ..." << std::endl;
1032 // runiov_ = econn->fetchRunIOV(&runtag, run_);
1033  runiov_ = econn->fetchRunIOV(location_, run_);
1034  if ( verbose_ ) std::cout << "done." << std::endl;
1035  foundRunIOV = true;
1036  } catch (std::runtime_error &e) {
1037  std::cerr << e.what() << std::endl;
1038  foundRunIOV = false;
1039  }
1040  }
1041  }
1042 
1043  }
1044 
1045  // end - setup the RunIOV (on behalf of the DAQ)
1046 
1047  if ( verbose_ ) {
1048  std::cout << std::endl;
1049  std::cout << "=============RunIOV:" << std::endl;
1050  std::cout << "Run Number: " << runiov_.getRunNumber() << std::endl;
1051  std::cout << "Run Start: " << runiov_.getRunStart().str() << std::endl;
1052  std::cout << "Run End: " << runiov_.getRunEnd().str() << std::endl;
1053  std::cout << "====================" << std::endl;
1054  std::cout << std::endl;
1055  std::cout << "=============RunTag:" << std::endl;
1056  std::cout << "GeneralTag: " << runiov_.getRunTag().getGeneralTag() << std::endl;
1057  std::cout << "Location: " << runiov_.getRunTag().getLocationDef().getLocation() << std::endl;
1058  std::cout << "Run Type: " << runiov_.getRunTag().getRunTypeDef().getRunType() << std::endl;
1059  std::cout << "====================" << std::endl;
1060  std::cout << std::endl;
1061  }
1062 
1063  std::string rt = runiov_.getRunTag().getRunTypeDef().getRunType();
1064  if ( strcmp(rt.c_str(), "UNKNOWN") == 0 ) {
1065  runType_ = -1;
1066  } else {
1067  for ( unsigned int i = 0; i < runTypes_.size(); i++ ) {
1068  if ( strcmp(rt.c_str(), runTypes_[i].c_str()) == 0 ) {
1069  if ( runType_ != int(i) ) {
1070  if ( verbose_ ) {
1071  std::cout << std::endl;
1072  std::cout << "Fixing Run Type to: " << runTypes_[i] << std::endl;
1073  std::cout << std::endl;
1074  }
1075  runType_ = i;
1076  }
1077  break;
1078  }
1079  }
1080  }
1081 
1082  if ( verbose_ ) std::cout << std::endl;
1083 
1084  if ( econn ) {
1085  try {
1086  if ( verbose_ ) std::cout << "Closing DB connection ..." << std::endl;
1087  delete econn;
1088  econn = 0;
1089  if ( verbose_ ) std::cout << "done." << std::endl;
1090  } catch (std::runtime_error &e) {
1091  std::cerr << e.what() << std::endl;
1092  }
1093  }
1094 #endif
1095 
1096  if ( verbose_ ) std::cout << std::endl;
1097 
1098 }
int i
Definition: DBlmapReader.cc:9
void setLocationDef(const LocationDef locDef)
Definition: RunTag.cc:53
void insertRunIOV(RunIOV *iov)
Definition: RunTag.h:13
RunIOV fetchRunIOV(RunTag *tag, run_t run)
void setToCurrentGMTime()
Definition: Tm.cc:156
void setRunTypeDef(const RunTypeDef runTypeDef)
Definition: RunTag.cc:70
std::vector< std::string > runTypes_
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:33
void setLocation(std::string loc)
Definition: LocationDef.cc:33
tuple cout
Definition: gather_cfg.py:41
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
Definition: Tm.h:14
void EcalBarrelMonitorClient::cleanup ( void  )

Cleanup.

Definition at line 935 of file EcalBarrelMonitorClient.cc.

References cloneME_, enableCleanup_, and h_.

Referenced by endJob(), and endRun().

935  {
936 
937  if ( ! enableCleanup_ ) return;
938 
939  if ( cloneME_ ) {
940  if ( h_ ) delete h_;
941  }
942 
943  h_ = 0;
944 
945 }
void EcalBarrelMonitorClient::endJob ( void  )
virtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 738 of file EcalBarrelMonitorClient.cc.

References analyze(), begin_run_, cleanup(), clients_, gather_cfg::cout, debug_, end_run_, EBSummaryClient::endJob(), endRun(), forced_status_, forced_update_, i, ievt_, summaryClient_, and verbose_.

738  {
739 
740  if ( ! end_run_ ) {
741 
742  if ( verbose_ ) {
743  std::cout << std::endl;
744  std::cout << "Checking last event at endJob() ... " << std::endl;
745  std::cout << std::endl;
746  }
747 
748  forced_update_ = true;
749  this->analyze();
750 
751  if ( begin_run_ && ! end_run_ ) {
752 
753  if ( verbose_ ) {
754  std::cout << std::endl;
755  std::cout << "Forcing endRun() ... " << std::endl;
756  std::cout << std::endl;
757  }
758 
759  forced_status_ = true;
760  this->analyze();
761  this->endRun();
762 
763  }
764 
765  }
766 
767  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: endJob, ievt = " << ievt_ << std::endl;
768 
769  this->cleanup();
770 
771  for ( unsigned int i=0; i<clients_.size(); i++ ) {
772  clients_[i]->endJob();
773  }
774 
776 
777 }
int i
Definition: DBlmapReader.cc:9
std::vector< EBClient * > clients_
void endJob(void)
EndJob.
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
virtual

EndLumiBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 901 of file EcalBarrelMonitorClient.cc.

References analyze(), gather_cfg::cout, current_time_, evt_, forced_update_, edm::LuminosityBlockBase::id(), last_time_update_, edm::LuminosityBlockID::luminosityBlock(), NULL, edm::LuminosityBlockID::run(), run_, runType_, cond::rpcobgas::time, updateTime_, and verbose_.

901  {
902 
904 
905  if ( verbose_ ) {
906  std::cout << std::endl;
907  std::cout << "Standard endLuminosityBlock() for luminosity block " << l.id().luminosityBlock() << " of run " << l.id().run() << std::endl;
908  std::cout << std::endl;
909  }
910 
911  if ( updateTime_ > 0 ) {
912  if ( (current_time_ - last_time_update_) < 60 * updateTime_ ) {
913  return;
914  }
916  }
917 
918  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
919 
920  forced_update_ = true;
921  this->analyze();
922 
923  }
924 
925 }
LuminosityBlockID id() const
#define NULL
Definition: scimark2.h:8
RunNumber_t run() const
LuminosityBlockNumber_t luminosityBlock() const
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::endRun ( void  )

EndRun.

Definition at line 779 of file EcalBarrelMonitorClient.cc.

References EBSummaryClient::analyze(), begin_run_, cleanup(), clients_, clientsRuns_, gather_cfg::cout, dbUpdateTime_, debug_, generateEDF::done, end_run_, EBSummaryClient::endRun(), endRunDb(), evt_, evtType_, i, j, jevt_, resetFile_, run_, runType_, softReset(), status_, subrun_, summaryClient_, and writeDb().

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

779  {
780 
781  begin_run_ = false;
782  end_run_ = true;
783 
784  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: endRun, jevt = " << jevt_ << std::endl;
785 
786  if ( subrun_ != -1 ) {
787 
788  this->writeDb();
789 
790  this->endRunDb();
791 
792  }
793 
794  if ( resetFile_.size() != 0 || dbUpdateTime_ > 0 ) {
795 
796  this->softReset(false);
797 
798  for ( int i=0; i<int(clients_.size()); i++ ) {
799  bool done = false;
800  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
801  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
802  done = true;
803  clients_[i]->analyze();
804  }
805  }
806  }
807 
809 
810  }
811 
812  for ( int i=0; i<int(clients_.size()); i++ ) {
813  bool done = false;
814  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
815  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
816  done = true;
817  clients_[i]->endRun();
818  }
819  }
820  }
821 
823 
824  this->cleanup();
825 
826  status_ = "unknown";
827 
828  run_ = -1;
829  evt_ = -1;
830 
831  runType_ = -1;
832  evtType_ = -1;
833 
834  subrun_ = -1;
835 
836 }
std::multimap< EBClient *, int > clientsRuns_
int i
Definition: DBlmapReader.cc:9
void endRun(void)
EndRun.
void softReset(bool flag)
SoftReset.
int j
Definition: DBlmapReader.cc:9
std::vector< EBClient * > clients_
tuple cout
Definition: gather_cfg.py:41
void analyze(void)
Analyze.
void EcalBarrelMonitorClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 838 of file EcalBarrelMonitorClient.cc.

References analyze(), begin_run_, gather_cfg::cout, dqmStore_, end_run_, endRun(), evt_, MonitorElement::Fill(), forced_status_, forced_update_, DQMStore::get(), i, edm::RunBase::id(), mergeRuns_, prefixME_, edm::RunID::run(), run_, runType_, Numbers::sEB(), MonitorElement::setBinContent(), and verbose_.

838  {
839 
840  if ( verbose_ ) {
841  std::cout << std::endl;
842  std::cout << "Standard endRun() for run " << r.id().run() << std::endl;
843  std::cout << std::endl;
844  }
845 
846  this->analyze();
847 
848  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
849 
850  forced_update_ = true;
851  this->analyze();
852 
853  if ( ! mergeRuns_ ) {
854 
855  if ( begin_run_ && ! end_run_ ) {
856 
857  forced_status_ = false;
858  this->endRun();
859 
860  }
861 
862  }
863 
864  }
865 
866  // summary for DQM GUI
867 
868  if ( run_ != -1 && evt_ != -1 && runType_ == -1 ) {
869 
870  MonitorElement* me;
871 
872  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
873  if ( me ) me->Fill(-1.0);
874 
875  for (int i = 0; i < 36; i++) {
876  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/EcalBarrel_" + Numbers::sEB(i+1));
877  if ( me ) me->Fill(-1.0);
878  }
879 
880  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
881  for ( int iettx = 0; iettx < 34; iettx++ ) {
882  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
883  if ( me ) me->setBinContent( ipttx+1, iettx+1, -1.0 );
884  }
885  }
886 
887  }
888 
889 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
static std::string sEB(const int ism)
Definition: Numbers.cc:87
RunID const & id() const
Definition: RunBase.h:43
RunNumber_t run() const
Definition: RunID.h:44
void Fill(long long x)
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
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::endRunDb ( void  )

EndRunDB.

Definition at line 1311 of file EcalBarrelMonitorClient.cc.

References benchmark_cfg::cerr, gather_cfg::cout, BeamSplash_cfg::dataset, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbUserName_, EcalCondDBInterface::fetchDataSet(), LogicID::getEcalLogicID(), h_, EcalCondDBInterface::insertDataSet(), RunDat::setNumEvents(), and verbose_.

Referenced by endRun().

1311  {
1312 
1313 #ifdef WITH_ECAL_COND_DB
1314  EcalCondDBInterface* econn;
1315 
1316  econn = 0;
1317 
1318  if ( dbName_.size() != 0 ) {
1319  try {
1320  if ( verbose_ ) std::cout << "Opening DB connection with TNS_ADMIN ..." << std::endl;
1322  if ( verbose_ ) std::cout << "done." << std::endl;
1323  } catch (std::runtime_error &e) {
1324  std::cerr << e.what() << std::endl;
1325  if ( dbHostName_.size() != 0 ) {
1326  try {
1327  if ( verbose_ ) std::cout << "Opening DB connection without TNS_ADMIN ..." << std::endl;
1329  if ( verbose_ ) std::cout << "done." << std::endl;
1330  } catch (std::runtime_error &e) {
1331  std::cerr << e.what() << std::endl;
1332  }
1333  }
1334  }
1335  }
1336 
1337  EcalLogicID ecid;
1338  RunDat rd;
1339  std::map<EcalLogicID, RunDat> dataset;
1340 
1341  float nevt = -1.;
1342 
1343  if ( h_ ) nevt = h_->GetSumOfWeights();
1344 
1345  rd.setNumEvents(int(nevt));
1346 
1347  // fetch the RunDat from the DB
1348 
1349  bool foundRunDat = false;
1350 
1351  if ( econn ) {
1352  try {
1353  if ( verbose_ ) std::cout << "Fetching RunDat ..." << std::endl;
1354  econn->fetchDataSet(&dataset, &runiov_);
1355  if ( verbose_ ) std::cout << "done." << std::endl;
1356  foundRunDat = true;
1357  } catch (std::runtime_error &e) {
1358  std::cerr << e.what() << std::endl;
1359  foundRunDat = false;
1360  }
1361  }
1362 
1363  // begin - setup the RunDat (on behalf of the DAQ)
1364 
1365  if ( ! foundRunDat ) {
1366 
1367  if ( econn ) {
1368  try {
1369  ecid = LogicID::getEcalLogicID("EB");
1370  dataset[ecid] = rd;
1371  } catch (std::runtime_error &e) {
1372  std::cerr << e.what() << std::endl;
1373  }
1374  }
1375 
1376  if ( econn ) {
1377  try {
1378  if ( verbose_ ) std::cout << "Inserting RunDat ..." << std::endl;
1379  econn->insertDataSet(&dataset, &runiov_);
1380  if ( verbose_ ) std::cout << "done." << std::endl;
1381  } catch (std::runtime_error &e) {
1382  std::cerr << e.what() << std::endl;
1383  }
1384  }
1385 
1386  }
1387 
1388  // end - setup the RunDat (on behalf of the DAQ)
1389 
1390  if ( econn ) {
1391  try {
1392  if ( verbose_ ) std::cout << "Closing DB connection ..." << std::endl;
1393  delete econn;
1394  econn = 0;
1395  if ( verbose_ ) std::cout << "done." << std::endl;
1396  } catch (std::runtime_error &e) {
1397  std::cerr << e.what() << std::endl;
1398  }
1399  }
1400 #endif
1401 
1402 }
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
void setNumEvents(int num)
Definition: RunDat.h:20
Definition: RunDat.h:11
tuple cout
Definition: gather_cfg.py:41
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
Definition: LogicID.h:31
const char* EcalBarrelMonitorClient::getRunType ( void  )
inline

Definition at line 93 of file EcalBarrelMonitorClient.h.

References runType_, and runTypes_.

Referenced by analyze(), beginRunDb(), and EcalBarrelMonitorXdaqClient::defaultWebPage().

93 { return( runType_ == -1 ? "UNKNOWN" : runTypes_[runType_].c_str() ); }
std::vector< std::string > runTypes_
void EcalBarrelMonitorClient::reset ( void  )

Reset.

Definition at line 927 of file EcalBarrelMonitorClient.cc.

Referenced by analyze().

927  {
928 
929 }
void EcalBarrelMonitorClient::setup ( void  )

Setup.

Definition at line 931 of file EcalBarrelMonitorClient.cc.

Referenced by beginRun().

931  {
932 
933 }
void EcalBarrelMonitorClient::softReset ( bool  flag)

SoftReset.

Definition at line 1719 of file EcalBarrelMonitorClient.cc.

References DQMStore::disableSoftReset(), dqmStore_, DQMStore::get(), DQMStore::getAllContents(), prefixME_, and DQMStore::softReset().

Referenced by analyze(), and endRun().

1719  {
1720 
1721  std::vector<MonitorElement*> mes = dqmStore_->getAllContents(prefixME_);
1722  std::vector<MonitorElement*>::const_iterator meitr;
1723  for ( meitr=mes.begin(); meitr!=mes.end(); meitr++ ) {
1724  if ( !strncmp((*meitr)->getName().c_str(), "EB", 2)
1725  && strncmp((*meitr)->getName().c_str(), "EBTrend", 7)
1726  && strncmp((*meitr)->getName().c_str(), "by lumi", 7) ) {
1727  if ( flag ) {
1728  dqmStore_->softReset(*meitr);
1729  } else {
1730  dqmStore_->disableSoftReset(*meitr);
1731  }
1732  }
1733  }
1734 
1735  MonitorElement* me = dqmStore_->get(prefixME_ + "/EcalInfo/EVTTYPE");
1736  if ( me ) {
1737  if ( flag ) {
1738  dqmStore_->softReset(me);
1739  } else {
1741  }
1742  }
1743 
1744 }
long int flag
Definition: mlp_lapack.h:47
std::vector< MonitorElement * > getAllContents(const std::string &path) const
Definition: DQMStore.cc:1469
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:2535
void softReset(MonitorElement *me)
Definition: DQMStore.cc:2527
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
void EcalBarrelMonitorClient::writeDb ( void  )

WriteDB.

Definition at line 1100 of file EcalBarrelMonitorClient.cc.

References benchmark_cfg::cerr, clients_, clientsNames_, clientsRuns_, clientsStatus_, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, gather_cfg::cout, BeamSplash_cfg::dataset, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbTagName_, dbUserName_, generateEDF::done, EcalCondDBInterface::fetchMonRunIOV(), LogicID::getEcalLogicID(), h_, i, EcalCondDBInterface::insertDataSet(), EcalCondDBInterface::insertMonRunIOV(), j, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_STD, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, run_, runType_, MonRunTag::setGeneralTag(), MonVersionDef::setMonitoringVersion(), MonRunDat::setMonRunOutcomeDef(), MonRunTag::setMonVersionDef(), MonRunDat::setNumEvents(), MonRunOutcomeDef::setShortDesc(), MonRunDat::setTaskList(), MonRunDat::setTaskOutcome(), Tm::setToCurrentGMTime(), ntuplemaker::status, subrun_, summaryClient_, EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, and verbose_.

Referenced by analyze(), and endRun().

1100  {
1101 
1102  subrun_++;
1103 
1104 #ifdef WITH_ECAL_COND_DB
1105  EcalCondDBInterface* econn;
1106 
1107  econn = 0;
1108 
1109  if ( dbName_.size() != 0 ) {
1110  try {
1111  if ( verbose_ ) std::cout << "Opening DB connection with TNS_ADMIN ..." << std::endl;
1113  if ( verbose_ ) std::cout << "done." << std::endl;
1114  } catch (std::runtime_error &e) {
1115  std::cerr << e.what() << std::endl;
1116  if ( dbHostName_.size() != 0 ) {
1117  try {
1118  if ( verbose_ ) std::cout << "Opening DB connection without TNS_ADMIN ..." << std::endl;
1120  if ( verbose_ ) std::cout << "done." << std::endl;
1121  } catch (std::runtime_error &e) {
1122  std::cerr << e.what() << std::endl;
1123  }
1124  }
1125  }
1126  }
1127 
1128  MonVersionDef monverdef;
1129 
1130  monverdef.setMonitoringVersion("test01");
1131 
1132  MonRunTag montag;
1133 
1134  montag.setMonVersionDef(monverdef);
1135  montag.setGeneralTag(dbTagName_);
1136 
1137  Tm startSubRun;
1138 
1139  startSubRun.setToCurrentGMTime();
1140 
1141  // fetch the MonIOV from the DB
1142 
1143  bool foundMonIOV = false;
1144 
1145  if ( econn ) {
1146  try {
1147  if ( verbose_ ) std::cout << "Fetching MonIOV ..." << std::endl;
1148  RunTag runtag = runiov_.getRunTag();
1149  moniov_ = econn->fetchMonRunIOV(&runtag, &montag, run_, subrun_);
1150  if ( verbose_ ) std::cout << "done." << std::endl;
1151  foundMonIOV = true;
1152  } catch (std::runtime_error &e) {
1153  std::cerr << e.what() << std::endl;
1154  foundMonIOV = false;
1155  }
1156  }
1157 
1158  // begin - setup the MonIOV
1159 
1160  if ( !foundMonIOV ) {
1161 
1162  moniov_.setRunIOV(runiov_);
1163  moniov_.setSubRunNumber(subrun_);
1164 
1165  if ( subrun_ > 1 ) {
1166  moniov_.setSubRunStart(startSubRun);
1167  } else {
1168  moniov_.setSubRunStart(runiov_.getRunStart());
1169  }
1170 
1171  moniov_.setMonRunTag(montag);
1172 
1173  if ( econn ) {
1174  try {
1175  if ( verbose_ ) std::cout << "Inserting MonIOV ..." << std::endl;
1176  econn->insertMonRunIOV(&moniov_);
1177  RunTag runtag = runiov_.getRunTag();
1178  moniov_ = econn->fetchMonRunIOV(&runtag, &montag, run_, subrun_);
1179  if ( verbose_ ) std::cout << "done." << std::endl;
1180  } catch (std::runtime_error &e) {
1181  std::cerr << e.what() << std::endl;
1182  try {
1183  if ( verbose_ ) std::cout << "Fetching MonIOV (again) ..." << std::endl;
1184  RunTag runtag = runiov_.getRunTag();
1185  moniov_ = econn->fetchMonRunIOV(&runtag, &montag, run_, subrun_);
1186  if ( verbose_ ) std::cout << "done." << std::endl;
1187  foundMonIOV = true;
1188  } catch (std::runtime_error &e) {
1189  std::cerr << e.what() << std::endl;
1190  foundMonIOV = false;
1191  }
1192  }
1193  }
1194 
1195  }
1196 
1197  // end - setup the MonIOV
1198 
1199  if ( verbose_ ) {
1200  std::cout << std::endl;
1201  std::cout << "==========MonRunIOV:" << std::endl;
1202  std::cout << "SubRun Number: " << moniov_.getSubRunNumber() << std::endl;
1203  std::cout << "SubRun Start: " << moniov_.getSubRunStart().str() << std::endl;
1204  std::cout << "SubRun End: " << moniov_.getSubRunEnd().str() << std::endl;
1205  std::cout << "====================" << std::endl;
1206  std::cout << std::endl;
1207  std::cout << "==========MonRunTag:" << std::endl;
1208  std::cout << "GeneralTag: " << moniov_.getMonRunTag().getGeneralTag() << std::endl;
1209  std::cout << "Monitoring Ver: " << moniov_.getMonRunTag().getMonVersionDef().getMonitoringVersion() << std::endl;
1210  std::cout << "====================" << std::endl;
1211  std::cout << std::endl;
1212  }
1213 
1214  int taskl = 0x0;
1215  int tasko = 0x0;
1216 
1217  for ( int i=0; i<int(clients_.size()); i++ ) {
1218  bool done = false;
1219  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
1220  if ( h_ && runType_ != -1 && runType_ == (*j).second && !done ) {
1222  if ( strcmp(clientsNames_[i].c_str(), "Laser") == 0 && runType_ != EcalDCCHeaderBlock::LASER_STD && runType_ != EcalDCCHeaderBlock::LASER_GAP && h_->GetBinContent(2+EcalDCCHeaderBlock::LASER_STD) == 0 && h_->GetBinContent(2+EcalDCCHeaderBlock::LASER_GAP) == 0 ) continue;
1223  if ( strcmp(clientsNames_[i].c_str(), "Pedestal") == 0 && runType_ != EcalDCCHeaderBlock::PEDESTAL_STD && runType_ != EcalDCCHeaderBlock::PEDESTAL_GAP && h_->GetBinContent(2+EcalDCCHeaderBlock::PEDESTAL_STD) == 0 && h_->GetBinContent(2+EcalDCCHeaderBlock::PEDESTAL_GAP) == 0 ) continue;
1224  if ( strcmp(clientsNames_[i].c_str(), "TestPulse") == 0 && runType_ != EcalDCCHeaderBlock::TESTPULSE_MGPA && runType_ != EcalDCCHeaderBlock::TESTPULSE_GAP && h_->GetBinContent(2+EcalDCCHeaderBlock::TESTPULSE_MGPA) == 0 && h_->GetBinContent(2+EcalDCCHeaderBlock::TESTPULSE_GAP) == 0 ) continue;
1225  done = true;
1226  if ( verbose_ ) {
1227  if ( econn ) {
1228  std::cout << " Writing " << clientsNames_[i] << " results to DB " << std::endl;
1229  std::cout << std::endl;
1230  }
1231  }
1232  bool status;
1233  if ( clients_[i]->writeDb(econn, &runiov_, &moniov_, status) ) {
1234  taskl |= 0x1 << clientsStatus_[clientsNames_[i]];
1235  if ( status ) {
1236  tasko |= 0x1 << clientsStatus_[clientsNames_[i]];
1237  }
1238  } else {
1239  tasko |= 0x1 << clientsStatus_[clientsNames_[i]];
1240  }
1241  }
1242  }
1243  if ( ((taskl >> clientsStatus_[clientsNames_[i]]) & 0x1) ) {
1244  if ( verbose_ ) {
1245  std::cout << " Task output for " << clientsNames_[i] << " = "
1246  << ((tasko >> clientsStatus_[clientsNames_[i]]) & 0x1) << std::endl;
1247  std::cout << std::endl;
1248  }
1249  }
1250  }
1251 
1252  bool status;
1253  if ( summaryClient_ ) summaryClient_->writeDb(econn, &runiov_, &moniov_, status);
1254 
1255  EcalLogicID ecid;
1256  MonRunDat md;
1257  std::map<EcalLogicID, MonRunDat> dataset;
1258 
1259  MonRunOutcomeDef monRunOutcomeDef;
1260 
1261  monRunOutcomeDef.setShortDesc("success");
1262 
1263  float nevt = -1.;
1264 
1265  if ( h_ ) nevt = h_->GetSumOfWeights();
1266 
1267  md.setNumEvents(int(nevt));
1268  md.setMonRunOutcomeDef(monRunOutcomeDef);
1269 
1270 // string fileName = "";
1271 // md.setRootfileName(fileName);
1272 
1273  md.setTaskList(taskl);
1274  md.setTaskOutcome(tasko);
1275 
1276  if ( econn ) {
1277  try {
1278  ecid = LogicID::getEcalLogicID("EB");
1279  dataset[ecid] = md;
1280  } catch (std::runtime_error &e) {
1281  std::cerr << e.what() << std::endl;
1282  }
1283  }
1284 
1285  if ( econn ) {
1286  try {
1287  if ( verbose_ ) std::cout << "Inserting MonRunDat ..." << std::endl;
1288  econn->insertDataSet(&dataset, &moniov_);
1289  if ( verbose_ ) std::cout << "done." << std::endl;
1290  } catch (std::runtime_error &e) {
1291  std::cerr << e.what() << std::endl;
1292  }
1293  }
1294 
1295  if ( econn ) {
1296  try {
1297  if ( verbose_ ) std::cout << "Closing DB connection ..." << std::endl;
1298  delete econn;
1299  econn = 0;
1300  if ( verbose_ ) std::cout << "done." << std::endl;
1301  } catch (std::runtime_error &e) {
1302  std::cerr << e.what() << std::endl;
1303  }
1304  }
1305 #endif
1306 
1307  if ( verbose_ ) std::cout << std::endl;
1308 
1309 }
std::multimap< EBClient *, int > clientsRuns_
int i
Definition: DBlmapReader.cc:9
void setTaskList(int list)
Definition: MonRunDat.h:30
void setNumEvents(int num)
Definition: MonRunDat.h:21
std::vector< std::string > clientsNames_
Definition: RunTag.h:13
void setToCurrentGMTime()
Definition: Tm.cc:156
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:33
void setShortDesc(std::string desc)
int j
Definition: DBlmapReader.cc:9
void setMonVersionDef(MonVersionDef ver)
Definition: MonRunTag.cc:49
void setTaskOutcome(int outcome)
Definition: MonRunDat.h:33
std::vector< EBClient * > clients_
std::map< std::string, int > clientsStatus_
void setMonRunOutcomeDef(MonRunOutcomeDef outcomeDef)
Definition: MonRunDat.h:24
MonRunIOV fetchMonRunIOV(RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun)
void setMonitoringVersion(std::string ver)
void insertMonRunIOV(MonRunIOV *iov)
tuple cout
Definition: gather_cfg.py:41
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple status
Definition: ntuplemaker.py:245
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
Definition: LogicID.h:31
Definition: Tm.h:14

Friends And Related Function Documentation

friend class EcalBarrelMonitorXdaqClient
friend

Definition at line 38 of file EcalBarrelMonitorClient.h.

Member Data Documentation

bool EcalBarrelMonitorClient::begin_run_
private

Definition at line 164 of file EcalBarrelMonitorClient.h.

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

std::vector<EBClient*> EcalBarrelMonitorClient::clients_
private
std::vector<std::string> EcalBarrelMonitorClient::clientsNames_
private
std::multimap<EBClient*,int> EcalBarrelMonitorClient::clientsRuns_
private
std::map<std::string,int> EcalBarrelMonitorClient::clientsStatus_
private

Definition at line 146 of file EcalBarrelMonitorClient.h.

Referenced by EcalBarrelMonitorClient(), and writeDb().

bool EcalBarrelMonitorClient::cloneME_
private

Definition at line 100 of file EcalBarrelMonitorClient.h.

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

time_t EcalBarrelMonitorClient::current_time_
private

Definition at line 130 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), beginJob(), beginRun(), and endLuminosityBlock().

std::string EcalBarrelMonitorClient::dbHostName_
private

Definition at line 112 of file EcalBarrelMonitorClient.h.

Referenced by beginRunDb(), EcalBarrelMonitorClient(), endRunDb(), and writeDb().

int EcalBarrelMonitorClient::dbHostPort_
private

Definition at line 113 of file EcalBarrelMonitorClient.h.

Referenced by beginRunDb(), EcalBarrelMonitorClient(), endRunDb(), and writeDb().

std::string EcalBarrelMonitorClient::dbName_
private

Definition at line 111 of file EcalBarrelMonitorClient.h.

Referenced by beginRunDb(), EcalBarrelMonitorClient(), endRunDb(), and writeDb().

std::string EcalBarrelMonitorClient::dbPassword_
private

Definition at line 115 of file EcalBarrelMonitorClient.h.

Referenced by beginRunDb(), EcalBarrelMonitorClient(), endRunDb(), and writeDb().

std::string EcalBarrelMonitorClient::dbTagName_
private

Definition at line 117 of file EcalBarrelMonitorClient.h.

Referenced by EcalBarrelMonitorClient(), and writeDb().

time_t EcalBarrelMonitorClient::dbUpdateTime_
private

Definition at line 136 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), EcalBarrelMonitorClient(), and endRun().

std::string EcalBarrelMonitorClient::dbUserName_
private

Definition at line 114 of file EcalBarrelMonitorClient.h.

Referenced by beginRunDb(), EcalBarrelMonitorClient(), endRunDb(), and writeDb().

bool EcalBarrelMonitorClient::debug_
private
DQMStore* EcalBarrelMonitorClient::dqmStore_
private

Definition at line 150 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), beginJob(), endRun(), and softReset().

bool EcalBarrelMonitorClient::enableCleanup_
private

Definition at line 107 of file EcalBarrelMonitorClient.h.

Referenced by cleanup(), and EcalBarrelMonitorClient().

std::vector<std::string> EcalBarrelMonitorClient::enabledClients_
private

Definition at line 140 of file EcalBarrelMonitorClient.h.

Referenced by EcalBarrelMonitorClient().

bool EcalBarrelMonitorClient::end_run_
private

Definition at line 165 of file EcalBarrelMonitorClient.h.

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

int EcalBarrelMonitorClient::evt_
private

Definition at line 162 of file EcalBarrelMonitorClient.h.

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

int EcalBarrelMonitorClient::evtType_
private

Definition at line 157 of file EcalBarrelMonitorClient.h.

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

bool EcalBarrelMonitorClient::forced_status_
private

Definition at line 167 of file EcalBarrelMonitorClient.h.

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

bool EcalBarrelMonitorClient::forced_update_
private

Definition at line 169 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), beginJob(), endJob(), endLuminosityBlock(), and endRun().

TH1F* EcalBarrelMonitorClient::h_
private
int EcalBarrelMonitorClient::ievt_
private
std::string EcalBarrelMonitorClient::inputFile_
private

Definition at line 109 of file EcalBarrelMonitorClient.h.

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

int EcalBarrelMonitorClient::jevt_
private

Definition at line 98 of file EcalBarrelMonitorClient.h.

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

int EcalBarrelMonitorClient::last_run_
private

Definition at line 171 of file EcalBarrelMonitorClient.h.

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

time_t EcalBarrelMonitorClient::last_time_reset_
private

Definition at line 133 of file EcalBarrelMonitorClient.h.

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

time_t EcalBarrelMonitorClient::last_time_update_
private

Definition at line 132 of file EcalBarrelMonitorClient.h.

Referenced by beginJob(), beginRun(), and endLuminosityBlock().

std::string EcalBarrelMonitorClient::location_
private

Definition at line 154 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), beginRunDb(), and EcalBarrelMonitorClient().

bool EcalBarrelMonitorClient::mergeRuns_
private

Definition at line 121 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), EcalBarrelMonitorClient(), and endRun().

std::string EcalBarrelMonitorClient::prefixME_
private
int EcalBarrelMonitorClient::prescaleFactor_
private

Definition at line 105 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), and EcalBarrelMonitorClient().

std::string EcalBarrelMonitorClient::resetFile_
private

Definition at line 119 of file EcalBarrelMonitorClient.h.

Referenced by analyze(), EcalBarrelMonitorClient(), and endRun().

int EcalBarrelMonitorClient::run_
private
int EcalBarrelMonitorClient::runType_
private
std::vector<std::string> EcalBarrelMonitorClient::runTypes_
private
std::string EcalBarrelMonitorClient::status_
private

Definition at line 159 of file EcalBarrelMonitorClient.h.

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

int EcalBarrelMonitorClient::subrun_
private

Definition at line 128 of file EcalBarrelMonitorClient.h.

Referenced by beginJob(), beginRunDb(), endRun(), and writeDb().

EBSummaryClient* EcalBarrelMonitorClient::summaryClient_
private
std::vector<int> EcalBarrelMonitorClient::superModules_
private

Definition at line 138 of file EcalBarrelMonitorClient.h.

Referenced by EcalBarrelMonitorClient().

time_t EcalBarrelMonitorClient::updateTime_
private

Definition at line 135 of file EcalBarrelMonitorClient.h.

Referenced by EcalBarrelMonitorClient(), and endLuminosityBlock().

bool EcalBarrelMonitorClient::verbose_
private