CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Typedefs | Functions | Variables
edm::eventsetup Namespace Reference

Namespaces

 depends_on
 
 heterocontainer
 
 looper
 
 produce
 

Classes

class  Callback
 
struct  CallbackBase
 
class  CallbackProxy
 
struct  CallbackSimpleDecorator
 
struct  ComponentDescription
 
class  ComponentFactory
 
class  ComponentMaker
 
class  ComponentMakerBase
 
class  ComponentMakerBaseHelper
 
struct  data_default_record_trait
 
struct  data_default_record_trait< DIPLumiDetail >
 
struct  data_default_record_trait< DIPLumiSummary >
 
struct  data_default_record_trait< ElectronLikelihood >
 
struct  data_default_record_trait< HepPDT::ParticleDataTable >
 
struct  data_default_record_trait< LumiCorrectionParam >
 
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 > >
 
class  DependentRecordImplementation
 
class  DependentRecordIntervalFinder
 
struct  DependentRecordTag
 
struct  DependsOnCaller
 
struct  DependsOnDoNothingCaller
 
class  ESPreFunctorDecorator
 
class  ESProducerInfo
 
class  ESSourceInfo
 
class  EventSetupKnownRecordsSupplier
 
class  EventSetupProvider
 
class  EventSetupRecord
 
class  EventSetupRecordImplementation
 
class  EventSetupRecordKey
 
class  EventSetupRecordProvider
 
class  EventSetupRecordProviderFactory
 
class  EventSetupRecordProviderFactoryManager
 
class  EventSetupRecordProviderFactoryTemplate
 
class  EventSetupRecordProviderTemplate
 
class  EventSetupsController
 
struct  FactoryInfo
 
struct  FindDependenciesFromDependentRecord
 
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
 
struct  NoDependenciesForRecord
 
class  NoProxyException
 
class  NoRecordException
 
class  ParameterSetIDHolder
 
class  ProxyArgumentFactoryTemplate
 
class  ProxyFactoryBase
 
class  ProxyFactoryTemplate
 
class  SimpleStringTag
 
struct  SourceMaker
 
struct  SourceMakerTraits
 

Typedefs

typedef NameTag IdTags
 
typedef Providers::iterator Itr
 
typedef ComponentFactory
< LooperMakerTraits
LooperFactory
 
typedef
edmplugin::PluginFactory
< edm::eventsetup::ComponentMakerBase
< LooperMakerTraits > *()> 
LooperPluginFactory
 
typedef ComponentFactory
< ModuleMakerTraits
ModuleFactory
 
typedef
edmplugin::PluginFactory
< edm::eventsetup::ComponentMakerBase
< ModuleMakerTraits > *()> 
ModulePluginFactory
 
typedef std::map
< EventSetupRecordKey,
std::shared_ptr
< EventSetupRecordProvider > > 
Providers
 
typedef std::map< DataKey,
const DataProxy * > 
Proxies
 
typedef std::map
< EventSetupRecordKey,
EventSetupRecordProvider::DataToPreferredProviderMap
RecordToPreferred
 
typedef ComponentFactory
< SourceMakerTraits
SourceFactory
 
typedef
edmplugin::PluginFactory
< edm::eventsetup::ComponentMakerBase
< edm::eventsetup::SourceMakerTraits > *()> 
SourcePluginFactory
 
typedef heterocontainer::HCTypeTag TypeTag
 

Functions

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 T >
void addRecordToDependencies (const T *, const T *, std::set< EventSetupRecordKey > &)
 
template<typename TFirst , typename TEnd >
void addRecordToDependencies (const TFirst *, const TEnd *iEnd, std::set< EventSetupRecordKey > &oSet)
 
template<typename FromT , typename ToT >
void copyFromTo (FromT &iFrom, ToT &iTo)
 
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)
 
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 RecordToPreferred determinePreferred (const EventSetupProvider::PreferredProviderInfo *iInfo, const Providers &iProviders)
 
static const ComponentDescriptiondummyDescription ()
 
template<class T >
void eventSetupGetImplementation (EventSetup const &iEventSetup, T const *&iValue)
 
template<>
void EventSetupRecord::get< fwliteeswriter::Handle > (const std::string &iName, fwliteeswriter::Handle &iHolder) const
 
