CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions
edm::eventsetup Namespace Reference

Namespaces

 depends_on
 
 heterocontainer
 
 impl
 
 looper
 
 produce
 

Classes

class  Callback
 
class  CallbackProxy
 
struct  CallbackSimpleDecorator
 
struct  ComponentDescription
 
class  ComponentFactory
 
class  ComponentMaker
 
class  ComponentMakerBase
 
class  ComponentMakerBaseHelper
 
struct  data_default_record_trait
 
struct  data_default_record_trait< DDDetector >
 
struct  data_default_record_trait< DIPLumiDetail >
 
struct  data_default_record_trait< DIPLumiSummary >
 
struct  data_default_record_trait< HepPDT::ParticleDataTable >
 
struct  data_default_record_trait< hph::Setup >
 
struct  data_default_record_trait< LumiCorrectionParam >
 
struct  data_default_record_trait< trackerDTC::LayerEncoding >
 
struct  data_default_record_trait< trackerTFP::DataFormats >
 
struct  data_default_record_trait< trackerTFP::Demonstrator >
 
struct  data_default_record_trait< trackerTFP::KalmanFilterFormats >
 
struct  data_default_record_trait< trackerTFP::LayerEncoding >
 
struct  data_default_record_trait< trklet::ChannelAssignment >
 
struct  data_default_record_trait< tt::Setup >
 
class  DataKey
 
class  DataProxy
 
class  DataProxyProvider
 
class  DataProxyTemplate
 
struct  DecoratorFromArg
 
struct  DecoratorFromArg< T, TRecord, depends_on::OneHolder< T, TDependsOnRecord > >
 
struct  DecoratorFromArg< T, TRecord, depends_on::TwoHolder< T1, T2 > >
 
struct  default_record
 
class  DependentRecordImplementation
 
class  DependentRecordIntervalFinder
 
struct  DependentRecordTag
 
struct  DependsOnCaller
 
struct  DependsOnDoNothingCaller
 
class  ESPreFunctorDecorator
 
class  ESProducerInfo
 
class  ESRecordsToProxyIndices
 
class  ESSourceConcurrentDataProxyTemplate
 
class  ESSourceDataProxyBase
 
class  ESSourceDataProxyConcurrentBase
 
class  ESSourceDataProxyNonConcurrentBase
 
class  ESSourceDataProxyTemplate
 
class  ESSourceInfo
 
class  EventSetupProvider
 
class  EventSetupRecord
 
class  EventSetupRecordGeneric
 
class  EventSetupRecordImpl
 
class  EventSetupRecordImplementation
 
class  EventSetupRecordIOVQueue
 
class  EventSetupRecordKey
 
class  EventSetupRecordProvider
 
class  EventSetupsController
 
struct  FactoryInfo
 
class  IntersectingIOVRecordIntervalFinder
 
struct  LooperMaker
 
struct  LooperMakerTraits
 
class  MakeDataException
 
struct  ModuleMaker
 
struct  ModuleMakerTraits
 
struct  MUST_GET_RECORD_FROM_EVENTSETUP_TO_GET_DATA
 
class  NameTag
 
class  NoDataException
 
class  NoDataExceptionBase
 
class  NoProxyException
 
class  NoRecordException
 
class  NumberOfConcurrentIOVs
 
class  ParameterSetIDHolder
 
class  ProxyArgumentFactoryTemplate
 
class  ProxyFactoryBase
 
struct  RecordDependencyRegister
 
class  SimpleStringTag
 
struct  SourceMaker
 
struct  SourceMakerTraits
 
class  SynchronousEventSetupsController
 

Typedefs

template<typename T >
using default_record_t = typename default_record< T >::RecordT
 
using DepFunction = std::set< EventSetupRecordKey >(*)()
 
typedef NameTag IdTags
 
using Itr = RecordProviders::iterator
 
typedef ComponentFactory< LooperMakerTraitsLooperFactory
 
typedef edmplugin::PluginFactory< edm::eventsetup::ComponentMakerBase< LooperMakerTraits > *()> LooperPluginFactory
 
typedef ComponentFactory< ModuleMakerTraitsModuleFactory
 
typedef edmplugin::PluginFactory< edm::eventsetup::ComponentMakerBase< ModuleMakerTraits > *()> ModulePluginFactory
 
typedef std::map< DataKey, const DataProxy * > Proxies
 
using RecordProviders = std::vector< std::shared_ptr< EventSetupRecordProvider > >
 
using RecordToPreferred = std::map< EventSetupRecordKey, EventSetupRecordProvider::DataToPreferredProviderMap >
 
typedef ComponentFactory< SourceMakerTraitsSourceFactory
 
typedef edmplugin::PluginFactory< edm::eventsetup::ComponentMakerBase< edm::eventsetup::SourceMakerTraits > *()> SourcePluginFactory
 
