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 1412 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().

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

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

1716  {
1717 
1718  run_ = e.id().run();
1719  evt_ = e.id().event();
1720 
1721  if ( prescaleFactor_ > 0 ) {
1722  if ( jevt_ % prescaleFactor_ == 0 ) this->analyze();
1723  }
1724 
1725 }
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_, trackerHits::histo, i, ievt_, inputFile_, jevt_, last_run_, last_time_reset_, last_time_update_, 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  char histo[200];
643 
644  MonitorElement* me;
645 
646  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo" );
647 
648  sprintf(histo, "reportSummary");
649  me = dqmStore_->get(prefixME_ + "/EventInfo/" + histo);
650  if ( me ) {
652  }
653  me = dqmStore_->bookFloat(histo);
654  me->Fill(-1.0);
655 
656  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo/reportSummaryContents" );
657 
658  for (int i = 0; i < 36; i++) {
659  sprintf(histo, "EcalBarrel_%s", Numbers::sEB(i+1).c_str());
660  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/" + histo);
661  if ( me ) {
663  }
664  me = dqmStore_->bookFloat(histo);
665  me->Fill(-1.0);
666  }
667 
668  dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo" );
669 
670  sprintf(histo, "reportSummaryMap");
671  me = dqmStore_->get(prefixME_ + "/EventInfo/" + histo);
672  if ( me ) {
674  }
675  me = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, 0., 34);
676  for ( int iettx = 0; iettx < 34; iettx++ ) {
677  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
678  me->setBinContent( ipttx+1, iettx+1, -1.0 );
679  }
680  }
681  me->setAxisTitle("jphi", 1);
682  me->setAxisTitle("jeta", 2);
683 
684 }
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:81
#define NULL
Definition: scimark2.h:8
tuple histo
Definition: trackerHits.py:12
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:456
void Fill(long long x)
void beginJob(void)
BeginJob.
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
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:2198
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:647
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:237
void EcalBarrelMonitorClient::beginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
virtual

BeginLumiBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 899 of file EcalBarrelMonitorClient.cc.

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

899  {
900 
901  if ( verbose_ ) {
902  std::cout << std::endl;
903  std::cout << "Standard beginLuminosityBlock() for luminosity block " << l.id().luminosityBlock() << " of run " << l.id().run() << std::endl;
904  std::cout << std::endl;
905  }
906 
907 }
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 686 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().

686  {
687 
688  begin_run_ = true;
689  end_run_ = false;
690 
691  last_run_ = run_;
692 
693  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: beginRun" << std::endl;
694 
695  jevt_ = 0;
696 
700 
701  this->setup();
702 
703  this->beginRunDb();
704 
705  for ( int i=0; i<int(clients_.size()); i++ ) {
706  clients_[i]->cleanup();
707  bool done = false;
708  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
709  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
710  done = true;
711  clients_[i]->beginRun();
712  }
713  }
714  }
715 
717 
718 }
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 720 of file EcalBarrelMonitorClient.cc.

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

720  {
721 
723 
724  if ( verbose_ ) std::cout << std::endl;
725 
727 
728  if ( verbose_ ) {
729  std::cout << std::endl;
730  std::cout << "Standard beginRun() for run " << r.id().run() << std::endl;
731  std::cout << std::endl;
732  }
733 
734  run_ = r.id().run();
735  evt_ = 0;
736 
737  jevt_ = 0;
738 
739 }
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:43
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::beginRunDb ( void  )

BeginRunDB.

Definition at line 955 of file EcalBarrelMonitorClient.cc.

References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbUserName_, ExpressReco_HICollisions_FallBack::e, 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().

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

References cloneME_, enableCleanup_, and h_.

Referenced by endJob(), and endRun().

943  {
944 
945  if ( ! enableCleanup_ ) return;
946 
947  if ( cloneME_ ) {
948  if ( h_ ) delete h_;
949  }
950 
951  h_ = 0;
952 
953 }
void EcalBarrelMonitorClient::endJob ( void  )
virtual

EndJob.

Reimplemented from edm::EDAnalyzer.

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

741  {
742 
743  if ( ! end_run_ ) {
744 
745  if ( verbose_ ) {
746  std::cout << std::endl;
747  std::cout << "Checking last event at endJob() ... " << std::endl;
748  std::cout << std::endl;
749  }
750 
751  forced_update_ = true;
752  this->analyze();
753 
754  if ( begin_run_ && ! end_run_ ) {
755 
756  if ( verbose_ ) {
757  std::cout << std::endl;
758  std::cout << "Forcing endRun() ... " << std::endl;
759  std::cout << std::endl;
760  }
761 
762  forced_status_ = true;
763  this->analyze();
764  this->endRun();
765 
766  }
767 
768  }
769 
770  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: endJob, ievt = " << ievt_ << std::endl;
771 
772  this->cleanup();
773 
774  for ( unsigned int i=0; i<clients_.size(); i++ ) {
775  clients_[i]->endJob();
776  }
777 
779 
780 }
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 909 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_.