template<>
void EventSetupRecord::getImplementation< fwliteeswriter::DummyType > (fwliteeswriter::DummyType const *&iData, const char *iName, const ComponentDescription *&iDesc, bool iTransientAccessOnly, std::shared_ptr< ESHandleExceptionFactory > &whyFailedFactory) const
 
template<class T >
void eventSetupTryToGetImplementation (EventSetup const &iEventSetup, T const *&iValue)
 
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)
 
template<class ProxyT >
void insertProxy (DataProxyProvider::KeyedProxies &iList, std::shared_ptr< ProxyT > iProxy, const char *iName="")
 
IOVSyncValue const & iovSyncValueFrom (edm::EventSetup const &)
 
static const std::string kAppendToDataLabel ("appendToDataLabel")
 
std::auto_ptr< EventSetupProvidermakeEventSetupProvider (ParameterSet const &params, unsigned subProcessIndex)
 
void no_record_exception_message_builder (cms::Exception &, const char *, IOVSyncValue const &, bool iKnownRecord)
 
static void preferEverything (const ComponentDescription &iComponent, const Providers &iProviders, RecordToPreferred &iReturnValue)
 find everything made by a DataProxyProvider and add it to the 'preferred' list More...
 
bool recordDoesExist (edm::EventSetup const &, edm::eventsetup::EventSetupRecordKey const &)
 
void swap (DataKey &a, DataKey &b)
 
void validateEventSetupParameters (ParameterSet &pset)
 

Variables

static std::recursive_mutex s_esGlobalMutex
 

Typedef Documentation

Definition at line 51 of file DataKeyTags.h.

typedef Providers::iterator edm::eventsetup::Itr

Definition at line 402 of file EventSetupProvider.cc.

Definition at line 107 of file LooperFactory.h.

Definition at line 109 of file LooperFactory.h.

Definition at line 55 of file ModuleFactory.h.

Definition at line 56 of file ModuleFactory.h.

Definition at line 140 of file EventSetupProvider.cc.

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

Definition at line 32 of file EventSetupRecord.cc.

Definition at line 141 of file EventSetupProvider.cc.

Definition at line 86 of file SourceFactory.h.

Definition at line 88 of file SourceFactory.h.

Definition at line 30 of file DataKeyTags.h.

Function Documentation

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(), idDealer::description, and edm::eventsetup::ComponentDescription::isSource_.

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

42  {
43  std::shared_ptr<DataProxyProvider> pProvider(iComponent);
44  ComponentDescription description = pProvider->description();
45  description.isSource_=true;
46  pProvider->setDescription(description);
47  iProvider.add(pProvider);
48  }
tuple description
Definition: idDealer.py:66
template<class T >
void edm::eventsetup::addProviderTo ( EventSetupProvider ,
std::shared_ptr< T ,
const void *   
)

Definition at line 50 of file SourceFactory.h.

51  {
52  //do nothing
53  }
template<typename T >
void edm::eventsetup::addRecordToDependencies ( const T ,
const T ,
std::set< EventSetupRecordKey > &   
)
template<typename TFirst , typename TEnd >
void edm::eventsetup::addRecordToDependencies ( const TFirst *  ,
const TEnd *  iEnd,
std::set< EventSetupRecordKey > &  oSet 
)

Definition at line 45 of file EventSetupRecordProviderTemplate.h.

References addRecordToDependencies(), edm::eventsetup::EventSetupRecordKey::makeKey(), and GetRecoTauVFromDQM_MC_cff::next.

46  {
48  const typename boost::mpl::next< TFirst >::type * next(nullptr);
49  addRecordToDependencies(next, iEnd, oSet);
50  }
Key makeKey(const IdTag &iIdTag)
Definition: HCMethods.h:28
type
Definition: HCALResponse.h:21
void addRecordToDependencies(const T *, const T *, std::set< EventSetupRecordKey > &)
template<typename FromT , typename ToT >
void edm::eventsetup::copyFromTo ( FromT &  iFrom,
ToT &  iTo 
)

Definition at line 32 of file produce_helpers.h.

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

