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().

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.

233 { return dummyBranchListIndexes_; }

References dummyBranchListIndexes_.

◆ updateEvent()

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 247 of file BranchMapReader.cc.

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

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

◆ updateFile()

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 272 of file BranchMapReader.cc.

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  }

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().

◆ updateLuminosityBlock()

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 256 of file BranchMapReader.cc.

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

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

◆ updateMap()

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 309 of file BranchMapReader.cc.

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  }

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

◆ updateRun()

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 264 of file BranchMapReader.cc.

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

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

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().

fwlite::internal::Strategy::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:105
fwlite::internal::Strategy::branchDescriptionMap_
bidToDesc branchDescriptionMap_
Definition: BranchMapReader.cc:87
edm::ProductRegistry::setFrozen
void setFrozen(bool initializeLookupInfo=true)
Definition: ProductRegistry.cc:153
edm::poolNames::eventMetaDataTreeName
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:222
fwlite::internal::Strategy::mapperFilled_
bool mapperFilled_
Definition: BranchMapReader.cc:89
fwlite::internal::Strategy::bDesc_
std::vector< edm::BranchDescription > bDesc_
Definition: BranchMapReader.cc:88
cms::cuda::assert
assert(be >=bs)
fwlite::internal::BMRStrategy::eventEntry_
Long_t eventEntry_
Definition: BranchMapReader.h:63
fwlite::internal::Strategy::Strategy
Strategy(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:93
fwlite::internal::BranchMapReaderStrategyV8::pEventEntryInfoVector_
edm::EventEntryInfoVector const * pEventEntryInfoVector_
Definition: BranchMapReader.cc:238
edm::BranchTypeToBranchEntryInfoBranchName
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:134
edm::ProductRegistry
Definition: ProductRegistry.h:37
fwlite::internal::BranchMapReaderStrategyV8::eventEntryInfoVector_
edm::EventEntryInfoVector eventEntryInfoVector_
Definition: BranchMapReader.cc:237
edm::ProductRegistry::productListUpdator
ProductList & productListUpdator()
Definition: ProductRegistry.h:81
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::InEvent
Definition: BranchType.h:11
fwlite::internal::BMRStrategy::luminosityBlockEntry_
Long_t luminosityBlockEntry_
Definition: BranchMapReader.h:64
geometryDiff.file
file
Definition: geometryDiff.py:13
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
fwlite::internal::BMRStrategy::currentFile_
edm::propagate_const< TFile * > currentFile_
Definition: BranchMapReader.h:58
fwlite::internal::BranchMapReaderStrategyV8::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:272
fwlite::internal::BranchMapReaderStrategyV8::dummyBranchListIndexes_
edm::BranchListIndexes dummyBranchListIndexes_
Definition: BranchMapReader.cc:239
beamvalidation.br
br
Definition: beamvalidation.py:397
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
fwlite::internal::Strategy::getBranchRegistry
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
Definition: BranchMapReader.cc:116
edm::BranchDescription
Definition: BranchDescription.h:32
fwlite::internal::BMRStrategy::runEntry_
Long_t runEntry_
Definition: BranchMapReader.h:65
fwlite::internal::BranchMapReaderStrategyV8::entryInfoBranch_
edm::propagate_const< TBranch * > entryInfoBranch_
Definition: BranchMapReader.cc:236