Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-24 02:18:45

0001 #ifndef FWCore_Framework_SynchronousEventSetupsController_h
0002 #define FWCore_Framework_SynchronousEventSetupsController_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     SynchronousEventSetupsController
0007 //
0008 /** \class edm::eventsetup::SynchronousEventSetupsController
0009 
0010  Description: Manages a group of EventSetups which can share components.
0011 
0012  Usage:
0013     Useful for unit testing parts of the EventSetup system
0014 
0015 */
0016 //
0017 // Original Authors:  Chris Jones, David Dagenhart
0018 //          Created:  Wed Jan 12 14:30:42 CST 2011
0019 //
0020 
0021 #include "FWCore/Framework/interface/EventSetupsController.h"
0022 
0023 #include "oneapi/tbb/task_group.h"
0024 #include "oneapi/tbb/global_control.h"
0025 
0026 namespace edm {
0027 
0028   namespace eventsetup {
0029 
0030     class SynchronousEventSetupsController {
0031     public:
0032       SynchronousEventSetupsController();
0033       ~SynchronousEventSetupsController();
0034 
0035       SynchronousEventSetupsController(SynchronousEventSetupsController const&) = delete;
0036       SynchronousEventSetupsController const& operator=(SynchronousEventSetupsController const&) = delete;
0037       SynchronousEventSetupsController(SynchronousEventSetupsController&&) = delete;
0038       SynchronousEventSetupsController const& operator=(SynchronousEventSetupsController&&) = delete;
0039 
0040       std::shared_ptr<EventSetupProvider> makeProvider(ParameterSet&,
0041                                                        ActivityRegistry*,
0042                                                        ParameterSet const* eventSetupPset = nullptr);
0043 
0044       // Version to use when IOVs are not allowed to run concurrently
0045       void eventSetupForInstance(IOVSyncValue const&);
0046 
0047     private:
0048       oneapi::tbb::global_control globalControl_;
0049       oneapi::tbb::task_group taskGroup_;
0050       EventSetupsController controller_;
0051     };
0052   }  // namespace eventsetup
0053 }  // namespace edm
0054 #endif