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< LumiCorrectionParam >
 
struct  data_default_record_trait< trackerDTC::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  ESSourceDataProxyBase
 
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 &, std::shared_ptr< T >, const void *)
 
template<class T >
void addProviderTo (EventSetupProvider &iProvider, std::shared_ptr< T > iComponent, const DataProxyProvider *)
 
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<>
bool EventSetupRecord::get< fwliteeswriter::Handle > (const std::string &iName, fwliteeswriter::Handle &iHolder) const
 
template<>
void EventSetupRecordImpl::getImplementation< fwliteeswriter::DummyType > (fwliteeswriter::DummyType const *&iData, const char *iName, const ComponentDescription *&iDesc, bool iTransientAccessOnly, std::shared_ptr< ESHandleExceptionFactory > &whyFailedFactory, ESParentContext const &iParent, edm::EventSetupImpl const *iEventSetupImpl) const
 
void fillEventSetupProvider (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, tbb::task_arena *taskArena)
 
template<typename FromT , typename ToT >
void moveFromTo (FromT &iFrom, ToT &iTo)
 
template<typename FromT , typename ToT >
void moveFromTo (std::optional< FromT > &iFrom, ToT &iTo)
 
template<typename FromT , typename ToT >
void moveFromTo (std::unique_ptr< 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, tbb::task_group &iGroup, eventsetup::EventSetupsController &espController)
 
void validateEventSetupParameters (ParameterSet &pset)
 

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 353 of file EventSetupProvider.cc.

◆ LooperFactory

Definition at line 102 of file LooperFactory.h.

◆ LooperPluginFactory

Definition at line 104 of file LooperFactory.h.

◆ ModuleFactory

Definition at line 55 of file ModuleFactory.h.

◆ ModulePluginFactory

Definition at line 56 of file ModuleFactory.h.

◆ Proxies

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

Definition at line 33 of file EventSetupRecord.cc.

◆ RecordProviders

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

Definition at line 109 of file EventSetupProvider.cc.

◆ RecordToPreferred

Definition at line 110 of file EventSetupProvider.cc.

◆ SourceFactory

Definition at line 84 of file SourceFactory.h.

◆ SourcePluginFactory

Definition at line 87 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.

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

References allowConcurrentIOVs().

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

◆ addProviderTo() [1/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  }

◆ addProviderTo() [2/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.

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  }

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

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

◆ 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.

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  }

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

Referenced by findDependentRecordsFor().

◆ allowConcurrentIOVs()

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

Definition at line 46 of file RecordDependencyRegister.cc.

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  }

References genParticles_cff::map.

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

◆ 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.

169  {
170  DependsOnDoNothingCaller<TRecord> tCaller;
172  temp(createDependsOnCaller(iT, iRec, iHolder.holdee_, tCaller));
173  return temp;
174  }

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

◆ 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.

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  }

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

◆ 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.

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

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

◆ dependencies()

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

Definition at line 37 of file RecordDependencyRegister.cc.

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  }

References genParticles_cff::map.

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

◆ 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 ComponentDescription s_desc;
35  return &s_desc;
36  }

◆ EventSetupRecord::get< fwliteeswriter::Handle >()

template<>
bool edm::eventsetup::EventSetupRecord::get< fwliteeswriter::Handle > ( const std::string &  iName,
fwliteeswriter::Handle iHolder 
) const

Definition at line 91 of file FWLiteESRecordWriterAnalyzer.cc.

92  {
94  t.m_tag = &(iHolder.m_info->m_tag);
96  const ComponentDescription* desc = nullptr;
97  std::shared_ptr<ESHandleExceptionFactory> dummy;
98  impl_->getImplementation(value, iName.c_str(), desc, true, dummy, *context_, eventSetupImpl_);
99  iHolder.m_data = t.m_data;
100  iHolder.m_desc = desc;
101  return true;
102  }

References submitPVResolutionJobs::desc, fwliteeswriter::Handle::m_data, fwliteeswriter::Handle::m_desc, fwliteeswriter::Handle::m_info, and submitPVValidationJobs::t.

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

template<>
void edm::eventsetup::EventSetupRecordImpl::getImplementation< fwliteeswriter::DummyType > ( fwliteeswriter::DummyType const *&  iData,
const char *  iName,
const ComponentDescription *&  iDesc,
bool  iTransientAccessOnly,
std::shared_ptr< ESHandleExceptionFactory > &  whyFailedFactory,
ESParentContext const &  iParent,
edm::EventSetupImpl const *  iEventSetupImpl 
) const

Definition at line 72 of file FWLiteESRecordWriterAnalyzer.cc.

