Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-24 04:44:53

0001 
0002 #include "oneTimeInitialization.h"
0003 
0004 #include "FWCore/PluginManager/interface/PluginManager.h"
0005 #include "FWCore/PluginManager/interface/standard.h"
0006 #include "FWCore/Concurrency/interface/ThreadsController.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "DataFormats/Provenance/interface/ParentageRegistry.h"
0009 
0010 namespace {
0011 
0012   bool oneTimeInitializationImpl() {
0013     edmplugin::PluginManager::configure(edmplugin::standard::config());
0014 
0015     static std::unique_ptr<edm::ThreadsController> tsiPtr = std::make_unique<edm::ThreadsController>(1);
0016 
0017     // register the empty parentage vector , once and for all
0018     edm::ParentageRegistry::instance()->insertMapped(edm::Parentage());
0019 
0020     // register the empty parameter set, once and for all.
0021     edm::ParameterSet().registerIt();
0022     return true;
0023   }
0024 }  //namespace
0025 
0026 namespace edm::testprocessor {
0027   bool oneTimeInitialization() {
0028     static const bool s_init{oneTimeInitializationImpl()};
0029     return s_init;
0030   }
0031 }  // namespace edm::testprocessor