Base class for data that users can add to pat objects. More...
#include "DataFormats/PatCandidates/interface/UserData.h"
Public Member Functions | |
const void * | bareData () const |
virtual UserData * | clone () const =0 |
Necessary for deep copy in OwnVector. More... | |
template<typename T > | |
const T * | get () const |
Extract data in a typesafe way. <T> must be the concrete type of the data. More... | |
template<typename T > | |
std::auto_ptr< pat::UserData > | make (const T &value, bool transientOnly) |
virtual const std::type_info & | typeId () const =0 |
Concrete type of stored data. More... | |
virtual const std::string & | typeName () const =0 |
Human readable name of the concrete type of stored data. More... | |
UserData () | |
virtual | ~UserData () |
Static Public Member Functions | |
template<typename T > | |
static std::auto_ptr< UserData > | make (const T &value, bool transientOnly=false) |
Protected Member Functions | |
virtual const void * | data_ () const =0 |
Get out the data (can't template non virtual functions) More... | |
Static Private Member Functions | |
static void | checkDictionaries (const std::type_info &type) |
Base class for data that users can add to pat objects.
Definition at line 25 of file UserData.h.
|
inline |
Definition at line 27 of file UserData.h.
|
inlinevirtual |
Definition at line 28 of file UserData.h.
|
inline |
Get the data as a void *, for CINT usage. COMPLETELY UNSUPPORTED, USE ONLY FOR DEBUGGING
Definition at line 50 of file UserData.h.
References data_().
Referenced by pat::PATObject< reco::Muon >::userDataBare().
|
staticprivate |
Definition at line 6 of file UserData.cc.
References edm::errors::DictionaryNotFound, edm::hlt::Exception, edm::TypeID::hasDictionary(), ntuplemaker::status, and typeName().
Referenced by make().
|
pure virtual |
Necessary for deep copy in OwnVector.
Implemented in pat::UserHolder< T >.
|
protectedpure virtual |
Get out the data (can't template non virtual functions)
Implemented in pat::UserHolder< T >.
Referenced by bareData(), and get().
|
inline |
Extract data in a typesafe way. <T> must be the concrete type of the data.
Definition at line 42 of file UserData.h.
References data_(), and typeId().
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().
|
static |
Make a UserData pointer from some value, wrapping it appropriately. It will check for dictionaries, unless 'transientOnly' is true
Referenced by pat::MatcherUsingTracks::produce().
std::auto_ptr<pat::UserData> pat::UserData::make | ( | const T & | value, |
bool | transientOnly | ||
) |
Definition at line 89 of file UserData.h.
References checkDictionaries(), and relativeConstraints::value.
|
pure virtual |
|
pure virtual |
Human readable name of the concrete type of stored data.
Implemented in pat::UserHolder< T >.
Referenced by checkDictionaries(), and pat::PATObject< reco::Muon >::userDataObjectType().