File indexing completed on 2024-04-06 12:12:02
0001 #ifndef FWCore_Framework_EventSetupImpl_h
0002 #define FWCore_Framework_EventSetupImpl_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <map>
0023 #include <optional>
0024 #include <vector>
0025
0026
0027 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0028 #include "FWCore/Framework/interface/EventSetupRecord.h"
0029 #include "FWCore/Utilities/interface/ESIndices.h"
0030
0031
0032
0033 class testEventsetup;
0034
0035 namespace edm {
0036 class ESInputTag;
0037 class ProcessBlockTransitionInfo;
0038 class Schedule;
0039 class ServiceToken;
0040 class WaitingTaskHolder;
0041
0042 namespace eventsetup {
0043 class EventSetupProvider;
0044 class EventSetupRecordImpl;
0045 class EventSetupRecordProvider;
0046 }
0047
0048 class EventSetupImpl {
0049 public:
0050 ~EventSetupImpl();
0051 EventSetupImpl(EventSetupImpl const&) = delete;
0052 EventSetupImpl& operator=(EventSetupImpl const&) = delete;
0053
0054
0055 eventsetup::EventSetupRecordImpl const* findImpl(const eventsetup::EventSetupRecordKey&) const;
0056 eventsetup::EventSetupRecordImpl const* findImpl(ESRecordIndex) const;
0057
0058 std::optional<eventsetup::EventSetupRecordGeneric> find(const eventsetup::EventSetupRecordKey&,
0059 unsigned int iTransitionID,
0060 ESResolverIndex const* getTokenIndices,
0061 ESParentContext const& iParent) const;
0062
0063
0064 void fillAvailableRecordKeys(std::vector<eventsetup::EventSetupRecordKey>& oToFill) const;
0065
0066
0067
0068 bool recordIsProvidedByAModule(eventsetup::EventSetupRecordKey const&) const;
0069
0070 bool validRecord(eventsetup::EventSetupRecordKey const& iKey) const;
0071
0072
0073 friend class eventsetup::EventSetupProvider;
0074 friend class eventsetup::EventSetupRecordProvider;
0075 friend class ::testEventsetup;
0076 friend class ::testEventsetupRecord;
0077 friend class ProcessBlockTransitionInfo;
0078
0079 protected:
0080 void addRecordImpl(const eventsetup::EventSetupRecordImpl& iRecord);
0081
0082 private:
0083 explicit EventSetupImpl();
0084
0085 void insertRecordImpl(const eventsetup::EventSetupRecordKey&, const eventsetup::EventSetupRecordImpl*);
0086
0087 void setKeyIters(std::vector<eventsetup::EventSetupRecordKey>::const_iterator const& keysBegin,
0088 std::vector<eventsetup::EventSetupRecordKey>::const_iterator const& keysEnd);
0089
0090
0091
0092 std::vector<eventsetup::EventSetupRecordKey>::const_iterator keysBegin_;
0093 std::vector<eventsetup::EventSetupRecordKey>::const_iterator keysEnd_;
0094 std::vector<eventsetup::EventSetupRecordImpl const*> recordImpls_;
0095 };
0096 }
0097 #endif