File indexing completed on 2024-04-06 12:12:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "FWCore/Framework/src/SynchronousEventSetupsController.h"
0014
0015 #include "FWCore/Concurrency/interface/WaitingTaskHolder.h"
0016 #include "FWCore/Concurrency/interface/FinalWaitingTask.h"
0017
0018 #include <algorithm>
0019 #include <iostream>
0020 #include <set>
0021
0022 namespace edm {
0023 namespace eventsetup {
0024
0025 SynchronousEventSetupsController::SynchronousEventSetupsController()
0026 : globalControl_(oneapi::tbb::global_control::max_allowed_parallelism, 1) {}
0027
0028 SynchronousEventSetupsController::~SynchronousEventSetupsController() {
0029 FinalWaitingTask finalTask{taskGroup_};
0030 controller_.endIOVsAsync(edm::WaitingTaskHolder(taskGroup_, &finalTask));
0031 finalTask.waitNoThrow();
0032 }
0033
0034 std::shared_ptr<EventSetupProvider> SynchronousEventSetupsController::makeProvider(
0035 ParameterSet& iPSet, ActivityRegistry* activityRegistry, ParameterSet const* eventSetupPset) {
0036 return controller_.makeProvider(iPSet, activityRegistry, eventSetupPset);
0037 }
0038
0039 void SynchronousEventSetupsController::eventSetupForInstance(IOVSyncValue const& syncValue) {
0040 synchronousEventSetupForInstance(syncValue, taskGroup_, controller_);
0041 }
0042
0043 }
0044 }