Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:11

0001 // -*- C++ -*-
0002 //
0003 // Package:     FWCore/Services
0004 // Class  :     ProductRegistryDumper
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Christopher Jones
0010 //         Created:  Thu, 23 Mar 2017 18:32:17 GMT
0011 //
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0015 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
0016 #include "FWCore/ServiceRegistry/interface/Service.h"
0017 #include "FWCore/Utilities/interface/CPUTimer.h"
0018 #include "FWCore/ServiceRegistry/interface/ServiceMaker.h"
0019 #include "FWCore/Framework/interface/ConstProductRegistry.h"
0020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0021 
0022 // system include files
0023 
0024 // user include files
0025 
0026 namespace edm {
0027   namespace service {
0028     class ProductRegistryDumper {
0029     public:
0030       ProductRegistryDumper(edm::ParameterSet const& iConfig, edm::ActivityRegistry& iAR);
0031     };
0032 
0033   }  // namespace service
0034 }  // namespace edm
0035 
0036 //
0037 // constants, enums and typedefs
0038 //
0039 
0040 //
0041 // static data member definitions
0042 //
0043 
0044 //
0045 // constructors and destructor
0046 //
0047 using namespace edm::service;
0048 ProductRegistryDumper::ProductRegistryDumper(edm::ParameterSet const& iConfig, edm::ActivityRegistry& iAR) {
0049   iAR.watchPostBeginJob([]() {
0050     Service<ConstProductRegistry> regService;
0051     for (auto const& branch : regService->allBranchDescriptions()) {
0052       if (branch) {
0053         edm::LogSystem("ProductRegistry") << *branch;
0054       }
0055     }
0056   });
0057 }
0058 
0059 DEFINE_FWK_SERVICE(ProductRegistryDumper);