/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Framework/interface/EventSetupsController.h
126 строк
5 KB
Chris Jones
Renamed function to runEventSetupForInstanceAsync(IOVSyncValue
13 июл 2026, 17:31
13 июл 2026, 17:31
e495aaf
Код
Авторство
О чём код?
// -*- C++ -*- #ifndef FWCore_Framework_EventSetupsController_h #define FWCore_Framework_EventSetupsController_h // // Package: Framework // Class : EventSetupsController // /** \class edm::eventsetup::EventSetupsController Description: Manage work related to concurrent IOVs in the EventSetup system. Usage: EventProcessor owns one of these through a unique_ptr. */ // // Original Authors: Chris Jones, David Dagenhart // Created: Wed Jan 12 14:30:42 CST 2011 // #include <memory> #include <vector> #include <map> #include <optional> #include "oneapi/tbb/task_group.h" #include "FWCore/Framework/interface/NumberOfConcurrentIOVs.h" #include "FWCore/Utilities/interface/propagate_const.h" namespace edm { class ActivityRegistry; class EventSetupImpl; class ParameterSet; class IOVSyncValue; class ModuleTypeResolverMaker; class SerialTaskQueue; class ServiceToken; class WaitingTaskHolder; class WaitingTaskList; class EventSetupRecordIntervalFinder; namespace eventsetup { class EventSetupProvider; class EventSetupRecordIOVCoordinator; class ESProductResolverProvider; class EventSetupsController { public: EventSetupsController(); explicit EventSetupsController(ModuleTypeResolverMaker const* resolverMaker); EventSetupsController(EventSetupsController const&) = delete; EventSetupsController const& operator=(EventSetupsController const&) = delete; ~EventSetupsController(); void endIOVsAsync(edm::WaitingTaskHolder iEndTask); std::shared_ptr<EventSetupProvider> makeProvider(ParameterSet&, ActivityRegistry*, ParameterSet const* eventSetupPset = nullptr, unsigned int maxConcurrentIOVs = 0, bool dumpOptions = false); //must be called after makeProvider and before any calls to eventSetupForInstanceAsync void addExtra(std::shared_ptr<EventSetupRecordIntervalFinder> iFinder); void addExtra(std::shared_ptr<eventsetup::ESProductResolverProvider> iProvider); void finishConfiguration(); // The main purpose of this function is to call eventSetupForInstanceAsync. // If there is an exception, then a signal is emitted and the exception // is propagated. void runEventSetupForInstanceAsync(IOVSyncValue const&, WaitingTaskHolder& taskToStartAfterIOVInit, WaitingTaskList& endIOVWaitingTasks, std::shared_ptr<const EventSetupImpl>&, ActivityRegistry*, ServiceToken const&); // Pass in an IOVSyncValue to let the EventSetup system know which run and lumi // need to be processed and prepare IOVs for it (also could be a time or only a run). // Pass in a WaitingTaskHolder that allows the EventSetup to communicate when all // the IOVs are ready to process this IOVSyncValue. Note this preparation is often // done in asynchronous tasks and the function might return before all the preparation // is complete. // Pass in endIOVWaitingTasks, additions to this WaitingTaskList allow the lumi or // run to notify the EventSetup system when a lumi or run transition is done and no // longer needs its EventSetup IOVs. // Pass in a reference to a shared_ptr<EventSetupImpl> that gets set and is used // to give clients access to the EventSetup system such that for each record the IOV // associated with the correct IOVSyncValue will be used. void eventSetupForInstanceAsync(IOVSyncValue const&, WaitingTaskHolder const& taskToStartAfterIOVInit, WaitingTaskList& endIOVWaitingTasks, std::shared_ptr<const EventSetupImpl>&); bool mustFinishConfiguration() const { return mustFinishConfiguration_; } void resetRecordPlusDependentRecords(EventSetupRecordKey const& recordKey); private: void initializeEventSetupRecordIOVCoordinators( std::map<EventSetupRecordKey, std::shared_ptr<EventSetupRecordIntervalFinder>> const& iKeyToFinders); // ---------- member data -------------------------------- propagate_const<std::shared_ptr<EventSetupProvider>> provider_; NumberOfConcurrentIOVs numberOfConcurrentIOVs_; // This data member is intentionally declared after provider_ // It is important that this is destroyed first. std::vector<propagate_const<std::unique_ptr<EventSetupRecordIOVCoordinator>>> eventSetupRecordIOVCoordinators_; ModuleTypeResolverMaker const* typeResolverMaker_ = nullptr; std::optional<std::vector<std::shared_ptr<EventSetupRecordIntervalFinder>>> loadedFinders_; bool mustFinishConfiguration_ = true; }; void synchronousEventSetupForInstance(IOVSyncValue const& syncValue, oneapi::tbb::task_group& iGroup, eventsetup::EventSetupsController& espController); } // namespace eventsetup } // namespace edm #endif