#include <Fireworks/Core/interface/FWItemAccessorFactory.h>
Public Member Functions | |
std::shared_ptr< FWItemAccessorBase > | accessorFor (const TClass *) const |
FWItemAccessorFactory () | |
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) |
Private Member Functions | |
FWItemAccessorFactory (const FWItemAccessorFactory &) | |
const FWItemAccessorFactory & | operator= (const FWItemAccessorFactory &) |
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 47 of file FWItemAccessorFactory.cc.
|
private |
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 94 of file FWItemAccessorFactory.cc.
References debug, fwLog, reco::get(), hasAccessor(), hasMemberTVirtualCollectionProxy(), hasTVirtualCollectionProxy(), fwlog::kDebug, PFRecoTauDiscriminationByIsolation_cfi::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 227 of file FWItemAccessorFactory.cc.
References hasAccessor(), hasMemberTVirtualCollectionProxy(), hasTVirtualCollectionProxy(), PFRecoTauDiscriminationByIsolation_cfi::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 204 of file FWItemAccessorFactory.cc.
References edmplugin::PluginManager::categoryToInfos(), MillePedeFileConverter_cfg::e, edmplugin::PluginManager::get(), mps_fire::i, dataset::name, 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 168 of file FWItemAccessorFactory.cc.
References edm::TypeDataMembers::begin(), MergeFilesAndCalculateEfficiencies_cfg::dataType, hasTVirtualCollectionProxy(), and edm::TypeDataMembers::size().
Referenced by accessorFor(), and classAccessedAsCollection().
|
static |
Helper method which
Definition at line 146 of file FWItemAccessorFactory.cc.
Referenced by accessorFor(), classAccessedAsCollection(), and hasMemberTVirtualCollectionProxy().
|
private |