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 std::vector
< edm::BranchDescription >
const & 
getBranchDescriptions ()
TBranch * getBranchRegistry (edm::ProductRegistry **pReg)
virtual edm::BranchDescription
const & 
productToBranch (edm::ProductID const &pid)
virtual edm::BranchID productToBranchID (edm::ProductID const &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 48 of file BranchMapReader.cc.


Member Typedef Documentation

Definition at line 50 of file BranchMapReader.cc.


Constructor & Destructor Documentation

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

Definition at line 76 of file BranchMapReader.cc.

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

Definition at line 82 of file BranchMapReader.cc.

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

Member Function Documentation

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

Implements fwlite::internal::BMRStrategy.

Definition at line 111 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 97 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;
    }
edm::BranchDescription const & fwlite::internal::Strategy::productToBranch ( edm::ProductID const &  pid) [virtual]

Implements fwlite::internal::BMRStrategy.

Definition at line 126 of file BranchMapReader.cc.

References branchDescriptionMap_, fwlite::internal::kDefaultBranchDescription, and productToBranchID().

                                                     {
      edm::BranchID bid = productToBranchID(pid);
      bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
      if(branchDescriptionMap_.end() == bdi) {
        return kDefaultBranchDescription;
      }
      return bdi->second;
    }
edm::BranchID fwlite::internal::Strategy::productToBranchID ( edm::ProductID const &  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