57 class ModuleCallingContext;
58 class ModuleDescription;
60 class PathsAndConsumesOfModulesBase;
207 TimeStamper(
bool enable) :
213 if (timestamp.enabled_)
391 desc.
addUntracked<
std::string>(
"indention",
"++")->setComment(
"Prefix characters for output. The characters are repeated to form the indentation.");
392 desc.
addUntracked<std::vector<std::string>>(
"dumpContextForLabels", std::vector<std::string>{})->setComment(
"Prints context information to cout for the module transitions associated with these modules' labels");
393 desc.
addUntracked<
bool>(
"dumpNonModuleContext",
false)->setComment(
"Prints context information to cout for the transitions not associated with any module label");
394 desc.
addUntracked<
bool>(
"dumpPathsAndConsumes",
false)->setComment(
"Prints information to cout about paths, endpaths, products consumed by modules and the dependencies between modules created by the products they consume");
395 desc.
addUntracked<
bool>(
"printTimestamps",
false)->setComment(
"Prints a time stamp for every transition");
396 desc.
addUntracked<
bool>(
"dumpEventSetupInfo",
false)->setComment(
"Prints info 3 times when an event setup cache is filled, before the lock, after the lock, and after filling");
397 descriptions.
add(
"Tracer", desc);
398 descriptions.
setComment(
"This service prints each phase the framework is processing, e.g. constructing a module,running a module, etc.");
413 out <<
"\n" <<
"Process name = " << pc.
processName() <<
"\n";
415 std::vector<std::string>
const& paths = pathsAndConsumes.
paths();
416 for(
auto const&
path : paths) {
417 out <<
" " <<
path <<
"\n";
419 out <<
"end paths:\n";
420 std::vector<std::string>
const& endpaths = pathsAndConsumes.
endPaths();
421 for(
auto const& endpath : endpaths) {
422 out <<
" " << endpath <<
"\n";
424 for(
unsigned int j = 0; j < paths.size(); ++j) {
425 std::vector<ModuleDescription const*>
const& modulesOnPath = pathsAndConsumes.
modulesOnPath(j);
426 out <<
"modules on path " << paths.at(j) <<
":\n";
427 for(
auto const& desc : modulesOnPath) {
428 out <<
" " << desc->moduleLabel() <<
"\n";
431 for(
unsigned int j = 0; j < endpaths.size(); ++j) {
432 std::vector<ModuleDescription const*>
const& modulesOnEndPath = pathsAndConsumes.
modulesOnEndPath(j);
433 out <<
"modules on end path " << endpaths.at(j) <<
":\n";
434 for(
auto const& desc : modulesOnEndPath) {
435 out <<
" " << desc->moduleLabel() <<
"\n";
438 std::vector<ModuleDescription const*>
const& allModules = pathsAndConsumes.
allModules();
439 out <<
"All modules and modules in the current process whose products they consume:\n";
440 out <<
"(This does not include modules from previous processes or the source)\n";
441 for(
auto const&
module : allModules) {
442 out <<
" " <<
module->moduleName() <<
"/\'" <<
module->moduleLabel() <<
"\'";
443 unsigned int moduleID =
module->id();
445 throw cms::Exception(
"TestFailure") <<
"Tracer::preBeginJob, moduleDescription returns incorrect value";
447 std::vector<ModuleDescription const*>
const& modulesWhoseProductsAreConsumedBy =
449 if(!modulesWhoseProductsAreConsumedBy.empty()) {
450 out <<
" consumes products from these modules:\n";
451 for(
auto const& producingModule : modulesWhoseProductsAreConsumedBy) {
452 out <<
" " << producingModule->moduleName() <<
"/\'" << producingModule->moduleLabel() <<
"\'\n";
458 out <<
"All modules (listed by class and label) and all their consumed products.\n";
459 out <<
"Consumed products are listed by type, label, instance, process.\n";
460 out <<
"For products not in the event, \'run\' or \'lumi\' is added to indicate the TTree they are from.\n";
461 out <<
"For products that are declared with mayConsume, \'may consume\' is added.\n";
462 out <<
"For products consumed for Views, \'element type\' is added\n";
463 out <<
"For products only read from previous processes, \'skip current process\' is added\n";
464 for(
auto const*
module : allModules) {
465 out <<
" " <<
module->moduleName() <<
"/\'" <<
module->moduleLabel() <<
"\'";
467 if(!consumesInfo.empty()) {
468 out <<
" consumes:\n";
469 for(
auto const&
info : consumesInfo) {
470 out <<
" " <<
info.type() <<
" \'" <<
info.label() <<
"\' \'" <<
info.instance();
471 out <<
"\' \'" <<
info.process() <<
"\'";
477 if(!
info.alwaysGets()) {
478 out <<
", may consume";
481 out <<
", element type";
483 if(
info.skipCurrentProcess()) {
484 out <<
", skip current process";
859 out <<
" starting: begin job for module with label '" << desc.
moduleLabel() <<
"' id = " << desc.
id();
870 out <<
" finished: begin job for module with label '" << desc.
moduleLabel() <<
"' id = " << desc.
id();
881 out <<
" starting: end job for module with label '" << desc.
moduleLabel() <<
"' id = " << desc.
id();
892 out <<
" finished: end job for module with label '" << desc.
moduleLabel() <<
"' id = " << desc.
id();
902 unsigned int nIndents = mcc.
depth() + 4;
903 for(
unsigned int i = 0;
i < nIndents; ++
i) {
917 unsigned int nIndents = mcc.
depth() + 4;
918 for(
unsigned int i = 0;
i < nIndents; ++
i) {
933 unsigned int nIndents = mcc.
depth() + 4;
934 for(
unsigned int i = 0;
i < nIndents; ++
i) {
948 unsigned int nIndents = mcc.
depth() + 4;
949 for(
unsigned int i = 0;
i < nIndents; ++
i) {
963 unsigned int nIndents = mcc.
depth() + 4;
964 for(
unsigned int i = 0;
i < nIndents; ++
i) {
974 unsigned int nIndents = mcc.
depth() + 4;
975 for(
unsigned int i = 0;
i < nIndents; ++
i) {
985 unsigned int nIndents = mcc.
depth() + 4;
986 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1000 unsigned int nIndents = mcc.
depth() + 4;
1001 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1015 unsigned int nIndents = mcc.
depth() + 5;
1016 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1026 unsigned int nIndents = mcc.
depth() + 5;
1027 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1038 unsigned int nIndents = mcc.
depth() + 3;
1039 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1053 unsigned int nIndents = mcc.
depth() + 3;
1054 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1068 unsigned int nIndents = mcc.
depth() + 3;
1069 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1083 unsigned int nIndents = mcc.
depth() + 3;
1084 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1098 unsigned int nIndents = mcc.
depth() + 3;
1099 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1113 unsigned int nIndents = mcc.
depth() + 3;
1114 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1128 unsigned int nIndents = mcc.
depth() + 3;
1129 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1143 unsigned int nIndents = mcc.
depth() + 3;
1144 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1158 unsigned int nIndents = mcc.
depth() + 3;
1159 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1173 unsigned int nIndents = mcc.
depth() + 3;
1174 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1188 unsigned int nIndents = mcc.
depth() + 3;
1189 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1203 unsigned int nIndents = mcc.
depth() + 3;
1204 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1218 unsigned int nIndents = mcc.
depth() + 3;
1219 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1233 unsigned int nIndents = mcc.
depth() + 3;
1234 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1248 unsigned int nIndents = mcc.
depth() + 3;
1249 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1263 unsigned int nIndents = mcc.
depth() + 3;
1264 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1278 unsigned int nIndents = mcc.
depth() + 3;
1279 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1293 unsigned int nIndents = mcc.
depth() + 3;
1294 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1308 unsigned int nIndents = mcc.
depth() + 3;
1309 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1323 unsigned int nIndents = mcc.
depth() + 3;
1324 for(
unsigned int i = 0;
i < nIndents; ++
i) {
1339 out <<
" starting: constructing source: " << desc.
moduleName();
1341 out <<
"\n" << desc;
1350 out <<
" finished: constructing source: " << desc.
moduleName();
1352 out <<
"\n" << desc;
1361 out <<
"preLockEventSetupGet ";
1362 out << desc->
label_ <<
" ";
1363 out << recordKey.
name() <<
" ";
1364 out << dataKey.
type().
name() <<
" ";
1373 out <<
"postLockEventSetupGet ";
1374 out << desc->
label_ <<
" ";
1375 out << recordKey.
name() <<
" ";
1376 out << dataKey.
type().
name() <<
" ";
1385 out <<
"postEventSetupGet ";
1386 out << desc->
label_ <<
" ";
1387 out << recordKey.
name() <<
" ";
1388 out << dataKey.
type().
name() <<
" ";
void preCloseFile(std::string const &lfn, bool primary)
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPostModuleConstruction(PostModuleConstruction::slot_type const &iSlot)
std::string const & pathName() const
EventNumber_t event() const
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
void postEventReadFromSource(StreamContext const &, ModuleCallingContext const &)
T getUntrackedParameter(std::string const &, T const &) const
void preModuleWriteRun(GlobalContext const &, ModuleCallingContext const &)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void postLockEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
void postSourceRun(RunIndex)
std::string const & processName() const
boost::uint64_t value() const
void watchPrePathEvent(PrePathEvent::slot_type const &iSlot)
void postModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void watchPreallocate(Preallocate::slot_type const &iSlot)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void postModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const &iSlot)
void postModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
void postModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void preModuleGlobalBeginLumi(GlobalContext const &, ModuleCallingContext const &)
void postModuleConstruction(ModuleDescription const &md)
void postModuleEndStream(StreamContext const &, ModuleCallingContext const &)
std::vector< ConsumesInfo > consumesInfo(unsigned int moduleID) const
void preSourceRun(RunIndex)
void postModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
void postModuleWriteLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
char const * name() const
void watchPreModuleConstruction(PreModuleConstruction::slot_type const &iSlot)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void preallocate(service::SystemBounds const &)
LuminosityBlockID const & luminosityBlockID() const
void postStreamBeginLumi(StreamContext const &)
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreSourceConstruction(PreSourceConstruction::slot_type const &iSlot)
void preModuleGlobalEndLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPostSourceConstruction(PostSourceConstruction::slot_type const &iSlot)
void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
std::vector< ModuleDescription const * > const & modulesOnEndPath(unsigned int endPathIndex) const
void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const &iSlot)
std::string const & moduleName() const
void watchPostPathEvent(PostPathEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void preModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void preGlobalEndLumi(GlobalContext const &)
void preModuleEndJob(ModuleDescription const &md)
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void preLockEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
void preModuleConstruction(ModuleDescription const &md)
std::vector< ModuleDescription const * > const & modulesOnPath(unsigned int pathIndex) const
void preBeginJob(PathsAndConsumesOfModulesBase const &, ProcessContext const &)
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
void postStreamEndRun(StreamContext const &)
void postGlobalEndLumi(GlobalContext const &)
void postSourceLumi(LuminosityBlockIndex)
LuminosityBlockNumber_t luminosityBlock() const
void postModuleBeginJob(ModuleDescription const &md)
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
void postModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
std::string const & moduleLabel() const
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const &iSlot)
void postCloseFile(std::string const &, bool)
void watchPostModuleWriteRun(PostModuleWriteRun::slot_type const &iSlot)
std::vector< ModuleDescription const * > const & allModules() const
void watchPostModuleWriteLumi(PostModuleWriteLumi::slot_type const &iSlot)
Timestamp const & timestamp() const
void preStreamEndLumi(StreamContext const &)
void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const &iSlot)
std::vector< std::string > const & endPaths() const
void preOpenFile(std::string const &, bool)
unsigned int maxNumberOfStreams() const
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void preGlobalBeginRun(GlobalContext const &)
PreStreamEarlyTermination preStreamEarlyTerminationSignal_
PreSourceEarlyTermination preSourceEarlyTerminationSignal_
void preSourceEvent(StreamID)
void preGlobalEndRun(GlobalContext const &)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const &iSlot)
void preModuleStreamEndLumi(StreamContext const &, ModuleCallingContext const &)
Tracer(const ParameterSet &, ActivityRegistry &)
void preModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
ModuleDescription const * moduleDescription(unsigned int moduleID) const
void prePathEvent(StreamContext const &, PathContext const &)
void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const &iSlot)
void postModuleEventPrefetching(StreamContext const &, ModuleCallingContext const &)
ModuleDescription const * moduleDescription() const
const char * name() const
void postModuleStreamBeginLumi(StreamContext const &, ModuleCallingContext const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const &iSlot)
bool dumpPathsAndConsumes_
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void preModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void postStreamBeginRun(StreamContext const &)
std::ostream & operator<<(std::ostream &os, SimpleMemoryCheck::SignificantEvent const &se)
void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const &iSlot)
void preStreamEndRun(StreamContext const &)
void watchPostStreamEndRun(PostStreamEndRun::slot_type const &iSlot)
void postOpenFile(std::string const &, bool)
void preEventReadFromSource(StreamContext const &, ModuleCallingContext const &)
PreGlobalEarlyTermination preGlobalEarlyTerminationSignal_
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void postPathEvent(StreamContext const &, PathContext const &, HLTPathStatus const &)
StreamID const & streamID() const
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
#define DEFINE_FWK_SERVICE(type)
void setComment(std::string const &value)
void postModuleEventDelayedGet(StreamContext const &, ModuleCallingContext const &)
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
void preSourceLumi(LuminosityBlockIndex)
unsigned int maxNumberOfConcurrentLuminosityBlocks() const
void watchPreLockEventSetupGet(PreLockEventSetupGet::slot_type const &iSlot)
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void postSourceEvent(StreamID)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
LuminosityBlockNumber_t luminosityBlock() const
const TypeTag & type() const
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
std::vector< ModuleDescription const * > const & modulesWhoseProductsAreConsumedBy(unsigned int moduleID) const
void preSourceConstruction(ModuleDescription const &md)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void preModuleEventPrefetching(StreamContext const &, ModuleCallingContext const &)
void watchPreModuleWriteRun(PreModuleWriteRun::slot_type const &iSlot)
void postModuleWriteRun(GlobalContext const &, ModuleCallingContext const &)
void preModuleEvent(StreamContext const &, ModuleCallingContext const &)
void preModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const &iSlot)
void postGlobalBeginRun(GlobalContext const &)
void postGlobalEndRun(GlobalContext const &)
void postGlobalBeginLumi(GlobalContext const &)
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
std::vector< std::string > const & paths() const
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
const NameTag & name() const
void preEvent(StreamContext const &)
void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const &iSlot)
void watchPostEventSetupGet(PostEventSetupGet::slot_type const &iSlot)
void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const &iSlot)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void preModuleWriteLumi(GlobalContext const &, ModuleCallingContext const &)
void watchPreModuleWriteLumi(PreModuleWriteLumi::slot_type const &iSlot)
const char * value() const
unsigned int maxNumberOfConcurrentRuns() const
void preStreamBeginLumi(StreamContext const &)
void postModuleEndJob(ModuleDescription const &md)
void preModuleEndStream(StreamContext const &, ModuleCallingContext const &)
void postModuleEvent(StreamContext const &, ModuleCallingContext const &)
EventID const & eventID() const
void preModuleEventDelayedGet(StreamContext const &, ModuleCallingContext const &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
void postEventSetupGet(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)
void watchPostLockEventSetupGet(PostLockEventSetupGet::slot_type const &iSlot)
void postModuleBeginStream(StreamContext const &, ModuleCallingContext const &)
void preModuleEventAcquire(StreamContext const &, ModuleCallingContext const &)
bool dumpNonModuleContext_
void preModuleBeginJob(ModuleDescription const &md)
void postStreamEndLumi(StreamContext const &)
void preModuleStreamEndRun(StreamContext const &, ModuleCallingContext const &)
void postEvent(StreamContext const &)
void preStreamBeginRun(StreamContext const &)
TimeValue_t value() const
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
void postModuleStreamBeginRun(StreamContext const &, ModuleCallingContext const &)
void preGlobalBeginLumi(GlobalContext const &)
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
void postModuleGlobalEndRun(GlobalContext const &, ModuleCallingContext const &)
void postSourceConstruction(ModuleDescription const &md)
std::set< std::string > dumpContextForLabels_
void preModuleGlobalBeginRun(GlobalContext const &, ModuleCallingContext const &)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
Timestamp const & timestamp() const