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

RootDelayedReaderoperator= (RootDelayedReader const &)
 RootDelayedReader (RootTree const &tree, boost::shared_ptr< InputFile > filePtr)
 RootDelayedReader (RootDelayedReader const &)
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

boost::shared_ptr< InputFilefilePtr_
DelayedReadernextReader_
RootTree const & tree_

Detailed Description

Definition at line 26 of file RootDelayedReader.h.


Member Typedef Documentation

Definition at line 28 of file RootDelayedReader.h.

Definition at line 29 of file RootDelayedReader.h.

Definition at line 31 of file RootDelayedReader.h.

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

Definition at line 30 of file RootDelayedReader.h.


Constructor & Destructor Documentation

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

Definition at line 16 of file RootDelayedReader.cc.

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

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

Definition at line 24 of file RootDelayedReader.cc.

edm::RootDelayedReader::RootDelayedReader ( RootDelayedReader const &  )

Member Function Documentation

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

Definition at line 45 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 47 of file RootDelayedReader.h.

References branches().

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

Definition at line 46 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 48 of file RootDelayedReader.h.

References branches().

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

Definition at line 49 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 28 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);
    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());
    if(tree_.branchType() == InEvent) {
      InputFile::reportReadBranch(std::string(br->GetName()));
    }
    setRefCoreStreamer(false);
    WrapperOwningHolder edp(p, interface);
    return edp;
  }
}
virtual void edm::RootDelayedReader::mergeReaders_ ( DelayedReader other) [inline, private, virtual]

Implements edm::DelayedReader.

Definition at line 43 of file RootDelayedReader.h.

References nextReader_.

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

Implements edm::DelayedReader.

Definition at line 44 of file RootDelayedReader.h.

References nextReader_.

{nextReader_ = 0;}

Member Data Documentation

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

Definition at line 53 of file RootDelayedReader.h.

Definition at line 54 of file RootDelayedReader.h.

Referenced by mergeReaders_(), and reset_().

Definition at line 52 of file RootDelayedReader.h.

Referenced by branches(), and entryNumber().