@@ -365,33 +365,42 @@ namespace edm::service::moduleAlloc {
365365
366366 auto esModuleLabelsPtr = std::make_shared<std::vector<std::string>>();
367367 auto & esModuleLabels = *esModuleLabelsPtr;
368+ auto esModuleTypesPtr = std::make_shared<std::vector<std::string>>();
369+ auto & esModuleTypes = *esModuleTypesPtr;
368370 // acquire names for all the ED and ES modules
369- iRegistry.watchPostESModuleRegistration ([&esModuleLabels](auto const & iDescription) {
371+ iRegistry.watchPostESModuleRegistration ([&esModuleLabels, &esModuleTypes ](auto const & iDescription) {
370372 if (esModuleLabels.size () <= iDescription.id_ + 1 ) {
371373 esModuleLabels.resize (iDescription.id_ + 2 );
374+ esModuleTypes.resize (iDescription.id_ + 2 );
372375 }
373376 // NOTE: we want the id to start at 1 not 0
374377 if (not iDescription.label_ .empty ()) {
375378 esModuleLabels[iDescription.id_ + 1 ] = iDescription.label_ ;
376379 } else {
377380 esModuleLabels[iDescription.id_ + 1 ] = iDescription.type_ ;
378381 }
382+ esModuleTypes[iDescription.id_ + 1 ] = iDescription.type_ ;
379383 });
380384 auto moduleCtrDtrPtr = std::make_shared<std::vector<ModuleCtrDtr>>();
381385 auto & moduleCtrDtr = *moduleCtrDtrPtr;
382386 auto moduleLabelsPtr = std::make_shared<std::vector<std::string>>();
387+ auto moduleTypesPtr = std::make_shared<std::vector<std::string>>();
383388 auto & moduleLabels = *moduleLabelsPtr;
389+ auto & moduleTypes = *moduleTypesPtr;
384390 iRegistry.watchPreModuleConstruction (
385- [&moduleLabels, &moduleCtrDtr, beginTime, iFilter](ModuleDescription const & md) {
391+ [&moduleLabels, &moduleTypes, & moduleCtrDtr, beginTime, iFilter](ModuleDescription const & md) {
386392 auto const t = duration_cast<duration_t >(now () - beginTime).count ();
387393
388394 auto const mid = md.id ();
389395 if (mid < moduleLabels.size ()) {
390396 moduleLabels[mid] = md.moduleLabel ();
397+ moduleTypes[mid] = md.moduleName ();
391398 moduleCtrDtr[mid].beginConstruction = t;
392399 } else {
393400 moduleLabels.resize (mid + 1 );
394401 moduleLabels.back () = md.moduleLabel ();
402+ moduleTypes.resize (mid + 1 );
403+ moduleTypes.back () = md.moduleName ();
395404 moduleCtrDtr.resize (mid + 1 );
396405 moduleCtrDtr.back ().beginConstruction = t;
397406 }
@@ -481,7 +490,9 @@ namespace edm::service::moduleAlloc {
481490 iRegistry.watchPreBeginJob ([logFile,
482491 iFilter,
483492 moduleLabelsPtr,
493+ moduleTypesPtr,
484494 esModuleLabelsPtr,
495+ esModuleTypesPtr,
485496 moduleCtrDtrPtr,
486497 sourceCtrPtr,
487498 beginTime,
@@ -490,15 +501,19 @@ namespace edm::service::moduleAlloc {
490501 *addDataInDtr = true ;
491502 {
492503 std::ostringstream oss;
493- moduleIdToLabel (oss, *moduleLabelsPtr, ' M' , " EDModule ID" , " Module label" );
504+ moduleIdToLabelAndType (
505+ oss, *moduleLabelsPtr, *moduleTypesPtr, ' M' , " EDModule ID" , " Module label" , " Module type" );
494506 logFile->write (oss.str ());
495507 moduleLabelsPtr.reset ();
508+ moduleTypesPtr.reset ();
496509 }
497510 {
498511 std::ostringstream oss;
499- moduleIdToLabel (oss, *esModuleLabelsPtr, ' N' , " ESModule ID" , " ESModule label" );
512+ moduleIdToLabelAndType (
513+ oss, *esModuleLabelsPtr, *esModuleTypesPtr, ' N' , " ESModule ID" , " ESModule label" , " ESModule type" );
500514 logFile->write (oss.str ());
501515 esModuleLabelsPtr.reset ();
516+ esModuleTypesPtr.reset ();
502517 }
503518 {
504519 auto const moduleAllocStart = duration_cast<duration_t >(beginModuleAlloc - beginTime).count ();
0 commit comments