CMS 3D CMS Logo

Public Member Functions | Private Attributes

fwlite::internal::BranchMapReaderStrategyV8 Class Reference

Inheritance diagram for fwlite::internal::BranchMapReaderStrategyV8:
fwlite::internal::Strategy fwlite::internal::BMRStrategy

List of all members.

Public Member Functions

virtual edm::BranchListIndexes
const & 
branchListIndexes () const
 BranchMapReaderStrategyV8 (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)

Private Attributes

edm::BranchListIndexes dummyBranchListIndexes_
TBranch * entryInfoBranch_
edm::EventEntryInfoVector eventEntryInfoVector_
edm::EventEntryInfoVectorpEventEntryInfoVector_

Detailed Description

Definition at line 199 of file BranchMapReader.cc.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual edm::BranchListIndexes const& fwlite::internal::BranchMapReaderStrategyV8::branchListIndexes ( ) const [inline, virtual]

Implements fwlite::internal::BMRStrategy.

Definition at line 207 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

bool fwlite::internal::BranchMapReaderStrategyV8::updateEvent ( Long_t  eventEntry) [virtual]

Reimplemented from fwlite::internal::Strategy.

Definition at line 221 of file BranchMapReader.cc.

References fwlite::internal::BMRStrategy::eventEntry_, and fwlite::internal::Strategy::mapperFilled_.

                                                               {
      // std::cout << "v8 updateevent " << newevent << std::endl;
      if(newevent != eventEntry_) {
        eventEntry_ = newevent;
        mapperFilled_ = false;
      }
      return true;
    }
bool fwlite::internal::BranchMapReaderStrategyV8::updateFile ( TFile *  file) [virtual]

Reimplemented from fwlite::internal::Strategy.

Definition at line 246 of file BranchMapReader.cc.

References fwlite::internal::Strategy::bDesc_, beamvalidation::br, fwlite::internal::Strategy::branchDescriptionMap_, edm::BranchTypeToBranchEntryInfoBranchName(), fwlite::internal::BMRStrategy::currentFile_, entryInfoBranch_, eventEntryInfoVector_, edm::poolNames::eventMetaDataTreeName(), fwlite::internal::Strategy::getBranchRegistry(), edm::InEvent, fwlite::internal::Strategy::mapperFilled_, pEventEntryInfoVector_, and edm::ProductRegistry::productList().

Referenced by BranchMapReaderStrategyV8().

                                                          {
      Strategy::updateFile(file);
      mapperFilled_ = false;
      entryInfoBranch_ = 0;
      TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
      if(0 != metaDataTree) {
        entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
//         std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
      } else {
        return false;
      }
      pEventEntryInfoVector_ = &eventEntryInfoVector_;
      entryInfoBranch_->SetAddress(&pEventEntryInfoVector_);

      branchDescriptionMap_.clear();
      bDesc_.clear();

      edm::ProductRegistry reg;
      edm::ProductRegistry* pReg = &reg;
      TBranch *br = getBranchRegistry(&pReg);

      if(0 != br) {
        edm::ProductRegistry::ProductList const& prodList = reg.productList();

        for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
          if(edm::InEvent == it->second.branchType()) {
            // call to regenerate branchName
            it->second.init();
            branchDescriptionMap_.insert(bidToDesc::value_type(it->second.branchID(), it->second));
          }
        }
      }
      return 0 != br;
    }
bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry) [virtual]

Reimplemented from fwlite::internal::Strategy.

Definition at line 230 of file BranchMapReader.cc.

References fwlite::internal::BMRStrategy::luminosityBlockEntry_, and fwlite::internal::Strategy::mapperFilled_.

                                                                        {
      if(newLumi != luminosityBlockEntry_) {
        luminosityBlockEntry_ = newLumi;
        mapperFilled_ = false;
      }
      return true;
    }
bool fwlite::internal::BranchMapReaderStrategyV8::updateMap ( ) [virtual]

Reimplemented from fwlite::internal::Strategy.

Definition at line 281 of file BranchMapReader.cc.

References entryInfoBranch_, fwlite::internal::BMRStrategy::eventEntry_, fwlite::internal::Strategy::mapperFilled_, and pEventEntryInfoVector_.

                                              {
      if(mapperFilled_) {
        return true;
      }

      assert(entryInfoBranch_);

      entryInfoBranch_->GetEntry(eventEntry_);

      for(std::vector<edm::EventEntryInfo>::const_iterator it = pEventEntryInfoVector_->begin(),
           itEnd = pEventEntryInfoVector_->end();
           it != itEnd; ++it) {
//         eventInfoMap_.insert(*it);
      }
      mapperFilled_ = true;
      return true;
    }
bool fwlite::internal::BranchMapReaderStrategyV8::updateRun ( Long_t  runEntry) [virtual]

Reimplemented from fwlite::internal::Strategy.

Definition at line 238 of file BranchMapReader.cc.

References fwlite::internal::Strategy::mapperFilled_, and fwlite::internal::BMRStrategy::runEntry_.

                                                           {
      if(newRun != runEntry_) {
        runEntry_ = newRun;
        mapperFilled_ = false;
      }
      return true;
    }

Member Data Documentation

Definition at line 212 of file BranchMapReader.cc.

Referenced by branchListIndexes().

Definition at line 209 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

Definition at line 210 of file BranchMapReader.cc.

Referenced by updateFile().

Definition at line 211 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().