33  {
34  iTo = iFrom;
35  }
template<typename T , typename TRecord , typename TDecorator >
const TDecorator& edm::eventsetup::createDecoratorFrom ( T ,
const TRecord *  ,
const TDecorator &  iDec 
)
inline

Definition at line 93 of file ESProducer.h.

Referenced by edm::ESProducer::setWhatProduced().

93  {
94  return iDec;
95  }
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 167 of file eventsetup_dependsOn.h.

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

167  {
168  DependsOnDoNothingCaller<TRecord> tCaller;
170  temp(createDependsOnCaller(iT, iRec, iHolder.holdee_, tCaller));
171  return temp;
172  }
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller(T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)
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 181 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().

181  {
183  (createDependsOnCaller(iT, iRec, iHolder.h2_, makeCaller(iT, iRec, iHolder.h1_)));
184  }
DependsOnCaller< T, TRecord, TDependsOnRecord, DependsOnDoNothingCaller< TRecord > > makeCaller(T *iT, const TRecord *iRec, const OneHolder< T, TDependsOnRecord > &iHolder)
DependsOnCaller< T, TRecord, TDependsOnRecord, TCallerChain > createDependsOnCaller(T *iCallee, const TRecord *, void(T::*iMethod)(const TDependsOnRecord &), const TCallerChain &iChain)
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 89 of file eventsetup_dependsOn.h.

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

90  {
91  return DependsOnCaller<T,TRecord, TDependsOnRecord, TCallerChain>(iCallee, iMethod, iChain);
92  }
template<typename T , typename TDependsOnRecord >
depends_on::OneHolder<T,TDependsOnRecord> edm::eventsetup::dependsOn ( void(T::*)(const TDependsOnRecord &)  iT)
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 194 of file eventsetup_dependsOn.h.

194 { return depends_on::OneHolder<T, T1>(iT1) & iT2; }
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 198 of file eventsetup_dependsOn.h.

198 { return depends_on::OneHolder<T,T1>(iT1) & iT2 & iT3; }
static RecordToPreferred edm::eventsetup::determinePreferred ( const EventSetupProvider::PreferredProviderInfo *  iInfo,
const Providers iProviders 
)
static

Definition at line 200 of file EventSetupProvider.cc.

References assert(), makeMuonMisalignmentScenario::components, Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), plotBeamSpotDB::first, preferEverything(), align_cfg::recordName, AlCaHLTBitMon_QueryRunRegistry::string, and edm::eventsetup::EventSetupRecordKey::type().

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

