1 #ifndef DataFormats_Common_RefHolder__h
2 #define DataFormats_Common_RefHolder__h
7 #include "Reflex/Object.h"
8 #include "Reflex/Type.h"
20 class RefHolder :
public RefHolderBase {
28 virtual ProductID
id()
const;
29 virtual size_t key()
const;
32 std::string&
msg)
const;
38 virtual void const *
product()
const;
87 RefHolder const*
h(dynamic_cast<RefHolder const*>(&rhs));
88 return h && (
getRef() == h->getRef());
94 std::string&
msg)
const
97 bool conversion_worked = (h != 0);
98 if (conversion_worked)
101 msg =
typeid(REF).
name();
102 return conversion_worked;
115 return ref_.productGetter();
120 return ref_.hasProductCache();
125 return ref_.product();
149 static const Reflex::Type s_type(Reflex::Type::ByTypeInfo(
typeid(contained_type)));
155 Reflex::Object
obj(s_type, const_cast<void*>(static_cast<const void*>(ref_.get())));
156 if ( s_type == iToType )
return obj.Address();
157 Reflex::Object cast =
obj.CastObject(iToType);
158 return cast.Address();
helper::MatcherGetRef< C >::ref_type getRef(const Handle< C > &c, size_t k)
REF const & getRef() const
virtual ProductID id() const
virtual bool hasProductCache() const
virtual RefHolderBase * clone() const
#define CMS_CLASS_VERSION(_version_)
virtual bool isAvailable() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Container::value_type value_type
virtual EDProductGetter const * productGetter() const
virtual void const * product() const
virtual bool fillRefIfMyTypeMatches(RefHolderBase &fillme, std::string &msg) const
virtual std::auto_ptr< RefVectorHolderBase > makeVectorHolder() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void setRef(REF const &r)
virtual void const * pointerToType(Reflex::Type const &iToType) const
virtual bool isEqualTo(RefHolderBase const &rhs) const
virtual size_t key() const
void swap(RefHolder &other)