typedef heterocontainer::HCTypeTag TypeTag
 

Functions

void addDependencyFunction (EventSetupRecordKey iKey, DepFunction iFunction, bool allowConcurrentIOVs)
 
template<class T >
void addProviderTo (EventSetupProvider &iProvider, std::shared_ptr< T > iComponent, const DataProxyProvider *)
 
template<class T >
void addProviderTo (EventSetupProvider &, std::shared_ptr< T >, const void *)
 
template<typename TFirst , typename TRemaining >
void addRecordToDependencies (const TFirst *, const TRemaining *, std::set< EventSetupRecordKey > &oSet)
 
bool allowConcurrentIOVs (EventSetupRecordKey const &)
 
template<typename T , typename TRecord , typename TDecorator >
const TDecorator & createDecoratorFrom (T *, const TRecord *, const TDecorator &iDec)
 
template<typename T , typename TRecord , typename TDependsOnRecord >
ESPreFunctorDecorator< TRecord, DependsOnCaller< T, TRecord, TDependsOnRecord, DependsOnDoNothingCaller< TRecord > > > createDecoratorFrom (T *iT, const TRecord *iRec, const depends_on::OneHolder< T, TDependsOnRecord > &iHolder)
 
template<typename T , typename TRecord , typename T1 , typename T2 >
ESPreFunctorDecorator< TRecord, typename depends_on::HolderToCaller< TRecord, depends_on::TwoHolder< T1, T2 > >::Caller_t > createDecoratorFrom (T *iT, const TRecord *iRec, const depends_on::TwoHolder< T1, T2 > &iHolder)
 
template<class T , class TRecord , class TDependsOnRecord , class TCallerChain >
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller (T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)
 
std::set< EventSetupRecordKeydependencies (EventSetupRecordKey const &)
 
template<typename T , typename TDependsOnRecord >
depends_on::OneHolder< T, TDependsOnRecord > dependsOn (void(T::*iT)(const TDependsOnRecord &))
 
template<typename T , typename T1 , typename T2 >
depends_on::TwoHolder< depends_on::OneHolder< T, T1 >, T2 > dependsOn (void(T::*iT1)(const T1 &), T2 iT2)
 
template<typename T , typename T1 , typename T2 , typename T3 >
depends_on::TwoHolder< depends_on::TwoHolder< depends_on::OneHolder< T, T1 >, T2 >, T3 > dependsOn (void(T::*iT1)(const T1 &), T2 iT2, T3 iT3)
 
static const ComponentDescriptiondummyDescription ()
 
template<>
edm::ESHandle< fwliteeswriter::DummyTypeEventSetupRecord::getHandleImpl< edm::ESHandle, fwliteeswriter::DummyType, fwliteeswriter::FWLWEventSetupRecord > (ESGetToken< fwliteeswriter::DummyType, fwliteeswriter::FWLWEventSetupRecord > const &iToken) const
 
template<>
void EventSetupRecordImpl::getImplementation< fwliteeswriter::DummyType > (fwliteeswriter::DummyType const *&iData, ESProxyIndex iProxyIndex, bool iTransientAccessOnly, ComponentDescription const *&oDesc, std::shared_ptr< ESHandleExceptionFactory > &whyFailedFactory, EventSetupImpl const *iEventSetupImpl) const
 
void fillEventSetupProvider (ModuleTypeResolverMaker const *resolverMaker, EventSetupsController &esController, EventSetupProvider &cp, ParameterSet &params)
 
template<typename T >
std::set< EventSetupRecordKeyfindDependentRecordsFor ()
 
static void findDependents (const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider >> &oDependents)
 
static const std::string kAppendToDataLabel ("appendToDataLabel")
 
std::unique_ptr< EventSetupProvidermakeEventSetupProvider (ParameterSet const &params, unsigned subProcessIndex, ActivityRegistry *activityRegistry)
 
template<typename FromT , typename ToT >
void moveFromTo (FromT &iFrom, ToT &iTo)
 
template<typename FromT , typename ToT >
void moveFromTo (std::unique_ptr< FromT > &iFrom, ToT &iTo)
 
template<typename FromT , typename ToT >
void moveFromTo (std::optional< FromT > &iFrom, ToT &iTo)
 
void no_record_exception_message_builder (cms::Exception &, const char *, bool iKnownRecord)
 
static void preferEverything (const ComponentDescription &iComponent, const RecordProviders &iRecordProviders, RecordToPreferred &iReturnValue)
 find everything made by a DataProxyProvider and add it to the 'preferred' list More...
 
bool recordDoesExist (edm::EventSetupImpl const &, edm::eventsetup::EventSetupRecordKey const &)
 
void swap (DataKey &a, DataKey &b)
 