909  {
910 
912 
913  if ( verbose_ ) {
914  std::cout << std::endl;
915  std::cout << "Standard endLuminosityBlock() for luminosity block " << l.id().luminosityBlock() << " of run " << l.id().run() << std::endl;
916  std::cout << std::endl;
917  }
918 
919  if ( updateTime_ > 0 ) {
920  if ( (current_time_ - last_time_update_) < 60 * updateTime_ ) {
921  return;
922  }
924  }
925 
926  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
927 
928  forced_update_ = true;
929  this->analyze();
930 
931  }
932 
933 }
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 782 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().

782  {
783 
784  begin_run_ = false;
785  end_run_ = true;
786 
787  if ( debug_ ) std::cout << "EcalBarrelMonitorClient: endRun, jevt = " << jevt_ << std::endl;
788 
789  if ( subrun_ != -1 ) {
790 
791  this->writeDb();
792 
793  this->endRunDb();
794 
795  }
796 
797  if ( resetFile_.size() != 0 || dbUpdateTime_ > 0 ) {
798 
799  this->softReset(false);
800 
801  for ( int i=0; i<int(clients_.size()); i++ ) {
802  bool done = false;
803  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
804  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
805  done = true;
806  clients_[i]->analyze();
807  }
808  }
809  }
810 
812 
813  }
814 
815  for ( int i=0; i<int(clients_.size()); i++ ) {
816  bool done = false;
817  for ( std::multimap<EBClient*,int>::iterator j = clientsRuns_.lower_bound(clients_[i]); j != clientsRuns_.upper_bound(clients_[i]); j++ ) {
818  if ( runType_ != -1 && runType_ == (*j).second && !done ) {
819  done = true;
820  clients_[i]->endRun();
821  }
822  }
823  }
824 
826 
827  this->cleanup();
828 
829  status_ = "unknown";
830 
831  run_ = -1;
832  evt_ = -1;
833 
834  runType_ = -1;
835  evtType_ = -1;
836 
837  subrun_ = -1;
838 
839 }
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 841 of file EcalBarrelMonitorClient.cc.

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

841  {
842 
843  if ( verbose_ ) {
844  std::cout << std::endl;
845  std::cout << "Standard endRun() for run " << r.id().run() << std::endl;
846  std::cout << std::endl;
847  }
848 
849  this->analyze();
850 
851  if ( run_ != -1 && evt_ != -1 && runType_ != -1 ) {
852 
853  forced_update_ = true;
854  this->analyze();
855 
856  if ( ! mergeRuns_ ) {
857 
858  if ( begin_run_ && ! end_run_ ) {
859 
860  forced_status_ = false;
861  this->endRun();
862 
863  }
864 
865  }
866 
867  }
868 
869  // summary for DQM GUI
870 
871  if ( run_ != -1 && evt_ != -1 && runType_ == -1 ) {
872 
873  char histo[200];
874 
875  MonitorElement* me;
876 
877  sprintf(histo, "reportSummary");
878  me = dqmStore_->get(prefixME_ + "/EventInfo/" + histo);
879  if ( me ) me->Fill(-1.0);
880 
881  for (int i = 0; i < 36; i++) {
882  sprintf(histo, "EcalBarrel_%s", Numbers::sEB(i+1).c_str());
883  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/" + histo);
884  if ( me ) me->Fill(-1.0);
885  }
886 
887  sprintf(histo, "reportSummaryMap");
888  me = dqmStore_->get(prefixME_ + "/EventInfo/" + histo);
889  for ( int iettx = 0; iettx < 34; iettx++ ) {
890  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
891  if ( me ) me->setBinContent( ipttx+1, iettx+1, -1.0 );
892  }
893  }
894 
895  }
896 
897 }
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:81
RunID const & id() const
Definition: RunBase.h:43
RunNumber_t run() const
Definition: RunID.h:44
tuple histo
Definition: trackerHits.py:12
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:1270
tuple cout
Definition: gather_cfg.py:41
void EcalBarrelMonitorClient::endRunDb ( void  )

EndRunDB.

Definition at line 1319 of file EcalBarrelMonitorClient.cc.

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

Referenced by endRun().

