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, Exception, edm::hasDictionary(), ntuplemaker::status, AlCaHLTBitMon_QueryRunRegistry::string, and typeName().
Referenced by make().
|
pure virtual |
Necessary for deep copy in OwnVector.
Implemented in pat::UserHolder< T >, pat::UserHolder< AlgebraicSymMatrix44 >, pat::UserHolder< AlgebraicSymMatrix22 >, pat::UserHolder< vid::CutFlowResult >, pat::UserHolder< math::XYZVector >, pat::UserHolder< std::vector< unsigned int > >, pat::UserHolder< reco::Track >, pat::UserHolder< AlgebraicSymMatrix55 >, pat::UserHolder< reco::Vertex >, pat::UserHolder< AlgebraicVector2 >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
|
protectedpure virtual |
Get out the data (can't template non virtual functions)
Implemented in pat::UserHolder< T >, pat::UserHolder< AlgebraicSymMatrix44 >, pat::UserHolder< AlgebraicSymMatrix22 >, pat::UserHolder< vid::CutFlowResult >, pat::UserHolder< math::XYZVector >, pat::UserHolder< std::vector< unsigned int > >, pat::UserHolder< reco::Track >, pat::UserHolder< AlgebraicSymMatrix55 >, pat::UserHolder< reco::Vertex >, pat::UserHolder< AlgebraicVector2 >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
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(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().
|
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(), and VersionedIdProducer< PhysicsObjectPtr, SelectorType >::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 |
Concrete type of stored data.
Implemented in pat::UserHolder< T >, pat::UserHolder< AlgebraicSymMatrix44 >, pat::UserHolder< AlgebraicSymMatrix22 >, pat::UserHolder< vid::CutFlowResult >, pat::UserHolder< math::XYZVector >, pat::UserHolder< std::vector< unsigned int > >, pat::UserHolder< reco::Track >, pat::UserHolder< AlgebraicSymMatrix55 >, pat::UserHolder< reco::Vertex >, pat::UserHolder< AlgebraicVector2 >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
Referenced by get().
|
pure virtual |
Human readable name of the concrete type of stored data.
Implemented in pat::UserHolder< T >, pat::UserHolder< AlgebraicSymMatrix44 >, pat::UserHolder< AlgebraicSymMatrix22 >, pat::UserHolder< vid::CutFlowResult >, pat::UserHolder< math::XYZVector >, pat::UserHolder< std::vector< unsigned int > >, pat::UserHolder< reco::Track >, pat::UserHolder< AlgebraicSymMatrix55 >, pat::UserHolder< reco::Vertex >, pat::UserHolder< AlgebraicVector2 >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
Referenced by checkDictionaries(), and pat::PATObject< reco::Muon >::userDataObjectType().