void synchronousEventSetupForInstance (IOVSyncValue const &syncValue, oneapi::tbb::task_group &iGroup, eventsetup::EventSetupsController &espController)
 

Typedef Documentation

◆ default_record_t

template<typename T >
using edm::eventsetup::default_record_t = typedef typename default_record<T>::RecordT

Definition at line 68 of file data_default_record_trait.h.

◆ DepFunction

using edm::eventsetup::DepFunction = typedef std::set<EventSetupRecordKey> (*)()

Definition at line 32 of file RecordDependencyRegister.h.

◆ IdTags

Definition at line 51 of file DataKeyTags.h.

◆ Itr

using edm::eventsetup::Itr = typedef RecordProviders::iterator

Definition at line 355 of file EventSetupProvider.cc.

◆ LooperFactory

Definition at line 103 of file LooperFactory.h.

◆ LooperPluginFactory

Definition at line 105 of file LooperFactory.h.

◆ ModuleFactory

Definition at line 56 of file ModuleFactory.h.

◆ ModulePluginFactory

Definition at line 57 of file ModuleFactory.h.

◆ Proxies

typedef std::map<DataKey, const DataProxy*> edm::eventsetup::Proxies

Definition at line 34 of file EventSetupRecord.cc.

◆ RecordProviders

using edm::eventsetup::RecordProviders = typedef std::vector<std::shared_ptr<EventSetupRecordProvider> >

Definition at line 111 of file EventSetupProvider.cc.

◆ RecordToPreferred

Definition at line 112 of file EventSetupProvider.cc.

◆ SourceFactory

Definition at line 85 of file SourceFactory.h.

◆ SourcePluginFactory

Definition at line 88 of file SourceFactory.h.

◆ TypeTag

Definition at line 30 of file DataKeyTags.h.

Function Documentation

◆ addDependencyFunction()

void edm::eventsetup::addDependencyFunction ( EventSetupRecordKey  iKey,
DepFunction  iFunction,
bool  allowConcurrentIOVs 
)

Definition at line 55 of file RecordDependencyRegister.cc.

References allowConcurrentIOVs().

Referenced by edm::eventsetup::RecordDependencyRegister< T >::RecordDependencyRegister().

55  {
56  getMap().emplace(iKey, iFunction);
57  getAllowMap().emplace(iKey, allowConcurrentIOVs);
58  }
bool allowConcurrentIOVs(EventSetupRecordKey const &)

◆ addProviderTo() [1/2]

template<class T >
void edm::eventsetup::addProviderTo ( EventSetupProvider iProvider,
std::shared_ptr< T iComponent,
const DataProxyProvider  
)

Definition at line 41 of file SourceFactory.h.

References edm::eventsetup::EventSetupProvider::add(), and makeListRunsInFiles::description.

Referenced by edm::eventsetup::SourceMakerTraits::addTo().

41  {
42  std::shared_ptr<DataProxyProvider> pProvider(iComponent);
43  ComponentDescription description = pProvider->description();
44  description.isSource_ = true;
45  pProvider->setDescription(description);
46  iProvider.add(pProvider);
47  }

◆ addProviderTo() [2/2]

template<class T >
void edm::eventsetup::addProviderTo ( EventSetupProvider ,
std::shared_ptr< T ,
const void *   
)

Definition at line 49 of file SourceFactory.h.

49  {
50  //do nothing
51  }

◆ addRecordToDependencies()

template<typename TFirst , typename TRemaining >
void edm::eventsetup::addRecordToDependencies ( const TFirst *  ,
const TRemaining *  ,
std::set< EventSetupRecordKey > &  oSet 
)

Definition at line 36 of file findDependentRecordsFor.h.

References relativeConstraints::empty, and GetRecoTauVFromDQM_MC_cff::next.

Referenced by findDependentRecordsFor().

36  {
37  oSet.insert(EventSetupRecordKey::makeKey<TFirst>());
38  using Pop = edm::mpl::Pop<TRemaining>;
39  if constexpr (not Pop::empty) {
40  const typename Pop::Item* next(nullptr);
41  const typename Pop::Remaining* remaining(nullptr);
42  addRecordToDependencies(next, remaining, oSet);
43  }
44  }
void addRecordToDependencies(const TFirst *, const TRemaining *, std::set< EventSetupRecordKey > &oSet)

◆ allowConcurrentIOVs()

bool edm::eventsetup::allowConcurrentIOVs ( EventSetupRecordKey const &  iKey)

Definition at line 46 of file RecordDependencyRegister.cc.

References genParticles_cff::map.

Referenced by addDependencyFunction(), and edm::eventsetup::DataProxyProvider::DataProxyContainer::fillRecordsNotAllowingConcurrentIOVs().

46  {
47  auto& map = getAllowMap();
48  auto itFind = map.find(iKey);
49  if (itFind != map.end()) {
50  return itFind->second;
51  }
52  return false;
53  }

