Go to the documentation of this file. 1 #ifndef DataFormats_PatCandidates_UserData_h
2 #define DataFormats_PatCandidates_UserData_h
32 virtual const std::type_info &
typeId()
const = 0;
44 return static_cast<const T *>(
data_());
55 static std::unique_ptr<UserData>
make(
const T &
value,
bool transientOnly =
false);
59 virtual const void *
data_()
const = 0;
74 const std::type_info &
typeId()
const override {
return typeid(
T); }
79 const void *
data_()
const override {
return &
obj_; }
virtual const std::type_info & typeId() const =0
Concrete type of stored data.
Base class for data that users can add to pat objects.
virtual UserData * clone() const =0
Necessary for deep copy in OwnVector.
static void checkDictionaries(const std::type_info &type)
UserHolder(const T &data)
edm::OwnVector< pat::UserData > UserDataCollection
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
const std::string & typeName() const override
Human readable name of the concrete type of stored data.
const T * get() const
Extract data in a typesafe way. <T> must be the concrete type of the data.
static std::string typeNameFor(std::type_info const &iInfo)
const void * data_() const override
Get out the data (can't template non virtual functions)
virtual const void * data_() const =0
Get out the data (can't template non virtual functions)
UserHolder< T > * clone() const override
Clone.
static std::unique_ptr< UserData > make(const T &value, bool transientOnly=false)
char data[epos_bytes_allocation]
const void * bareData() const
static const std::string & typeName_()
const std::type_info & typeId() const override
Concrete type of stored data.