202 {
203  using namespace edm::eventsetup;
204  RecordToPreferred returnValue;
205  if(0 != iInfo){
206  for(EventSetupProvider::PreferredProviderInfo::const_iterator itInfo = iInfo->begin(),
207  itInfoEnd = iInfo->end();
208  itInfo != itInfoEnd;
209  ++itInfo) {
210  if(itInfo->second.empty()) {
211  //want everything
212  preferEverything(itInfo->first, iProviders, returnValue);
213  } else {
214  for(EventSetupProvider::RecordToDataMap::const_iterator itRecData = itInfo->second.begin(),
215  itRecDataEnd = itInfo->second.end();
216  itRecData != itRecDataEnd;
217  ++itRecData) {
218  std::string recordName= itRecData->first;
220  if(recordKey.type() == eventsetup::EventSetupRecordKey::TypeTag()) {
221  throw cms::Exception("ESPreferUnknownRecord") <<"Unknown record \""<<recordName
222  <<"\" used in es_prefer statement for type="
223  <<itInfo->first.type_<<" label=\""<<itInfo->first.label_
224  <<"\"\n Please check spelling.";
225  //record not found
226  }
227  //See if the ProxyProvider provides something for this Record
228  Providers::const_iterator itRecordProvider = iProviders.find(recordKey);
229  assert(itRecordProvider != iProviders.end());
230 
231  std::set<ComponentDescription> components = itRecordProvider->second->proxyProviderDescriptions();
232  std::set<ComponentDescription>::iterator itProxyProv = components.find(itInfo->first);
233  if(itProxyProv == components.end()){
234  throw cms::Exception("ESPreferWrongRecord")<<"The type="<<itInfo->first.type_<<" label=\""<<
235  itInfo->first.label_<<"\" does not provide data for the Record "<<recordName;
236  }
237  //Does it data type exist?
238  eventsetup::TypeTag datumType = eventsetup::TypeTag::findType(itRecData->second.first);
239  if(datumType == eventsetup::TypeTag()) {
240  //not found
241  throw cms::Exception("ESPreferWrongDataType")<<"The es_prefer statement for type="<<itInfo->first.type_<<" label=\""<<
242  itInfo->first.label_<<"\" has the unknown data type \""<<itRecData->second.first<<"\""
243  <<"\n Please check spelling";
244  }
245  eventsetup::DataKey datumKey(datumType, itRecData->second.second.c_str());
246 
247  //Does the proxyprovider make this?
248  std::shared_ptr<DataProxyProvider> proxyProv =
249  itRecordProvider->second->proxyProvider(*itProxyProv);
250  const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(recordKey);
251  if(std::find_if(keyedProxies.begin(), keyedProxies.end(),
252  boost::bind(std::equal_to<DataKey>(), datumKey, boost::bind(&DataProxyProvider::KeyedProxies::value_type::first,_1))) ==
253  keyedProxies.end()){
254  throw cms::Exception("ESPreferWrongData")<<"The es_prefer statement for type="<<itInfo->first.type_<<" label=\""<<
255  itInfo->first.label_<<"\" specifies the data item \n"
256  <<" type=\""<<itRecData->second.first<<"\" label=\""<<itRecData->second.second<<"\""
257  <<" which is not provided. Please check spelling.";
258  }
259 
261  =returnValue[recordKey];
262  //has another provider already been specified?
263  if(dataToProviderMap.end() != dataToProviderMap.find(datumKey)) {
264  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
265  dataToProviderMap.find(datumKey);
266  throw cms::Exception("ESPreferConflict") <<"Two providers have been set to be preferred for\n"
267  <<datumKey.type().name()<<" \""<<datumKey.name().value()<<"\""
268  <<"\n the providers are "
269  <<"\n 1) type="<<itFind->second.type_<<" label=\""<<itFind->second.label_<<"\""
270  <<"\n 2) type="<<itProxyProv->type_<<" label=\""<<itProxyProv->label_<<"\""
271  <<"\nPlease modify configuration so only one is preferred";
272  }
273  dataToProviderMap.insert(std::make_pair(datumKey,*itProxyProv));
274  }
275  }
276  }
277  }
278  return returnValue;
279 }
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap
assert(m_qm.get())
tuple recordName
Definition: align_cfg.py:66
std::map< EventSetupRecordKey, EventSetupRecordProvider::DataToPreferredProviderMap > RecordToPreferred
std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
heterocontainer::HCTypeTag TypeTag
Definition: DataKeyTags.h:30
static void preferEverything(const ComponentDescription &iComponent, const Providers &iProviders, RecordToPreferred &iReturnValue)
find everything made by a DataProxyProvider and add it to the &#39;preferred&#39; list
heterocontainer::HCTypeTag TypeTag
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
static const ComponentDescription* edm::eventsetup::dummyDescription ( )
static

Definition at line 34 of file DataProxy.cc.

35 {
36  static ComponentDescription s_desc;
37  return &s_desc;
38 }
template<class T >
void edm::eventsetup::eventSetupGetImplementation ( EventSetup const &  iEventSetup,
T const *&  iValue 
)
inline

Definition at line 31 of file eventSetupGetImplementation.h.

References iovSyncValueFrom(), recordDoesExist(), and groupFilesInBlocks::temp.

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

31  {
32  T const* temp = heterocontainer::find<EventSetupRecordKey, T const>(iEventSetup);
33  if(0 == temp) {
34  throw NoRecordException<T>(iovSyncValueFrom(iEventSetup), recordDoesExist(iEventSetup, EventSetupRecordKey::makeKey<T>()));
35  }
36  iValue = temp;
37  }
bool recordDoesExist(edm::EventSetup const &, edm::eventsetup::EventSetupRecordKey const &)
IOVSyncValue const & iovSyncValueFrom(edm::EventSetup const &)
long double T
template<>
void edm::eventsetup::EventSetupRecord::get< fwliteeswriter::Handle > ( const std::string &  iName,
fwliteeswriter::Handle iHolder 
) const