◆ createDecoratorFrom() [1/3]

template<typename T , typename TRecord , typename TDecorator >
const TDecorator& edm::eventsetup::createDecoratorFrom ( T ,
const TRecord *  ,
const TDecorator &  iDec 
)
inline

Definition at line 99 of file ESProducer.h.

99  {
100  return iDec;
101  }

◆ createDecoratorFrom() [2/3]

template<typename T , typename TRecord , typename TDependsOnRecord >
ESPreFunctorDecorator<TRecord, DependsOnCaller<T, TRecord, TDependsOnRecord, DependsOnDoNothingCaller<TRecord> > > edm::eventsetup::createDecoratorFrom ( T iT,
const TRecord *  iRec,
const depends_on::OneHolder< T, TDependsOnRecord > &  iHolder 
)
inline

Definition at line 169 of file eventsetup_dependsOn.h.

References createDependsOnCaller(), edm::eventsetup::depends_on::OneHolder< T, TDependsOnRecord >::holdee_, and groupFilesInBlocks::temp.

169  {
170  DependsOnDoNothingCaller<TRecord> tCaller;
172  temp(createDependsOnCaller(iT, iRec, iHolder.holdee_, tCaller));
173  return temp;
174  }
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller(T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)

◆ createDecoratorFrom() [3/3]

template<typename T , typename TRecord , typename T1 , typename T2 >
ESPreFunctorDecorator<TRecord, typename depends_on::HolderToCaller<TRecord, depends_on::TwoHolder<T1, T2> >::Caller_t> edm::eventsetup::createDecoratorFrom ( T iT,
const TRecord *  iRec,
const depends_on::TwoHolder< T1, T2 > &  iHolder 
)
inline

Definition at line 186 of file eventsetup_dependsOn.h.

References createDependsOnCaller(), edm::eventsetup::depends_on::TwoHolder< T, U >::h1_, edm::eventsetup::depends_on::TwoHolder< T, U >::h2_, and edm::eventsetup::depends_on::makeCaller().

186  {
187  return ESPreFunctorDecorator<
188  TRecord,
189  typename depends_on::HolderToCaller<TRecord, depends_on::TwoHolder<T1, T2> >::Caller_t>(
190  createDependsOnCaller(iT, iRec, iHolder.h2_, makeCaller(iT, iRec, iHolder.h1_)));
191  }
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller(T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)
DependsOnCaller< T, TRecord, T2, typename HolderToCaller< TRecord, T1 >::Caller_t > makeCaller(T *iT, const TRecord *iRec, const TwoHolder< T1, void(T::*)(const T2 &)> &iHolder)

◆ createDependsOnCaller()

template<class T , class TRecord , class TDependsOnRecord , class TCallerChain >
DependsOnCaller<T, TRecord, TDependsOnRecord, TCallerChain> edm::eventsetup::createDependsOnCaller ( T iCallee,
const TRecord *  ,
void(T::*)(const TDependsOnRecord &)  iMethod,
const TCallerChain &  iChain 
)

Definition at line 87 of file eventsetup_dependsOn.h.

Referenced by createDecoratorFrom(), and edm::eventsetup::depends_on::makeCaller().

88  {
89  return DependsOnCaller<T, TRecord, TDependsOnRecord, TCallerChain>(iCallee, iMethod, iChain);
90  }

◆ dependencies()

std::set< EventSetupRecordKey > edm::eventsetup::dependencies ( EventSetupRecordKey const &  iKey)

Definition at line 37 of file RecordDependencyRegister.cc.

References genParticles_cff::map.

Referenced by edm::eventsetup::EventSetupRecordProvider::dependentRecords().

37  {
38  auto& map = getMap();
39  auto itFind = map.find(iKey);
40  if (itFind != map.end()) {
41  return itFind->second();
42  }
43  return std::set<EventSetupRecordKey>();
44  }

◆ dependsOn() [1/3]

template<typename T , typename TDependsOnRecord >
depends_on::OneHolder<T, TDependsOnRecord> edm::eventsetup::dependsOn ( void(T::*)(const TDependsOnRecord &)  iT)

Definition at line 195 of file eventsetup_dependsOn.h.

195  {
196  return iT;
197  }

◆ dependsOn() [2/3]

template<typename T , typename T1 , typename T2 >
depends_on::TwoHolder<depends_on::OneHolder<T, T1>, T2> edm::eventsetup::dependsOn ( void(T::*)(const T1 &)  iT1,
T2  iT2 
)

Definition at line 200 of file eventsetup_dependsOn.h.

200  {
201  return depends_on::OneHolder<T, T1>(iT1) & iT2;
202  }

◆ dependsOn() [3/3]

