#include <Fireworks/Core/interface/FWItemAccessorFactory.h>
Public Member Functions | |
std::shared_ptr< FWItemAccessorBase > | accessorFor (const TClass *) const |
FWItemAccessorFactory () | |
FWItemAccessorFactory (const FWItemAccessorFactory &)=delete | |
const FWItemAccessorFactory & | operator= (const FWItemAccessorFactory &)=delete |
virtual | ~FWItemAccessorFactory () |
Static Public Member Functions | |
static bool | classAccessedAsCollection (const TClass *) |
static bool | hasAccessor (const TClass *iClass, std::string &result) |
static bool | hasMemberTVirtualCollectionProxy (const TClass *iClass, TClass *&oMember, size_t &oOffset) |
static bool | hasTVirtualCollectionProxy (const TClass *iClass) |
Description: Factory for constructing FWItemAccessorBases appropriate to a certain type
Usage: <usage>
Definition at line 31 of file FWItemAccessorFactory.h.
FWItemAccessorFactory::FWItemAccessorFactory | ( | ) |
Definition at line 38 of file FWItemAccessorFactory.cc.
|
virtual |
Definition at line 45 of file FWItemAccessorFactory.cc.
|
delete |
std::shared_ptr< FWItemAccessorBase > FWItemAccessorFactory::accessorFor | ( | const TClass * | iClass | ) | const |
Create an accessor for a given type iClass.
iClass the type for which we need an accessor.
If the type is known to ROOT to be some sort of collection, we return the a FWItemTVirtualCollectionProxyAccessor constructed using the associated TVirtualCollectionProxy.
If above is not true, we lookup the plugin based FWItemAccessorRegistry for a plugin that can handle the given type.
If the type is not a collection but it contains only one element which is a collection, we return a FWItemTVirtualCollectionProxyAccessor using the TVirtualCollectionProxy of that element.
Failing that, we return a FWItemSingleAccessor which threats the object as if it was not a collection. Notice that this also will mean that the product associated to iClass will not show up in the "Add Collection" table.
Definition at line 89 of file FWItemAccessorFactory.cc.
References debug, fwLog, get, hasAccessor(), hasMemberTVirtualCollectionProxy(), hasTVirtualCollectionProxy(), fwlog::kDebug, HLT_IsoTrack_cff::offset, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FWSimpleRepresentationChecker::infoFor().
|
static |
Helper method which checks if the object will be treated as a collection.
Definition at line 202 of file FWItemAccessorFactory.cc.
References hasAccessor(), hasMemberTVirtualCollectionProxy(), hasTVirtualCollectionProxy(), HLT_IsoTrack_cff::offset, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FWLiteJobMetadataManager::doUpdate(), and FWFFMetadataManager::doUpdate().
|
static |
Helper method which can be used to retrieve the name of the accessor plugin which has to be created for a object of type iClass.
The result is stored in the passed reference result.
Definition at line 182 of file FWItemAccessorFactory.cc.
References edmplugin::PluginManager::categoryToInfos(), MillePedeFileConverter_cfg::e, edmplugin::PluginManager::get(), mps_fire::i, mergeVDriftHistosByStation::name, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by accessorFor(), and classAccessedAsCollection().
|
static |
Helper method which checks if the object has only one data member and if that data memeber can be accessed via a TVirtualCollectionProxy.
oMember a reference to the pointer which will hold the actual TClass of the datamember to be used to build the TVirtualCollectionProxy.
a reference which will hold the offset of the member relative to the beginning address of a class instance.
Definition at line 150 of file FWItemAccessorFactory.cc.
References cms::cuda::assert(), edm::TypeDataMembers::begin(), dtTPAnalyzer_cfg::dataType, hasTVirtualCollectionProxy(), and edm::TypeDataMembers::size().
Referenced by accessorFor(), and classAccessedAsCollection().
|
static |
Helper method which
Definition at line 132 of file FWItemAccessorFactory.cc.
Referenced by accessorFor(), classAccessedAsCollection(), and hasMemberTVirtualCollectionProxy().
|
delete |