Definition at line 90 of file FWLiteESRecordWriterAnalyzer.cc.

References fwliteeswriter::DummyType::m_data, fwliteeswriter::DummyType::m_tag, lumiQTWidget::t, and relativeConstraints::value.

90  {
92  t.m_tag = &(iHolder.m_info->m_tag);
94  const ComponentDescription* desc = 0;
95  std::shared_ptr<ESHandleExceptionFactory> dummy;
96  this->getImplementation(value, iName.c_str(),desc,true, dummy);
97  iHolder.m_data = t.m_data;
98  iHolder.m_desc = desc;
99  }
const edm::eventsetup::heterocontainer::HCTypeTag * m_tag
const edm::eventsetup::ComponentDescription * m_desc
template<>
void edm::eventsetup::EventSetupRecord::getImplementation< fwliteeswriter::DummyType > ( fwliteeswriter::DummyType const *&  iData,
const char *  iName,
const ComponentDescription *&  iDesc,
bool  iTransientAccessOnly,
std::shared_ptr< ESHandleExceptionFactory > &  whyFailedFactory 
) const

Definition at line 72 of file FWLiteESRecordWriterAnalyzer.cc.

References Exception, edm::eventsetup::DataKey::kDoNotCopyMemory, and relval_steps::key.

76  {
77  DataKey dataKey(*(iData->m_tag),
78  iName,
79  DataKey::kDoNotCopyMemory);
80 
81  const void* pValue = this->getFromProxy(dataKey,iDesc,iTransientAccessOnly);
82  if(0==pValue) {
83  throw cms::Exception("NoProxyException")<<"No data of type \""<<iData->m_tag->name()<<"\" with label \""<<
84  iName<<"\" in record \""<<this->key().name()<<"\"";
85  }
86  iData->m_data = pValue;
87  }
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
template<class T >
void edm::eventsetup::eventSetupTryToGetImplementation ( EventSetup const &  iEventSetup,
T const *&  iValue 
)
inline

Definition at line 40 of file eventSetupGetImplementation.h.

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

40  {
41  iValue = heterocontainer::find<EventSetupRecordKey, T const>(iEventSetup);
42  }
void edm::eventsetup::fillEventSetupProvider ( EventSetupsController &  esController,
EventSetupProvider cp,
ParameterSet params 
)

Definition at line 104 of file EventSetupProviderMaker.cc.

References edm::eventsetup::ComponentFactory< T >::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getPSetForUpdate(), edm::ParameterSet::registerIt(), and validateEventSetupParameters().

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

106  {
107  std::vector<std::string> providers =
108  params.getParameter<std::vector<std::string> >("@all_esmodules");
109 
110  for(std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
111  itName != itNameEnd;
112  ++itName) {
113  ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
114  validateEventSetupParameters(*providerPSet);
115  providerPSet->registerIt();
116  ModuleFactory::get()->addTo(esController,
117  cp,
118  *providerPSet);
119  }
120 
121  std::vector<std::string> sources =
122  params.getParameter<std::vector<std::string> >("@all_essources");
123 
124  for(std::vector<std::string>::iterator itName = sources.begin(), itNameEnd = sources.end();
125  itName != itNameEnd;
126  ++itName) {
127  ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
128  validateEventSetupParameters(*providerPSet);
129  providerPSet->registerIt();
130  SourceFactory::get()->addTo(esController,
131  cp,
132  *providerPSet);
133  }
134  }
void validateEventSetupParameters(ParameterSet &pset)
T get(const Candidate &c)
Definition: component.h:55
template<typename T >
std::set<EventSetupRecordKey> edm::eventsetup::findDependentRecordsFor ( )

Definition at line 71 of file EventSetupRecordProviderTemplate.h.

71  {
73  FindDependenciesFromDependentRecord<T>,
74  NoDependenciesForRecord>::type DepFinder;
75  std::set<EventSetupRecordKey> returnValue;
76  DepFinder::dependentRecords(returnValue);
77  return returnValue;
78  }
type
Definition: HCALResponse.h:21
static void edm::eventsetup::findDependents ( const EventSetupRecordKey iKey,
Itr  itBegin,
Itr  itEnd,
std::vector< std::shared_ptr< EventSetupRecordProvider > > &  oDependents 
)
static

