CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::root::FWLiteDelayedReader Class Reference

Inheritance diagram for edm::root::FWLiteDelayedReader:
edm::DelayedReader

List of all members.

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_

Detailed Description

Definition at line 58 of file TFWLiteSelectorBasic.cc.


Constructor & Destructor Documentation

edm::root::FWLiteDelayedReader::FWLiteDelayedReader ( ) [inline]

Definition at line 60 of file TFWLiteSelectorBasic.cc.

: entry_(-1), eventTree_(0), reg_() {}

Member Function Documentation

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]

Implements edm::DelayedReader.

Definition at line 69 of file TFWLiteSelectorBasic.cc.

{}
virtual void edm::root::FWLiteDelayedReader::reset_ ( ) [inline, private, virtual]

Implements edm::DelayedReader.

Definition at line 70 of file TFWLiteSelectorBasic.cc.

{}
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]

Definition at line 61 of file TFWLiteSelectorBasic.cc.

References entry_.

{ entry_ = iEntry; }
void edm::root::FWLiteDelayedReader::setTree ( TTree *  iTree) [inline]

Definition at line 62 of file TFWLiteSelectorBasic.cc.

References eventTree_.

{eventTree_ = iTree;}

Member Data Documentation

Definition at line 71 of file TFWLiteSelectorBasic.cc.

Referenced by getProduct_(), and setEntry().

Definition at line 72 of file TFWLiteSelectorBasic.cc.

Referenced by getProduct_(), and setTree().