CMS 3D CMS Logo

EventSetupImpl.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_EventSetupImpl_h
2 #define FWCore_Framework_EventSetupImpl_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class: EventSetupImpl
7 //
16 //
17 // Author: Chris Jones
18 // Created: Thu Mar 24 13:50:04 EST 2005
19 //
20 
21 // system include files
22 #include <map>
23 #include <optional>
24 #include <vector>
25 #include "tbb/task_arena.h"
26 
27 // user include files
31 
32 // forward declarations
33 
34 class testEventsetup;
35 
36 namespace edm {
37  class ESInputTag;
38  class ProcessBlockTransitionInfo;
39  class Schedule;
40  class ServiceToken;
41  class WaitingTaskHolder;
42 
43  namespace eventsetup {
44  class EventSetupProvider;
45  class EventSetupRecordImpl;
46  class EventSetupRecordProvider;
47  } // namespace eventsetup
48 
50  public:
52 
53  EventSetupImpl(EventSetupImpl const&) = delete;
54  EventSetupImpl& operator=(EventSetupImpl const&) = delete;
55 
56  // ---------- const member functions ---------------------
59 
60  std::optional<eventsetup::EventSetupRecordGeneric> find(const eventsetup::EventSetupRecordKey&,
61  unsigned int iTransitionID,
62  ESProxyIndex const* getTokenIndices,
63  ESParentContext const& iParent) const;
64 
66  void fillAvailableRecordKeys(std::vector<eventsetup::EventSetupRecordKey>& oToFill) const;
67 
71 
72  bool validRecord(eventsetup::EventSetupRecordKey const& iKey) const;
73 
74  tbb::task_arena* taskArena CMS_THREAD_SAFE() const { return taskArena_; }
78  friend class ::testEventsetup;
79  friend class ::testEventsetupRecord;
81 
82  protected:
84 
85  private:
86  EventSetupImpl() = delete;
87  explicit EventSetupImpl(tbb::task_arena*);
88 
90 
91  void setKeyIters(std::vector<eventsetup::EventSetupRecordKey>::const_iterator const& keysBegin,
92  std::vector<eventsetup::EventSetupRecordKey>::const_iterator const& keysEnd);
93 
94  // ---------- member data --------------------------------
95 
96  std::vector<eventsetup::EventSetupRecordKey>::const_iterator keysBegin_;
97  std::vector<eventsetup::EventSetupRecordKey>::const_iterator keysEnd_;
98  std::vector<eventsetup::EventSetupRecordImpl const*> recordImpls_;
99  tbb::task_arena* taskArena_ = nullptr;
100  };
101 } // namespace edm
102 #endif
edm::EventSetupImpl::findImpl
eventsetup::EventSetupRecordImpl const * findImpl(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetupImpl.cc:60
edm::ProcessBlockTransitionInfo
Definition: TransitionInfoTypes.h:80
ESInputTag
edm::EventSetupImpl
Definition: EventSetupImpl.h:49
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::EventSetupImpl::fillAvailableRecordKeys
void fillAvailableRecordKeys(std::vector< eventsetup::EventSetupRecordKey > &oToFill) const
clears the oToFill vector and then fills it with the keys for all available records
Definition: EventSetupImpl.cc:76
edm::EventSetupImpl::validRecord
bool validRecord(eventsetup::EventSetupRecordKey const &iKey) const
Definition: EventSetupImpl.cc:92
edm::EventSetupImpl::EventSetupImpl
EventSetupImpl()=delete
edm::ESRecordIndex
Definition: ESIndices.h:80
ESIndices.h
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edm::ESProxyIndex
Definition: ESIndices.h:30
EventSetupRecord.h
edm::eventsetup::EventSetupRecordProvider
Definition: EventSetupRecordProvider.h:47
edm::eventsetup::EventSetupProvider
Definition: EventSetupProvider.h:50
edm::EventSetupImpl::taskArena
tbb::task_arena * taskArena() const
Definition: EventSetupImpl.h:74
WaitingTaskHolder
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
edm::EventSetupImpl::keysEnd_
std::vector< eventsetup::EventSetupRecordKey >::const_iterator keysEnd_
Definition: EventSetupImpl.h:97
edm::eventsetup::EventSetupRecordImpl
Definition: EventSetupRecordImpl.h:77
edm::EventSetupImpl::setKeyIters
void setKeyIters(std::vector< eventsetup::EventSetupRecordKey >::const_iterator const &keysBegin, std::vector< eventsetup::EventSetupRecordKey >::const_iterator const &keysEnd)
Definition: EventSetupImpl.cc:101
edm::EventSetupImpl::~EventSetupImpl
~EventSetupImpl()
Definition: EventSetupImpl.cc:28
edm::EventSetupImpl::insertRecordImpl
void insertRecordImpl(const eventsetup::EventSetupRecordKey &, const eventsetup::EventSetupRecordImpl *)
Definition: EventSetupImpl.cc:30
edm::EventSetupImpl::keysBegin_
std::vector< eventsetup::EventSetupRecordKey >::const_iterator keysBegin_
Definition: EventSetupImpl.h:96
edm::EventSetupImpl::recordIsProvidedByAModule
bool recordIsProvidedByAModule(eventsetup::EventSetupRecordKey const &) const
Definition: EventSetupImpl.cc:87
edm::ESParentContext
Definition: ESParentContext.h:21
ServiceToken
edm::EventSetupImpl::taskArena_
tbb::task_arena * taskArena_
Definition: EventSetupImpl.h:99
edm::EventSetupImpl::recordImpls_
std::vector< eventsetup::EventSetupRecordImpl const * > recordImpls_
Definition: EventSetupImpl.h:98
EventSetupRecordKey.h
edm::EventSetupImpl::operator=
EventSetupImpl & operator=(EventSetupImpl const &)=delete
edm::EventSetupImpl::find
std::optional< eventsetup::EventSetupRecordGeneric > find(const eventsetup::EventSetupRecordKey &, unsigned int iTransitionID, ESProxyIndex const *getTokenIndices, ESParentContext const &iParent) const
Definition: EventSetupImpl.cc:45
edm::EventSetupImpl::addRecordImpl
void addRecordImpl(const eventsetup::EventSetupRecordImpl &iRecord)
Definition: EventSetupImpl.cc:41