1 #ifndef FWCore_Framework_EventSetupRecord_h 2 #define FWCore_Framework_EventSetupRecord_h 77 class testEventsetupRecord;
82 class ESHandleExceptionFactory;
86 namespace eventsetup {
87 struct ComponentDescription;
92 friend class ::testEventsetup;
93 friend class ::testEventsetupRecord;
109 transitionID_ = transitionID;
110 getTokenIndices_ = getTokenIndices;
113 template <
typename HolderT>
114 bool get(HolderT& iHolder)
const {
115 return get(
"", iHolder);
118 template <
typename HolderT>
119 bool get(
char const* iName, HolderT& iHolder)
const {
122 std::shared_ptr<ESHandleExceptionFactory> whyFailedFactory;
123 impl_->getImplementation(value, iName, desc, iHolder.transientAccessOnly, whyFailedFactory);
126 iHolder = HolderT(value, desc);
129 iHolder = HolderT(
std::move(whyFailedFactory));
133 template <
typename HolderT>
135 return get(iName.c_str(), iHolder);
138 template <
typename HolderT>
142 std::shared_ptr<ESHandleExceptionFactory> whyFailedFactory;
143 impl_->getImplementation(value, iTag.data().c_str(), desc, iHolder.transientAccessOnly, whyFailedFactory);
146 validate(desc, iTag);
147 iHolder = HolderT(value, desc);
150 iHolder = HolderT(
std::move(whyFailedFactory));
156 bool doGet(
DataKey const& aKey,
bool aGetTransiently =
false)
const;
161 bool wasGotten(
DataKey const& aKey)
const;
187 template <
template <
typename>
typename H,
typename T,
typename R>
191 assert(getTokenIndices_);
196 auto proxyIndex = getTokenIndices_[iToken.
index().value()];
200 T
const*
value =
nullptr;
202 std::shared_ptr<ESHandleExceptionFactory> whyFailedFactory;
203 impl_->getImplementation(value, proxyIndex, H<T>::transientAccessOnly, desc, whyFailedFactory);
207 return H<T>(
value, desc);
222 void changeStdExceptionToCmsException(
char const* iExceptionWhatMessage,
232 template <
template <
typename>
typename H,
typename T,
typename R>
234 auto const key = this->
key();
239 template <
template <
typename>
typename H,
typename T,
typename R>
241 auto const key = this->
key();
245 return std::make_exception_ptr(ex);
249 void const* getFromProxy(
DataKey const& iKey,
251 bool iTransientAccessOnly)
const;
263 unsigned int iTransitionID,
265 setImpl(iImpl, iTransitionID, getTokenIndices);
unsigned long long cacheIdentifier() const
EventSetupRecordImpl const * impl() const
EventSetupRecordGeneric(EventSetupRecordImpl const *iImpl, unsigned int iTransitionID, ESProxyIndex const *getTokenIndices)
constexpr unsigned int transitionID() const noexcept
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::shared_ptr< ESHandleExceptionFactory > makeESHandleExceptionFactory(T &&iFunctor)
Container::value_type value_type
H< T > noProxyHandle(ESGetToken< T, R > const &iToken) const
unsigned int transitionID() const
void setImpl(EventSetupRecordImpl const *iImpl, unsigned int transitionID, ESProxyIndex const *getTokenIndices)
EventSetupRecordKey key() const final
Namespace of DDCMS conversion namespace.
EventSetupImpl const & eventSetup() const
constexpr char const * name() const noexcept
void fillRegisteredDataKeys(std::vector< DataKey > &oToFill) const
clears the oToFill vector and then fills it with the keys for all registered data keys ...
constexpr ESTokenIndex index() const noexcept
H< T > getHandleImpl(ESGetToken< T, R > const &iToken) const
constexpr bool isInitialized() const noexcept
ESProxyIndex const * getTokenIndices() const
ValidityInterval const & validityInterval() const
constexpr bool hasValidIndex() const noexcept
H< T > invalidTokenHandle(ESGetToken< T, R > const &iToken) const