CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Tracer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : Tracer
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Thu Sep 8 14:17:58 EDT 2005
11 //
12 
19 
25 
33 
34 #include <iostream>
35 
36 using namespace edm::service;
37 
38 namespace {
39 
40  class TimeStamper {
41  public:
42  TimeStamper(bool enable) :
43  enabled_(enable)
44  { }
45 
46  friend
47  std::ostream & operator<<(std::ostream & out, TimeStamper const & timestamp) {
48  if (timestamp.enabled_)
49  out << std::setprecision(2) << edm::TimeOfDay() << " ";
50  return out;
51  }
52 
53  private:
54  bool enabled_;
55  };
56 
57 }
58 
60  indention_(iPS.getUntrackedParameter<std::string>("indention")),
61  dumpContextForLabels_(),
62  dumpNonModuleContext_(iPS.getUntrackedParameter<bool>("dumpNonModuleContext")),
63  printTimestamps_(iPS.getUntrackedParameter<bool>("printTimestamps"))
64 {
65  for (std::string & label: iPS.getUntrackedParameter<std::vector<std::string>>("dumpContextForLabels"))
66  dumpContextForLabels_.insert(std::move(label));
67 
68  iRegistry.watchPreallocate(this, &Tracer::preallocate);
69 
70  iRegistry.watchPostBeginJob(this, &Tracer::postBeginJob);
71  iRegistry.watchPostEndJob(this, &Tracer::postEndJob);
72 
75 
76  iRegistry.watchPreSourceLumi(this, &Tracer::preSourceLumi);
78 
79  iRegistry.watchPreSourceRun(this, &Tracer::preSourceRun);
80  iRegistry.watchPostSourceRun(this, &Tracer::postSourceRun);
81 
82  iRegistry.watchPreOpenFile(this, &Tracer::preOpenFile);
83  iRegistry.watchPostOpenFile(this, &Tracer::postOpenFile);
84 
85  iRegistry.watchPreCloseFile(this, &Tracer::preCloseFile);
86  iRegistry.watchPostCloseFile(this, &Tracer::postCloseFile);
87 
90 
93 
96 
99 
102 
105 
108 
111 
114 
117 
118  iRegistry.watchPreEvent(this, &Tracer::preEvent);
119  iRegistry.watchPostEvent(this, &Tracer::postEvent);
120 
121  iRegistry.watchPrePathEvent(this, &Tracer::prePathEvent);
122  iRegistry.watchPostPathEvent(this, &Tracer::postPathEvent);
123 
126 
129 
132 
137 
142 
147 
152 
157 
160 
162  LogAbsolute out("Tracer");
163  out << TimeStamper(printTimestamps_);
164  out << indention_ << indention_ << " early termination before processing transition";
165  });
166  iRegistry.preStreamEarlyTerminationSignal_.connect([this](edm::StreamContext const& iContext, edm::TerminationOrigin iOrigin) {
167  LogAbsolute out("Tracer");
168  out << TimeStamper(printTimestamps_);
169  if(iContext.eventID().luminosityBlock() ==0) {
170  out << indention_ << indention_ << " early termination of run: stream = " << iContext.streamID()
171  <<" run = " << iContext.eventID().run();
172  }else {
173  if(iContext.eventID().event() == 0) {
174  out << indention_ << indention_ << " early termination of stream lumi: stream = " << iContext.streamID()
175  <<" run = " << iContext.eventID().run()
176  << " lumi = " << iContext.eventID().luminosityBlock() ;
177  } else {
178  out << indention_ << indention_ << " early termination of event: stream = " << iContext.streamID()
179  <<" run = " << iContext.eventID().run()
180  << " lumi = " << iContext.eventID().luminosityBlock()
181  << " event = "<< iContext.eventID().event();
182 
183  }
184  }
185  out<< " : time = " << iContext.timestamp().value();
186 
187  });
188  iRegistry.preGlobalEarlyTerminationSignal_.connect([this](edm::GlobalContext const& iContext, edm::TerminationOrigin iOrigin) {
189  LogAbsolute out("Tracer");
190  out << TimeStamper(printTimestamps_);
191  if(iContext.luminosityBlockID().value() ==0) {
192  out << indention_ << indention_ << " early termination of global run " << iContext.luminosityBlockID().run();
193  }else {
194  out << indention_ << indention_ << " early termination of global lumi run = " << iContext.luminosityBlockID().run()
195  << " lumi = " << iContext.luminosityBlockID().luminosityBlock() ;
196 
197  }
198  out<< " : time = " << iContext.timestamp().value();
199  });
200 }
201 
202 void
205  desc.addUntracked<std::string>("indention", "++")->setComment("Prefix characters for output. The characters are repeated to form the indentation.");
206  desc.addUntracked<std::vector<std::string>>("dumpContextForLabels", std::vector<std::string>{})->setComment("Prints context information to cout for the module transitions associated with these modules' labels");
207  desc.addUntracked<bool>("dumpNonModuleContext", false)->setComment("Prints context information to cout for the transitions not associated with any module label");
208  desc.addUntracked<bool>("printTimestamps", false)->setComment("Prints a time stamp for every transition");
209  descriptions.add("Tracer", desc);
210  descriptions.setComment("This service prints each phase the framework is processing, e.g. constructing a module,running a module, etc.");
211 }
212 
213 void
215  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
216  << bounds.maxNumberOfConcurrentLuminosityBlocks() << " concurrent luminosity sections, "
217  << bounds.maxNumberOfStreams() << " streams";
218 }
219 
220 void
222  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: begin job";
223 }
224 
225 void
227  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: end job";
228 }
229 
230 void
232  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source event";
233 }
234 
235 void
237  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source event";
238 }
239 
240 void
242  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source lumi";
243 }
244 
245 void
247  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source lumi";
248 }
249 
250 void
252  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source run";
253 }
254 
255 void
257  LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source run";
258 }
259 
260 void
261 Tracer::preOpenFile(std::string const& lfn, bool b) {
262  LogAbsolute out("Tracer");
263  out << TimeStamper(printTimestamps_);
264  out << indention_ << indention_ << " starting: open input file: lfn = " << lfn;
265  if(dumpNonModuleContext_) out << " usedFallBack = " << b;
266 }
267 
268 void
269 Tracer::postOpenFile (std::string const& lfn, bool b) {
270  LogAbsolute out("Tracer");
271  out << TimeStamper(printTimestamps_);
272  out << indention_ << indention_ << " finished: open input file: lfn = " << lfn;
273  if(dumpNonModuleContext_) out << " usedFallBack = " << b;
274 }
275 
276 void
277 Tracer::preCloseFile(std::string const & lfn, bool b) {
278  LogAbsolute out("Tracer");
279  out << TimeStamper(printTimestamps_);
280  out << indention_ << indention_ << " starting: close input file: lfn = " << lfn;
281  if(dumpNonModuleContext_) out << " usedFallBack = " << b;
282 }
283 void
284 Tracer::postCloseFile (std::string const& lfn, bool b) {
285  LogAbsolute out("Tracer");
286  out << TimeStamper(printTimestamps_);
287  out << indention_ << indention_ << " finished: close input file: lfn = " << lfn;
288  if(dumpNonModuleContext_) out << " usedFallBack = " << b;
289 }
290 
291 void
293  ModuleDescription const& desc = *mcc.moduleDescription();
294  LogAbsolute out("Tracer");
295  out << TimeStamper(printTimestamps_);
296  out << indention_ << indention_ << " starting: begin stream for module: stream = " << sc.streamID() << " label = '" << desc.moduleLabel() << "' id = " << desc.id();
297  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
298  out << "\n" << sc;
299  out << mcc;
300  }
301 }
302 
303 void
305  ModuleDescription const& desc = *mcc.moduleDescription();
306  LogAbsolute out("Tracer");
307  out << TimeStamper(printTimestamps_);
308  out << indention_ << indention_ << " finished: begin stream for module: stream = " << sc.streamID() << " label = '" << desc.moduleLabel() << "' id = " << desc.id();
309  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
310  out << "\n" << sc;
311  out << mcc;
312  }
313 }
314 
315 void
317  ModuleDescription const& desc = *mcc.moduleDescription();
318  LogAbsolute out("Tracer");
319  out << TimeStamper(printTimestamps_);
320  out << indention_ << indention_ << " starting: end stream for module: stream = " << sc.streamID() << " label = '" << desc.moduleLabel() << "' id = " << desc.id();
321  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
322  out << "\n" << sc;
323  out << mcc;
324  }
325 }
326 
327 void
329  ModuleDescription const& desc = *mcc.moduleDescription();
330  LogAbsolute out("Tracer");
331  out << TimeStamper(printTimestamps_);
332  out << indention_ << indention_ << " finished: end stream for module: stream = " << sc.streamID() << " label = '" << desc.moduleLabel() << "' id = " << desc.id();
333  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
334  out << "\n" << sc;
335  out << mcc;
336  }
337 }
338 
339 void
341  LogAbsolute out("Tracer");
342  out << TimeStamper(printTimestamps_);
343  out << indention_ << indention_ << " starting: global begin run " << gc.luminosityBlockID().run()
344  << " : time = " << gc.timestamp().value();
346  out << "\n" << gc;
347  }
348 }
349 
350 void
352  LogAbsolute out("Tracer");
353  out << TimeStamper(printTimestamps_);
354  out << indention_ << indention_ << " finished: global begin run " << gc.luminosityBlockID().run()
355  << " : time = " << gc.timestamp().value();
357  out << "\n" << gc;
358  }
359 }
360 
361 void
363  LogAbsolute out("Tracer");
364  out << TimeStamper(printTimestamps_);
365  out << indention_ << indention_ << " starting: global end run " << gc.luminosityBlockID().run()
366  << " : time = " << gc.timestamp().value();
368  out << "\n" << gc;
369  }
370 }
371 
372 void
374  LogAbsolute out("Tracer");
375  out << TimeStamper(printTimestamps_);
376  out << indention_ << indention_ << " finished: global end run " << gc.luminosityBlockID().run()
377  << " : time = " << gc.timestamp().value();
379  out << "\n" << gc;
380  }
381 }
382 
383 void
385  LogAbsolute out("Tracer");
386  out << TimeStamper(printTimestamps_);
387  out << indention_ << indention_ << " starting: begin run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
388  << " time = " << sc.timestamp().value();
390  out << "\n" << sc;
391  }
392 }
393 
394 void
396  LogAbsolute out("Tracer");
397  out << TimeStamper(printTimestamps_);
398  out << indention_ << indention_ << " finished: begin run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
399  << " time = " << sc.timestamp().value();
401  out << "\n" << sc;
402  }
403 }
404 
405 void
407  LogAbsolute out("Tracer");
408  out << TimeStamper(printTimestamps_);
409  out << indention_ << indention_ << " starting: end run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
410  << " time = " << sc.timestamp().value();
412  out << "\n" << sc;
413  }
414 }
415 
416 void
418  LogAbsolute out("Tracer");
419  out << TimeStamper(printTimestamps_);
420  out << indention_ << indention_ << " finished: end run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
421  << " time = " << sc.timestamp().value();
423  out << "\n" << sc;
424  }
425 }
426 
427 void
429  LogAbsolute out("Tracer");
430  out << TimeStamper(printTimestamps_);
431  out << indention_ << indention_ << " starting: global begin lumi: run = " << gc.luminosityBlockID().run()
432  << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
434  out << "\n" << gc;
435  }
436 }
437 
438 void
440  LogAbsolute out("Tracer");
441  out << TimeStamper(printTimestamps_);
442  out << indention_ << indention_ << " finished: global begin lumi: run = " << gc.luminosityBlockID().run()
443  << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
445  out << "\n" << gc;
446  }
447 }
448 
449 void
451  LogAbsolute out("Tracer");
452  out << TimeStamper(printTimestamps_);
453  out << indention_ << indention_ << " starting: global end lumi: run = " << gc.luminosityBlockID().run()
454  << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
456  out << "\n" << gc;
457  }
458 }
459 
460 void
462  LogAbsolute out("Tracer");
463  out << TimeStamper(printTimestamps_);
464  out << indention_ << indention_ << " finished: global end lumi: run = " << gc.luminosityBlockID().run()
465  << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
467  out << "\n" << gc;
468  }
469 }
470 
471 void
473  LogAbsolute out("Tracer");
474  out << TimeStamper(printTimestamps_);
475  out << indention_ << indention_ << " starting: begin lumi: stream = " << sc.streamID() << " run = " << sc.eventID().run()
476  << " lumi = " << sc.eventID().luminosityBlock() << " time = " << sc.timestamp().value();
478  out << "\n" << sc;
479  }
480 }
481 
482 void
484  LogAbsolute out("Tracer");
485  out << TimeStamper(printTimestamps_);
486  out << indention_ << indention_ << " finished: begin lumi: stream = " << sc.streamID() << " run = " << sc.eventID().run()
487  << " lumi = " << sc.eventID().luminosityBlock() << " time = " << sc.timestamp().value();
489  out << "\n" << sc;
490  }
491 }
492 
493 void
495  LogAbsolute out("Tracer");
496  out << TimeStamper(printTimestamps_);
497  out << indention_ << indention_ << " starting: end lumi: stream = " << sc.streamID() << " run = " << sc.eventID().run()
498  << " lumi = " << sc.eventID().luminosityBlock() << " time = " << sc.timestamp().value();
500  out << "\n" << sc;
501  }
502 }
503 
504 void
506  LogAbsolute out("Tracer");
507  out << TimeStamper(printTimestamps_);
508  out << indention_ << indention_ << " finished: end lumi: stream = " << sc.streamID() << " run = " << sc.eventID().run()
509  << " lumi = " << sc.eventID().luminosityBlock() << " time = " << sc.timestamp().value();
511  out << "\n" << sc;
512  }
513 }
514 
515 void
517  LogAbsolute out("Tracer");
518  out << TimeStamper(printTimestamps_);
519  out << indention_ << indention_ << " starting: processing event : stream = " << sc.streamID() << " run = " << sc.eventID().run()
520  << " lumi = " << sc.eventID().luminosityBlock() << " event = " << sc.eventID().event() << " time = " << sc.timestamp().value();
522  out << "\n" << sc;
523  }
524 }
525 
526 void
528  LogAbsolute out("Tracer");
529  out << TimeStamper(printTimestamps_);
530  out << indention_ << indention_ << " finished: processing event : stream = " << sc.streamID() << " run = " << sc.eventID().run()
531  << " lumi = " << sc.eventID().luminosityBlock() << " event = " << sc.eventID().event() << " time = " << sc.timestamp().value();
533  out << "\n" << sc;
534  }
535 }
536 
537 void
539  LogAbsolute out("Tracer");
540  out << TimeStamper(printTimestamps_);
541  out << indention_ << indention_ << indention_ << " starting: processing path '" << pc.pathName() << "' : stream = " << sc.streamID();
543  out << "\n" << sc;
544  out << pc;
545  }
546 }
547 
548 void
550  LogAbsolute out("Tracer");
551  out << TimeStamper(printTimestamps_);
552  out << indention_ << indention_ << indention_ << " finished: processing path '" << pc.pathName() << "' : stream = " << sc.streamID();
554  out << "\n" << sc;
555  out << pc;
556  }
557 }
558 
559 void
561  LogAbsolute out("Tracer");
562  out << TimeStamper(printTimestamps_);
563  out << indention_ << indention_ << " starting: constructing module with label '" << desc.moduleLabel() << "' id = " << desc.id();
564  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
565  out << "\n" << desc;
566  }
567 }
568 
569 void
571  LogAbsolute out("Tracer");
572  out << TimeStamper(printTimestamps_);
573  out << indention_ << indention_ << " finished: constructing module with label '" << desc.moduleLabel() << "' id = " << desc.id();
574  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
575  out << "\n" << desc;
576  }
577 }
578 
579 void
581  LogAbsolute out("Tracer");
582  out << TimeStamper(printTimestamps_);
583  out << indention_ << indention_;
584  out << " starting: begin job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
585  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
586  out << "\n" << desc;
587  }
588 }
589 
590 void
592  LogAbsolute out("Tracer");
593  out << TimeStamper(printTimestamps_);
594  out << indention_ << indention_;
595  out << " finished: begin job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
596  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
597  out << "\n" << desc;
598  }
599 }
600 
601 void
603  LogAbsolute out("Tracer");
604  out << TimeStamper(printTimestamps_);
605  out << indention_ << indention_;
606  out << " starting: end job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
607  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
608  out << "\n" << desc;
609  }
610 }
611 
612 void
614  LogAbsolute out("Tracer");
615  out << TimeStamper(printTimestamps_);
616  out << indention_ << indention_;
617  out << " finished: end job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
618  if(dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
619  out << "\n" << desc;
620  }
621 }
622 
623 void
625  LogAbsolute out("Tracer");
626  out << TimeStamper(printTimestamps_);
627  unsigned int nIndents = mcc.depth() + 4;
628  for(unsigned int i = 0; i < nIndents; ++i) {
629  out << indention_;
630  }
631  out << " starting: processing event for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
633  out << "\n" << sc;
634  out << mcc;
635  }
636 }
637 
638 void
640  LogAbsolute out("Tracer");
641  out << TimeStamper(printTimestamps_);
642  unsigned int nIndents = mcc.depth() + 4;
643  for(unsigned int i = 0; i < nIndents; ++i) {
644  out << indention_;
645  }
646  out << " finished: processing event for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
648  out << "\n" << sc;
649  out << mcc;
650  }
651 }
652 
653 
654 void
656  LogAbsolute out("Tracer");
657  out << TimeStamper(printTimestamps_);
658  unsigned int nIndents = mcc.depth() + 4;
659  for(unsigned int i = 0; i < nIndents; ++i) {
660  out << indention_;
661  }
662  out << " starting: delayed processing event for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
664  out << "\n" << sc;
665  out << mcc;
666  }
667 }
668 
669 void
671  LogAbsolute out("Tracer");
672  out << TimeStamper(printTimestamps_);
673  unsigned int nIndents = mcc.depth() + 4;
674  for(unsigned int i = 0; i < nIndents; ++i) {
675  out << indention_;
676  }
677  out << " finished: delayed processing event for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
679  out << "\n" << sc;
680  out << mcc;
681  }
682 }
683 
684 
685 void
687  LogAbsolute out("Tracer");
688  out << TimeStamper(printTimestamps_);
689  unsigned int nIndents = mcc.depth() + 3;
690  for(unsigned int i = 0; i < nIndents; ++i) {
691  out << indention_;
692  }
693  out << " starting: begin run for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
695  out << "\n" << sc;
696  out << mcc;
697  }
698 }
699 
700 void
702  LogAbsolute out("Tracer");
703  out << TimeStamper(printTimestamps_);
704  unsigned int nIndents = mcc.depth() + 3;
705  for(unsigned int i = 0; i < nIndents; ++i) {
706  out << indention_;
707  }
708  out << " finished: begin run for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
710  out << "\n" << sc;
711  out << mcc;
712  }
713 }
714 
715 void
717  LogAbsolute out("Tracer");
718  out << TimeStamper(printTimestamps_);
719  unsigned int nIndents = mcc.depth() + 3;
720  for(unsigned int i = 0; i < nIndents; ++i) {
721  out << indention_;
722  }
723  out << " starting: end run for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
725  out << "\n" << sc;
726  out << mcc;
727  }
728 }
729 
730 void
732  LogAbsolute out("Tracer");
733  out << TimeStamper(printTimestamps_);
734  unsigned int nIndents = mcc.depth() + 3;
735  for(unsigned int i = 0; i < nIndents; ++i) {
736  out << indention_;
737  }
738  out << " finished: end run for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
740  out << "\n" << sc;
741  out << mcc;
742  }
743 }
744 
745 void
747  LogAbsolute out("Tracer");
748  out << TimeStamper(printTimestamps_);
749  unsigned int nIndents = mcc.depth() + 3;
750  for(unsigned int i = 0; i < nIndents; ++i) {
751  out << indention_;
752  }
753  out << " starting: begin lumi for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
755  out << "\n" << sc;
756  out << mcc;
757  }
758 }
759 
760 void
762  LogAbsolute out("Tracer");
763  out << TimeStamper(printTimestamps_);
764  unsigned int nIndents = mcc.depth() + 3;
765  for(unsigned int i = 0; i < nIndents; ++i) {
766  out << indention_;
767  }
768  out << " finished: begin lumi for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
770  out << "\n" << sc;
771  out << mcc;
772  }
773 }
774 
775 void
777  LogAbsolute out("Tracer");
778  out << TimeStamper(printTimestamps_);
779  unsigned int nIndents = mcc.depth() + 3;
780  for(unsigned int i = 0; i < nIndents; ++i) {
781  out << indention_;
782  }
783  out << " starting: end lumi for module: stream = " << sc.streamID() << " label = '"<< mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
785  out << "\n" << sc;
786  out << mcc;
787  }
788 }
789 
790 void
792  LogAbsolute out("Tracer");
793  out << TimeStamper(printTimestamps_);
794  unsigned int nIndents = mcc.depth() + 3;
795  for(unsigned int i = 0; i < nIndents; ++i) {
796  out << indention_;
797  }
798  out << " finished: end lumi for module: stream = " << sc.streamID() << " label = '"<< mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
800  out << "\n" << sc;
801  out << mcc;
802  }
803 }
804 
805 void
807  LogAbsolute out("Tracer");
808  out << TimeStamper(printTimestamps_);
809  unsigned int nIndents = mcc.depth() + 3;
810  for(unsigned int i = 0; i < nIndents; ++i) {
811  out << indention_;
812  }
813  out << " starting: global begin run for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
815  out << "\n" << gc;
816  out << mcc;
817  }
818 }
819 
820 void
822  LogAbsolute out("Tracer");
823  out << TimeStamper(printTimestamps_);
824  unsigned int nIndents = mcc.depth() + 3;
825  for(unsigned int i = 0; i < nIndents; ++i) {
826  out << indention_;
827  }
828  out << " finished: global begin run for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
830  out << "\n" << gc;
831  out << mcc;
832  }
833 }
834 
835 void
837  LogAbsolute out("Tracer");
838  out << TimeStamper(printTimestamps_);
839  unsigned int nIndents = mcc.depth() + 3;
840  for(unsigned int i = 0; i < nIndents; ++i) {
841  out << indention_;
842  }
843  out << " starting: global end run for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
845  out << "\n" << gc;
846  out << mcc;
847  }
848 }
849 
850 void
852  LogAbsolute out("Tracer");
853  out << TimeStamper(printTimestamps_);
854  unsigned int nIndents = mcc.depth() + 3;
855  for(unsigned int i = 0; i < nIndents; ++i) {
856  out << indention_;
857  }
858  out << " finished: global end run for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
860  out << "\n" << gc;
861  out << mcc;
862  }
863 }
864 
865 void
867  LogAbsolute out("Tracer");
868  out << TimeStamper(printTimestamps_);
869  unsigned int nIndents = mcc.depth() + 3;
870  for(unsigned int i = 0; i < nIndents; ++i) {
871  out << indention_;
872  }
873  out << " starting: global begin lumi for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
875  out << "\n" << gc;
876  out << mcc;
877  }
878 }
879 
880 void
882  LogAbsolute out("Tracer");
883  out << TimeStamper(printTimestamps_);
884  unsigned int nIndents = mcc.depth() + 3;
885  for(unsigned int i = 0; i < nIndents; ++i) {
886  out << indention_;
887  }
888  out << " finished: global begin lumi for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
890  out << "\n" << gc;
891  out << mcc;
892  }
893 }
894 
895 void
897  LogAbsolute out("Tracer");
898  out << TimeStamper(printTimestamps_);
899  unsigned int nIndents = mcc.depth() + 3;
900  for(unsigned int i = 0; i < nIndents; ++i) {
901  out << indention_;
902  }
903  out << " starting: global end lumi for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
905  out << "\n" << gc;
906  out << mcc;
907  }
908 }
909 
910 void
912  LogAbsolute out("Tracer");
913  out << TimeStamper(printTimestamps_);
914  unsigned int nIndents = mcc.depth() + 3;
915  for(unsigned int i = 0; i < nIndents; ++i) {
916  out << indention_;
917  }
918  out << " finished: global end lumi for module: label = '" << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
920  out << "\n" << gc;
921  out << mcc;
922  }
923 }
924 
925 void
927  LogAbsolute out("Tracer");
928  out << TimeStamper(printTimestamps_);
929  out << indention_;
930  out << " starting: constructing source: " << desc.moduleName();
932  out << "\n" << desc;
933  }
934 }
935 
936 void
938  LogAbsolute out("Tracer");
939  out << TimeStamper(printTimestamps_);
940  out << indention_;
941  out << " finished: constructing source: " << desc.moduleName();
943  out << "\n" << desc;
944  }
945 }
void preCloseFile(std::string const &lfn, bool primary)
Definition: Tracer.cc:277
RunNumber_t run() const
Definition: EventID.h:39
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
std::string const & pathName() const
Definition: PathContext.h:37
EventNumber_t event() const
Definition: EventID.h:41
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreEvent(PreEvent::slot_type const &iSlot)
int i
Definition: DBlmapReader.cc:9
void postSourceRun()
Definition: Tracer.cc:256
boost::uint64_t value() const
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void postModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:821
void watchPreallocate(Preallocate::slot_type const &iSlot)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void postModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:881
void postModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:791
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void preModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:866
void postModuleConstruction(ModuleDescription const &md)
Definition: Tracer.cc:570
void postModuleEndStream(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:328
void postModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:911
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void preallocate(service::SystemBounds const &)
Definition: Tracer.cc:214
LuminosityBlockID const & luminosityBlockID() const
Definition: GlobalContext.h:52
void postStreamBeginLumi(StreamContext const &)
Definition: Tracer.cc:483
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
void preModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:896
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
std::string const & moduleName() const
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void preModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:746
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void preGlobalEndLumi(GlobalContext const &)
Definition: Tracer.cc:450
void preModuleEndJob(ModuleDescription const &md)
Definition: Tracer.cc:602
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void preModuleConstruction(ModuleDescription const &md)
Definition: Tracer.cc:560
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
void postStreamEndRun(StreamContext const &)
Definition: Tracer.cc:417
void postGlobalEndLumi(GlobalContext const &)
Definition: Tracer.cc:461
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
void postModuleBeginJob(ModuleDescription const &md)
Definition: Tracer.cc:591
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
void postModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:731
std::string const & moduleLabel() const
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void postCloseFile(std::string const &, bool)
Definition: Tracer.cc:284
Timestamp const & timestamp() const
Definition: GlobalContext.h:55
void preStreamEndLumi(StreamContext const &)
Definition: Tracer.cc:494
void preOpenFile(std::string const &, bool)
Definition: Tracer.cc:261
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void preGlobalBeginRun(GlobalContext const &)
Definition: Tracer.cc:340
PreStreamEarlyTermination preStreamEarlyTerminationSignal_
PreSourceEarlyTermination preSourceEarlyTerminationSignal_
void preSourceEvent(StreamID)
Definition: Tracer.cc:231
void preGlobalEndRun(GlobalContext const &)
Definition: Tracer.cc:362
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
void preModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:776
Tracer(const ParameterSet &, ActivityRegistry &)
Definition: Tracer.cc:59
void preModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:686
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
void prePathEvent(StreamContext const &, PathContext const &)
Definition: Tracer.cc:538
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
ModuleDescription const * moduleDescription() const
void postModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:761
RunNumber_t run() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Tracer.cc:203
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void preModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:836
void postStreamBeginRun(StreamContext const &)
Definition: Tracer.cc:395
std::ostream & operator<<(std::ostream &os, SimpleMemoryCheck::SignificantEvent const &se)
Definition: Memory.cc:807
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void preStreamEndRun(StreamContext const &)
Definition: Tracer.cc:406
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
void postOpenFile(std::string const &, bool)
Definition: Tracer.cc:269
PreGlobalEarlyTermination preGlobalEarlyTerminationSignal_
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void postPathEvent(StreamContext const &, PathContext const &, HLTPathStatus const &)
Definition: Tracer.cc:549
StreamID const & streamID() const
Definition: StreamContext.h:57
tuple out
Definition: dbtoconf.py:99
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
void setComment(std::string const &value)
void postModuleEventDelayedGet(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:670
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
Definition: SystemBounds.h:45
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void preSourceLumi()
Definition: Tracer.cc:241
void postSourceEvent(StreamID)
Definition: Tracer.cc:236
std::string indention_
Definition: Tracer.h:145
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
double b
Definition: hdecay.h:120
LuminosityBlockNumber_t luminosityBlock() const
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
void preSourceConstruction(ModuleDescription const &md)
Definition: Tracer.cc:926
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:624
void preModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:292
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
void postGlobalBeginRun(GlobalContext const &)
Definition: Tracer.cc:351
void postGlobalEndRun(GlobalContext const &)
Definition: Tracer.cc:373
void postGlobalBeginLumi(GlobalContext const &)
Definition: Tracer.cc:439
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
void preEvent(StreamContext const &)
Definition: Tracer.cc:516
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
unsigned int maxNumberOfConcurrentRuns() const
Definition: SystemBounds.h:44
void preStreamBeginLumi(StreamContext const &)
Definition: Tracer.cc:472
void postModuleEndJob(ModuleDescription const &md)
Definition: Tracer.cc:613
void preModuleEndStream(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:316
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:639
EventID const & eventID() const
Definition: StreamContext.h:59
void preModuleEventDelayedGet(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:655
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
void postModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:304
bool dumpNonModuleContext_
Definition: Tracer.h:147
void preModuleBeginJob(ModuleDescription const &md)
Definition: Tracer.cc:580
void postStreamEndLumi(StreamContext const &)
Definition: Tracer.cc:505
void preModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:716
void postEvent(StreamContext const &)
Definition: Tracer.cc:527
void preStreamBeginRun(StreamContext const &)
Definition: Tracer.cc:384
TimeValue_t value() const
Definition: Timestamp.h:56
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
void connect(U iFunc)
Definition: Signal.h:63
void postModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:701
void postSourceLumi()
Definition: Tracer.cc:246
void preGlobalBeginLumi(GlobalContext const &)
Definition: Tracer.cc:428
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void postModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:851
unsigned int id() const
void postSourceConstruction(ModuleDescription const &md)
Definition: Tracer.cc:937
std::set< std::string > dumpContextForLabels_
Definition: Tracer.h:146
void preModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
Definition: Tracer.cc:806
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Timestamp const & timestamp() const
Definition: StreamContext.h:62