template<typename T , typename T1 , typename T2 , typename T3 >
depends_on::TwoHolder<depends_on::TwoHolder<depends_on::OneHolder<T, T1>, T2>, T3> edm::eventsetup::dependsOn ( void(T::*)(const T1 &)  iT1,
T2  iT2,
T3  iT3 
)

Definition at line 205 of file eventsetup_dependsOn.h.

206  {
207  return depends_on::OneHolder<T, T1>(iT1) & iT2 & iT3;
208  }

◆ dummyDescription()

static const ComponentDescription* edm::eventsetup::dummyDescription ( )
static

Definition at line 33 of file DataProxy.cc.

33  {
34  static const ComponentDescription s_desc;
35  return &s_desc;
36  }

◆ EventSetupRecord::getHandleImpl< edm::ESHandle, fwliteeswriter::DummyType, fwliteeswriter::FWLWEventSetupRecord >()

Definition at line 152 of file FWLiteESRecordWriterAnalyzer.cc.

References cms::cuda::assert(), submitPVResolutionJobs::desc, crabWrapper::key, edm::makeESHandleExceptionFactory(), SiStripPI::max, makeGlobalPositionRcd_cfg::tag, UNLIKELY, and relativeConstraints::value.

153  {
154  if UNLIKELY (not iToken.isInitialized()) {
155  std::rethrow_exception(makeUninitializedTokenException(this->key(), iToken.dataInfo().m_tag));
156  }
157  if UNLIKELY (iToken.transitionID() != transitionID()) {
158  throwWrongTransitionID();
159  }
161  assert(getTokenIndices_);
162  //need to check token has valid index
163  if UNLIKELY (not iToken.hasValidIndex()) {
164  return TheHandle{makeESHandleExceptionFactory(
165  [key = this->key(), tag = iToken.dataInfo().m_tag, transitionID = iToken.transitionID()] {
166  return makeInvalidTokenException(key, tag, transitionID);
167  })};
168  }
169 
170  auto proxyIndex = getTokenIndices_[iToken.index().value()];
171  if UNLIKELY (proxyIndex.value() == std::numeric_limits<int>::max()) {
172  return TheHandle(makeESHandleExceptionFactory([iToken, key = this->key()] {
173  cms::Exception exc("NoProxyException");
174  exc << "No data of type \"" << iToken.dataInfo().m_tag.name() << "\" with label \"" << iToken.name()
175  << "\" in record \"" << key.name() << "\"";
176  return std::make_exception_ptr(exc);
177  }));
178  }
179 
181  fwliteeswriter::DummyType const* pValue = &value;
182  ComponentDescription const* desc = nullptr;
183  std::shared_ptr<ESHandleExceptionFactory> whyFailedFactory;
184 
185  impl_->getImplementation(pValue, proxyIndex, false, desc, whyFailedFactory, eventSetupImpl_);
186 
187  if UNLIKELY (not value.m_data) {
188  std::rethrow_exception(whyFailedFactory->make());
189  }
191  }
assert(be >=bs)
std::shared_ptr< ESHandleExceptionFactory > makeESHandleExceptionFactory(T &&iFunctor)
Definition: value.py:1
#define UNLIKELY(x)
Definition: Likely.h:21

◆ EventSetupRecordImpl::getImplementation< fwliteeswriter::DummyType >()

template<>
void edm::eventsetup::EventSetupRecordImpl::getImplementation< fwliteeswriter::DummyType > ( fwliteeswriter::DummyType const *&  iData,
ESProxyIndex  iProxyIndex,
bool  iTransientAccessOnly,
ComponentDescription const *&  oDesc,
std::shared_ptr< ESHandleExceptionFactory > &  whyFailedFactory,
EventSetupImpl const *  iEventSetupImpl 
) const

Definition at line 124 of file FWLiteESRecordWriterAnalyzer.cc.

References cms::cuda::assert(), Exception, crabWrapper::key, SiStripPI::max, edm::eventsetup::DataKey::name(), and edm::eventsetup::SimpleStringTag::value().

130  {
131  DataKey const* dataKey = nullptr;
132 
133  if (iProxyIndex.value() == std::numeric_limits<int>::max()) {
134  throw cms::Exception("NoProxyException") << "No data of type \"" << iData->m_tag->name()
135  << "\" with unknown label in record \"" << this->key().name() << "\"";
136  iData->m_data = nullptr;
137  return;
138  }
139  assert(iProxyIndex.value() > -1 and
140  iProxyIndex.value() < static_cast<ESProxyIndex::Value_t>(keysForProxies_.size()));
141  void const* pValue = this->getFromProxyAfterPrefetch(iProxyIndex, iTransientAccessOnly, oDesc, dataKey);
142  if (nullptr == pValue) {
143  throw cms::Exception("NoDataException")
144  << "No data of type \"" << iData->m_tag->name() << "\" with label \"" << dataKey->name().value()
145  << "\" in record \"" << this->key().name() << "\"";
146  }
147  iData->m_data = pValue;
148  }
assert(be >=bs)