1319  {
1320 
1321 #ifdef WITH_ECAL_COND_DB
1322  EcalCondDBInterface* econn;
1323 
1324  econn = 0;
1325 
1326  if ( dbName_.size() != 0 ) {
1327  try {
1328  if ( verbose_ ) std::cout << "Opening DB connection with TNS_ADMIN ..." << std::endl;
1330  if ( verbose_ ) std::cout << "done." << std::endl;
1331  } catch (std::runtime_error &e) {
1332  std::cerr << e.what() << std::endl;
1333  if ( dbHostName_.size() != 0 ) {
1334  try {
1335  if ( verbose_ ) std::cout << "Opening DB connection without TNS_ADMIN ..." << std::endl;
1337  if ( verbose_ ) std::cout << "done." << std::endl;
1338  } catch (std::runtime_error &e) {
1339  std::cerr << e.what() << std::endl;
1340  }
1341  }
1342  }
1343  }
1344 
1345  EcalLogicID ecid;
1346  RunDat rd;
1347  std::map<EcalLogicID, RunDat> dataset;
1348 
1349  float nevt = -1.;
1350 
1351  if ( h_ ) nevt = h_->GetSumOfWeights();
1352 
1353  rd.setNumEvents(int(nevt));
1354 
1355  // fetch the RunDat from the DB
1356 
1357  bool foundRunDat = false;
1358 
1359  if ( econn ) {
1360  try {
1361  if ( verbose_ ) std::cout << "Fetching RunDat ..." << std::endl;
1362  econn->fetchDataSet(&dataset, &runiov_);
1363  if ( verbose_ ) std::cout << "done." << std::endl;
1364  foundRunDat = true;
1365  } catch (std::runtime_error &e) {
1366  std::cerr << e.what() << std::endl;
1367  foundRunDat = false;
1368  }
1369  }
1370 
1371  // begin - setup the RunDat (on behalf of the DAQ)
1372 
1373  if ( ! foundRunDat ) {
1374 
1375  if ( econn ) {
1376  try {
1377  ecid = LogicID::getEcalLogicID("EB");
1378  dataset[ecid] = rd;
1379  } catch (std::runtime_error &e) {
1380  std::cerr << e.what() << std::endl;
1381  }
1382  }
1383 
1384  if ( econn ) {
1385  try {
1386  if ( verbose_ ) std::cout << "Inserting RunDat ..." << std::endl;
1387  econn->insertDataSet(&dataset, &runiov_);
1388  if ( verbose_ ) std::cout << "done." << std::endl;
1389  } catch (std::runtime_error &e) {
1390  std::cerr << e.what() << std::endl;
1391  }
1392  }
1393 
1394  }
1395 
1396  // end - setup the RunDat (on behalf of the DAQ)
1397 
1398  if ( econn ) {
1399  try {
1400  if ( verbose_ ) std::cout << "Closing DB connection ..." << std::endl;
1401  delete econn;
1402  econn = 0;
1403  if ( verbose_ ) std::cout << "done." << std::endl;
1404  } catch (std::runtime_error &e) {
1405  std::cerr << e.what() << std::endl;
1406  }
1407  }
1408 #endif
1409 
1410 }
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 935 of file EcalBarrelMonitorClient.cc.

Referenced by analyze().

935  {
936 
937 }
void EcalBarrelMonitorClient::setup ( void  )

Setup.

Definition at line 939 of file EcalBarrelMonitorClient.cc.

Referenced by beginRun().

939  {
940 
941 }
void EcalBarrelMonitorClient::softReset ( bool  flag)

SoftReset.

Definition at line 1727 of file EcalBarrelMonitorClient.cc.

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

Referenced by analyze(), and endRun().

1727  {
1728 
1729  std::vector<MonitorElement*> mes = dqmStore_->getAllContents(prefixME_);
1730  std::vector<MonitorElement*>::const_iterator meitr;
1731  for ( meitr=mes.begin(); meitr!=mes.end(); meitr++ ) {
1732  if ( !strncmp((*meitr)->getName().c_str(), "EB", 2)
1733  && strncmp((*meitr)->getName().c_str(), "EBTrend", 7)
1734  && strncmp((*meitr)->getName().c_str(), "by lumi", 7) ) {
1735  if ( flag ) {
1736  dqmStore_->softReset(*meitr);
1737  } else {
1738  dqmStore_->disableSoftReset(*meitr);
1739  }
1740  }
1741  }
1742 
1743  MonitorElement* me = dqmStore_->get(prefixME_ + "/EcalInfo/EVTTYPE");
1744  if ( me ) {
1745  if ( flag ) {
1746  dqmStore_->softReset(me);
1747  } else {
1749  }
1750  }
1751 
1752 }
long int flag
Definition: mlp_lapack.h:47
std::vector< MonitorElement * > getAllContents(const std::string &path) const
Definition: DQMStore.cc:1474
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:2520
void softReset(MonitorElement *me)
Definition: DQMStore.cc:2512
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
void EcalBarrelMonitorClient::writeDb ( void  )

WriteDB.

Definition at line 1108 of file EcalBarrelMonitorClient.cc.

References ExpressReco_HICollisions_FallBack::cerr, clients_, clientsNames_, clientsRuns_, clientsStatus_, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, gather_cfg::cout, AlCaRecoCosmics_cfg::dataset, dbHostName_, dbHostPort_, dbName_, dbPassword_, dbTagName_, dbUserName_, generateEDF::done, ExpressReco_HICollisions_FallBack::e, 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().

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