1 #ifndef DataFormats_PatCandidates_UserData_h
2 #define DataFormats_PatCandidates_UserData_h
32 virtual const std::type_info &
typeId()
const = 0;
41 const T *
get()
const {
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_; }
UserHolder(const T &data)
const std::type_info & typeId() const override
Concrete type of stored data.
virtual const void * data_() const =0
Get out the data (can't template non virtual functions)
static std::unique_ptr< UserData > make(const T &value, bool transientOnly=false)
const std::string & typeName() const override
Human readable name of the concrete type of stored data.
virtual const std::type_info & typeId() const =0
Concrete type of stored data.
const void * data_() const override
Get out the data (can't template non virtual functions)
virtual UserData * clone() const =0
Necessary for deep copy in OwnVector.
static std::string typeNameFor(std::type_info const &iInfo)
char data[epos_bytes_allocation]
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
edm::OwnVector< pat::UserData > UserDataCollection
Base class for data that users can add to pat objects.
static const std::string & typeName_()
UserHolder< T > * clone() const override
Clone.
const void * bareData() const
static void checkDictionaries(const std::type_info &type)