CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes

fwlite::internal::Strategy Class Reference

Inheritance diagram for fwlite::internal::Strategy:
fwlite::internal::BMRStrategy fwlite::internal::BranchMapReaderStrategyV1 fwlite::internal::BranchMapReaderStrategyV11 fwlite::internal::BranchMapReaderStrategyV17 fwlite::internal::BranchMapReaderStrategyV8 fwlite::internal::BranchMapReaderStrategyV7

List of all members.

Public Types

typedef std::map
< edm::BranchID,
edm::BranchDescription
bidToDesc

Public Member Functions

virtual const std::vector
< edm::BranchDescription > & 
getBranchDescriptions ()
TBranch * getBranchRegistry (edm::ProductRegistry **pReg)
virtual const
edm::BranchDescription 
productToBranch (const edm::ProductID &pid)
virtual edm::BranchID productToBranchID (const edm::ProductID &pid)
 Strategy (TFile *file, int fileVersion)
virtual bool updateEvent (Long_t eventEntry)
virtual bool updateFile (TFile *file)
virtual bool updateLuminosityBlock (Long_t luminosityBlockEntry)
virtual bool updateMap ()
virtual bool updateRun (Long_t runEntry)
virtual ~Strategy ()

Public Attributes

std::vector
< edm::BranchDescription
bDesc_
bidToDesc branchDescriptionMap_
bool mapperFilled_

Detailed Description

Definition at line 45 of file BranchMapReader.cc.


Member Typedef Documentation

Definition at line 47 of file BranchMapReader.cc.


Constructor & Destructor Documentation

fwlite::internal::Strategy::Strategy ( TFile *  file,
int  fileVersion 
)

Definition at line 73 of file BranchMapReader.cc.

      : BMRStrategy(file, fileVersion), mapperFilled_(false) {
      // do in derived obects
      // updateFile(file);
    }
fwlite::internal::Strategy::~Strategy ( ) [virtual]

Definition at line 79 of file BranchMapReader.cc.

                        {
      // probably need to clean up something here...
    }

Member Function Documentation

const std::vector< edm::BranchDescription > & fwlite::internal::Strategy::getBranchDescriptions ( ) [virtual]

Implements fwlite::internal::BMRStrategy.

Definition at line 108 of file BranchMapReader.cc.

References bDesc_, branchDescriptionMap_, and i.

                                    {
      if (bDesc_.empty()) {
        for (bidToDesc::const_iterator i = branchDescriptionMap_.begin(); i != branchDescriptionMap_.end(); ++i) {
          bDesc_.push_back(i->second);
        }
      }
      return bDesc_;
    }
TBranch * fwlite::internal::Strategy::getBranchRegistry ( edm::ProductRegistry **  pReg)

Definition at line 94 of file BranchMapReader.cc.

References fwlite::internal::BMRStrategy::currentFile_, edm::poolNames::metaDataTreeName(), and edm::poolNames::productDescriptionBranchName().

Referenced by fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().

                                                                   {
      TBranch* bReg(0);

      TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
      if (0 != metaDataTree) {
        bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str());
        bReg->SetAddress(ppReg);
        bReg->GetEntry(0);
        (*ppReg)->setFrozen(false);
      }
      return bReg;
    }
const edm::BranchDescription fwlite::internal::Strategy::productToBranch ( const edm::ProductID pid) [virtual]

Implements fwlite::internal::BMRStrategy.

Definition at line 123 of file BranchMapReader.cc.

References branchDescriptionMap_, and productToBranchID().

                                                     {
      edm::BranchID bid = productToBranchID(pid);
      bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
      if (branchDescriptionMap_.end() == bdi) {
        return edm::BranchDescription();
      }
      return bdi->second;
    }
edm::BranchID fwlite::internal::Strategy::productToBranchID ( const edm::ProductID pid) [virtual]
virtual bool fwlite::internal::Strategy::updateEvent ( Long_t  eventEntry) [inline, virtual]
bool fwlite::internal::Strategy::updateFile ( TFile *  file) [virtual]
virtual bool fwlite::internal::Strategy::updateLuminosityBlock ( Long_t  luminosityBlockEntry) [inline, virtual]
virtual bool fwlite::internal::Strategy::updateMap ( ) [inline, virtual]
virtual bool fwlite::internal::Strategy::updateRun ( Long_t  runEntry) [inline, virtual]

Member Data Documentation