Public Member Functions | |
FWLiteDelayedReader () | |
void | set (boost::shared_ptr< ProductRegistry const > iReg) |
void | setEntry (Long64_t iEntry) |
void | setTree (TTree *iTree) |
Private Member Functions | |
boost::shared_ptr (reg_) | |
virtual WrapperOwningHolder | getProduct_ (BranchKey const &k, WrapperInterfaceBase const *interface, EDProductGetter const *ep) const |
virtual std::auto_ptr < EventEntryDescription > | getProvenance_ (BranchKey const &) const |
virtual void | mergeReaders_ (DelayedReader *) |
virtual void | reset_ () |
Private Attributes | |
Long64_t | entry_ |
TTree * | eventTree_ |
Definition at line 58 of file TFWLiteSelectorBasic.cc.
edm::root::FWLiteDelayedReader::FWLiteDelayedReader | ( | ) | [inline] |
Definition at line 60 of file TFWLiteSelectorBasic.cc.
: entry_(-1), eventTree_(0), reg_() {}
edm::root::FWLiteDelayedReader::boost::shared_ptr | ( | reg_ | ) | [private] |
WrapperOwningHolder edm::root::FWLiteDelayedReader::getProduct_ | ( | BranchKey const & | k, |
WrapperInterfaceBase const * | interface, | ||
EDProductGetter const * | ep | ||
) | const [private, virtual] |
Implements edm::DelayedReader.
Definition at line 77 of file TFWLiteSelectorBasic.cc.
References edm::BranchDescription::branchName(), edm::TypeWithDict::byName(), edm::BranchDescription::className(), entry_, eventTree_, Exception, newFWLiteAna::fullName, edm::BranchDescription::getInterface(), gen::k, edm::errors::ProductNotFound, AlCaHLTBitMon_QueryRunRegistry::string, and edm::wrappedClassName().
{ ProductRegistry::ProductList::const_iterator itFind= reg_->productList().find(k); if(itFind == reg_->productList().end()) { throw Exception(errors::ProductNotFound) << "could not find entry for product " << k; } BranchDescription const& bDesc = itFind->second; TBranch* branch= eventTree_->GetBranch(bDesc.branchName().c_str()); if(0 == branch) { throw cms::Exception("MissingBranch") << "could not find branch named '" << bDesc.branchName() << "'" << "\n Perhaps the data being requested was not saved in this file?"; } //find the class type std::string const fullName = wrappedClassName(bDesc.className()); TypeWithDict classType = TypeWithDict::byName(fullName); if(!bool(classType)) { throw cms::Exception("MissingDictionary") << "could not find dictionary for type '" << fullName << "'" << "\n Please make sure all the necessary libraries are available."; } //create an instance of it void const* address = classType.construct().address(); if(0 == address) { throw cms::Exception("FailedToCreate") << "could not create an instance of '" << fullName << "'"; } branch->SetAddress(&address); branch->GetEntry(entry_); return WrapperOwningHolder(address, bDesc.getInterface()); }
virtual std::auto_ptr<EventEntryDescription> edm::root::FWLiteDelayedReader::getProvenance_ | ( | BranchKey const & | ) | const [inline, private, virtual] |
Definition at line 66 of file TFWLiteSelectorBasic.cc.
{
return std::auto_ptr<EventEntryDescription>();
}
virtual void edm::root::FWLiteDelayedReader::mergeReaders_ | ( | DelayedReader * | ) | [inline, private, virtual] |
virtual void edm::root::FWLiteDelayedReader::reset_ | ( | ) | [inline, private, virtual] |
void edm::root::FWLiteDelayedReader::set | ( | boost::shared_ptr< ProductRegistry const > | iReg | ) | [inline] |
Definition at line 63 of file TFWLiteSelectorBasic.cc.
{ reg_ = iReg;}
void edm::root::FWLiteDelayedReader::setEntry | ( | Long64_t | iEntry | ) | [inline] |
void edm::root::FWLiteDelayedReader::setTree | ( | TTree * | iTree | ) | [inline] |
Long64_t edm::root::FWLiteDelayedReader::entry_ [private] |
Definition at line 71 of file TFWLiteSelectorBasic.cc.
Referenced by getProduct_(), and setEntry().
TTree* edm::root::FWLiteDelayedReader::eventTree_ [private] |
Definition at line 72 of file TFWLiteSelectorBasic.cc.
Referenced by getProduct_(), and setTree().