CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
fwlite::internal::BranchMapReaderStrategyV8 Class Reference
Inheritance diagram for fwlite::internal::BranchMapReaderStrategyV8:
fwlite::internal::Strategy fwlite::internal::BMRStrategy

Public Member Functions

edm::BranchListIndexes const & branchListIndexes () const override
 
 BranchMapReaderStrategyV8 (TFile *file, int fileVersion)
 
bool updateEvent (Long_t eventEntry) override
 
bool updateFile (TFile *file) override
 
bool updateLuminosityBlock (Long_t luminosityBlockEntry) override
 
bool updateMap () override
 
bool updateRun (Long_t runEntry) override
 
- Public Member Functions inherited from fwlite::internal::Strategy
edm::BranchDescription const & branchIDToBranch (edm::BranchID const &bid) const override
 
std::vector< edm::BranchDescription > const & getBranchDescriptions () override
 
TBranch * getBranchRegistry (edm::ProductRegistry **pReg)
 
edm::BranchDescription const & productToBranch (edm::ProductID const &pid) override
 
edm::BranchID productToBranchID (edm::ProductID const &pid) override
 
 Strategy (TFile *file, int fileVersion)
 
edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper () const override
 
 ~Strategy () override
 
- Public Member Functions inherited from fwlite::internal::BMRStrategy
 BMRStrategy (TFile *file, int fileVersion)
 
virtual ~BMRStrategy ()
 

Private Attributes

edm::BranchListIndexes dummyBranchListIndexes_
 
edm::propagate_const< TBranch * > entryInfoBranch_
 
edm::EventEntryInfoVector eventEntryInfoVector_
 
edm::EventEntryInfoVector const * pEventEntryInfoVector_
 

Additional Inherited Members

- Public Types inherited from fwlite::internal::Strategy
typedef std::map< edm::BranchID, edm::BranchDescriptionbidToDesc
 
- Public Attributes inherited from fwlite::internal::Strategy
std::vector< edm::BranchDescriptionbDesc_
 
bidToDesc branchDescriptionMap_
 
bool mapperFilled_
 
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
 
- Public Attributes inherited from fwlite::internal::BMRStrategy
edm::propagate_const< TFile * > currentFile_
 
Long_t eventEntry_
 
edm::propagate_const< TTree * > eventTree_
 
TUUID fileUUID_
 
int fileVersion_
 
Long_t luminosityBlockEntry_
 
edm::propagate_const< TTree * > luminosityBlockTree_
 
Long_t runEntry_
 
edm::propagate_const< TTree * > runTree_
 

Detailed Description

Definition at line 225 of file BranchMapReader.cc.

Constructor & Destructor Documentation

◆ BranchMapReaderStrategyV8()

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

Definition at line 242 of file BranchMapReader.cc.

References geometryDiff::file, and updateFile().

244  updateFile(file);
245  }
edm::EventEntryInfoVector const * pEventEntryInfoVector_
edm::EventEntryInfoVector eventEntryInfoVector_
Strategy(TFile *file, int fileVersion)

Member Function Documentation

◆ branchListIndexes()

edm::BranchListIndexes const& fwlite::internal::BranchMapReaderStrategyV8::branchListIndexes ( ) const
inlineoverridevirtual

Implements fwlite::internal::BMRStrategy.

Definition at line 233 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

233 { return dummyBranchListIndexes_; }

◆ updateEvent()

