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::unique_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::unique_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 Protected Member Functions | |
static std::string | typeNameFor (std::type_info const &iInfo) |
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 24 of file UserData.h.
|
inline |
Definition at line 26 of file UserData.h.
|
inlinevirtual |
Definition at line 27 of file UserData.h.
References clone(), AlCaHLTBitMon_QueryRunRegistry::string, typeId(), and typeName().
|
inline |
Get the data as a void *, for CINT usage. COMPLETELY UNSUPPORTED, USE ONLY FOR DEBUGGING
Definition at line 49 of file UserData.h.
References checkDictionaries(), data_(), make(), AlCaHLTBitMon_QueryRunRegistry::string, and typeNameFor().
Referenced by pat::PATObject< reco::Muon >::userDataBare().
|
staticprivate |
Definition at line 7 of file UserData.cc.
References symbols::demangled, edm::errors::DictionaryNotFound, Exception, edm::hasDictionary(), mps_update::status, AlCaHLTBitMon_QueryRunRegistry::string, and typeName().
Referenced by bareData(), and 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< Vector3DBase< float, GlobalTag > >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< edm::Ref< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate, edm::refhelper::FindUsingAdvance< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate > > >, pat::UserHolder< bool >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< edm::Ref< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex, edm::refhelper::FindUsingAdvance< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex > > >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
Referenced by pat::PATObject< reco::Muon >::addUserDataFromPtr(), and ~UserData().
|
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< Vector3DBase< float, GlobalTag > >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< edm::Ref< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate, edm::refhelper::FindUsingAdvance< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate > > >, pat::UserHolder< bool >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< edm::Ref< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex, edm::refhelper::FindUsingAdvance< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex > > >, 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 41 of file UserData.h.
References data_(), and typeId().
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), 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 bareData(), pat::MatcherUsingTracks::produce(), and VersionedIdProducer< PhysicsObjectPtr, SelectorType >::produce().
std::unique_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< Vector3DBase< float, GlobalTag > >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< edm::Ref< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate, edm::refhelper::FindUsingAdvance< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate > > >, pat::UserHolder< bool >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< edm::Ref< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex, edm::refhelper::FindUsingAdvance< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex > > >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
Referenced by get(), and ~UserData().
|
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< Vector3DBase< float, GlobalTag > >, pat::UserHolder< AlgebraicVector3 >, pat::UserHolder< edm::Ref< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate, edm::refhelper::FindUsingAdvance< std::vector< pat::CompositeCandidate, std::allocator< pat::CompositeCandidate > >, pat::CompositeCandidate > > >, pat::UserHolder< bool >, pat::UserHolder< AlgebraicVector4 >, pat::UserHolder< edm::Ref< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex, edm::refhelper::FindUsingAdvance< std::vector< reco::Vertex, std::allocator< reco::Vertex > >, reco::Vertex > > >, pat::UserHolder< AlgebraicVector5 >, pat::UserHolder< math::XYZTLorentzVector >, pat::UserHolder< math::PtEtaPhiMLorentzVector >, pat::UserHolder< math::XYZPoint >, and pat::UserHolder< AlgebraicSymMatrix33 >.
Referenced by checkDictionaries(), pat::PATObject< reco::Muon >::userDataObjectType(), and ~UserData().
|
staticprotected |
Definition at line 28 of file UserData.cc.
References symbols::demangled, mps_update::status, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by bareData(), and pat::UserHolder< T >::typeName_().