CMS 3D CMS Logo

Classes | Functions

edm::eventsetup::heterocontainer Namespace Reference

Classes

class  HCTypeTag
struct  type_from_itemtype

Functions

template<class Key , class ItemType , class Storage , class IdTag >
ItemType * find (const Storage &iStorage, const IdTag &iIdTag)
template<class Key , class ItemType , class Storage >
ItemType * find (const Storage &iStorage)
template<class Key , class ItemType , class Storage >
bool insert (Storage &iStorage, ItemType *iItem)
template<class Key , class ItemType , class Storage , class IdTag >
bool insert (Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
template<class Type , class Key , class IdTag >
Key makeKey (const IdTag &iIdTag)
template<class Type , class Key >
Key makeKey ()

Function Documentation

template<class Key , class ItemType , class Storage , class IdTag >
ItemType* edm::eventsetup::heterocontainer::find ( const Storage iStorage,
const IdTag &  iIdTag 
) [inline]

Definition at line 62 of file HCMethods.h.

References makeKey().

                                                                          {
        //The cast should be safe since the Key tells us the type
        return static_cast<ItemType*>(iStorage.find(
                                                    makeKey<typename type_from_itemtype<Key,
                                                    ItemType>::Type,Key>(iIdTag)));
      }
template<class Key , class ItemType , class Storage >
ItemType* edm::eventsetup::heterocontainer::find ( const Storage iStorage) [inline]

Definition at line 70 of file HCMethods.h.

References makeKey().

                                                     {
        //The cast should be safe since the Key tells us the type
        return static_cast<ItemType*>( iStorage.find(
                                                     makeKey<typename type_from_itemtype<Key,
                                                     ItemType>::Type,Key>()));
         }
template<class Key , class ItemType , class Storage >
bool edm::eventsetup::heterocontainer::insert ( Storage iStorage,
ItemType *  iItem 
) [inline]

Definition at line 55 of file HCMethods.h.

References makeKey().

                                                             {
        return iStorage.insert(makeKey<ItemType,
                               Key>() , iItem);
         }
template<class Key , class ItemType , class Storage , class IdTag >
bool edm::eventsetup::heterocontainer::insert ( Storage iStorage,
ItemType *  iItem,
const IdTag &  iIdTag 
) [inline]
template<class Type , class Key , class IdTag >
Key edm::eventsetup::heterocontainer::makeKey ( const IdTag &  iIdTag) [inline]

Definition at line 28 of file HCMethods.h.

Referenced by find(), edm::eventsetup::EventSetupProvider::insert(), and insert().

                                              {
        HCTypeTag typeTag = HCTypeTag::make<Type>();
        return Key(typeTag, iIdTag);
      }
template<class Type , class Key >
Key edm::eventsetup::heterocontainer::makeKey ( ) [inline]

Definition at line 34 of file HCMethods.h.

                           {
        HCTypeTag typeTag = HCTypeTag::make<Type>();
        return Key(typeTag);
      }