1 #ifndef Framework_HCMethods_h
2 #define Framework_HCMethods_h
21 #include <type_traits>
25 namespace eventsetup {
26 namespace heterocontainer {
27 template <
class Type,
class Key,
class IdTag>
29 HCTypeTag typeTag = HCTypeTag::make<Type>();
30 return Key(typeTag, iIdTag);
33 template <
class Type,
class Key>
35 HCTypeTag typeTag = HCTypeTag::make<Type>();
44 template <
class Key,
class ItemType>
49 template <
class Key,
class ItemType,
class Storage,
class IdTag>
50 inline bool insert(
Storage& iStorage, ItemType* iItem,
const IdTag& iIdTag) {
54 template <
class Key,
class ItemType,
class Storage>
56 return iStorage.insert(makeKey<ItemType, Key>(), iItem);
59 template <
class Key,
class ItemType,
class Storage,
class IdTag>
60 inline ItemType*
find(
const Storage& iStorage,
const IdTag& iIdTag) {
62 return static_cast<ItemType*>(
66 template <
class Key,
class ItemType,
class Storage>