79  {
80  DataKey dataKey(*(iData->m_tag), iName, DataKey::kDoNotCopyMemory);
81 
82  const void* pValue = this->getFromProxy(dataKey, iDesc, iTransientAccessOnly, iParent, iEventSetupImpl);
83  if (nullptr == pValue) {
84  throw cms::Exception("NoProxyException") << "No data of type \"" << iData->m_tag->name() << "\" with label \""
85  << iName << "\" in record \"" << this->key().name() << "\"";
86  }
87  iData->m_data = pValue;
88  }

References Exception, edm::eventsetup::DataKey::kDoNotCopyMemory, crabWrapper::key, fwliteeswriter::DummyType::m_data, fwliteeswriter::DummyType::m_tag, and edm::eventsetup::heterocontainer::HCTypeTag::name().

◆ fillEventSetupProvider()

void edm::eventsetup::fillEventSetupProvider ( EventSetupsController esController,
EventSetupProvider cp,
ParameterSet params 
)

Definition at line 94 of file EventSetupProviderMaker.cc.

94  {
95  std::vector<std::string> providers = params.getParameter<std::vector<std::string> >("@all_esmodules");
96 
97  for (std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
98  itName != itNameEnd;
99  ++itName) {
100  ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
101  validateEventSetupParameters(*providerPSet);
102  providerPSet->registerIt();
103  ModuleFactory::get()->addTo(esController, cp, *providerPSet);
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  validateEventSetupParameters(*providerPSet);
112  providerPSet->registerIt();
113  SourceFactory::get()->addTo(esController, cp, *providerPSet);
114  }
115  }

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

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

◆ findDependentRecordsFor()

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

Definition at line 47 of file findDependentRecordsFor.h.

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  }

References addRecordToDependencies().

◆ findDependents()

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

Definition at line 354 of file EventSetupProvider.cc.

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

References symbols::deps.

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

◆ 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,
tbb::task_arena *  taskArena 
)

Definition at line 25 of file EventSetupProviderMaker.cc.

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

References cms::Exception::append(), edm::errors::Configuration, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), CalibrationSummaryClient_cfi::params, and AlCaHLTBitMon_QueryRunRegistry::string.

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

◆ 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.

33  {
34  iTo = std::move(iFrom);
35  }

References eostools::move().

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

