#include <Fireworks/Core/interface/FWItemAccessorFactory.h>
Public Member Functions | |
boost::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 |
boost::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 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.
If none of the above is true, we lookup the plugin based FWItemAccessorRegistry for a plugin that can handle the given type.
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, HLT_25ns14e33_v1_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 228 of file FWItemAccessorFactory.cc.
References hasAccessor(), hasMemberTVirtualCollectionProxy(), hasTVirtualCollectionProxy(), HLT_25ns14e33_v1_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 205 of file FWItemAccessorFactory.cc.
References edmplugin::PluginManager::categoryToInfos(), alignCSCRings::e, edmplugin::PluginManager::get(), i, mergeVDriftHistosByStation::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 169 of file FWItemAccessorFactory.cc.
References assert(), edm::TypeDataMembers::begin(), dtTPAnalyzer_cfg::dataType, hasTVirtualCollectionProxy(), and edm::TypeDataMembers::size().
Referenced by accessorFor(), and classAccessedAsCollection().
|
static |
Helper method which
Definition at line 147 of file FWItemAccessorFactory.cc.
Referenced by accessorFor(), classAccessedAsCollection(), and hasMemberTVirtualCollectionProxy().
|
private |