Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-28 22:48:30

0001 // -*- C++ -*-
0002 //
0003 // Package:     Services
0004 // Class  :     Tracer
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu Sep  8 14:17:58 EDT 2005
0011 //
0012 
0013 #include "FWCore/Framework/interface/ComponentDescription.h"
0014 #include "FWCore/Framework/interface/DataKey.h"
0015 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0016 #include "FWCore/Framework/interface/IOVSyncValue.h"
0017 
0018 #include "FWCore/ServiceRegistry/interface/ServiceMaker.h"
0019 
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
0022 
0023 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0024 #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h"
0025 #include "FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h"
0026 #include "FWCore/ServiceRegistry/interface/SystemBounds.h"
0027 #include "FWCore/Utilities/interface/BranchType.h"
0028 #include "FWCore/Utilities/interface/Exception.h"
0029 #include "FWCore/Utilities/interface/ProductKindOfType.h"
0030 #include "FWCore/Utilities/interface/TimeOfDay.h"
0031 
0032 #include "DataFormats/Provenance/interface/EventID.h"
0033 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0034 #include "DataFormats/Provenance/interface/ModuleDescription.h"
0035 #include "DataFormats/Provenance/interface/RunID.h"
0036 #include "DataFormats/Provenance/interface/Timestamp.h"
0037 
0038 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0039 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0040 #include "FWCore/ServiceRegistry/interface/GlobalContext.h"
0041 #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
0042 #include "FWCore/ServiceRegistry/interface/ESModuleCallingContext.h"
0043 #include "FWCore/ServiceRegistry/interface/PathContext.h"
0044 #include "FWCore/ServiceRegistry/interface/ProcessContext.h"
0045 #include "FWCore/ServiceRegistry/interface/StreamContext.h"
0046 #include "DataFormats/Common/interface/HLTPathStatus.h"
0047 
0048 #include "tracer_setupFile.h"
0049 
0050 #include <iostream>
0051 #include <vector>
0052 #include <string>
0053 #include <set>
0054 #include <optional>
0055 
0056 namespace edm {
0057   namespace service {
0058     class Tracer {
0059     public:
0060       Tracer(const ParameterSet&, ActivityRegistry&);
0061 
0062       static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0063 
0064       void preallocate(service::SystemBounds const&);
0065 
0066       void preBeginJob(PathsAndConsumesOfModulesBase const&, ProcessContext const&);
0067       void postBeginJob();
0068       void preEndJob();
0069       void postEndJob();
0070 
0071       void preBeginStream(StreamContext const&);
0072       void postBeginStream(StreamContext const&);
0073       void preEndStream(StreamContext const&);
0074       void postEndStream(StreamContext const&);
0075 
0076       void preSourceEvent(StreamID);
0077       void postSourceEvent(StreamID);
0078 
0079       void preSourceLumi(LuminosityBlockIndex);
0080       void postSourceLumi(LuminosityBlockIndex);
0081 
0082       void preSourceRun(RunIndex);
0083       void postSourceRun(RunIndex);
0084 
0085       void preSourceProcessBlock();
0086       void postSourceProcessBlock(std::string const&);
0087 
0088       void preOpenFile(std::string const&);
0089       void postOpenFile(std::string const&);
0090 
0091       void preCloseFile(std::string const& lfn);
0092       void postCloseFile(std::string const&);
0093 
0094       void preModuleBeginStream(StreamContext const&, ModuleCallingContext const&);
0095       void postModuleBeginStream(StreamContext const&, ModuleCallingContext const&);
0096 
0097       void preModuleEndStream(StreamContext const&, ModuleCallingContext const&);
0098       void postModuleEndStream(StreamContext const&, ModuleCallingContext const&);
0099 
0100       void preBeginProcessBlock(GlobalContext const&);
0101       void postBeginProcessBlock(GlobalContext const&);
0102 
0103       void preAccessInputProcessBlock(GlobalContext const&);
0104       void postAccessInputProcessBlock(GlobalContext const&);
0105 
0106       void preEndProcessBlock(GlobalContext const&);
0107       void postEndProcessBlock(GlobalContext const&);
0108 
0109       void preWriteProcessBlock(GlobalContext const&);
0110       void postWriteProcessBlock(GlobalContext const&);
0111 
0112       void preGlobalBeginRun(GlobalContext const&);
0113       void postGlobalBeginRun(GlobalContext const&);
0114 
0115       void preGlobalEndRun(GlobalContext const&);
0116       void postGlobalEndRun(GlobalContext const&);
0117 
0118       void preGlobalWriteRun(GlobalContext const&);
0119       void postGlobalWriteRun(GlobalContext const&);
0120 
0121       void preStreamBeginRun(StreamContext const&);
0122       void postStreamBeginRun(StreamContext const&);
0123 
0124       void preStreamEndRun(StreamContext const&);
0125       void postStreamEndRun(StreamContext const&);
0126 
0127       void preGlobalBeginLumi(GlobalContext const&);
0128       void postGlobalBeginLumi(GlobalContext const&);
0129 
0130       void preGlobalEndLumi(GlobalContext const&);
0131       void postGlobalEndLumi(GlobalContext const&);
0132 
0133       void preGlobalWriteLumi(GlobalContext const&);
0134       void postGlobalWriteLumi(GlobalContext const&);
0135 
0136       void preStreamBeginLumi(StreamContext const&);
0137       void postStreamBeginLumi(StreamContext const&);
0138 
0139       void preStreamEndLumi(StreamContext const&);
0140       void postStreamEndLumi(StreamContext const&);
0141 
0142       void preEvent(StreamContext const&);
0143       void postEvent(StreamContext const&);
0144 
0145       void prePathEvent(StreamContext const&, PathContext const&);
0146       void postPathEvent(StreamContext const&, PathContext const&, HLTPathStatus const&);
0147 
0148       void preModuleConstruction(ModuleDescription const& md);
0149       void postModuleConstruction(ModuleDescription const& md);
0150 
0151       void preModuleDestruction(ModuleDescription const& md);
0152       void postModuleDestruction(ModuleDescription const& md);
0153 
0154       void preModuleBeginJob(ModuleDescription const& md);
0155       void postModuleBeginJob(ModuleDescription const& md);
0156 
0157       void preModuleEndJob(ModuleDescription const& md);
0158       void postModuleEndJob(ModuleDescription const& md);
0159 
0160       void preModuleEventPrefetching(StreamContext const&, ModuleCallingContext const&);
0161       void postModuleEventPrefetching(StreamContext const&, ModuleCallingContext const&);
0162       void preModuleEvent(StreamContext const&, ModuleCallingContext const&);
0163       void postModuleEvent(StreamContext const&, ModuleCallingContext const&);
0164       void preModuleEventAcquire(StreamContext const&, ModuleCallingContext const&);
0165       void postModuleEventAcquire(StreamContext const&, ModuleCallingContext const&);
0166       void preModuleEventDelayedGet(StreamContext const&, ModuleCallingContext const&);
0167       void postModuleEventDelayedGet(StreamContext const&, ModuleCallingContext const&);
0168       void preEventReadFromSource(StreamContext const&, ModuleCallingContext const&);
0169       void postEventReadFromSource(StreamContext const&, ModuleCallingContext const&);
0170       void preModuleTransformPrefetching(StreamContext const&, ModuleCallingContext const&);
0171       void postModuleTransformPrefetching(StreamContext const&, ModuleCallingContext const&);
0172       void preModuleTransform(StreamContext const&, ModuleCallingContext const&);
0173       void postModuleTransform(StreamContext const&, ModuleCallingContext const&);
0174       void preModuleTransformAcquiring(StreamContext const&, ModuleCallingContext const&);
0175       void postModuleTransformAcquiring(StreamContext const&, ModuleCallingContext const&);
0176 
0177       void preModuleStreamPrefetching(StreamContext const&, ModuleCallingContext const&);
0178       void postModuleStreamPrefetching(StreamContext const&, ModuleCallingContext const&);
0179 
0180       void preModuleStreamBeginRun(StreamContext const&, ModuleCallingContext const&);
0181       void postModuleStreamBeginRun(StreamContext const&, ModuleCallingContext const&);
0182       void preModuleStreamEndRun(StreamContext const&, ModuleCallingContext const&);
0183       void postModuleStreamEndRun(StreamContext const&, ModuleCallingContext const&);
0184 
0185       void preModuleStreamBeginLumi(StreamContext const&, ModuleCallingContext const&);
0186       void postModuleStreamBeginLumi(StreamContext const&, ModuleCallingContext const&);
0187       void preModuleStreamEndLumi(StreamContext const&, ModuleCallingContext const&);
0188       void postModuleStreamEndLumi(StreamContext const&, ModuleCallingContext const&);
0189 
0190       void preModuleBeginProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0191       void postModuleBeginProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0192       void preModuleAccessInputProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0193       void postModuleAccessInputProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0194       void preModuleEndProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0195       void postModuleEndProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0196 
0197       void preModuleGlobalPrefetching(GlobalContext const&, ModuleCallingContext const&);
0198       void postModuleGlobalPrefetching(GlobalContext const&, ModuleCallingContext const&);
0199 
0200       void preModuleGlobalBeginRun(GlobalContext const&, ModuleCallingContext const&);
0201       void postModuleGlobalBeginRun(GlobalContext const&, ModuleCallingContext const&);
0202       void preModuleGlobalEndRun(GlobalContext const&, ModuleCallingContext const&);
0203       void postModuleGlobalEndRun(GlobalContext const&, ModuleCallingContext const&);
0204 
0205       void preModuleGlobalBeginLumi(GlobalContext const&, ModuleCallingContext const&);
0206       void postModuleGlobalBeginLumi(GlobalContext const&, ModuleCallingContext const&);
0207       void preModuleGlobalEndLumi(GlobalContext const&, ModuleCallingContext const&);
0208       void postModuleGlobalEndLumi(GlobalContext const&, ModuleCallingContext const&);
0209 
0210       void preModuleWriteProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0211       void postModuleWriteProcessBlock(GlobalContext const&, ModuleCallingContext const&);
0212 
0213       void preModuleWriteRun(GlobalContext const&, ModuleCallingContext const&);
0214       void postModuleWriteRun(GlobalContext const&, ModuleCallingContext const&);
0215 
0216       void preModuleWriteLumi(GlobalContext const&, ModuleCallingContext const&);
0217       void postModuleWriteLumi(GlobalContext const&, ModuleCallingContext const&);
0218 
0219       void preSourceConstruction(ModuleDescription const& md);
0220       void postSourceConstruction(ModuleDescription const& md);
0221 
0222       void preESModulePrefetching(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0223       void postESModulePrefetching(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0224       void preESModule(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0225       void postESModule(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0226       void preESModuleAcquire(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0227       void postESModuleAcquire(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&);
0228 
0229     private:
0230       std::string indention_;
0231       std::set<std::string> dumpContextForLabels_;
0232       bool dumpNonModuleContext_;
0233       bool dumpPathsAndConsumes_;
0234       bool printTimestamps_;
0235       bool dumpEventSetupInfo_;
0236     };
0237   }  // namespace service
0238 }  // namespace edm
0239 
0240 using namespace edm::service;
0241 
0242 namespace {
0243 
0244   class TimeStamper {
0245   public:
0246     TimeStamper(bool enable) : enabled_(enable) {}
0247 
0248     friend std::ostream& operator<<(std::ostream& out, TimeStamper const& timestamp) {
0249       if (timestamp.enabled_)
0250         out << std::setprecision(2) << edm::TimeOfDay() << "  ";
0251       return out;
0252     }
0253 
0254   private:
0255     bool enabled_;
0256   };
0257 
0258 }  // namespace
0259 
0260 Tracer::Tracer(ParameterSet const& iPS, ActivityRegistry& iRegistry)
0261     : indention_(iPS.getUntrackedParameter<std::string>("indention")),
0262       dumpContextForLabels_(),
0263       dumpNonModuleContext_(iPS.getUntrackedParameter<bool>("dumpNonModuleContext")),
0264       dumpPathsAndConsumes_(iPS.getUntrackedParameter<bool>("dumpPathsAndConsumes")),
0265       printTimestamps_(iPS.getUntrackedParameter<bool>("printTimestamps")),
0266       dumpEventSetupInfo_(iPS.getUntrackedParameter<bool>("dumpEventSetupInfo")) {
0267   tracer::setupFile(iPS.getUntrackedParameter<std::string>("fileName"), iRegistry);
0268 
0269   if (not iPS.getUntrackedParameter<bool>("useMessageLogger"))
0270     return;
0271   for (std::string& label : iPS.getUntrackedParameter<std::vector<std::string>>("dumpContextForLabels"))
0272     dumpContextForLabels_.insert(std::move(label));
0273 
0274   iRegistry.watchPreallocate(this, &Tracer::preallocate);
0275 
0276   iRegistry.watchPreBeginJob(this, &Tracer::preBeginJob);
0277   iRegistry.watchPostBeginJob(this, &Tracer::postBeginJob);
0278   iRegistry.watchPreEndJob(this, &Tracer::preEndJob);
0279   iRegistry.watchPostEndJob(this, &Tracer::postEndJob);
0280 
0281   iRegistry.watchPreBeginStream(this, &Tracer::preBeginStream);
0282   iRegistry.watchPostBeginStream(this, &Tracer::postBeginStream);
0283   iRegistry.watchPreEndStream(this, &Tracer::preEndStream);
0284   iRegistry.watchPostEndStream(this, &Tracer::postEndStream);
0285 
0286   iRegistry.watchPreSourceEvent(this, &Tracer::preSourceEvent);
0287   iRegistry.watchPostSourceEvent(this, &Tracer::postSourceEvent);
0288 
0289   iRegistry.watchPreSourceLumi(this, &Tracer::preSourceLumi);
0290   iRegistry.watchPostSourceLumi(this, &Tracer::postSourceLumi);
0291 
0292   iRegistry.watchPreSourceRun(this, &Tracer::preSourceRun);
0293   iRegistry.watchPostSourceRun(this, &Tracer::postSourceRun);
0294 
0295   iRegistry.watchPreSourceProcessBlock(this, &Tracer::preSourceProcessBlock);
0296   iRegistry.watchPostSourceProcessBlock(this, &Tracer::postSourceProcessBlock);
0297 
0298   iRegistry.watchPreOpenFile(this, &Tracer::preOpenFile);
0299   iRegistry.watchPostOpenFile(this, &Tracer::postOpenFile);
0300 
0301   iRegistry.watchPreCloseFile(this, &Tracer::preCloseFile);
0302   iRegistry.watchPostCloseFile(this, &Tracer::postCloseFile);
0303 
0304   iRegistry.watchPreModuleBeginStream(this, &Tracer::preModuleBeginStream);
0305   iRegistry.watchPostModuleBeginStream(this, &Tracer::postModuleBeginStream);
0306 
0307   iRegistry.watchPreModuleEndStream(this, &Tracer::preModuleEndStream);
0308   iRegistry.watchPostModuleEndStream(this, &Tracer::postModuleEndStream);
0309 
0310   iRegistry.watchPreBeginProcessBlock(this, &Tracer::preBeginProcessBlock);
0311   iRegistry.watchPostBeginProcessBlock(this, &Tracer::postBeginProcessBlock);
0312 
0313   iRegistry.watchPreAccessInputProcessBlock(this, &Tracer::preAccessInputProcessBlock);
0314   iRegistry.watchPostAccessInputProcessBlock(this, &Tracer::postAccessInputProcessBlock);
0315 
0316   iRegistry.watchPreEndProcessBlock(this, &Tracer::preEndProcessBlock);
0317   iRegistry.watchPostEndProcessBlock(this, &Tracer::postEndProcessBlock);
0318 
0319   iRegistry.watchPreWriteProcessBlock(this, &Tracer::preWriteProcessBlock);
0320   iRegistry.watchPostWriteProcessBlock(this, &Tracer::postWriteProcessBlock);
0321 
0322   iRegistry.watchPreGlobalBeginRun(this, &Tracer::preGlobalBeginRun);
0323   iRegistry.watchPostGlobalBeginRun(this, &Tracer::postGlobalBeginRun);
0324 
0325   iRegistry.watchPreGlobalEndRun(this, &Tracer::preGlobalEndRun);
0326   iRegistry.watchPostGlobalEndRun(this, &Tracer::postGlobalEndRun);
0327 
0328   iRegistry.watchPreGlobalWriteRun(this, &Tracer::preGlobalWriteRun);
0329   iRegistry.watchPostGlobalWriteRun(this, &Tracer::postGlobalWriteRun);
0330 
0331   iRegistry.watchPreStreamBeginRun(this, &Tracer::preStreamBeginRun);
0332   iRegistry.watchPostStreamBeginRun(this, &Tracer::postStreamBeginRun);
0333 
0334   iRegistry.watchPreStreamEndRun(this, &Tracer::preStreamEndRun);
0335   iRegistry.watchPostStreamEndRun(this, &Tracer::postStreamEndRun);
0336 
0337   iRegistry.watchPreGlobalBeginLumi(this, &Tracer::preGlobalBeginLumi);
0338   iRegistry.watchPostGlobalBeginLumi(this, &Tracer::postGlobalBeginLumi);
0339 
0340   iRegistry.watchPreGlobalEndLumi(this, &Tracer::preGlobalEndLumi);
0341   iRegistry.watchPostGlobalEndLumi(this, &Tracer::postGlobalEndLumi);
0342 
0343   iRegistry.watchPreGlobalWriteLumi(this, &Tracer::preGlobalWriteLumi);
0344   iRegistry.watchPostGlobalWriteLumi(this, &Tracer::postGlobalWriteLumi);
0345 
0346   iRegistry.watchPreStreamBeginLumi(this, &Tracer::preStreamBeginLumi);
0347   iRegistry.watchPostStreamBeginLumi(this, &Tracer::postStreamBeginLumi);
0348 
0349   iRegistry.watchPreStreamEndLumi(this, &Tracer::preStreamEndLumi);
0350   iRegistry.watchPostStreamEndLumi(this, &Tracer::postStreamEndLumi);
0351 
0352   iRegistry.watchPreEvent(this, &Tracer::preEvent);
0353   iRegistry.watchPostEvent(this, &Tracer::postEvent);
0354 
0355   iRegistry.watchPrePathEvent(this, &Tracer::prePathEvent);
0356   iRegistry.watchPostPathEvent(this, &Tracer::postPathEvent);
0357 
0358   iRegistry.watchPreModuleConstruction(this, &Tracer::preModuleConstruction);
0359   iRegistry.watchPostModuleConstruction(this, &Tracer::postModuleConstruction);
0360 
0361   iRegistry.watchPreModuleDestruction(this, &Tracer::preModuleDestruction);
0362   iRegistry.watchPostModuleDestruction(this, &Tracer::postModuleDestruction);
0363 
0364   iRegistry.watchPreModuleBeginJob(this, &Tracer::preModuleBeginJob);
0365   iRegistry.watchPostModuleBeginJob(this, &Tracer::postModuleBeginJob);
0366 
0367   iRegistry.watchPreModuleEndJob(this, &Tracer::preModuleEndJob);
0368   iRegistry.watchPostModuleEndJob(this, &Tracer::postModuleEndJob);
0369 
0370   iRegistry.watchPreModuleEventPrefetching(this, &Tracer::preModuleEventPrefetching);
0371   iRegistry.watchPostModuleEventPrefetching(this, &Tracer::postModuleEventPrefetching);
0372   iRegistry.watchPreModuleEvent(this, &Tracer::preModuleEvent);
0373   iRegistry.watchPostModuleEvent(this, &Tracer::postModuleEvent);
0374   iRegistry.watchPreModuleEventAcquire(this, &Tracer::preModuleEventAcquire);
0375   iRegistry.watchPostModuleEventAcquire(this, &Tracer::postModuleEventAcquire);
0376   iRegistry.watchPreModuleEventDelayedGet(this, &Tracer::preModuleEventDelayedGet);
0377   iRegistry.watchPostModuleEventDelayedGet(this, &Tracer::postModuleEventDelayedGet);
0378   iRegistry.watchPreEventReadFromSource(this, &Tracer::preEventReadFromSource);
0379   iRegistry.watchPostEventReadFromSource(this, &Tracer::postEventReadFromSource);
0380   iRegistry.watchPreModuleTransformPrefetching(this, &Tracer::preModuleTransformPrefetching);
0381   iRegistry.watchPostModuleTransformPrefetching(this, &Tracer::postModuleTransformPrefetching);
0382   iRegistry.watchPreModuleTransform(this, &Tracer::preModuleTransform);
0383   iRegistry.watchPostModuleTransform(this, &Tracer::postModuleTransform);
0384   iRegistry.watchPreModuleTransformAcquiring(this, &Tracer::preModuleTransformAcquiring);
0385   iRegistry.watchPostModuleTransformAcquiring(this, &Tracer::postModuleTransformAcquiring);
0386 
0387   iRegistry.watchPreModuleStreamPrefetching(this, &Tracer::preModuleStreamPrefetching);
0388   iRegistry.watchPostModuleStreamPrefetching(this, &Tracer::postModuleStreamPrefetching);
0389 
0390   iRegistry.watchPreModuleStreamBeginRun(this, &Tracer::preModuleStreamBeginRun);
0391   iRegistry.watchPostModuleStreamBeginRun(this, &Tracer::postModuleStreamBeginRun);
0392   iRegistry.watchPreModuleStreamEndRun(this, &Tracer::preModuleStreamEndRun);
0393   iRegistry.watchPostModuleStreamEndRun(this, &Tracer::postModuleStreamEndRun);
0394 
0395   iRegistry.watchPreModuleStreamBeginLumi(this, &Tracer::preModuleStreamBeginLumi);
0396   iRegistry.watchPostModuleStreamBeginLumi(this, &Tracer::postModuleStreamBeginLumi);
0397   iRegistry.watchPreModuleStreamEndLumi(this, &Tracer::preModuleStreamEndLumi);
0398   iRegistry.watchPostModuleStreamEndLumi(this, &Tracer::postModuleStreamEndLumi);
0399 
0400   iRegistry.watchPreModuleBeginProcessBlock(this, &Tracer::preModuleBeginProcessBlock);
0401   iRegistry.watchPostModuleBeginProcessBlock(this, &Tracer::postModuleBeginProcessBlock);
0402   iRegistry.watchPreModuleAccessInputProcessBlock(this, &Tracer::preModuleAccessInputProcessBlock);
0403   iRegistry.watchPostModuleAccessInputProcessBlock(this, &Tracer::postModuleAccessInputProcessBlock);
0404   iRegistry.watchPreModuleEndProcessBlock(this, &Tracer::preModuleEndProcessBlock);
0405   iRegistry.watchPostModuleEndProcessBlock(this, &Tracer::postModuleEndProcessBlock);
0406 
0407   iRegistry.watchPreModuleGlobalPrefetching(this, &Tracer::preModuleGlobalPrefetching);
0408   iRegistry.watchPostModuleGlobalPrefetching(this, &Tracer::postModuleGlobalPrefetching);
0409 
0410   iRegistry.watchPreModuleGlobalBeginRun(this, &Tracer::preModuleGlobalBeginRun);
0411   iRegistry.watchPostModuleGlobalBeginRun(this, &Tracer::postModuleGlobalBeginRun);
0412   iRegistry.watchPreModuleGlobalEndRun(this, &Tracer::preModuleGlobalEndRun);
0413   iRegistry.watchPostModuleGlobalEndRun(this, &Tracer::postModuleGlobalEndRun);
0414 
0415   iRegistry.watchPreModuleGlobalBeginLumi(this, &Tracer::preModuleGlobalBeginLumi);
0416   iRegistry.watchPostModuleGlobalBeginLumi(this, &Tracer::postModuleGlobalBeginLumi);
0417   iRegistry.watchPreModuleGlobalEndLumi(this, &Tracer::preModuleGlobalEndLumi);
0418   iRegistry.watchPostModuleGlobalEndLumi(this, &Tracer::postModuleGlobalEndLumi);
0419 
0420   iRegistry.watchPreModuleWriteProcessBlock(this, &Tracer::preModuleWriteProcessBlock);
0421   iRegistry.watchPostModuleWriteProcessBlock(this, &Tracer::postModuleWriteProcessBlock);
0422 
0423   iRegistry.watchPreModuleWriteRun(this, &Tracer::preModuleWriteRun);
0424   iRegistry.watchPostModuleWriteRun(this, &Tracer::postModuleWriteRun);
0425 
0426   iRegistry.watchPreModuleWriteLumi(this, &Tracer::preModuleWriteLumi);
0427   iRegistry.watchPostModuleWriteLumi(this, &Tracer::postModuleWriteLumi);
0428 
0429   iRegistry.watchPreSourceConstruction(this, &Tracer::preSourceConstruction);
0430   iRegistry.watchPostSourceConstruction(this, &Tracer::postSourceConstruction);
0431 
0432   iRegistry.watchPreESModulePrefetching(this, &Tracer::preESModulePrefetching);
0433   iRegistry.watchPostESModulePrefetching(this, &Tracer::postESModulePrefetching);
0434   iRegistry.watchPreESModule(this, &Tracer::preESModule);
0435   iRegistry.watchPostESModule(this, &Tracer::postESModule);
0436   iRegistry.watchPreESModuleAcquire(this, &Tracer::preESModuleAcquire);
0437   iRegistry.watchPostESModuleAcquire(this, &Tracer::postESModuleAcquire);
0438 
0439   iRegistry.preSourceEarlyTerminationSignal_.connect([this](edm::TerminationOrigin iOrigin) {
0440     LogAbsolute out("Tracer");
0441     out << TimeStamper(printTimestamps_);
0442     out << indention_ << indention_ << " early termination before processing transition";
0443   });
0444   iRegistry.preStreamEarlyTerminationSignal_.connect(
0445       [this](edm::StreamContext const& iContext, edm::TerminationOrigin iOrigin) {
0446         LogAbsolute out("Tracer");
0447         out << TimeStamper(printTimestamps_);
0448         if (iContext.eventID().luminosityBlock() == 0) {
0449           out << indention_ << indention_ << " early termination of run: stream = " << iContext.streamID()
0450               << " run = " << iContext.eventID().run();
0451         } else {
0452           if (iContext.eventID().event() == 0) {
0453             out << indention_ << indention_ << " early termination of stream lumi: stream = " << iContext.streamID()
0454                 << " run = " << iContext.eventID().run() << " lumi = " << iContext.eventID().luminosityBlock();
0455           } else {
0456             out << indention_ << indention_ << " early termination of event: stream = " << iContext.streamID()
0457                 << " run = " << iContext.eventID().run() << " lumi = " << iContext.eventID().luminosityBlock()
0458                 << " event = " << iContext.eventID().event();
0459           }
0460         }
0461         out << " : time = " << iContext.timestamp().value();
0462       });
0463   iRegistry.preGlobalEarlyTerminationSignal_.connect(
0464       [this](edm::GlobalContext const& iContext, edm::TerminationOrigin iOrigin) {
0465         LogAbsolute out("Tracer");
0466         out << TimeStamper(printTimestamps_);
0467         if (iContext.luminosityBlockID().value() == 0) {
0468           out << indention_ << indention_ << " early termination of global run " << iContext.luminosityBlockID().run();
0469         } else {
0470           out << indention_ << indention_
0471               << " early termination of global lumi run = " << iContext.luminosityBlockID().run()
0472               << " lumi = " << iContext.luminosityBlockID().luminosityBlock();
0473         }
0474         out << " : time = " << iContext.timestamp().value();
0475       });
0476 
0477   iRegistry.esSyncIOVQueuingSignal_.connect([this](edm::IOVSyncValue const& iSync) {
0478     LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_
0479                           << " queuing: EventSetup synchronization " << iSync.eventID();
0480   });
0481   iRegistry.preESSyncIOVSignal_.connect([this](edm::IOVSyncValue const& iSync) {
0482     LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_
0483                           << " pre: EventSetup synchronizing " << iSync.eventID();
0484   });
0485   iRegistry.postESSyncIOVSignal_.connect([this](edm::IOVSyncValue const& iSync) {
0486     LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_
0487                           << " post: EventSetup synchronizing " << iSync.eventID();
0488   });
0489 }
0490 
0491 void Tracer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0492   edm::ParameterSetDescription desc;
0493   desc.addUntracked<std::string>("indention", "++")
0494       ->setComment("Prefix characters for output. The characters are repeated to form the indentation.");
0495   desc.addUntracked<std::vector<std::string>>("dumpContextForLabels", std::vector<std::string>{})
0496       ->setComment(
0497           "Prints context information to cout for the module transitions associated with these modules' labels");
0498   desc.addUntracked<bool>("dumpNonModuleContext", false)
0499       ->setComment("Prints context information to cout for the transitions not associated with any module label");
0500   desc.addUntracked<bool>("dumpPathsAndConsumes", false)
0501       ->setComment(
0502           "Prints information to cout about paths, endpaths, products consumed by modules and the dependencies between "
0503           "modules created by the products they consume");
0504   desc.addUntracked<bool>("printTimestamps", false)->setComment("Prints a time stamp for every transition");
0505   desc.addUntracked<bool>("dumpEventSetupInfo", false)
0506       ->setComment(
0507           "Prints info 3 times when an event setup cache is filled, before the lock, after the lock, and after "
0508           "filling");
0509   desc.addUntracked<bool>("useMessageLogger", true)
0510       ->setComment("If true, information is sent via the MessageLogger. Only use false if `fileName` is used.");
0511   desc.addUntracked<std::string>("fileName", "")
0512       ->setComment("If fileName is given, write a compact representation of tracer info to the file.");
0513   descriptions.add("Tracer", desc);
0514   descriptions.setComment(
0515       "This service prints each phase the framework is processing, e.g. constructing a module,running a module, etc.");
0516 }
0517 
0518 void Tracer::preallocate(service::SystemBounds const& bounds) {
0519   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_
0520                         << " preallocate: " << bounds.maxNumberOfConcurrentRuns() << " concurrent runs, "
0521                         << bounds.maxNumberOfConcurrentLuminosityBlocks() << " concurrent luminosity sections, "
0522                         << bounds.maxNumberOfStreams() << " streams";
0523 }
0524 
0525 void Tracer::preBeginJob(PathsAndConsumesOfModulesBase const& pathsAndConsumes, ProcessContext const& pc) {
0526   LogAbsolute out("Tracer");
0527   out << TimeStamper(printTimestamps_) << indention_ << " starting: begin job";
0528   if (dumpPathsAndConsumes_) {
0529     out << "\n"
0530         << "Process name = " << pc.processName() << "\n";
0531     out << "paths:\n";
0532     std::vector<std::string> const& paths = pathsAndConsumes.paths();
0533     for (auto const& path : paths) {
0534       out << "  " << path << "\n";
0535     }
0536     out << "end paths:\n";
0537     std::vector<std::string> const& endpaths = pathsAndConsumes.endPaths();
0538     for (auto const& endpath : endpaths) {
0539       out << "  " << endpath << "\n";
0540     }
0541     for (unsigned int j = 0; j < paths.size(); ++j) {
0542       std::vector<ModuleDescription const*> const& modulesOnPath = pathsAndConsumes.modulesOnPath(j);
0543       out << "modules on path " << paths.at(j) << ":\n";
0544       for (auto const& desc : modulesOnPath) {
0545         out << "  " << desc->moduleLabel() << "\n";
0546       }
0547     }
0548     for (unsigned int j = 0; j < endpaths.size(); ++j) {
0549       std::vector<ModuleDescription const*> const& modulesOnEndPath = pathsAndConsumes.modulesOnEndPath(j);
0550       out << "modules on end path " << endpaths.at(j) << ":\n";
0551       for (auto const& desc : modulesOnEndPath) {
0552         out << "  " << desc->moduleLabel() << "\n";
0553       }
0554     }
0555     std::vector<ModuleDescription const*> const& allModules = pathsAndConsumes.allModules();
0556     out << "All modules and modules in the current process whose products they consume:\n";
0557     out << "(This does not include modules from previous processes or the source)\n";
0558     out << "(Exclusively considers Event products, not Run, Lumi, or ProcessBlock products)\n";
0559     for (auto const& module : allModules) {
0560       out << "  " << module->moduleName() << "/\'" << module->moduleLabel() << "\'";
0561       unsigned int moduleID = module->id();
0562       if (pathsAndConsumes.moduleDescription(moduleID) != module) {
0563         throw cms::Exception("TestFailure") << "Tracer::preBeginJob, moduleDescription returns incorrect value";
0564       }
0565       std::vector<ModuleDescription const*> const& modulesWhoseProductsAreConsumedBy =
0566           pathsAndConsumes.modulesWhoseProductsAreConsumedBy(moduleID);
0567       if (!modulesWhoseProductsAreConsumedBy.empty()) {
0568         out << " consumes products from these modules:\n";
0569         for (auto const& producingModule : modulesWhoseProductsAreConsumedBy) {
0570           out << "    " << producingModule->moduleName() << "/\'" << producingModule->moduleLabel() << "\'\n";
0571         }
0572       } else {
0573         out << "\n";
0574       }
0575     }
0576     out << "All modules (listed by class and label) and all their consumed products.\n";
0577     out << "Consumed products are listed by type, label, instance, process.\n";
0578     out << "For products not in the event, \'processBlock\', \'run\' or \'lumi\' is added to indicate the TTree they "
0579            "are from.\n";
0580     out << "For products that are declared with mayConsume, \'may consume\' is added.\n";
0581     out << "For products consumed for Views, \'element type\' is added\n";
0582     out << "For products only read from previous processes, \'skip current process\' is added\n";
0583     for (auto const* module : allModules) {
0584       out << "  " << module->moduleName() << "/\'" << module->moduleLabel() << "\'";
0585       std::vector<ConsumesInfo> consumesInfo = pathsAndConsumes.consumesInfo(module->id());
0586       if (!consumesInfo.empty()) {
0587         out << " consumes:\n";
0588         for (auto const& info : consumesInfo) {
0589           out << "    " << info.type() << " \'" << info.label() << "\' \'" << info.instance();
0590           out << "\' \'" << info.process() << "\'";
0591           if (info.branchType() == InLumi) {
0592             out << ", lumi";
0593           } else if (info.branchType() == InRun) {
0594             out << ", run";
0595           } else if (info.branchType() == InProcess) {
0596             out << ", processBlock";
0597           }
0598           if (!info.alwaysGets()) {
0599             out << ", may consume";
0600           }
0601           if (info.kindOfType() == ELEMENT_TYPE) {
0602             out << ", element type";
0603           }
0604           if (info.skipCurrentProcess()) {
0605             out << ", skip current process";
0606           }
0607           out << "\n";
0608         }
0609       } else {
0610         out << "\n";
0611       }
0612     }
0613   }
0614 }
0615 
0616 void Tracer::postBeginJob() {
0617   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: begin job";
0618 }
0619 
0620 void Tracer::preEndJob() {
0621   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " starting: end job";
0622 }
0623 
0624 void Tracer::postEndJob() {
0625   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: end job";
0626 }
0627 
0628 void Tracer::preBeginStream(StreamContext const& sc) {
0629   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " starting: begin stream " << sc.streamID();
0630 }
0631 
0632 void Tracer::postBeginStream(StreamContext const& sc) {
0633   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: begin stream " << sc.streamID();
0634 }
0635 
0636 void Tracer::preEndStream(StreamContext const& sc) {
0637   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " starting: end stream " << sc.streamID();
0638 }
0639 
0640 void Tracer::postEndStream(StreamContext const& sc) {
0641   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: end stream " << sc.streamID();
0642 }
0643 
0644 void Tracer::preSourceEvent(StreamID sid) {
0645   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source event";
0646 }
0647 
0648 void Tracer::postSourceEvent(StreamID sid) {
0649   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source event";
0650 }
0651 
0652 void Tracer::preSourceLumi(LuminosityBlockIndex index) {
0653   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source lumi";
0654 }
0655 
0656 void Tracer::postSourceLumi(LuminosityBlockIndex index) {
0657   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source lumi";
0658 }
0659 
0660 void Tracer::preSourceRun(RunIndex index) {
0661   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " starting: source run";
0662 }
0663 
0664 void Tracer::postSourceRun(RunIndex index) {
0665   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_ << " finished: source run";
0666 }
0667 
0668 void Tracer::preSourceProcessBlock() {
0669   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_
0670                         << " starting: source process block";
0671 }
0672 
0673 void Tracer::postSourceProcessBlock(std::string const& processName) {
0674   LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << indention_
0675                         << " finished: source process block " << processName;
0676 }
0677 
0678 void Tracer::preOpenFile(std::string const& lfn) {
0679   LogAbsolute out("Tracer");
0680   out << TimeStamper(printTimestamps_);
0681   out << indention_ << indention_ << " starting: open input file: lfn = " << lfn;
0682 }
0683 
0684 void Tracer::postOpenFile(std::string const& lfn) {
0685   LogAbsolute out("Tracer");
0686   out << TimeStamper(printTimestamps_);
0687   out << indention_ << indention_ << " finished: open input file: lfn = " << lfn;
0688 }
0689 
0690 void Tracer::preCloseFile(std::string const& lfn) {
0691   LogAbsolute out("Tracer");
0692   out << TimeStamper(printTimestamps_);
0693   out << indention_ << indention_ << " starting: close input file: lfn = " << lfn;
0694 }
0695 void Tracer::postCloseFile(std::string const& lfn) {
0696   LogAbsolute out("Tracer");
0697   out << TimeStamper(printTimestamps_);
0698   out << indention_ << indention_ << " finished: close input file: lfn = " << lfn;
0699 }
0700 
0701 void Tracer::preModuleBeginStream(StreamContext const& sc, ModuleCallingContext const& mcc) {
0702   ModuleDescription const& desc = *mcc.moduleDescription();
0703   LogAbsolute out("Tracer");
0704   out << TimeStamper(printTimestamps_);
0705   out << indention_ << indention_ << " starting: begin stream for module: stream = " << sc.streamID() << " label = '"
0706       << desc.moduleLabel() << "' id = " << desc.id();
0707   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
0708     out << "\n" << sc;
0709     out << mcc;
0710   }
0711 }
0712 
0713 void Tracer::postModuleBeginStream(StreamContext const& sc, ModuleCallingContext const& mcc) {
0714   ModuleDescription const& desc = *mcc.moduleDescription();
0715   LogAbsolute out("Tracer");
0716   out << TimeStamper(printTimestamps_);
0717   out << indention_ << indention_ << " finished: begin stream for module: stream = " << sc.streamID() << " label = '"
0718       << desc.moduleLabel() << "' id = " << desc.id();
0719   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
0720     out << "\n" << sc;
0721     out << mcc;
0722   }
0723 }
0724 
0725 void Tracer::preModuleEndStream(StreamContext const& sc, ModuleCallingContext const& mcc) {
0726   ModuleDescription const& desc = *mcc.moduleDescription();
0727   LogAbsolute out("Tracer");
0728   out << TimeStamper(printTimestamps_);
0729   out << indention_ << indention_ << " starting: end stream for module: stream = " << sc.streamID() << " label = '"
0730       << desc.moduleLabel() << "' id = " << desc.id();
0731   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
0732     out << "\n" << sc;
0733     out << mcc;
0734   }
0735 }
0736 
0737 void Tracer::postModuleEndStream(StreamContext const& sc, ModuleCallingContext const& mcc) {
0738   ModuleDescription const& desc = *mcc.moduleDescription();
0739   LogAbsolute out("Tracer");
0740   out << TimeStamper(printTimestamps_);
0741   out << indention_ << indention_ << " finished: end stream for module: stream = " << sc.streamID() << " label = '"
0742       << desc.moduleLabel() << "' id = " << desc.id();
0743   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
0744     out << "\n" << sc;
0745     out << mcc;
0746   }
0747 }
0748 
0749 void Tracer::preBeginProcessBlock(GlobalContext const& gc) {
0750   LogAbsolute out("Tracer");
0751   out << indention_ << indention_ << " starting: begin process block";
0752   if (dumpNonModuleContext_) {
0753     out << "\n" << gc;
0754   }
0755 }
0756 
0757 void Tracer::postBeginProcessBlock(GlobalContext const& gc) {
0758   LogAbsolute out("Tracer");
0759   out << indention_ << indention_ << " finished: begin process block";
0760   if (dumpNonModuleContext_) {
0761     out << "\n" << gc;
0762   }
0763 }
0764 
0765 void Tracer::preAccessInputProcessBlock(GlobalContext const& gc) {
0766   LogAbsolute out("Tracer");
0767   out << indention_ << indention_ << " starting: access input process block";
0768   if (dumpNonModuleContext_) {
0769     out << "\n" << gc;
0770   }
0771 }
0772 
0773 void Tracer::postAccessInputProcessBlock(GlobalContext const& gc) {
0774   LogAbsolute out("Tracer");
0775   out << indention_ << indention_ << " finished: access input process block";
0776   if (dumpNonModuleContext_) {
0777     out << "\n" << gc;
0778   }
0779 }
0780 
0781 void Tracer::preEndProcessBlock(GlobalContext const& gc) {
0782   LogAbsolute out("Tracer");
0783   out << indention_ << indention_ << " starting: end process block";
0784   if (dumpNonModuleContext_) {
0785     out << "\n" << gc;
0786   }
0787 }
0788 
0789 void Tracer::postEndProcessBlock(GlobalContext const& gc) {
0790   LogAbsolute out("Tracer");
0791   out << indention_ << indention_ << " finished: end process block";
0792   if (dumpNonModuleContext_) {
0793     out << "\n" << gc;
0794   }
0795 }
0796 
0797 void Tracer::preWriteProcessBlock(GlobalContext const& gc) {
0798   LogAbsolute out("Tracer");
0799   out << indention_ << indention_ << " starting: write process block";
0800   if (dumpNonModuleContext_) {
0801     out << "\n" << gc;
0802   }
0803 }
0804 
0805 void Tracer::postWriteProcessBlock(GlobalContext const& gc) {
0806   LogAbsolute out("Tracer");
0807   out << indention_ << indention_ << " finished: write process block";
0808   if (dumpNonModuleContext_) {
0809     out << "\n" << gc;
0810   }
0811 }
0812 
0813 void Tracer::preGlobalBeginRun(GlobalContext const& gc) {
0814   LogAbsolute out("Tracer");
0815   out << TimeStamper(printTimestamps_);
0816   out << indention_ << indention_ << " starting: global begin run " << gc.luminosityBlockID().run()
0817       << " : time = " << gc.timestamp().value();
0818   if (dumpNonModuleContext_) {
0819     out << "\n" << gc;
0820   }
0821 }
0822 
0823 void Tracer::postGlobalBeginRun(GlobalContext const& gc) {
0824   LogAbsolute out("Tracer");
0825   out << TimeStamper(printTimestamps_);
0826   out << indention_ << indention_ << " finished: global begin run " << gc.luminosityBlockID().run()
0827       << " : time = " << gc.timestamp().value();
0828   if (dumpNonModuleContext_) {
0829     out << "\n" << gc;
0830   }
0831 }
0832 
0833 void Tracer::preGlobalEndRun(GlobalContext const& gc) {
0834   LogAbsolute out("Tracer");
0835   out << TimeStamper(printTimestamps_);
0836   out << indention_ << indention_ << " starting: global end run " << gc.luminosityBlockID().run()
0837       << " : time = " << gc.timestamp().value();
0838   if (dumpNonModuleContext_) {
0839     out << "\n" << gc;
0840   }
0841 }
0842 
0843 void Tracer::postGlobalEndRun(GlobalContext const& gc) {
0844   LogAbsolute out("Tracer");
0845   out << TimeStamper(printTimestamps_);
0846   out << indention_ << indention_ << " finished: global end run " << gc.luminosityBlockID().run()
0847       << " : time = " << gc.timestamp().value();
0848   if (dumpNonModuleContext_) {
0849     out << "\n" << gc;
0850   }
0851 }
0852 
0853 void Tracer::preGlobalWriteRun(GlobalContext const& gc) {
0854   LogAbsolute out("Tracer");
0855   out << TimeStamper(printTimestamps_);
0856   out << indention_ << indention_ << " starting: global write run " << gc.luminosityBlockID().run()
0857       << " : time = " << gc.timestamp().value();
0858   if (dumpNonModuleContext_) {
0859     out << "\n" << gc;
0860   }
0861 }
0862 
0863 void Tracer::postGlobalWriteRun(GlobalContext const& gc) {
0864   LogAbsolute out("Tracer");
0865   out << TimeStamper(printTimestamps_);
0866   out << indention_ << indention_ << " finished: global write run " << gc.luminosityBlockID().run()
0867       << " : time = " << gc.timestamp().value();
0868   if (dumpNonModuleContext_) {
0869     out << "\n" << gc;
0870   }
0871 }
0872 
0873 void Tracer::preStreamBeginRun(StreamContext const& sc) {
0874   LogAbsolute out("Tracer");
0875   out << TimeStamper(printTimestamps_);
0876   out << indention_ << indention_ << " starting: begin run: stream = " << sc.streamID()
0877       << " run = " << sc.eventID().run() << " time = " << sc.timestamp().value();
0878   if (dumpNonModuleContext_) {
0879     out << "\n" << sc;
0880   }
0881 }
0882 
0883 void Tracer::postStreamBeginRun(StreamContext const& sc) {
0884   LogAbsolute out("Tracer");
0885   out << TimeStamper(printTimestamps_);
0886   out << indention_ << indention_ << " finished: begin run: stream = " << sc.streamID()
0887       << " run = " << sc.eventID().run() << " time = " << sc.timestamp().value();
0888   if (dumpNonModuleContext_) {
0889     out << "\n" << sc;
0890   }
0891 }
0892 
0893 void Tracer::preStreamEndRun(StreamContext const& sc) {
0894   LogAbsolute out("Tracer");
0895   out << TimeStamper(printTimestamps_);
0896   out << indention_ << indention_ << " starting: end run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
0897       << " time = " << sc.timestamp().value();
0898   if (dumpNonModuleContext_) {
0899     out << "\n" << sc;
0900   }
0901 }
0902 
0903 void Tracer::postStreamEndRun(StreamContext const& sc) {
0904   LogAbsolute out("Tracer");
0905   out << TimeStamper(printTimestamps_);
0906   out << indention_ << indention_ << " finished: end run: stream = " << sc.streamID() << " run = " << sc.eventID().run()
0907       << " time = " << sc.timestamp().value();
0908   if (dumpNonModuleContext_) {
0909     out << "\n" << sc;
0910   }
0911 }
0912 
0913 void Tracer::preGlobalBeginLumi(GlobalContext const& gc) {
0914   LogAbsolute out("Tracer");
0915   out << TimeStamper(printTimestamps_);
0916   out << indention_ << indention_ << " starting: global begin lumi: run = " << gc.luminosityBlockID().run()
0917       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0918   if (dumpNonModuleContext_) {
0919     out << "\n" << gc;
0920   }
0921 }
0922 
0923 void Tracer::postGlobalBeginLumi(GlobalContext const& gc) {
0924   LogAbsolute out("Tracer");
0925   out << TimeStamper(printTimestamps_);
0926   out << indention_ << indention_ << " finished: global begin lumi: run = " << gc.luminosityBlockID().run()
0927       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0928   if (dumpNonModuleContext_) {
0929     out << "\n" << gc;
0930   }
0931 }
0932 
0933 void Tracer::preGlobalEndLumi(GlobalContext const& gc) {
0934   LogAbsolute out("Tracer");
0935   out << TimeStamper(printTimestamps_);
0936   out << indention_ << indention_ << " starting: global end lumi: run = " << gc.luminosityBlockID().run()
0937       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0938   if (dumpNonModuleContext_) {
0939     out << "\n" << gc;
0940   }
0941 }
0942 
0943 void Tracer::postGlobalEndLumi(GlobalContext const& gc) {
0944   LogAbsolute out("Tracer");
0945   out << TimeStamper(printTimestamps_);
0946   out << indention_ << indention_ << " finished: global end lumi: run = " << gc.luminosityBlockID().run()
0947       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0948   if (dumpNonModuleContext_) {
0949     out << "\n" << gc;
0950   }
0951 }
0952 
0953 void Tracer::preGlobalWriteLumi(GlobalContext const& gc) {
0954   LogAbsolute out("Tracer");
0955   out << TimeStamper(printTimestamps_);
0956   out << indention_ << indention_ << " starting: global write lumi: run = " << gc.luminosityBlockID().run()
0957       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0958   if (dumpNonModuleContext_) {
0959     out << "\n" << gc;
0960   }
0961 }
0962 
0963 void Tracer::postGlobalWriteLumi(GlobalContext const& gc) {
0964   LogAbsolute out("Tracer");
0965   out << TimeStamper(printTimestamps_);
0966   out << indention_ << indention_ << " finished: global write lumi: run = " << gc.luminosityBlockID().run()
0967       << " lumi = " << gc.luminosityBlockID().luminosityBlock() << " time = " << gc.timestamp().value();
0968   if (dumpNonModuleContext_) {
0969     out << "\n" << gc;
0970   }
0971 }
0972 
0973 void Tracer::preStreamBeginLumi(StreamContext const& sc) {
0974   LogAbsolute out("Tracer");
0975   out << TimeStamper(printTimestamps_);
0976   out << indention_ << indention_ << " starting: begin lumi: stream = " << sc.streamID()
0977       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
0978       << " time = " << sc.timestamp().value();
0979   if (dumpNonModuleContext_) {
0980     out << "\n" << sc;
0981   }
0982 }
0983 
0984 void Tracer::postStreamBeginLumi(StreamContext const& sc) {
0985   LogAbsolute out("Tracer");
0986   out << TimeStamper(printTimestamps_);
0987   out << indention_ << indention_ << " finished: begin lumi: stream = " << sc.streamID()
0988       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
0989       << " time = " << sc.timestamp().value();
0990   if (dumpNonModuleContext_) {
0991     out << "\n" << sc;
0992   }
0993 }
0994 
0995 void Tracer::preStreamEndLumi(StreamContext const& sc) {
0996   LogAbsolute out("Tracer");
0997   out << TimeStamper(printTimestamps_);
0998   out << indention_ << indention_ << " starting: end lumi: stream = " << sc.streamID()
0999       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
1000       << " time = " << sc.timestamp().value();
1001   if (dumpNonModuleContext_) {
1002     out << "\n" << sc;
1003   }
1004 }
1005 
1006 void Tracer::postStreamEndLumi(StreamContext const& sc) {
1007   LogAbsolute out("Tracer");
1008   out << TimeStamper(printTimestamps_);
1009   out << indention_ << indention_ << " finished: end lumi: stream = " << sc.streamID()
1010       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
1011       << " time = " << sc.timestamp().value();
1012   if (dumpNonModuleContext_) {
1013     out << "\n" << sc;
1014   }
1015 }
1016 
1017 void Tracer::preEvent(StreamContext const& sc) {
1018   LogAbsolute out("Tracer");
1019   out << TimeStamper(printTimestamps_);
1020   out << indention_ << indention_ << " starting: processing event : stream = " << sc.streamID()
1021       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
1022       << " event = " << sc.eventID().event() << " time = " << sc.timestamp().value();
1023   if (dumpNonModuleContext_) {
1024     out << "\n" << sc;
1025   }
1026 }
1027 
1028 void Tracer::postEvent(StreamContext const& sc) {
1029   LogAbsolute out("Tracer");
1030   out << TimeStamper(printTimestamps_);
1031   out << indention_ << indention_ << " finished: processing event : stream = " << sc.streamID()
1032       << " run = " << sc.eventID().run() << " lumi = " << sc.eventID().luminosityBlock()
1033       << " event = " << sc.eventID().event() << " time = " << sc.timestamp().value();
1034   if (dumpNonModuleContext_) {
1035     out << "\n" << sc;
1036   }
1037 }
1038 
1039 void Tracer::prePathEvent(StreamContext const& sc, PathContext const& pc) {
1040   LogAbsolute out("Tracer");
1041   out << TimeStamper(printTimestamps_);
1042   out << indention_ << indention_ << indention_ << " starting: processing path '" << pc.pathName()
1043       << "' : stream = " << sc.streamID();
1044   if (dumpNonModuleContext_) {
1045     out << "\n" << sc;
1046     out << pc;
1047   }
1048 }
1049 
1050 void Tracer::postPathEvent(StreamContext const& sc, PathContext const& pc, HLTPathStatus const& hlts) {
1051   LogAbsolute out("Tracer");
1052   out << TimeStamper(printTimestamps_);
1053   out << indention_ << indention_ << indention_ << " finished: processing path '" << pc.pathName()
1054       << "' : stream = " << sc.streamID();
1055   if (dumpNonModuleContext_) {
1056     out << "\n" << sc;
1057     out << pc;
1058   }
1059 }
1060 
1061 void Tracer::preModuleConstruction(ModuleDescription const& desc) {
1062   LogAbsolute out("Tracer");
1063   out << TimeStamper(printTimestamps_);
1064   out << indention_ << indention_ << " starting: constructing module with label '" << desc.moduleLabel()
1065       << "' id = " << desc.id();
1066   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1067     out << "\n" << desc;
1068   }
1069 }
1070 
1071 void Tracer::postModuleConstruction(ModuleDescription const& desc) {
1072   LogAbsolute out("Tracer");
1073   out << TimeStamper(printTimestamps_);
1074   out << indention_ << indention_ << " finished: constructing module with label '" << desc.moduleLabel()
1075       << "' id = " << desc.id();
1076   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1077     out << "\n" << desc;
1078   }
1079 }
1080 
1081 void Tracer::preModuleDestruction(ModuleDescription const& desc) {
1082   LogAbsolute out("Tracer");
1083   out << TimeStamper(printTimestamps_);
1084   out << indention_ << indention_ << " starting: destructing module with label '" << desc.moduleLabel()
1085       << "' id = " << desc.id();
1086   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1087     out << "\n" << desc;
1088   }
1089 }
1090 
1091 void Tracer::postModuleDestruction(ModuleDescription const& desc) {
1092   LogAbsolute out("Tracer");
1093   out << TimeStamper(printTimestamps_);
1094   out << indention_ << indention_ << " finished: destructing module with label '" << desc.moduleLabel()
1095       << "' id = " << desc.id();
1096   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1097     out << "\n" << desc;
1098   }
1099 }
1100 
1101 void Tracer::preModuleBeginJob(ModuleDescription const& desc) {
1102   LogAbsolute out("Tracer");
1103   out << TimeStamper(printTimestamps_);
1104   out << indention_ << indention_;
1105   out << " starting: begin job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
1106   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1107     out << "\n" << desc;
1108   }
1109 }
1110 
1111 void Tracer::postModuleBeginJob(ModuleDescription const& desc) {
1112   LogAbsolute out("Tracer");
1113   out << TimeStamper(printTimestamps_);
1114   out << indention_ << indention_;
1115   out << " finished: begin job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
1116   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1117     out << "\n" << desc;
1118   }
1119 }
1120 
1121 void Tracer::preModuleEndJob(ModuleDescription const& desc) {
1122   LogAbsolute out("Tracer");
1123   out << TimeStamper(printTimestamps_);
1124   out << indention_ << indention_;
1125   out << " starting: end job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
1126   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1127     out << "\n" << desc;
1128   }
1129 }
1130 
1131 void Tracer::postModuleEndJob(ModuleDescription const& desc) {
1132   LogAbsolute out("Tracer");
1133   out << TimeStamper(printTimestamps_);
1134   out << indention_ << indention_;
1135   out << " finished: end job for module with label '" << desc.moduleLabel() << "' id = " << desc.id();
1136   if (dumpContextForLabels_.find(desc.moduleLabel()) != dumpContextForLabels_.end()) {
1137     out << "\n" << desc;
1138   }
1139 }
1140 
1141 void Tracer::preModuleEventPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1142   LogAbsolute out("Tracer");
1143   out << TimeStamper(printTimestamps_);
1144   unsigned int nIndents = mcc.depth() + 4;
1145   for (unsigned int i = 0; i < nIndents; ++i) {
1146     out << indention_;
1147   }
1148   out << " starting: prefetching before processing event for module: stream = " << sc.streamID() << " label = '"
1149       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1150   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1151     out << "\n" << sc;
1152     out << mcc;
1153   }
1154 }
1155 
1156 void Tracer::postModuleEventPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1157   LogAbsolute out("Tracer");
1158   out << TimeStamper(printTimestamps_);
1159   unsigned int nIndents = mcc.depth() + 4;
1160   for (unsigned int i = 0; i < nIndents; ++i) {
1161     out << indention_;
1162   }
1163   out << " finished: prefetching before processing event for module: stream = " << sc.streamID() << " label = '"
1164       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1165   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1166     out << "\n" << sc;
1167     out << mcc;
1168   }
1169 }
1170 
1171 void Tracer::preModuleEvent(StreamContext const& sc, ModuleCallingContext const& mcc) {
1172   LogAbsolute out("Tracer");
1173   out << TimeStamper(printTimestamps_);
1174   unsigned int nIndents = mcc.depth() + 4;
1175   for (unsigned int i = 0; i < nIndents; ++i) {
1176     out << indention_;
1177   }
1178   out << " starting: processing event for module: stream = " << sc.streamID() << " label = '"
1179       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1180   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1181     out << "\n" << sc;
1182     out << mcc;
1183   }
1184 }
1185 
1186 void Tracer::postModuleEvent(StreamContext const& sc, ModuleCallingContext const& mcc) {
1187   LogAbsolute out("Tracer");
1188   out << TimeStamper(printTimestamps_);
1189   unsigned int nIndents = mcc.depth() + 4;
1190   for (unsigned int i = 0; i < nIndents; ++i) {
1191     out << indention_;
1192   }
1193   out << " finished: processing event for module: stream = " << sc.streamID() << " label = '"
1194       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1195   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1196     out << "\n" << sc;
1197     out << mcc;
1198   }
1199 }
1200 
1201 void Tracer::preModuleEventAcquire(StreamContext const& sc, ModuleCallingContext const& mcc) {
1202   LogAbsolute out("Tracer");
1203   out << TimeStamper(printTimestamps_);
1204   unsigned int nIndents = mcc.depth() + 4;
1205   for (unsigned int i = 0; i < nIndents; ++i) {
1206     out << indention_;
1207   }
1208   out << " starting: processing event acquire for module: stream = " << sc.streamID() << " label = '"
1209       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1210 }
1211 
1212 void Tracer::postModuleEventAcquire(StreamContext const& sc, ModuleCallingContext const& mcc) {
1213   LogAbsolute out("Tracer");
1214   out << TimeStamper(printTimestamps_);
1215   unsigned int nIndents = mcc.depth() + 4;
1216   for (unsigned int i = 0; i < nIndents; ++i) {
1217     out << indention_;
1218   }
1219   out << " finished: processing event acquire for module: stream = " << sc.streamID() << " label = '"
1220       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1221 }
1222 
1223 void Tracer::preModuleEventDelayedGet(StreamContext const& sc, ModuleCallingContext const& mcc) {
1224   LogAbsolute out("Tracer");
1225   out << TimeStamper(printTimestamps_);
1226   unsigned int nIndents = mcc.depth() + 4;
1227   for (unsigned int i = 0; i < nIndents; ++i) {
1228     out << indention_;
1229   }
1230   out << " starting: delayed processing event for module: stream = " << sc.streamID() << " label = '"
1231       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1232   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1233     out << "\n" << sc;
1234     out << mcc;
1235   }
1236 }
1237 
1238 void Tracer::postModuleEventDelayedGet(StreamContext const& sc, ModuleCallingContext const& mcc) {
1239   LogAbsolute out("Tracer");
1240   out << TimeStamper(printTimestamps_);
1241   unsigned int nIndents = mcc.depth() + 4;
1242   for (unsigned int i = 0; i < nIndents; ++i) {
1243     out << indention_;
1244   }
1245   out << " finished: delayed processing event for module: stream = " << sc.streamID() << " label = '"
1246       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1247   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1248     out << "\n" << sc;
1249     out << mcc;
1250   }
1251 }
1252 
1253 void Tracer::preEventReadFromSource(StreamContext const& sc, ModuleCallingContext const& mcc) {
1254   LogAbsolute out("Tracer");
1255   out << TimeStamper(printTimestamps_);
1256   unsigned int nIndents = mcc.depth() + 5;
1257   for (unsigned int i = 0; i < nIndents; ++i) {
1258     out << indention_;
1259   }
1260   out << " starting: event delayed read from source: stream = " << sc.streamID() << " label = '"
1261       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1262 }
1263 
1264 void Tracer::postEventReadFromSource(StreamContext const& sc, ModuleCallingContext const& mcc) {
1265   LogAbsolute out("Tracer");
1266   out << TimeStamper(printTimestamps_);
1267   unsigned int nIndents = mcc.depth() + 5;
1268   for (unsigned int i = 0; i < nIndents; ++i) {
1269     out << indention_;
1270   }
1271   out << " finished: event delayed read from source: stream = " << sc.streamID() << " label = '"
1272       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1273 }
1274 
1275 void Tracer::preModuleTransformPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1276   LogAbsolute out("Tracer");
1277   out << TimeStamper(printTimestamps_);
1278   unsigned int nIndents = mcc.depth() + 4;
1279   for (unsigned int i = 0; i < nIndents; ++i) {
1280     out << indention_;
1281   }
1282   out << " starting: prefetching before transform in event for module: stream = " << sc.streamID() << " label = '"
1283       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1284       << " callID = " << mcc.callID();
1285   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1286     out << "\n" << sc;
1287     out << mcc;
1288   }
1289 }
1290 
1291 void Tracer::postModuleTransformPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1292   LogAbsolute out("Tracer");
1293   out << TimeStamper(printTimestamps_);
1294   unsigned int nIndents = mcc.depth() + 4;
1295   for (unsigned int i = 0; i < nIndents; ++i) {
1296     out << indention_;
1297   }
1298   out << " finished: prefetching before transform in event for module: stream = " << sc.streamID() << " label = '"
1299       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1300       << " callID = " << mcc.callID();
1301   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1302     out << "\n" << sc;
1303     out << mcc;
1304   }
1305 }
1306 
1307 void Tracer::preModuleTransform(StreamContext const& sc, ModuleCallingContext const& mcc) {
1308   LogAbsolute out("Tracer");
1309   out << TimeStamper(printTimestamps_);
1310   unsigned int nIndents = mcc.depth() + 4;
1311   for (unsigned int i = 0; i < nIndents; ++i) {
1312     out << indention_;
1313   }
1314   out << " starting: transform in event for module: stream = " << sc.streamID() << " label = '"
1315       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1316       << " callID = " << mcc.callID();
1317   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1318     out << "\n" << sc;
1319     out << mcc;
1320   }
1321 }
1322 
1323 void Tracer::postModuleTransform(StreamContext const& sc, ModuleCallingContext const& mcc) {
1324   LogAbsolute out("Tracer");
1325   out << TimeStamper(printTimestamps_);
1326   unsigned int nIndents = mcc.depth() + 4;
1327   for (unsigned int i = 0; i < nIndents; ++i) {
1328     out << indention_;
1329   }
1330   out << " finished: transform in event for module: stream = " << sc.streamID() << " label = '"
1331       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1332       << " callID = " << mcc.callID();
1333   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1334     out << "\n" << sc;
1335     out << mcc;
1336   }
1337 }
1338 
1339 void Tracer::preModuleTransformAcquiring(StreamContext const& sc, ModuleCallingContext const& mcc) {
1340   LogAbsolute out("Tracer");
1341   out << TimeStamper(printTimestamps_);
1342   unsigned int nIndents = mcc.depth() + 4;
1343   for (unsigned int i = 0; i < nIndents; ++i) {
1344     out << indention_;
1345   }
1346   out << " starting: acquiring before transform in event for module: stream = " << sc.streamID() << " label = '"
1347       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1348       << " callID = " << mcc.callID();
1349 }
1350 
1351 void Tracer::postModuleTransformAcquiring(StreamContext const& sc, ModuleCallingContext const& mcc) {
1352   LogAbsolute out("Tracer");
1353   out << TimeStamper(printTimestamps_);
1354   unsigned int nIndents = mcc.depth() + 4;
1355   for (unsigned int i = 0; i < nIndents; ++i) {
1356     out << indention_;
1357   }
1358   out << " finished: acquiring before transform in event acquire for module: stream = " << sc.streamID() << " label = '"
1359       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id()
1360       << " callID = " << mcc.callID();
1361 }
1362 void Tracer::preModuleStreamPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1363   LogAbsolute out("Tracer");
1364   out << TimeStamper(printTimestamps_);
1365   unsigned int nIndents = mcc.depth() + 4;
1366   for (unsigned int i = 0; i < nIndents; ++i) {
1367     out << indention_;
1368   }
1369   out << " starting: prefetching before processing " << transitionName(sc.transition())
1370       << " for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel()
1371       << "' id = " << mcc.moduleDescription()->id();
1372   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1373     out << "\n" << sc;
1374     out << mcc;
1375   }
1376 }
1377 
1378 void Tracer::postModuleStreamPrefetching(StreamContext const& sc, ModuleCallingContext const& mcc) {
1379   LogAbsolute out("Tracer");
1380   out << TimeStamper(printTimestamps_);
1381   unsigned int nIndents = mcc.depth() + 4;
1382   for (unsigned int i = 0; i < nIndents; ++i) {
1383     out << indention_;
1384   }
1385   out << " finished: prefetching before processing " << transitionName(sc.transition())
1386       << " for module: stream = " << sc.streamID() << " label = '" << mcc.moduleDescription()->moduleLabel()
1387       << "' id = " << mcc.moduleDescription()->id();
1388   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1389     out << "\n" << sc;
1390     out << mcc;
1391   }
1392 }
1393 
1394 void Tracer::preModuleStreamBeginRun(StreamContext const& sc, ModuleCallingContext const& mcc) {
1395   LogAbsolute out("Tracer");
1396   out << TimeStamper(printTimestamps_);
1397   unsigned int nIndents = mcc.depth() + 3;
1398   for (unsigned int i = 0; i < nIndents; ++i) {
1399     out << indention_;
1400   }
1401   out << " starting: begin run for module: stream = " << sc.streamID() << " label = '"
1402       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1403   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1404     out << "\n" << sc;
1405     out << mcc;
1406   }
1407 }
1408 
1409 void Tracer::postModuleStreamBeginRun(StreamContext const& sc, ModuleCallingContext const& mcc) {
1410   LogAbsolute out("Tracer");
1411   out << TimeStamper(printTimestamps_);
1412   unsigned int nIndents = mcc.depth() + 3;
1413   for (unsigned int i = 0; i < nIndents; ++i) {
1414     out << indention_;
1415   }
1416   out << " finished: begin run for module: stream = " << sc.streamID() << " label = '"
1417       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1418   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1419     out << "\n" << sc;
1420     out << mcc;
1421   }
1422 }
1423 
1424 void Tracer::preModuleStreamEndRun(StreamContext const& sc, ModuleCallingContext const& mcc) {
1425   LogAbsolute out("Tracer");
1426   out << TimeStamper(printTimestamps_);
1427   unsigned int nIndents = mcc.depth() + 3;
1428   for (unsigned int i = 0; i < nIndents; ++i) {
1429     out << indention_;
1430   }
1431   out << " starting: end run for module: stream = " << sc.streamID() << " label = '"
1432       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1433   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1434     out << "\n" << sc;
1435     out << mcc;
1436   }
1437 }
1438 
1439 void Tracer::postModuleStreamEndRun(StreamContext const& sc, ModuleCallingContext const& mcc) {
1440   LogAbsolute out("Tracer");
1441   out << TimeStamper(printTimestamps_);
1442   unsigned int nIndents = mcc.depth() + 3;
1443   for (unsigned int i = 0; i < nIndents; ++i) {
1444     out << indention_;
1445   }
1446   out << " finished: end run for module: stream = " << sc.streamID() << " label = '"
1447       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1448   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1449     out << "\n" << sc;
1450     out << mcc;
1451   }
1452 }
1453 
1454 void Tracer::preModuleStreamBeginLumi(StreamContext const& sc, ModuleCallingContext const& mcc) {
1455   LogAbsolute out("Tracer");
1456   out << TimeStamper(printTimestamps_);
1457   unsigned int nIndents = mcc.depth() + 3;
1458   for (unsigned int i = 0; i < nIndents; ++i) {
1459     out << indention_;
1460   }
1461   out << " starting: begin lumi for module: stream = " << sc.streamID() << " label = '"
1462       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1463   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1464     out << "\n" << sc;
1465     out << mcc;
1466   }
1467 }
1468 
1469 void Tracer::postModuleStreamBeginLumi(StreamContext const& sc, ModuleCallingContext const& mcc) {
1470   LogAbsolute out("Tracer");
1471   out << TimeStamper(printTimestamps_);
1472   unsigned int nIndents = mcc.depth() + 3;
1473   for (unsigned int i = 0; i < nIndents; ++i) {
1474     out << indention_;
1475   }
1476   out << " finished: begin lumi for module: stream = " << sc.streamID() << " label = '"
1477       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1478   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1479     out << "\n" << sc;
1480     out << mcc;
1481   }
1482 }
1483 
1484 void Tracer::preModuleStreamEndLumi(StreamContext const& sc, ModuleCallingContext const& mcc) {
1485   LogAbsolute out("Tracer");
1486   out << TimeStamper(printTimestamps_);
1487   unsigned int nIndents = mcc.depth() + 3;
1488   for (unsigned int i = 0; i < nIndents; ++i) {
1489     out << indention_;
1490   }
1491   out << " starting: end lumi for module: stream = " << sc.streamID() << " label = '"
1492       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1493   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1494     out << "\n" << sc;
1495     out << mcc;
1496   }
1497 }
1498 
1499 void Tracer::postModuleStreamEndLumi(StreamContext const& sc, ModuleCallingContext const& mcc) {
1500   LogAbsolute out("Tracer");
1501   out << TimeStamper(printTimestamps_);
1502   unsigned int nIndents = mcc.depth() + 3;
1503   for (unsigned int i = 0; i < nIndents; ++i) {
1504     out << indention_;
1505   }
1506   out << " finished: end lumi for module: stream = " << sc.streamID() << " label = '"
1507       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1508   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1509     out << "\n" << sc;
1510     out << mcc;
1511   }
1512 }
1513 
1514 void Tracer::preModuleGlobalPrefetching(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1515   LogAbsolute out("Tracer");
1516   out << TimeStamper(printTimestamps_);
1517   unsigned int nIndents = mcc.depth() + 4;
1518   for (unsigned int i = 0; i < nIndents; ++i) {
1519     out << indention_;
1520   }
1521   out << " starting: prefetching before processing " << transitionName(gc.transition()) << " for module: label = '"
1522       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1523   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1524     out << "\n" << gc;
1525     out << mcc;
1526   }
1527 }
1528 
1529 void Tracer::postModuleGlobalPrefetching(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1530   LogAbsolute out("Tracer");
1531   out << TimeStamper(printTimestamps_);
1532   unsigned int nIndents = mcc.depth() + 4;
1533   for (unsigned int i = 0; i < nIndents; ++i) {
1534     out << indention_;
1535   }
1536   out << " finished: prefetching before processing " << transitionName(gc.transition()) << " for module: label = '"
1537       << mcc.moduleDescription()->moduleLabel() << "' id = " << mcc.moduleDescription()->id();
1538   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1539     out << "\n" << gc;
1540     out << mcc;
1541   }
1542 }
1543 
1544 void Tracer::preModuleBeginProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1545   LogAbsolute out("Tracer");
1546   unsigned int nIndents = mcc.depth() + 3;
1547   for (unsigned int i = 0; i < nIndents; ++i) {
1548     out << indention_;
1549   }
1550   out << " starting: begin process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1551       << "' id = " << mcc.moduleDescription()->id();
1552   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1553     out << "\n" << gc;
1554     out << mcc;
1555   }
1556 }
1557 
1558 void Tracer::postModuleBeginProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1559   LogAbsolute out("Tracer");
1560   unsigned int nIndents = mcc.depth() + 3;
1561   for (unsigned int i = 0; i < nIndents; ++i) {
1562     out << indention_;
1563   }
1564   out << " finished: begin process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1565       << "' id = " << mcc.moduleDescription()->id();
1566   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1567     out << "\n" << gc;
1568     out << mcc;
1569   }
1570 }
1571 
1572 void Tracer::preModuleAccessInputProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1573   LogAbsolute out("Tracer");
1574   unsigned int nIndents = mcc.depth() + 3;
1575   for (unsigned int i = 0; i < nIndents; ++i) {
1576     out << indention_;
1577   }
1578   out << " starting: access input process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1579       << "' id = " << mcc.moduleDescription()->id();
1580   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1581     out << "\n" << gc;
1582     out << mcc;
1583   }
1584 }
1585 
1586 void Tracer::postModuleAccessInputProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1587   LogAbsolute out("Tracer");
1588   unsigned int nIndents = mcc.depth() + 3;
1589   for (unsigned int i = 0; i < nIndents; ++i) {
1590     out << indention_;
1591   }
1592   out << " finished: access input process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1593       << "' id = " << mcc.moduleDescription()->id();
1594   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1595     out << "\n" << gc;
1596     out << mcc;
1597   }
1598 }
1599 
1600 void Tracer::preModuleEndProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1601   LogAbsolute out("Tracer");
1602   unsigned int nIndents = mcc.depth() + 3;
1603   for (unsigned int i = 0; i < nIndents; ++i) {
1604     out << indention_;
1605   }
1606   out << " starting: end process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1607       << "' id = " << mcc.moduleDescription()->id();
1608   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1609     out << "\n" << gc;
1610     out << mcc;
1611   }
1612 }
1613 
1614 void Tracer::postModuleEndProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1615   LogAbsolute out("Tracer");
1616   unsigned int nIndents = mcc.depth() + 3;
1617   for (unsigned int i = 0; i < nIndents; ++i) {
1618     out << indention_;
1619   }
1620   out << " finished: end process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1621       << "' id = " << mcc.moduleDescription()->id();
1622   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1623     out << "\n" << gc;
1624     out << mcc;
1625   }
1626 }
1627 
1628 void Tracer::preModuleGlobalBeginRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1629   LogAbsolute out("Tracer");
1630   out << TimeStamper(printTimestamps_);
1631   unsigned int nIndents = mcc.depth() + 3;
1632   for (unsigned int i = 0; i < nIndents; ++i) {
1633     out << indention_;
1634   }
1635   out << " starting: global begin run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1636       << "' id = " << mcc.moduleDescription()->id();
1637   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1638     out << "\n" << gc;
1639     out << mcc;
1640   }
1641 }
1642 
1643 void Tracer::postModuleGlobalBeginRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1644   LogAbsolute out("Tracer");
1645   out << TimeStamper(printTimestamps_);
1646   unsigned int nIndents = mcc.depth() + 3;
1647   for (unsigned int i = 0; i < nIndents; ++i) {
1648     out << indention_;
1649   }
1650   out << " finished: global begin run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1651       << "' id = " << mcc.moduleDescription()->id();
1652   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1653     out << "\n" << gc;
1654     out << mcc;
1655   }
1656 }
1657 
1658 void Tracer::preModuleGlobalEndRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1659   LogAbsolute out("Tracer");
1660   out << TimeStamper(printTimestamps_);
1661   unsigned int nIndents = mcc.depth() + 3;
1662   for (unsigned int i = 0; i < nIndents; ++i) {
1663     out << indention_;
1664   }
1665   out << " starting: global end run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1666       << "' id = " << mcc.moduleDescription()->id();
1667   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1668     out << "\n" << gc;
1669     out << mcc;
1670   }
1671 }
1672 
1673 void Tracer::postModuleGlobalEndRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1674   LogAbsolute out("Tracer");
1675   out << TimeStamper(printTimestamps_);
1676   unsigned int nIndents = mcc.depth() + 3;
1677   for (unsigned int i = 0; i < nIndents; ++i) {
1678     out << indention_;
1679   }
1680   out << " finished: global end run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1681       << "' id = " << mcc.moduleDescription()->id();
1682   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1683     out << "\n" << gc;
1684     out << mcc;
1685   }
1686 }
1687 
1688 void Tracer::preModuleGlobalBeginLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1689   LogAbsolute out("Tracer");
1690   out << TimeStamper(printTimestamps_);
1691   unsigned int nIndents = mcc.depth() + 3;
1692   for (unsigned int i = 0; i < nIndents; ++i) {
1693     out << indention_;
1694   }
1695   out << " starting: global begin lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1696       << "' id = " << mcc.moduleDescription()->id();
1697   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1698     out << "\n" << gc;
1699     out << mcc;
1700   }
1701 }
1702 
1703 void Tracer::postModuleGlobalBeginLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1704   LogAbsolute out("Tracer");
1705   out << TimeStamper(printTimestamps_);
1706   unsigned int nIndents = mcc.depth() + 3;
1707   for (unsigned int i = 0; i < nIndents; ++i) {
1708     out << indention_;
1709   }
1710   out << " finished: global begin lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1711       << "' id = " << mcc.moduleDescription()->id();
1712   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1713     out << "\n" << gc;
1714     out << mcc;
1715   }
1716 }
1717 
1718 void Tracer::preModuleGlobalEndLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1719   LogAbsolute out("Tracer");
1720   out << TimeStamper(printTimestamps_);
1721   unsigned int nIndents = mcc.depth() + 3;
1722   for (unsigned int i = 0; i < nIndents; ++i) {
1723     out << indention_;
1724   }
1725   out << " starting: global end lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1726       << "' id = " << mcc.moduleDescription()->id();
1727   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1728     out << "\n" << gc;
1729     out << mcc;
1730   }
1731 }
1732 
1733 void Tracer::postModuleGlobalEndLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1734   LogAbsolute out("Tracer");
1735   out << TimeStamper(printTimestamps_);
1736   unsigned int nIndents = mcc.depth() + 3;
1737   for (unsigned int i = 0; i < nIndents; ++i) {
1738     out << indention_;
1739   }
1740   out << " finished: global end lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1741       << "' id = " << mcc.moduleDescription()->id();
1742   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1743     out << "\n" << gc;
1744     out << mcc;
1745   }
1746 }
1747 
1748 void Tracer::preModuleWriteProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1749   LogAbsolute out("Tracer");
1750   unsigned int nIndents = mcc.depth() + 3;
1751   for (unsigned int i = 0; i < nIndents; ++i) {
1752     out << indention_;
1753   }
1754   out << " starting: write process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1755       << "' id = " << mcc.moduleDescription()->id();
1756   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1757     out << "\n" << gc;
1758     out << mcc;
1759   }
1760 }
1761 
1762 void Tracer::postModuleWriteProcessBlock(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1763   LogAbsolute out("Tracer");
1764   unsigned int nIndents = mcc.depth() + 3;
1765   for (unsigned int i = 0; i < nIndents; ++i) {
1766     out << indention_;
1767   }
1768   out << " finished: write process block for module: label = '" << mcc.moduleDescription()->moduleLabel()
1769       << "' id = " << mcc.moduleDescription()->id();
1770   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1771     out << "\n" << gc;
1772     out << mcc;
1773   }
1774 }
1775 
1776 void Tracer::preModuleWriteRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1777   LogAbsolute out("Tracer");
1778   out << TimeStamper(printTimestamps_);
1779   unsigned int nIndents = mcc.depth() + 3;
1780   for (unsigned int i = 0; i < nIndents; ++i) {
1781     out << indention_;
1782   }
1783   out << " starting: write run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1784       << "' id = " << mcc.moduleDescription()->id();
1785   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1786     out << "\n" << gc;
1787     out << mcc;
1788   }
1789 }
1790 
1791 void Tracer::postModuleWriteRun(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1792   LogAbsolute out("Tracer");
1793   out << TimeStamper(printTimestamps_);
1794   unsigned int nIndents = mcc.depth() + 3;
1795   for (unsigned int i = 0; i < nIndents; ++i) {
1796     out << indention_;
1797   }
1798   out << " finished: write run for module: label = '" << mcc.moduleDescription()->moduleLabel()
1799       << "' id = " << mcc.moduleDescription()->id();
1800   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1801     out << "\n" << gc;
1802     out << mcc;
1803   }
1804 }
1805 
1806 void Tracer::preModuleWriteLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1807   LogAbsolute out("Tracer");
1808   out << TimeStamper(printTimestamps_);
1809   unsigned int nIndents = mcc.depth() + 3;
1810   for (unsigned int i = 0; i < nIndents; ++i) {
1811     out << indention_;
1812   }
1813   out << " starting: write lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1814       << "' id = " << mcc.moduleDescription()->id();
1815   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1816     out << "\n" << gc;
1817     out << mcc;
1818   }
1819 }
1820 
1821 void Tracer::postModuleWriteLumi(GlobalContext const& gc, ModuleCallingContext const& mcc) {
1822   LogAbsolute out("Tracer");
1823   out << TimeStamper(printTimestamps_);
1824   unsigned int nIndents = mcc.depth() + 3;
1825   for (unsigned int i = 0; i < nIndents; ++i) {
1826     out << indention_;
1827   }
1828   out << " finished: write lumi for module: label = '" << mcc.moduleDescription()->moduleLabel()
1829       << "' id = " << mcc.moduleDescription()->id();
1830   if (dumpContextForLabels_.find(mcc.moduleDescription()->moduleLabel()) != dumpContextForLabels_.end()) {
1831     out << "\n" << gc;
1832     out << mcc;
1833   }
1834 }
1835 
1836 void Tracer::preSourceConstruction(ModuleDescription const& desc) {
1837   LogAbsolute out("Tracer");
1838   out << TimeStamper(printTimestamps_);
1839   out << indention_;
1840   out << " starting: constructing source: " << desc.moduleName();
1841   if (dumpNonModuleContext_) {
1842     out << "\n" << desc;
1843   }
1844 }
1845 
1846 void Tracer::postSourceConstruction(ModuleDescription const& desc) {
1847   LogAbsolute out("Tracer");
1848   out << TimeStamper(printTimestamps_);
1849   out << indention_;
1850   out << " finished: constructing source: " << desc.moduleName();
1851   if (dumpNonModuleContext_) {
1852     out << "\n" << desc;
1853   }
1854 }
1855 
1856 void Tracer::preESModulePrefetching(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1857   LogAbsolute out("Tracer");
1858   out << TimeStamper(printTimestamps_);
1859   unsigned int nIndents = mcc.depth() + 4;
1860   for (unsigned int i = 0; i < nIndents; ++i) {
1861     out << indention_;
1862   }
1863   out << " starting: prefetching for esmodule: label = '" << mcc.componentDescription()->label_
1864       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1865 }
1866 
1867 void Tracer::postESModulePrefetching(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1868   LogAbsolute out("Tracer");
1869   out << TimeStamper(printTimestamps_);
1870   unsigned int nIndents = mcc.depth() + 4;
1871   for (unsigned int i = 0; i < nIndents; ++i) {
1872     out << indention_;
1873   }
1874   out << " finished: prefetching for esmodule: label = '" << mcc.componentDescription()->label_
1875       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1876 }
1877 
1878 void Tracer::preESModule(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1879   LogAbsolute out("Tracer");
1880   out << TimeStamper(printTimestamps_);
1881   unsigned int nIndents = mcc.depth() + 4;
1882   for (unsigned int i = 0; i < nIndents; ++i) {
1883     out << indention_;
1884   }
1885   out << " starting: processing esmodule: label = '" << mcc.componentDescription()->label_
1886       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1887 }
1888 
1889 void Tracer::postESModule(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1890   LogAbsolute out("Tracer");
1891   out << TimeStamper(printTimestamps_);
1892   unsigned int nIndents = mcc.depth() + 4;
1893   for (unsigned int i = 0; i < nIndents; ++i) {
1894     out << indention_;
1895   }
1896   out << " finished: processing esmodule: label = '" << mcc.componentDescription()->label_
1897       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1898 }
1899 
1900 void Tracer::preESModuleAcquire(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1901   LogAbsolute out("Tracer");
1902   out << TimeStamper(printTimestamps_);
1903   unsigned int nIndents = mcc.depth() + 4;
1904   for (unsigned int i = 0; i < nIndents; ++i) {
1905     out << indention_;
1906   }
1907   out << " starting: processing esmodule acquire: label = '" << mcc.componentDescription()->label_
1908       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1909 }
1910 
1911 void Tracer::postESModuleAcquire(eventsetup::EventSetupRecordKey const& iKey, ESModuleCallingContext const& mcc) {
1912   LogAbsolute out("Tracer");
1913   out << TimeStamper(printTimestamps_);
1914   unsigned int nIndents = mcc.depth() + 4;
1915   for (unsigned int i = 0; i < nIndents; ++i) {
1916     out << indention_;
1917   }
1918   out << " finished: processing esmodule acquire: label = '" << mcc.componentDescription()->label_
1919       << "' type = " << mcc.componentDescription()->type_ << " in record = " << iKey.name();
1920 }
1921 
1922 using edm::service::Tracer;
1923 DEFINE_FWK_SERVICE(Tracer);