CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

edm::RootDelayedReader Class Reference

#include <RootDelayedReader.h>

Inheritance diagram for edm::RootDelayedReader:
edm::DelayedReader

List of all members.

Public Types

typedef roottree::BranchInfo BranchInfo
typedef roottree::BranchMap BranchMap
typedef roottree::EntryNumber EntryNumber
typedef
roottree::BranchMap::const_iterator 
iterator

Public Member Functions

 RootDelayedReader (RootTree const &tree, FileFormatVersion const &fileFormatVersion, boost::shared_ptr< InputFile > filePtr)
virtual ~RootDelayedReader ()

Private Member Functions

BranchMap const & branches () const
iterator branchIter (BranchKey const &k) const
EntryNumber const & entryNumber () const
bool found (iterator const &iter) const
BranchInfo const & getBranchInfo (iterator const &iter) const
virtual WrapperOwningHolder getProduct_ (BranchKey const &k, WrapperInterfaceBase const *interface, EDProductGetter const *ep) const
virtual void mergeReaders_ (DelayedReader *other)
virtual void reset_ ()

Private Attributes

FileFormatVersion const & fileFormatVersion_
boost::shared_ptr< InputFilefilePtr_
DelayedReadernextReader_
RootTree const & tree_

Detailed Description

Definition at line 30 of file RootDelayedReader.h.


Member Typedef Documentation

Definition at line 32 of file RootDelayedReader.h.

Definition at line 33 of file RootDelayedReader.h.

Definition at line 35 of file RootDelayedReader.h.

typedef roottree::BranchMap::const_iterator edm::RootDelayedReader::iterator

Definition at line 34 of file RootDelayedReader.h.


Constructor & Destructor Documentation

data refman pasoursint CMSSW_4_4_3_patch1 src IOPool Input src RootDelayedReader cc edm::RootDelayedReader::RootDelayedReader ( RootTree const &  tree,
FileFormatVersion const &  fileFormatVersion,
boost::shared_ptr< InputFile filePtr 
)

Definition at line 15 of file RootDelayedReader.cc.

                                          :
   tree_(tree),
   filePtr_(filePtr),
   nextReader_(),
   fileFormatVersion_(fileFormatVersion) {
  }

edm::RootDelayedReader::~RootDelayedReader ( ) [virtual]

Definition at line 25 of file RootDelayedReader.cc.


Member Function Documentation

BranchMap const& edm::RootDelayedReader::branches ( ) const [inline, private]

Definition at line 47 of file RootDelayedReader.h.

References edm::RootTree::branches(), and tree_.

Referenced by branchIter(), and found().

{return tree_.branches();}
iterator edm::RootDelayedReader::branchIter ( BranchKey const &  k) const [inline, private]

Definition at line 49 of file RootDelayedReader.h.

References branches().

{return branches().find(k);}
EntryNumber const& edm::RootDelayedReader::entryNumber ( ) const [inline, private]

Definition at line 48 of file RootDelayedReader.h.

References edm::RootTree::entryNumber(), and tree_.

{return tree_.entryNumber();}
bool edm::RootDelayedReader::found ( iterator const &  iter) const [inline, private]

Definition at line 50 of file RootDelayedReader.h.

References branches().

{return iter != branches().end();}
BranchInfo const& edm::RootDelayedReader::getBranchInfo ( iterator const &  iter) const [inline, private]

Definition at line 51 of file RootDelayedReader.h.

{return iter->second; }
WrapperOwningHolder edm::RootDelayedReader::getProduct_ ( BranchKey const &  k,
WrapperInterfaceBase const *  interface,
EDProductGetter const *  ep 
) const [private, virtual]

Implements edm::DelayedReader.

Definition at line 29 of file RootDelayedReader.cc.

                      {
      if (nextReader_) {
        return nextReader_->getProduct(k, interface, ep);
      } else {
        return WrapperOwningHolder();
      }
    }
    roottree::BranchInfo const& branchInfo = getBranchInfo(iter);
    TBranch* br = branchInfo.productBranch_;
    if (br == 0) {
      if (nextReader_) {
        return nextReader_->getProduct(k, interface, ep);
      } else {
        return WrapperOwningHolder();
      }
    }
    setRefCoreStreamer(ep, !fileFormatVersion_.splitProductIDs(), !fileFormatVersion_.productIDIsInt());
    TClass* cp = branchInfo.classCache_;
    if(0 == cp) {
      branchInfo.classCache_ = gROOT->GetClass(branchInfo.branchDescription_.wrappedName().c_str());
      cp = branchInfo.classCache_;
    }
    void* p = cp->New();
    br->SetAddress(&p);
    tree_.getEntry(br, entryNumber());
    setRefCoreStreamer(!fileFormatVersion_.splitProductIDs());
    WrapperOwningHolder edp(p, interface);
    return edp;
  }
}
virtual void edm::RootDelayedReader::mergeReaders_ ( DelayedReader other) [inline, private, virtual]

Implements edm::DelayedReader.

Definition at line 45 of file RootDelayedReader.h.

References nextReader_.

{nextReader_ = other;}
virtual void edm::RootDelayedReader::reset_ ( ) [inline, private, virtual]

Implements edm::DelayedReader.

Definition at line 46 of file RootDelayedReader.h.

References nextReader_.

{nextReader_ = 0;}

Member Data Documentation

Definition at line 57 of file RootDelayedReader.h.

boost::shared_ptr<InputFile> edm::RootDelayedReader::filePtr_ [private]

Definition at line 55 of file RootDelayedReader.h.

Definition at line 56 of file RootDelayedReader.h.

Referenced by mergeReaders_(), and reset_().

Definition at line 54 of file RootDelayedReader.h.

Referenced by branches(), and entryNumber().