bool fwlite::internal::BranchMapReaderStrategyV8::updateEvent ( Long_t  eventEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 247 of file BranchMapReader.cc.

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

247  {
248  // std::cout << "v8 updateevent " << newevent << std::endl;
249  if (newevent != eventEntry_) {
250  eventEntry_ = newevent;
251  mapperFilled_ = false;
252  }
253  return true;
254  }

◆ updateFile()

bool fwlite::internal::BranchMapReaderStrategyV8::updateFile ( TFile *  file)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 272 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(), geometryDiff::file, fwlite::internal::Strategy::getBranchRegistry(), edm::InEvent, B2GTnPMonitor_cfi::item, fwlite::internal::Strategy::mapperFilled_, pEventEntryInfoVector_, dumpMFGeometry_cfg::prod, edm::ProductRegistry::productListUpdator(), edm::ProductRegistry::setFrozen(), and fwlite::internal::Strategy::updateFile().

Referenced by BranchMapReaderStrategyV8().

272  {
274  mapperFilled_ = false;
275  entryInfoBranch_ = nullptr;
276  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
277  if (nullptr != metaDataTree) {
278  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
279  // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
280  } else {
281  return false;
282  }
285 
286  branchDescriptionMap_.clear();
287  bDesc_.clear();
288 
290  edm::ProductRegistry* pReg = &reg;
291  TBranch* br = getBranchRegistry(&pReg);
292 
293  if (nullptr != br) {
295 
296  for (auto& item : prodList) {
297  edm::BranchDescription& prod = item.second;
298  if (edm::InEvent == prod.branchType()) {
299  // call to regenerate branchName
300  prod.init();
302  }
303  }
304  }
305  reg.setFrozen(false);
306  return nullptr != br;
307  }
edm::propagate_const< TFile * > currentFile_
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:134
std::map< BranchKey, BranchDescription > ProductList
edm::EventEntryInfoVector const * pEventEntryInfoVector_
bool updateFile(TFile *file) override
std::vector< edm::BranchDescription > bDesc_
edm::EventEntryInfoVector eventEntryInfoVector_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
void setFrozen(bool initializeLookupInfo=true)
ProductList & productListUpdator()
edm::propagate_const< TBranch * > entryInfoBranch_
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:222

◆ updateLuminosityBlock()

bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 256 of file BranchMapReader.cc.

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

256  {
257  if (newLumi != luminosityBlockEntry_) {
258  luminosityBlockEntry_ = newLumi;
259  mapperFilled_ = false;
260  }
261  return true;
262  }

◆ updateMap()

bool fwlite::internal::BranchMapReaderStrategyV8::updateMap ( )
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 309 of file BranchMapReader.cc.

References cms::cuda::assert(), entryInfoBranch_, fwlite::internal::BMRStrategy::eventEntry_, and fwlite::internal::Strategy::mapperFilled_.

309  {
310  if (mapperFilled_) {
311  return true;
312  }
313 
315 
316  entryInfoBranch_->GetEntry(eventEntry_);
317 
318  // for(auto const& item : *pEventEntryInfoVector_) {
319  // eventInfoMap_.insert(item);
320  // }
321  mapperFilled_ = true;
322  return true;
323  }
assert(be >=bs)
edm::propagate_const< TBranch * > entryInfoBranch_

◆ updateRun()

bool fwlite::internal::BranchMapReaderStrategyV8::updateRun ( Long_t  runEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 264 of file BranchMapReader.cc.

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

264  {
265  if (newRun != runEntry_) {
266  runEntry_ = newRun;
267  mapperFilled_ = false;
268  }
269  return true;
270  }

Member Data Documentation

◆ dummyBranchListIndexes_

edm::BranchListIndexes fwlite::internal::BranchMapReaderStrategyV8::dummyBranchListIndexes_
private

Definition at line 239 of file BranchMapReader.cc.

Referenced by branchListIndexes().

◆ entryInfoBranch_

edm::propagate_const<TBranch*> fwlite::internal::BranchMapReaderStrategyV8::entryInfoBranch_
private

Definition at line 236 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

◆ eventEntryInfoVector_

edm::EventEntryInfoVector fwlite::internal::BranchMapReaderStrategyV8::eventEntryInfoVector_
private

Definition at line 237 of file BranchMapReader.cc.

Referenced by updateFile().

◆ pEventEntryInfoVector_

edm::EventEntryInfoVector const* fwlite::internal::BranchMapReaderStrategyV8::pEventEntryInfoVector_
private

Definition at line 238 of file BranchMapReader.cc.

Referenced by updateFile().