◆ fillEventSetupProvider()

void edm::eventsetup::fillEventSetupProvider ( ModuleTypeResolverMaker const *  resolverMaker,
EventSetupsController esController,
EventSetupProvider cp,
ParameterSet params 
)

Definition at line 93 of file EventSetupProviderMaker.cc.

References edm::eventsetup::ComponentFactory< T >::get(), submitPVValidationJobs::params, and CalibrationSummaryClient_cfi::sources.

Referenced by edm::eventsetup::EventSetupsController::makeProvider().

96  {
97  std::vector<std::string> providers = params.getParameter<std::vector<std::string> >("@all_esmodules");
98 
99  for (std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
100  itName != itNameEnd;
101  ++itName) {
102  ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
103  ModuleFactory::get()->addTo(esController, cp, *providerPSet, resolverMaker);
104  }
105 
106  std::vector<std::string> sources = params.getParameter<std::vector<std::string> >("@all_essources");
107 
108  for (std::vector<std::string>::iterator itName = sources.begin(), itNameEnd = sources.end(); itName != itNameEnd;
109  ++itName) {
110  ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
111  SourceFactory::get()->addTo(esController, cp, *providerPSet, resolverMaker);
112  }
113  }
#define get

◆ findDependentRecordsFor()

template<typename T >
std::set<EventSetupRecordKey> edm::eventsetup::findDependentRecordsFor ( )

Definition at line 47 of file findDependentRecordsFor.h.

References addRecordToDependencies().

47  {
48  std::set<EventSetupRecordKey> returnValue;
49  if constexpr (std::is_base_of_v<edm::eventsetup::DependentRecordTag, T>) {
50  using list_type = typename T::list_type;
51  using Pop = edm::mpl::Pop<list_type>;
52 
53  const typename Pop::Item* begin(nullptr);
54  const typename Pop::Remaining* remaining(nullptr);
55  addRecordToDependencies(begin, remaining, returnValue);
56  }
57  return returnValue;
58  }
void addRecordToDependencies(const TFirst *, const TRemaining *, std::set< EventSetupRecordKey > &oSet)

◆ findDependents()

static void edm::eventsetup::findDependents ( const EventSetupRecordKey iKey,
Itr  itBegin,
Itr  itEnd,
std::vector< std::shared_ptr< EventSetupRecordProvider >> &  oDependents 
)
static

Definition at line 356 of file EventSetupProvider.cc.

References symbols::deps.

Referenced by edm::eventsetup::EventSetupProvider::resetRecordPlusDependentRecords().

359  {
360  for (Itr it = itBegin; it != itEnd; ++it) {
361  //does it depend on the record in question?
362  const std::set<EventSetupRecordKey>& deps = (*it)->dependentRecords();
363  if (deps.end() != deps.find(iKey)) {
364  oDependents.push_back(*it);
365  //now see who is dependent on this record since they will be indirectly dependent on iKey
366  findDependents((*it)->key(), itBegin, itEnd, oDependents);
367  }
368  }
369  }
static void findDependents(const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider >> &oDependents)
RecordProviders::iterator Itr

◆ kAppendToDataLabel()

static const std::string edm::eventsetup::kAppendToDataLabel ( "appendToDataLabel"  )
static

◆ makeEventSetupProvider()

std::unique_ptr< EventSetupProvider > edm::eventsetup::makeEventSetupProvider ( ParameterSet const &  params,
unsigned  subProcessIndex,
ActivityRegistry activityRegistry 
)

Definition at line 24 of file EventSetupProviderMaker.cc.

References cms::Exception::append(), edm::errors::Configuration, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), submitPVValidationJobs::params, AlCaHLTBitMon_QueryRunRegistry::string, and edm::eventsetup::ComponentDescription::unknownID().

Referenced by edm::eventsetup::EventSetupsController::makeProvider().

