CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions

edm::eventsetup Namespace Reference

Namespaces

namespace  depends_on
namespace  heterocontainer
namespace  looper
namespace  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
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  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
class  NameTag
class  NoDataException
class  NoDataExceptionBase
struct  NoDependenciesForRecord
class  NoProxyException
class  NoRecordException
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,
boost::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, boost::shared_ptr< T > iComponent, const DataProxyProvider *)
template<class T >
void addProviderTo (EventSetupProvider &, boost::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 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 TDecorator >
const TDecorator & createDecoratorFrom (T *, const TRecord *, const TDecorator &iDec)
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 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)
template<typename T , typename TDependsOnRecord >
depends_on::OneHolder< T,
TDependsOnRecord > 
dependsOn (void(T::*iT)(const TDependsOnRecord &))
static RecordToPreferred determinePreferred (const EventSetupProvider::PreferredProviderInfo *iInfo, const Providers &iProviders)
static const ComponentDescriptiondummyDescription ()
template<class T >
void eventSetupGetImplementation (EventSetup const &, T const *&)
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) const
void fillEventSetupProvider (EventSetupProvider &cp, ParameterSet &params, CommonParams const &common)
template<typename T >
std::set< EventSetupRecordKeyfindDependentRecordsFor ()
static void findDependents (const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< boost::shared_ptr< EventSetupRecordProvider > > &oDependents)
template<class ProxyT >
void insertProxy (DataProxyProvider::KeyedProxies &iList, boost::shared_ptr< ProxyT > iProxy, const char *iName="")
std::auto_ptr< EventSetupProvidermakeEventSetupProvider (ParameterSet const &params)
void no_dependent_record_exception_message_builder (cms::Exception &, const EventSetupRecordKey &, const char *)
void no_record_exception_message_builder (cms::Exception &, const char *)
static void preferEverything (const ComponentDescription &iComponent, const Providers &iProviders, RecordToPreferred &iReturnValue)
 find everything made by a DataProxyProvider and add it to the 'preferred' list
void swap (DataKey &a, DataKey &b)
void validateEventSetupParameters (ParameterSet &pset)

Typedef Documentation

Definition at line 52 of file DataKeyTags.h.

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

Definition at line 351 of file EventSetupProvider.cc.

Definition at line 93 of file LooperFactory.h.

Definition at line 95 of file LooperFactory.h.

Definition at line 43 of file ModuleFactory.h.

Definition at line 44 of file ModuleFactory.h.

typedef std::map< EventSetupRecordKey, boost::shared_ptr< EventSetupRecordProvider > > edm::eventsetup::Providers

Definition at line 101 of file EventSetupProvider.cc.

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

Definition at line 29 of file EventSetupRecord.cc.

Definition at line 102 of file EventSetupProvider.cc.

Definition at line 68 of file SourceFactory.h.

Definition at line 70 of file SourceFactory.h.

Definition at line 31 of file DataKeyTags.h.


Function Documentation

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

Definition at line 39 of file SourceFactory.h.

References edm::eventsetup::EventSetupProvider::add(), idDealer::description, and edm::eventsetup::ComponentDescription::isSource_.

Referenced by edm::eventsetup::SourceMakerTraits::addTo(), and edm::eventsetup::LooperMakerTraits::addTo().

      {
            boost::shared_ptr<DataProxyProvider> pProvider(iComponent);
            ComponentDescription description = pProvider->description();
            description.isSource_=true;
            pProvider->setDescription(description);
            iProvider.add(pProvider);
      }
template<class T >
void edm::eventsetup::addProviderTo ( EventSetupProvider ,
boost::shared_ptr< T ,
const void *   
)

Definition at line 48 of file SourceFactory.h.

      {
            //do nothing
      }
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 
)
template<typename FromT , typename ToT >
void edm::eventsetup::copyFromTo ( FromT &  iFrom,
ToT &  iTo 
)

Definition at line 33 of file produce_helpers.h.

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

                                                                       {
       iTo = iFrom;
     }
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]
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().

                                                                                               {
         return iDec;
      }
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]
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 90 of file eventsetup_dependsOn.h.

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

      {
            return DependsOnCaller<T,TRecord, TDependsOnRecord, TCallerChain>(iCallee, iMethod, iChain);
      }
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 195 of file eventsetup_dependsOn.h.

