28 namespace eventsetup {
32 typedef std::map< DataKey , const DataProxy* >
Proxies;
45 transientAccessRequested_(
false)
106 <<
" want to deliver type=\""<< iKey.
type().
name() <<
"\" label=\""<<iKey.
name().
value()<<
"\"\n"
107 <<
" from record "<<
key().
type().
name() <<
". The two providers are \n"
111 <<
"\n or find a way of configuring one of them so it does not deliver this data"
112 <<
"\n or use an es_prefer statement in the configuration to choose one.";
147 bool iTransientAccessOnly)
const
153 const void* hold = 0;
158 hold = proxy->
get(*
this, iKey,iTransientAccessOnly);
183 return entry->second;
194 proxy->
doGet(*
this, aKey, aGetTransiently);
237 for(std::map< DataKey , const DataProxy* >::const_iterator it =
proxies_.begin(), itEnd=
proxies_.end();
240 oToFill.push_back(it->first);
248 if(iDesc && iTag.
module().size()) {
249 bool matched =
false;
250 if(iDesc->
label_.empty()) {
256 throw cms::Exception(
"EventSetupWrongModule") <<
"EventSetup data was retrieved using an ESInputTag with the values\n"
257 <<
" moduleLabel = '"<<iTag.
module()<<
"'\n"
258 <<
" dataLabel = '"<<iTag.
data()<<
"'\n"
259 <<
"but the data matching the C++ class type and dataLabel comes from module type="<<iDesc->
type_<<
" label='"<<iDesc->
label_
260 <<
"'.\n Please either change the ESInputTag's 'module' label to be "<<( iDesc->
label_.empty()? iDesc->
type_:iDesc->
label_)
261 <<
"\n or add the EventSetup module "<<iTag.
module()<<
" to the configuration.";
269 std::ostringstream ost;
270 ost <<
"Using EventSetup component "
271 << iDescription->
type_
272 <<
"/'" << iDescription->
label_
bool cacheIsValid() const
void fillRegisteredDataKeys(std::vector< DataKey > &oToFill) const
clears the oToFill vector and then fills it with the keys for all registered data keys ...
bool wasGotten(DataKey const &aKey) const
char const * name() const
virtual EventSetupRecordKey key() const =0
void addTraceInfoToCmsException(cms::Exception &iException, char const *iName, ComponentDescription const *, DataKey const &) const
void const * get(EventSetupRecord const &, DataKey const &iKey, bool iTransiently) const
std::map< DataKey, DataProxy const * > proxies_
ComponentDescription const * providerDescription(DataKey const &aKey) const
U second(std::pair< T, U > const &p)
unsigned long long cacheIdentifier_
DataProxy const * find(DataKey const &aKey) const
virtual ~EventSetupRecord()
void transientAccessRequested() const
void stdToEDM(std::exception const &e)
std::pair< std::string, MonitorElement * > entry
void doGet(EventSetupRecord const &iRecord, DataKey const &iKey, bool iTransiently) const
Container::value_type value_type
void charPtrToEDM(char const *c)
ComponentDescription const * providerDescription() const
returns the description of the DataProxyProvider which owns this Proxy
void stringToEDM(std::string &s)
bool add(DataKey const &iKey, DataProxy const *iProxy)
const TypeTag & type() const
void addContext(std::string const &context)
bool transientAccessRequested_
std::map< DataKey, const DataProxy * > Proxies
bool transientReset()
returns 'true' if a transient request has occurred since the last call to transientReset.
const TypeTag & type() const
const NameTag & name() const
const char * value() const
void validate(ComponentDescription const *, ESInputTag const &) const
bool doGet(DataKey const &aKey, bool aGetTransiently=false) const
returns false if no data available for key
void set(ValidityInterval const &)
void const * getFromProxy(DataKey const &iKey, ComponentDescription const *&iDesc, bool iTransientAccessOnly) const
ValidityInterval validity_