26  {
27  std::vector<std::string> prefers = params.getParameter<std::vector<std::string> >("@all_esprefers");
28 
29  if (prefers.empty()) {
30  return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex);
31  }
32 
33  EventSetupProvider::PreferredProviderInfo preferInfo;
34  EventSetupProvider::RecordToDataMap recordToData;
35 
36  //recordToData.insert(std::make_pair(std::string("DummyRecord"),
37  // std::make_pair(std::string("DummyData"), std::string())));
38  //preferInfo[ComponentDescription("DummyProxyProvider", "", false)]=
39  // recordToData;
40 
41  for (std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end(); itName != itNameEnd;
42  ++itName) {
43  recordToData.clear();
44  ParameterSet const& preferPSet = params.getParameterSet(*itName);
45  std::vector<std::string> recordNames = preferPSet.getParameterNames();
46  for (std::vector<std::string>::iterator itRecordName = recordNames.begin(), itRecordNameEnd = recordNames.end();
47  itRecordName != itRecordNameEnd;
48  ++itRecordName) {
49  if ((*itRecordName)[0] == '@') {
50  //this is a 'hidden parameter' so skip it
51  continue;
52  }
53 
54  //this should be a record name with its info
55  try {
56  std::vector<std::string> dataInfo = preferPSet.getParameter<std::vector<std::string> >(*itRecordName);
57 
58  if (dataInfo.empty()) {
59  //FUTURE: empty should just mean all data
61  << "The record named " << *itRecordName << " specifies no data items";
62  }
63  //FUTURE: 'any' should be a special name
64  for (std::vector<std::string>::iterator itDatum = dataInfo.begin(), itDatumEnd = dataInfo.end();
65  itDatum != itDatumEnd;
66  ++itDatum) {
67  std::string datumName(*itDatum, 0, itDatum->find_first_of("/"));
68  std::string labelName;
69 
70  if (itDatum->size() != datumName.size()) {
71  labelName = std::string(*itDatum, datumName.size() + 1);
72  }
73  recordToData.insert(std::make_pair(std::string(*itRecordName), std::make_pair(datumName, labelName)));
74  }
75  } catch (cms::Exception const& iException) {
76  cms::Exception theError("ESPreferConfigurationError");
77  theError << "While parsing the es_prefer statement for type="
78  << preferPSet.getParameter<std::string>("@module_type") << " label=\""
79  << preferPSet.getParameter<std::string>("@module_label") << "\" an error occurred.";
80  theError.append(iException);
81  throw theError;
82  }
83  }
84  preferInfo[ComponentDescription(preferPSet.getParameter<std::string>("@module_type"),
85  preferPSet.getParameter<std::string>("@module_label"),
86  ComponentDescription::unknownID(),
87  false)] = recordToData;
88  }
89  return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex, &preferInfo);
90  }

◆ moveFromTo() [1/3]

template<typename FromT , typename ToT >
void edm::eventsetup::moveFromTo ( FromT &  iFrom,
ToT &  iTo 
)

Definition at line 33 of file produce_helpers.h.

References eostools::move().

Referenced by edm::eventsetup::Callback< T, TFunc, TReturn, TRecord, TDecorator >::setData().

33  {
34  iTo = std::move(iFrom);
35  }
def move(src, dest)
Definition: eostools.py:511

◆ moveFromTo() [2/3]

template<typename FromT , typename ToT >
void edm::eventsetup::moveFromTo ( std::unique_ptr< FromT > &  iFrom,
ToT &  iTo 
)

Definition at line 38 of file produce_helpers.h.

References eostools::move().

38  {
39  iTo = std::move(iFrom);
40  }
def move(src, dest)
Definition: eostools.py:511

◆ moveFromTo() [3/3]

template<typename FromT , typename ToT >
void edm::eventsetup::moveFromTo ( std::optional< FromT > &  iFrom,
ToT &  iTo 
)

Definition at line 42 of file produce_helpers.h.

References eostools::move().

42  {
43  iTo = std::move(iFrom.value());
44  }
def move(src, dest)
Definition: eostools.py:511

◆ no_record_exception_message_builder()

void edm::eventsetup::no_record_exception_message_builder ( cms::Exception oException,
const char *  iName,
bool  iKnownRecord 
)

Definition at line 26 of file NoRecordException.cc.

Referenced by edm::eventsetup::NoRecordException< T >::NoRecordException().

28  {
29  oException << "No \"" << iName << "\" record found in the EventSetup.\n";
30  if (iKnownRecord) {
31  oException << "\n The Record is delivered by an ESSource or ESProducer but there is no valid IOV for the "
32  "synchronization value.\n"
33  " Please check \n"
34  " a) if the synchronization value is reasonable and report to the hypernews if it is not.\n"
35  " b) else check that all ESSources have been properly configured. \n";
36  } else {
37  oException << "\n Please add an ESSource or ESProducer that delivers such a record.\n";
38  }
39 }

◆ preferEverything()

static void edm::eventsetup::preferEverything ( const ComponentDescription iComponent,
const RecordProviders iRecordProviders,
RecordToPreferred iReturnValue 
)
static

find everything made by a DataProxyProvider and add it to the 'preferred' list

Definition at line 114 of file EventSetupProvider.cc.

References cms::cuda::assert(), makeMuonMisalignmentScenario::components, Exception, edm::eventsetup::ComponentDescription::label_, edm::eventsetup::ComponentDescription::type_, and edm::eventsetup::DataProxyProvider::KeyedProxies::unInitialized().