{ 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 199 of file eventsetup_dependsOn.h.

{ return depends_on::OneHolder<T,T1>(iT1) & iT2 & iT3; }
template<typename T , typename TDependsOnRecord >
depends_on::OneHolder<T,TDependsOnRecord> edm::eventsetup::dependsOn ( void(T::*)(const TDependsOnRecord &)  iT)
static RecordToPreferred edm::eventsetup::determinePreferred ( const EventSetupProvider::PreferredProviderInfo *  iInfo,
const Providers iProviders 
) [static]

Definition at line 161 of file EventSetupProvider.cc.

References Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::typelookup::findType(), first, preferEverything(), ecalTPGAnalyzer_cfg::recordName, and edm::eventsetup::EventSetupRecordKey::type().

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

{
   using namespace edm::eventsetup;
   RecordToPreferred returnValue;
   if(0 != iInfo){
      for(EventSetupProvider::PreferredProviderInfo::const_iterator itInfo = iInfo->begin(),
          itInfoEnd = iInfo->end();
          itInfo != itInfoEnd;
          ++itInfo) {
         if(itInfo->second.empty()) {
            //want everything
            preferEverything(itInfo->first, iProviders, returnValue);
         } else {
            for(EventSetupProvider::RecordToDataMap::const_iterator itRecData = itInfo->second.begin(),
                itRecDataEnd = itInfo->second.end();
                itRecData != itRecDataEnd;
                ++itRecData) {
               std::string recordName= itRecData->first;
               EventSetupRecordKey recordKey(eventsetup::EventSetupRecordKey::TypeTag::findType(recordName));
               if(recordKey.type() == eventsetup::EventSetupRecordKey::TypeTag()) {
                  throw cms::Exception("ESPreferUnknownRecord") <<"Unknown record \""<<recordName
                  <<"\" used in es_prefer statement for type="
                  <<itInfo->first.type_<<" label=\""<<itInfo->first.label_
                  <<"\"\n Please check spelling.";
                  //record not found
               }
               //See if the ProxyProvider provides something for this Record
               Providers::const_iterator itRecordProvider = iProviders.find(recordKey);
               assert(itRecordProvider != iProviders.end());
               
               std::set<ComponentDescription> components = itRecordProvider->second->proxyProviderDescriptions();
               std::set<ComponentDescription>::iterator itProxyProv = components.find(itInfo->first);
               if(itProxyProv == components.end()){
                  throw cms::Exception("ESPreferWrongRecord")<<"The type="<<itInfo->first.type_<<" label=\""<<
                  itInfo->first.label_<<"\" does not provide data for the Record "<<recordName;
               }
               //Does it data type exist?
               eventsetup::TypeTag datumType = eventsetup::TypeTag::findType(itRecData->second.first);
               if(datumType == eventsetup::TypeTag()) {
                  //not found
                  throw cms::Exception("ESPreferWrongDataType")<<"The es_prefer statement for type="<<itInfo->first.type_<<" label=\""<<
                  itInfo->first.label_<<"\" has the unknown data type \""<<itRecData->second.first<<"\""
                  <<"\n Please check spelling";
               }
               eventsetup::DataKey datumKey(datumType, itRecData->second.second.c_str());
               
               //Does the proxyprovider make this?
               boost::shared_ptr<DataProxyProvider> proxyProv = 
                  itRecordProvider->second->proxyProvider(*itProxyProv);
               const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(recordKey);
               if(std::find_if(keyedProxies.begin(), keyedProxies.end(), 
                                boost::bind(std::equal_to<DataKey>(), datumKey, boost::bind(&DataProxyProvider::KeyedProxies::value_type::first,_1))) ==
                   keyedProxies.end()){
                  throw cms::Exception("ESPreferWrongData")<<"The es_prefer statement for type="<<itInfo->first.type_<<" label=\""<<
                  itInfo->first.label_<<"\" specifies the data item \n"
                  <<"  type=\""<<itRecData->second.first<<"\" label=\""<<itRecData->second.second<<"\""
                  <<"  which is not provided.  Please check spelling.";
               }
               
               EventSetupRecordProvider::DataToPreferredProviderMap& dataToProviderMap
                  =returnValue[recordKey];
               //has another provider already been specified?
               if(dataToProviderMap.end() != dataToProviderMap.find(datumKey)) {
                  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
                  dataToProviderMap.find(datumKey);
                  throw cms::Exception("ESPreferConflict") <<"Two providers have been set to be preferred for\n"
                  <<datumKey.type().name()<<" \""<<datumKey.name().value()<<"\""
                  <<"\n the providers are "
                  <<"\n 1) type="<<itFind->second.type_<<" label=\""<<itFind->second.label_<<"\""
                  <<"\n 2) type="<<itProxyProv->type_<<" label=\""<<itProxyProv->label_<<"\""
                  <<"\nPlease modify configuration so only one is preferred";
               }
               dataToProviderMap.insert(std::make_pair(datumKey,*itProxyProv));
            }
         }
      }
   }
   return returnValue;
}
static const ComponentDescription* edm::eventsetup::dummyDescription ( ) [static]

Definition at line 32 of file DataProxy.cc.

{
   static ComponentDescription s_desc;
   return &s_desc;
}     
template<class T >
void edm::eventsetup::eventSetupGetImplementation ( EventSetup const &  ,
T const *&   
)

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

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

Definition at line 89 of file FWLiteESRecordWriterAnalyzer.cc.

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

                                                                                                                  {
         fwliteeswriter::DummyType t;
         t.m_tag = &(iHolder.m_info->m_tag);
         const fwliteeswriter::DummyType* value = &t;
         const ComponentDescription* desc = 0;
         this->getImplementation(value, iName.c_str(),desc,true);
         iHolder.m_data = t.m_data;
         iHolder.m_desc = desc;
      }
template<>
void edm::eventsetup::EventSetupRecord::getImplementation< fwliteeswriter::DummyType > ( fwliteeswriter::DummyType const *&  iData,
const char *  iName,
const ComponentDescription *&  iDesc,
bool  iTransientAccessOnly 
) const

Definition at line 73 of file FWLiteESRecordWriterAnalyzer.cc.

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

                                                                                                           {
         DataKey dataKey(*(iData->m_tag),
                         iName,
                         DataKey::kDoNotCopyMemory);
         
         const void* pValue = this->getFromProxy(dataKey,iDesc,iTransientAccessOnly);
         if(0==pValue) {
            throw cms::Exception("NoProxyException");
         }
         iData->m_data = pValue;
      }
void edm::eventsetup::fillEventSetupProvider ( EventSetupProvider cp,
ParameterSet params,
CommonParams const &  common 
)

Definition at line 102 of file EventSetupProviderMaker.cc.

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

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

                                                       {
      std::vector<std::string> providers =
        params.getParameter<std::vector<std::string> >("@all_esmodules");

      for(std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
          itName != itNameEnd;
          ++itName) {
        ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
        validateEventSetupParameters(*providerPSet);
        providerPSet->registerIt();
        ModuleFactory::get()->addTo(cp,
                                    *providerPSet,
                                    common.processName_,
                                    common.releaseVersion_,
                                    common.passID_);
      }

      std::vector<std::string> sources =
        params.getParameter<std::vector<std::string> >("@all_essources");

      for(std::vector<std::string>::iterator itName = sources.begin(), itNameEnd = sources.end();
          itName != itNameEnd;
          ++itName) {
        ParameterSet* providerPSet = params.getPSetForUpdate(*itName);
        validateEventSetupParameters(*providerPSet);
        providerPSet->registerIt();
        SourceFactory::get()->addTo(cp,
                                    *providerPSet,
                                    common.processName_,
                                    common.releaseVersion_,
                                    common.passID_);
      }
    }
template<typename T >
std::set<EventSetupRecordKey> edm::eventsetup::findDependentRecordsFor ( )

Definition at line 72 of file EventSetupRecordProviderTemplate.h.

                                {
         typedef typename boost::mpl::if_< typename boost::is_base_and_derived<edm::eventsetup::DependentRecordTag, T>::type,
                                           FindDependenciesFromDependentRecord<T>,
                                           NoDependenciesForRecord>::type DepFinder;
         std::set<EventSetupRecordKey> returnValue;
         DepFinder::dependentRecords(returnValue);
         return returnValue;
      }
static void edm::eventsetup::findDependents ( const EventSetupRecordKey iKey,
Itr  itBegin,
Itr  itEnd,
std::vector< boost::shared_ptr< EventSetupRecordProvider > > &  oDependents 
) [static]

Definition at line 354 of file EventSetupProvider.cc.

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

{
  
  for(Itr it = itBegin; it != itEnd; ++it) {
    //does it depend on the record in question?
    const std::set<EventSetupRecordKey>& deps = it->second->dependentRecords();
    if(deps.end() != deps.find(iKey)) {
      oDependents.push_back(it->second);
      //now see who is dependent on this record since they will be indirectly dependent on iKey
      findDependents(it->first, itBegin, itEnd, oDependents);
    }
  }
}
template<class ProxyT >
void edm::eventsetup::insertProxy ( DataProxyProvider::KeyedProxies &  iList,
boost::shared_ptr< ProxyT >  iProxy,
const char *  iName = "" 
) [inline]

Definition at line 109 of file DataProxyProvider.h.

                                              {
   iList.push_back(DataProxyProvider::KeyedProxies::value_type(
                                             DataKey(DataKey::makeTypeTag<typename ProxyT::value_type>(),
                                                     iName),
                                             iProxy));
   
}
std::auto_ptr< EventSetupProvider > edm::eventsetup::makeEventSetupProvider ( ParameterSet const &  params)

Definition at line 24 of file EventSetupProviderMaker.cc.

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

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

                                                       {
      std::vector<std::string> prefers =
        params.getParameter<std::vector<std::string> >("@all_esprefers");

      if(prefers.empty()) {
        return std::auto_ptr<EventSetupProvider>(new EventSetupProvider());
      }

      EventSetupProvider::PreferredProviderInfo preferInfo;
      EventSetupProvider::RecordToDataMap recordToData;

      //recordToData.insert(std::make_pair(std::string("DummyRecord"),
      //      std::make_pair(std::string("DummyData"), std::string())));
      //preferInfo[ComponentDescription("DummyProxyProvider", "", false)]=
      //      recordToData;

      for(std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end();
          itName != itNameEnd;
          ++itName) {
        recordToData.clear();
        ParameterSet const& preferPSet = params.getParameterSet(*itName);
        std::vector<std::string> recordNames = preferPSet.getParameterNames();
        for(std::vector<std::string>::iterator itRecordName = recordNames.begin(),
            itRecordNameEnd = recordNames.end();
            itRecordName != itRecordNameEnd;
            ++itRecordName) {

          if((*itRecordName)[0] == '@') {
            //this is a 'hidden parameter' so skip it
            continue;
          }

          //this should be a record name with its info
          try {
            std::vector<std::string> dataInfo =
              preferPSet.getParameter<std::vector<std::string> >(*itRecordName);

            if(dataInfo.empty()) {
              //FUTURE: empty should just mean all data
              throw Exception(errors::Configuration)
                << "The record named "
                << *itRecordName << " specifies no data items";
            }
            //FUTURE: 'any' should be a special name
            for(std::vector<std::string>::iterator itDatum = dataInfo.begin(),
                itDatumEnd = dataInfo.end();
                itDatum != itDatumEnd;
                ++itDatum){
              std::string datumName(*itDatum, 0, itDatum->find_first_of("/"));
              std::string labelName;

              if(itDatum->size() != datumName.size()) {
                labelName = std::string(*itDatum, datumName.size() + 1);
              }
              recordToData.insert(std::make_pair(std::string(*itRecordName),
                                                 std::make_pair(datumName,
                                                                labelName)));
            }
          } catch(cms::Exception const& iException) {
            cms::Exception theError("ESPreferConfigurationError");
            theError << "While parsing the es_prefer statement for type="
                     << preferPSet.getParameter<std::string>("@module_type")
                     << " label=\""
                     << preferPSet.getParameter<std::string>("@module_label")
                     << "\" an error occurred.";
            theError.append(iException);
            throw theError;
          }
        }
        preferInfo[ComponentDescription(preferPSet.getParameter<std::string>("@module_type"),
                                        preferPSet.getParameter<std::string>("@module_label"),
                                        false)] = recordToData;
      }
      return std::auto_ptr<EventSetupProvider>(new EventSetupProvider(&preferInfo));
    }
void edm::eventsetup::no_dependent_record_exception_message_builder ( cms::Exception oException,
const EventSetupRecordKey iKey,
const char *  iName 
)

Definition at line 30 of file NoRecordException.cc.

References edm::eventsetup::heterocontainer::HCTypeTag::name(), and edm::eventsetup::EventSetupRecordKey::type().

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

                                                                                                                                         {
   oException
   << "No \"" 
   << iName
   << "\" record found in the dependent record \""<<iKey.type().name()
   << "\".\n Please add an ESSource or ESProducer that delivers the \""
   << iName<<"\" record.";
}
void edm::eventsetup::no_record_exception_message_builder ( cms::Exception oException,
const char *  iName 
)

Definition at line 22 of file NoRecordException.cc.

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

                                                                                             {
   oException
   << "No \"" 
   << iName
   << "\" record found in the EventSetup.\n Please add an ESSource or ESProducer that delivers such a record.\n";
}   
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 106 of file EventSetupProvider.cc.

References Exception, edm::eventsetup::ComponentDescription::label_, and edm::eventsetup::ComponentDescription::type_.

Referenced by determinePreferred().

{
   //need to get our hands on the actual DataProxyProvider
   bool foundProxyProvider = false;
   for(Providers::const_iterator itProvider = iProviders.begin(), itProviderEnd = iProviders.end();
       itProvider!= itProviderEnd;
       ++itProvider) {
      std::set<ComponentDescription> components = itProvider->second->proxyProviderDescriptions();
      if(components.find(iComponent)!= components.end()) {
         boost::shared_ptr<DataProxyProvider> proxyProv = 
         itProvider->second->proxyProvider(*(components.find(iComponent)));
         assert(proxyProv.get());
         
         std::set<EventSetupRecordKey> records = proxyProv->usingRecords();
         for(std::set<EventSetupRecordKey>::iterator itRecord = records.begin(),
             itRecordEnd = records.end();
             itRecord != itRecordEnd;
             ++itRecord){
            const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(*itRecord);
            if(!keyedProxies.empty()){
               //add them to our output
               EventSetupRecordProvider::DataToPreferredProviderMap& dataToProviderMap =
               iReturnValue[*itRecord];
               
               for(DataProxyProvider::KeyedProxies::const_iterator itProxy = keyedProxies.begin(),
                   itProxyEnd = keyedProxies.end();
                   itProxy != itProxyEnd;
                   ++itProxy) {
                  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
                  dataToProviderMap.find(itProxy->first);
                  if(itFind != dataToProviderMap.end()){
                     throw cms::Exception("ESPreferConflict") <<"Two providers have been set to be preferred for\n"
                     <<itProxy->first.type().name()<<" \""<<itProxy->first.name().value()<<"\""
                     <<"\n the providers are "
                     <<"\n 1) type="<<itFind->second.type_<<" label=\""<<itFind->second.label_<<"\""
                     <<"\n 2) type="<<iComponent.type_<<" label=\""<<iComponent.label_<<"\""
                     <<"\nPlease modify configuration so only one is preferred";
                  }
                  dataToProviderMap.insert(std::make_pair(itProxy->first,iComponent));
               }
            }
         }
         foundProxyProvider=true;
         break;
      }
   }
   if(!foundProxyProvider) {
      throw cms::Exception("ESPreferNoProvider")<<"Could not make type=\""<<iComponent.type_
      <<"\" label=\""<<iComponent.label_<<"\" a preferred Provider."<<
      "\n  Please check spelling of name, or that it was loaded into the job.";
   }
}
void edm::eventsetup::swap ( DataKey a,
DataKey b 
) [inline]
void edm::eventsetup::validateEventSetupParameters ( ParameterSet pset)

Definition at line 139 of file EventSetupProviderMaker.cc.

References cms::Exception::append(), edm::errors::Configuration, SurfaceDeformationFactory::create(), reco::get(), edm::ParameterSet::getParameter(), moduleLabel(), and edm::ConfigurationDescriptions::validate().

Referenced by fillEventSetupProvider().

                                                           {
      std::string modtype;
      std::string moduleLabel;
      try {
        modtype = pset.getParameter<std::string>("@module_type");
        moduleLabel = pset.getParameter<std::string>("@module_label");
        // Check for the "unlabeled" case
        // This is an artifact left over from the old configuration language
        // we were using before switching to the python configuration
        // This is handled in the validation code and python configuration
        // files by using a label equal to the module typename.
        if (moduleLabel == std::string("")) {
          moduleLabel = modtype;
        }

        std::auto_ptr<ParameterSetDescriptionFillerBase> filler(
          ParameterSetDescriptionFillerPluginFactory::get()->create(modtype));
        ConfigurationDescriptions descriptions(filler->baseType());
        filler->fill(descriptions);
        descriptions.validate(pset, moduleLabel);
      }
      catch (cms::Exception& iException) {
        Exception toThrow(errors::Configuration, "Failed validating configuration of ESProducer or ESSource.");
        toThrow << "\nThe plugin name is \"" << modtype << "\"\n";
        toThrow << "The module label is \"" << moduleLabel << "\"\n";
        toThrow.append(iException);
        throw toThrow;
      }
    }