Definition at line 405 of file EventSetupProvider.cc.

References symbols::deps.

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

409 {
410 
411  for(Itr it = itBegin; it != itEnd; ++it) {
412  //does it depend on the record in question?
413  const std::set<EventSetupRecordKey>& deps = it->second->dependentRecords();
414  if(deps.end() != deps.find(iKey)) {
415  oDependents.push_back(it->second);
416  //now see who is dependent on this record since they will be indirectly dependent on iKey
417  findDependents(it->first, itBegin, itEnd, oDependents);
418  }
419  }
420 }
static void findDependents(const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider > > &oDependents)
tuple deps
Definition: symbols.py:54
Providers::iterator Itr
template<class ProxyT >
void edm::eventsetup::insertProxy ( DataProxyProvider::KeyedProxies &  iList,
std::shared_ptr< ProxyT >  iProxy,
const char *  iName = "" 
)
inline

Definition at line 113 of file DataProxyProvider.h.

115  {
117  DataKey(DataKey::makeTypeTag<typename ProxyT::value_type>(),
118  iName),
119  iProxy));
120 
121 }
edm::IOVSyncValue const & edm::eventsetup::iovSyncValueFrom ( edm::EventSetup const &  iES)

Definition at line 23 of file NoRecordException.cc.

References edm::EventSetup::iovSyncValue().

Referenced by eventSetupGetImplementation().

23  {
24  return iES.iovSyncValue();
25 }
static const std::string edm::eventsetup::kAppendToDataLabel ( "appendToDataLabel"  )
static
std::auto_ptr< EventSetupProvider > edm::eventsetup::makeEventSetupProvider ( ParameterSet const &  params,
unsigned  subProcessIndex 
)

Definition at line 26 of file EventSetupProviderMaker.cc.

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

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

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

Definition at line 34 of file NoRecordException.cc.

References edm::EventID::event(), edm::IOVSyncValue::eventID(), edm::IOVSyncValue::luminosityBlockNumber(), edm::EventID::run(), edm::IOVSyncValue::time(), and edm::Timestamp::value().

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

34  {
35  oException
36  << "No \""
37  << iName
38  << "\" record found in the EventSetup for synchronization value\n"
39  << "Run: "<<iValue.eventID().run()
40  <<" LuminosityBlock: "<<iValue.luminosityBlockNumber()
41  <<" Event: "<<iValue.eventID().event()
42  <<" Time: "<<iValue.time().value();
43  if(iKnownRecord) {
44  oException<<"\n The Record is delivered by an ESSource or ESProducer but there is no valid IOV for the synchronizatio value.\n"
45  " Please check \n"
46  " a) if the synchronization value is reasonable and report to the hypernews if it is not.\n"
47  " b) else check that all ESSources have been properly configured. \n";
48  } else {
49  oException <<"\n Please add an ESSource or ESProducer that delivers such a record.\n";
50  }
51 }
static void edm::eventsetup::preferEverything ( const ComponentDescription iComponent,
const Providers iProviders,
RecordToPreferred iReturnValue 
)
static

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

Definition at line 145 of file EventSetupProvider.cc.

References assert(), makeMuonMisalignmentScenario::components, Exception, edm::eventsetup::ComponentDescription::label_, and edm::eventsetup::ComponentDescription::type_.

Referenced by determinePreferred().