Referenced by edm::eventsetup::EventSetupProvider::determinePreferred().

116  {
117  //need to get our hands on the actual DataProxyProvider
118  bool foundProxyProvider = false;
119  for (auto const& recordProvider : iRecordProviders) {
120  std::set<ComponentDescription> components = recordProvider->proxyProviderDescriptions();
121  if (components.find(iComponent) != components.end()) {
122  std::shared_ptr<DataProxyProvider> proxyProv = recordProvider->proxyProvider(*(components.find(iComponent)));
123  assert(proxyProv.get());
124 
125  std::set<EventSetupRecordKey> records = proxyProv->usingRecords();
126  for (auto const& recordKey : records) {
127  unsigned int iovIndex = 0; // Doesn't matter which index is picked, at least 1 should always exist
128  DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(recordKey, iovIndex);
129  if (!keyedProxies.unInitialized()) {
130  //add them to our output
131  EventSetupRecordProvider::DataToPreferredProviderMap& dataToProviderMap = iReturnValue[recordKey];
132 
133  for (auto keyedProxy : keyedProxies) {
134  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
135  dataToProviderMap.find(keyedProxy.dataKey_);
136  if (itFind != dataToProviderMap.end()) {
137  throw cms::Exception("ESPreferConflict")
138  << "Two providers have been set to be preferred for\n"
139  << keyedProxy.dataKey_.type().name() << " \"" << keyedProxy.dataKey_.name().value() << "\""
140  << "\n the providers are "
141  << "\n 1) type=" << itFind->second.type_ << " label=\"" << itFind->second.label_ << "\""
142  << "\n 2) type=" << iComponent.type_ << " label=\"" << iComponent.label_ << "\""
143  << "\nPlease modify configuration so only one is preferred";
144  }
145  dataToProviderMap.insert(std::make_pair(keyedProxy.dataKey_, iComponent));
146  }
147  }
148  }
149  foundProxyProvider = true;
150  break;
151  }
152  }
153  if (!foundProxyProvider) {
154  throw cms::Exception("ESPreferNoProvider")
155  << "Could not make type=\"" << iComponent.type_ << "\" label=\"" << iComponent.label_
156  << "\" a preferred Provider."
157  << "\n Please check spelling of name, or that it was loaded into the job.";
158  }
159  }
assert(be >=bs)
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap

◆ recordDoesExist()

bool edm::eventsetup::recordDoesExist ( edm::EventSetupImpl const &  iES,
edm::eventsetup::EventSetupRecordKey const &  iKey 
)

Definition at line 22 of file NoRecordException.cc.

References edm::EventSetupImpl::recordIsProvidedByAModule().

Referenced by edm::EventSetup::get().

22  {
23  return iES.recordIsProvidedByAModule(iKey);
24 }

◆ swap()

void edm::eventsetup::swap ( DataKey a,
DataKey b 
)
inline

Definition at line 85 of file DataKey.h.

References a, and b.

Referenced by edm::eventsetup::NumberOfConcurrentIOVs::clear(), and edm::eventsetup::DataProxyProvider::keyedProxies().

85 { a.swap(b); }
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ synchronousEventSetupForInstance()

void edm::eventsetup::synchronousEventSetupForInstance ( IOVSyncValue const &  syncValue,
oneapi::tbb::task_group &  iGroup,
eventsetup::EventSetupsController espController 
)

Definition at line 463 of file EventSetupsController.cc.

References CMS_SA_ALLOW, edm::WaitingTaskHolder::doneWaiting(), edm::WaitingTaskList::doneWaiting(), and edm::eventsetup::EventSetupsController::eventSetupForInstanceAsync().

Referenced by edm::test::TestProcessor::beginLuminosityBlock(), edm::test::TestProcessor::beginRun(), edm::test::TestProcessor::endLuminosityBlock(), edm::test::TestProcessor::endRun(), and edm::eventsetup::SynchronousEventSetupsController::eventSetupForInstance().

465  {
466  FinalWaitingTask waitUntilIOVInitializationCompletes{iGroup};
467 
468  // These do nothing ...
469  WaitingTaskList dummyWaitingTaskList;
470  std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
471 
472  {
473  WaitingTaskHolder waitingTaskHolder(iGroup, &waitUntilIOVInitializationCompletes);
474  // Caught exception is propagated via WaitingTaskHolder
475  CMS_SA_ALLOW try {
476  // All the real work is done here.
477  espController.eventSetupForInstanceAsync(
478  syncValue, waitingTaskHolder, dummyWaitingTaskList, dummyEventSetupImpls);
479  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
480  } catch (...) {
481  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
482  waitingTaskHolder.doneWaiting(std::current_exception());
483  }
484  }
485  waitUntilIOVInitializationCompletes.wait();
486  }
#define CMS_SA_ALLOW