◆ moveFromTo() [2/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.

42  {
43  iTo = std::move(iFrom.value());
44  }

References eostools::move().

◆ moveFromTo() [3/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.

38  {
39  iTo = std::move(iFrom);
40  }

References eostools::move().

◆ 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.

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  "synchronizatio 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 }

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

◆ 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 112 of file EventSetupProvider.cc.

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

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().

◆ recordDoesExist()

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

Definition at line 22 of file NoRecordException.cc.

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

References edm::EventSetupImpl::recordIsProvidedByAModule().

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

◆ swap()

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

Definition at line 85 of file DataKey.h.

85 { a.swap(b); }

References a, and b.

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

◆ synchronousEventSetupForInstance()

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

Definition at line 414 of file EventSetupsController.cc.

416  {
417  FinalWaitingTask waitUntilIOVInitializationCompletes;
418 
419  // These do nothing ...
420  WaitingTaskList dummyWaitingTaskList;
421  std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
422 
423  {
424  WaitingTaskHolder waitingTaskHolder(iGroup, &waitUntilIOVInitializationCompletes);
425  // Caught exception is propagated via WaitingTaskHolder
426  CMS_SA_ALLOW try {
427  // All the real work is done here.
428  espController.eventSetupForInstanceAsync(
429  syncValue, waitingTaskHolder, dummyWaitingTaskList, dummyEventSetupImpls);
430  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
431  } catch (...) {
432  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
433  waitingTaskHolder.doneWaiting(std::current_exception());
434  }
435  }
436  do {
437  iGroup.wait();
438  } while (not waitUntilIOVInitializationCompletes.done());
439 
440  if (waitUntilIOVInitializationCompletes.exceptionPtr() != nullptr) {
441  std::rethrow_exception(*(waitUntilIOVInitializationCompletes.exceptionPtr()));
442  }
443  }

References CMS_SA_ALLOW, edm::FinalWaitingTask::done(), edm::WaitingTaskHolder::doneWaiting(), edm::WaitingTaskList::doneWaiting(), edm::eventsetup::EventSetupsController::eventSetupForInstanceAsync(), and edm::WaitingTask::exceptionPtr().

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

◆ validateEventSetupParameters()

void edm::eventsetup::validateEventSetupParameters ( ParameterSet pset)

Definition at line 118 of file EventSetupProviderMaker.cc.

118  {
119  std::string modtype;
121  modtype = pset.getParameter<std::string>("@module_type");
122  moduleLabel = pset.getParameter<std::string>("@module_label");
123  // Check for the "unlabeled" case
124  // This is an artifact left over from the old configuration language
125  // we were using before switching to the python configuration
126  // This is handled in the validation code and python configuration
127  // files by using a label equal to the module typename.
128  if (moduleLabel == std::string("")) {
129  moduleLabel = modtype;
130  }
131 
132  std::unique_ptr<ParameterSetDescriptionFillerBase> filler(
134  ConfigurationDescriptions descriptions(filler->baseType(), modtype);
135  filler->fill(descriptions);
136  try {
137  edm::convertException::wrap([&]() { descriptions.validate(pset, moduleLabel); });
138  } catch (cms::Exception& iException) {
139  std::ostringstream ost;
140  ost << "Validating configuration of ESProducer or ESSource of type " << modtype << " with label: '"
141  << moduleLabel << "'";
142  iException.addContext(ost.str());
143  throw;
144  }
145  }

References cms::Exception::addContext(), beamerCreator::create(), trigObjTnPSource_cfi::filler, get, HerwigMaxPtPartonFilter_cfi::moduleLabel, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and edm::convertException::wrap().

Referenced by fillEventSetupProvider().

cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
DataKey
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
fwliteeswriter::Handle::m_data
const void * m_data
Definition: FWLiteESRecordWriterAnalyzer.cc:59
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
edm::eventsetup::DataProxyProvider::KeyedProxies::unInitialized
bool unInitialized() const
Definition: DataProxyProvider.cc:38
cms::cuda::assert
assert(be >=bs)
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
hgcal_conditions::parameters
Definition: HGCConditions.h:86
edm::eventsetup::DataProxyProvider::KeyedProxies
Definition: DataProxyProvider.h:73
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
edm::eventsetup::depends_on::makeCaller
DependsOnCaller< T, TRecord, T2, typename HolderToCaller< TRecord, T1 >::Caller_t > makeCaller(T *iT, const TRecord *iRec, const TwoHolder< T1, void(T::*)(const T2 &)> &iHolder)
Definition: eventsetup_dependsOn.h:147
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
ESPreFunctorDecorator
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::eventsetup::ComponentDescription::label_
std::string label_
Definition: ComponentDescription.h:31
edm::eventsetup::ComponentDescription::type_
std::string type_
Definition: ComponentDescription.h:32
edm::eventsetup::createDependsOnCaller
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller(T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)
Definition: eventsetup_dependsOn.h:87
edm::convertException::wrap
auto wrap(F iFunc) -> decltype(iFunc())
Definition: ConvertException.h:19
edm::eventsetup::findDependents
static void findDependents(const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider >> &oDependents)
Definition: EventSetupProvider.cc:354
WaitingTaskHolder
b
double b
Definition: hdecay.h:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::eventsetup::validateEventSetupParameters
void validateEventSetupParameters(ParameterSet &pset)
Definition: EventSetupProviderMaker.cc:118
a
double a
Definition: hdecay.h:119
ParameterSet
Definition: Functions.h:16
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
value
Definition: value.py:1
WaitingTaskList
get
#define get
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::eventsetup::EventSetupRecordProvider::DataToPreferredProviderMap
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap
Definition: EventSetupRecordProvider.h:51
eostools.move
def move(src, dest)
Definition: eostools.py:511
ConfigurationDescriptions
edm::eventsetup::addRecordToDependencies
void addRecordToDependencies(const TFirst *, const TRemaining *, std::set< EventSetupRecordKey > &oSet)
Definition: findDependentRecordsFor.h:36
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:245
fwliteeswriter::Handle::m_desc
const edm::eventsetup::ComponentDescription * m_desc
Definition: FWLiteESRecordWriterAnalyzer.cc:61
cms::Exception
Definition: Exception.h:70
genParticles_cff.map
map
Definition: genParticles_cff.py:11
dummy
Definition: DummySelector.h:38
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
fwliteeswriter::DummyType
Definition: FWLiteESRecordWriterAnalyzer.cc:53
symbols.deps
deps
Definition: symbols.py:55
edm::mpl::Pop
Definition: mplVector.h:62
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
crabWrapper.key
key
Definition: crabWrapper.py:19
edm::errors::Configuration
Definition: EDMException.h:36
edm::eventsetup::allowConcurrentIOVs
bool allowConcurrentIOVs(EventSetupRecordKey const &)
Definition: RecordDependencyRegister.cc:46
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::eventsetup::Itr
RecordProviders::iterator Itr
Definition: EventSetupProvider.cc:353
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31
fwliteeswriter::Handle::m_info
const DataInfo * m_info
Definition: FWLiteESRecordWriterAnalyzer.cc:60