![]() |
![]() |
#include <DataGetterHelper.h>
Public Member Functions | |
DataGetterHelper (TTree *tree, std::shared_ptr< HistoryGetterBase > historyGetter, std::shared_ptr< BranchMapReader > branchMap=std::shared_ptr< BranchMapReader >(), std::shared_ptr< edm::EDProductGetter > getter=std::shared_ptr< edm::EDProductGetter >(), bool useCache=false, std::function< void(TBranch const &)> baFunc=[](TBranch const &){}) | |
virtual std::string const | getBranchNameFor (std::type_info const &, char const *, char const *, char const *) const |
virtual bool | getByLabel (std::type_info const &, char const *, char const *, char const *, void *, Long_t) const |
edm::WrapperBase const * | getByProductID (edm::ProductID const &pid, Long_t eventEntry) const |
edm::EDProductGetter const * | getter () const |
edm::WrapperBase const * | getThinnedProduct (edm::ProductID const &pid, unsigned int &key, Long_t eventEntry) const |
void | getThinnedProducts (edm::ProductID const &pid, std::vector< edm::WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys, Long_t eventEntry) const |
void | setGetter (std::shared_ptr< edm::EDProductGetter const > getter) |
virtual | ~DataGetterHelper () |
Private Types | |
typedef std::map< internal::DataKey, std::shared_ptr< internal::Data > > | KeyToDataMap |
Private Member Functions | |
DataGetterHelper (const DataGetterHelper &)=delete | |
void | getBranchData (edm::EDProductGetter const *, Long64_t, internal::Data &) const |
internal::Data & | getBranchDataFor (std::type_info const &, char const *, char const *, char const *) const |
bool | getByBranchDescription (edm::BranchDescription const &, Long_t eventEntry, KeyToDataMap::iterator &) const |
edm::WrapperBase const * | getByBranchID (edm::BranchID const &bid, Long_t eventEntry) const |
edm::ThinnedAssociation const * | getThinnedAssociation (edm::BranchID const &branchID, Long_t eventEntry) const |
const edm::ProcessHistory & | history () const |
const DataGetterHelper & | operator= (const DataGetterHelper &)=delete |
edm::WrapperBase const * | wrapperBasePtr (edm::ObjectWithDict const &) const |
Private Attributes | |
std::map< edm::BranchID, std::shared_ptr< internal::Data > > | bidToData_ |
std::function< void(TBranch const &)> | branchAccessFunc_ |
std::shared_ptr< BranchMapReader > | branchMap_ |
KeyToDataMap | data_ |
std::shared_ptr< edm::EDProductGetter const > | getter_ |
edm::propagate_const< std::shared_ptr< fwlite::HistoryGetterBase > > | historyGetter_ |
std::map< std::pair< edm::ProductID, edm::BranchListIndex >, std::shared_ptr< internal::Data > > | idToData_ |
std::vector< char const * > | labels_ |
bool | tcTrained_ |
const bool | tcUse_ |
Use internal TTreeCache. More... | |
TTree * | tree_ |
Definition at line 53 of file DataGetterHelper.h.
|
private |
Definition at line 97 of file DataGetterHelper.h.
DataGetterHelper::DataGetterHelper | ( | TTree * | tree, |
std::shared_ptr< HistoryGetterBase > | historyGetter, | ||
std::shared_ptr< BranchMapReader > | branchMap = std::shared_ptr<BranchMapReader>() , |
||
std::shared_ptr< edm::EDProductGetter > | getter = std::shared_ptr<edm::EDProductGetter>() , |
||
bool | useCache = false , |
||
std::function< void(TBranch const &)> | baFunc = [](TBranch const&){} |
||
) |
Definition at line 52 of file DataGetterHelper.cc.
References Exception, tcUse_, compare::tree, and tree_.
|
virtual |
Definition at line 78 of file DataGetterHelper.cc.
|
privatedelete |
|
private |
Definition at line 117 of file DataGetterHelper.cc.
References fwlite::internal::Data::branch_, branchAccessFunc_, branchMap_, fwlite::internal::Data::lastProduct_, tcTrained_, tcUse_, and tree_.
Referenced by getByBranchID(), getByLabel(), and getByProductID().
|
private |
Definition at line 156 of file DataGetterHelper.cc.
References edm::ObjectWithDict::address(), MicroEventContent_cff::branch, fwlite::branchNotFound, edm::ObjectWithDict::byType(), data_, Exception, fwlite::findBranch(), edm::TypeID::friendlyClassName(), h, history(), fwlite::internal::DataKey::kEmpty(), fwlite::kEmptyString, crabWrapper::key, labels_, fwlite::internal::DataKey::module(), dataset::name, edm::TypeWithDict::name(), haddnano::obj, fwlite::internal::DataKey::process(), fwlite::internal::DataKey::product(), edm::ProcessHistory::rbegin(), edm::ProcessHistory::rend(), AlCaHLTBitMon_QueryRunRegistry::string, and tree_.
Referenced by getBranchNameFor(), and getByLabel().
|
virtual |
Definition at line 277 of file DataGetterHelper.cc.
References fwlite::internal::Data::branch_, getBranchDataFor(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by fwlite::Run::getBranchNameFor(), fwlite::LuminosityBlock::getBranchNameFor(), and fwlite::Event::getBranchNameFor().
|
private |
Definition at line 318 of file DataGetterHelper.cc.
References edm::BranchDescription::branchID(), edm::TypeWithDict::byName(), data_, edm::BranchDescription::fullClassName(), getByLabel(), edm::BranchID::isValid(), gen::k, edm::BranchDescription::moduleLabel(), edm::BranchDescription::processName(), edm::BranchDescription::productInstanceName(), and edm::wrappedClassName().
Referenced by getByBranchID(), and getByProductID().
|
private |
Definition at line 390 of file DataGetterHelper.cc.
References bidToData_, branchMap_, getBranchData(), getByBranchDescription(), getter_, and wrapperBasePtr().
Referenced by getThinnedAssociation().
|
virtual |
Definition at line 292 of file DataGetterHelper.cc.
References edm::ObjectWithDict::address(), fwlite::internal::Data::branch_, getBranchData(), getBranchDataFor(), getter_, fwlite::internal::Data::lastProduct_, and fwlite::internal::Data::obj_.
Referenced by getByBranchDescription(), fwlite::Run::getByLabel(), fwlite::LuminosityBlock::getByLabel(), and fwlite::Event::getByLabel().
edm::WrapperBase const * DataGetterHelper::getByProductID | ( | edm::ProductID const & | pid, |
Long_t | eventEntry | ||
) | const |
Definition at line 361 of file DataGetterHelper.cc.
References branchMap_, getBranchData(), getByBranchDescription(), getter_, idToData_, edm::ProductID::processIndex(), and wrapperBasePtr().
Referenced by fwlite::Run::getByProductID(), fwlite::LuminosityBlock::getByProductID(), fwlite::Event::getByProductID(), getThinnedProduct(), and getThinnedProducts().
|
inline |
Definition at line 88 of file DataGetterHelper.h.
Referenced by fwlite::Event::draw(), and fwlite::Event::scan().
|
private |
Definition at line 537 of file DataGetterHelper.cc.
References edm::WrapperBase::dynamicTypeInfo(), Exception, getByBranchID(), edm::errors::LogicError, and wrapper.
Referenced by getThinnedProduct(), and getThinnedProducts().
edm::WrapperBase const * DataGetterHelper::getThinnedProduct | ( | edm::ProductID const & | pid, |
unsigned int & | key, | ||
Long_t | eventEntry | ||
) | const |
Definition at line 425 of file DataGetterHelper.cc.
References branchMap_, getByProductID(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), edm::BranchID::isValid(), class-composition::parent, edm::ThinnedAssociationsHelper::parentBegin(), edm::ThinnedAssociation::parentCollectionID(), edm::ThinnedAssociationsHelper::parentEnd(), and edm::ThinnedAssociation::thinnedCollectionID().
Referenced by fwlite::Event::getThinnedProduct().
void DataGetterHelper::getThinnedProducts | ( | edm::ProductID const & | pid, |
std::vector< edm::WrapperBase const * > & | foundContainers, | ||
std::vector< unsigned int > & | keys, | ||
Long_t | eventEntry | ||
) | const |
Definition at line 471 of file DataGetterHelper.cc.
References branchMap_, getByProductID(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), edm::BranchID::isValid(), gen::k, SiStripPI::max, class-composition::parent, edm::ThinnedAssociationsHelper::parentBegin(), edm::ThinnedAssociation::parentCollectionID(), edm::ThinnedAssociationsHelper::parentEnd(), and edm::ThinnedAssociation::thinnedCollectionID().
Referenced by fwlite::Event::getThinnedProducts().
|
private |
Definition at line 555 of file DataGetterHelper.cc.
References historyGetter_.
Referenced by getBranchDataFor().
|
privatedelete |
|
inline |
Definition at line 84 of file DataGetterHelper.h.
|
private |
Definition at line 417 of file DataGetterHelper.cc.
References edm::ObjectWithDict::address(), edm::TypeWithDict::pointerToBaseType(), and edm::ObjectWithDict::typeOf().
Referenced by getByBranchID(), and getByProductID().
|
mutableprivate |
Definition at line 114 of file DataGetterHelper.h.
Referenced by getByBranchID().
|
private |
Branch-access-function gets called whenever a branch data is accessed. This can be used for management of TTreeCache on the user side.
Definition at line 122 of file DataGetterHelper.h.
Referenced by getBranchData().
|
mutableprivate |
Definition at line 108 of file DataGetterHelper.h.
Referenced by getBranchData(), getByBranchID(), getByProductID(), getThinnedProduct(), and getThinnedProducts().
|
mutableprivate |
Definition at line 109 of file DataGetterHelper.h.
Referenced by getBranchDataFor(), and getByBranchDescription().
|
private |
Definition at line 116 of file DataGetterHelper.h.
Referenced by getByBranchID(), getByLabel(), and getByProductID().
|
private |
Definition at line 115 of file DataGetterHelper.h.
Referenced by history().
|
mutableprivate |
Definition at line 113 of file DataGetterHelper.h.
Referenced by getByProductID().
|
mutableprivate |
Definition at line 110 of file DataGetterHelper.h.
Referenced by getBranchDataFor().
|
mutableprivate |
Definition at line 117 of file DataGetterHelper.h.
Referenced by getBranchData().
|
private |
Use internal TTreeCache.
Definition at line 119 of file DataGetterHelper.h.
Referenced by DataGetterHelper(), and getBranchData().
|
private |
Definition at line 107 of file DataGetterHelper.h.
Referenced by DataGetterHelper(), getBranchData(), and getBranchDataFor().