148 {
149  //need to get our hands on the actual DataProxyProvider
150  bool foundProxyProvider = false;
151  for(Providers::const_iterator itProvider = iProviders.begin(), itProviderEnd = iProviders.end();
152  itProvider!= itProviderEnd;
153  ++itProvider) {
154  std::set<ComponentDescription> components = itProvider->second->proxyProviderDescriptions();
155  if(components.find(iComponent)!= components.end()) {
156  std::shared_ptr<DataProxyProvider> proxyProv =
157  itProvider->second->proxyProvider(*(components.find(iComponent)));
158  assert(proxyProv.get());
159 
160  std::set<EventSetupRecordKey> records = proxyProv->usingRecords();
161  for(std::set<EventSetupRecordKey>::iterator itRecord = records.begin(),
162  itRecordEnd = records.end();
163  itRecord != itRecordEnd;
164  ++itRecord){
165  const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(*itRecord);
166  if(!keyedProxies.empty()){
167  //add them to our output
168  EventSetupRecordProvider::DataToPreferredProviderMap& dataToProviderMap =
169  iReturnValue[*itRecord];
170 
171  for(DataProxyProvider::KeyedProxies::const_iterator itProxy = keyedProxies.begin(),
172  itProxyEnd = keyedProxies.end();
173  itProxy != itProxyEnd;
174  ++itProxy) {
175  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
176  dataToProviderMap.find(itProxy->first);
177  if(itFind != dataToProviderMap.end()){
178  throw cms::Exception("ESPreferConflict") <<"Two providers have been set to be preferred for\n"
179  <<itProxy->first.type().name()<<" \""<<itProxy->first.name().value()<<"\""
180  <<"\n the providers are "
181  <<"\n 1) type="<<itFind->second.type_<<" label=\""<<itFind->second.label_<<"\""
182  <<"\n 2) type="<<iComponent.type_<<" label=\""<<iComponent.label_<<"\""
183  <<"\nPlease modify configuration so only one is preferred";
184  }
185  dataToProviderMap.insert(std::make_pair(itProxy->first,iComponent));
186  }
187  }
188  }
189  foundProxyProvider=true;
190  break;
191  }
192  }
193  if(!foundProxyProvider) {
194  throw cms::Exception("ESPreferNoProvider")<<"Could not make type=\""<<iComponent.type_
195  <<"\" label=\""<<iComponent.label_<<"\" a preferred Provider."<<
196  "\n Please check spelling of name, or that it was loaded into the job.";
197  }
198 }
assert(m_qm.get())
bool edm::eventsetup::recordDoesExist ( edm::EventSetup const &  iES,
edm::eventsetup::EventSetupRecordKey const &  iKey 
)

Definition at line 28 of file NoRecordException.cc.

References edm::EventSetup::recordIsProvidedByAModule().

Referenced by eventSetupGetImplementation().

28  {
29  return iES.recordIsProvidedByAModule(iKey);
30 }
void edm::eventsetup::swap ( DataKey a,
DataKey b 
)
inline

Definition at line 99 of file DataKey.h.

References edm::eventsetup::DataKey::swap.

Referenced by edm::eventsetup::DataProxyProvider::keyedProxies().

100  {
101  a.swap(b);
102  }
void edm::eventsetup::validateEventSetupParameters ( ParameterSet pset)

Definition at line 137 of file EventSetupProviderMaker.cc.

References cms::Exception::addContext(), beamerCreator::create(), reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::convertException::wrap().

Referenced by fillEventSetupProvider().

137  {
138  std::string modtype;
139  std::string moduleLabel;
140  modtype = pset.getParameter<std::string>("@module_type");
141  moduleLabel = pset.getParameter<std::string>("@module_label");
142  // Check for the "unlabeled" case
143  // This is an artifact left over from the old configuration language
144  // we were using before switching to the python configuration
145  // This is handled in the validation code and python configuration
146  // files by using a label equal to the module typename.
147  if (moduleLabel == std::string("")) {
148  moduleLabel = modtype;
149  }
150 
151  std::auto_ptr<ParameterSetDescriptionFillerBase> filler(
153  ConfigurationDescriptions descriptions(filler->baseType());
154  filler->fill(descriptions);
155  try {
157  descriptions.validate(pset, moduleLabel);
158  });
159  }
160  catch (cms::Exception & iException) {
161  std::ostringstream ost;
162  ost << "Validating configuration of ESProducer or ESSource of type " << modtype
163  << " with label: '" << moduleLabel << "'";
164  iException.addContext(ost.str());
165  throw;
166  }
167  }
void addContext(std::string const &context)
Definition: Exception.cc:227
auto wrap(F iFunc) -> decltype(iFunc())
T get(const Candidate &c)
Definition: component.h:55

Variable Documentation

std::recursive_mutex edm::eventsetup::s_esGlobalMutex
static

Definition at line 28 of file DataProxy.cc.

Referenced by edm::eventsetup::DataProxy::get().