CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Constructor & Destructor Documentation

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

Definition at line 232 of file BranchMapReader.cc.

References updateFile().

233  : Strategy(file, fileVersion),
235  updateFile(file);
236  }
edm::EventEntryInfoVector const * pEventEntryInfoVector_
edm::EventEntryInfoVector eventEntryInfoVector_
Strategy(TFile *file, int fileVersion)
virtual bool updateFile(TFile *file) override

Member Function Documentation

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

Implements fwlite::internal::BMRStrategy.

Definition at line 224 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

224 {return dummyBranchListIndexes_;}
bool fwlite::internal::BranchMapReaderStrategyV8::updateEvent ( Long_t  eventEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 238 of file BranchMapReader.cc.

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

238  {
239  // std::cout << "v8 updateevent " << newevent << std::endl;
240  if(newevent != eventEntry_) {
241  eventEntry_ = newevent;
242  mapperFilled_ = false;
243  }
244  return true;
245  }
bool fwlite::internal::BranchMapReaderStrategyV8::updateFile ( TFile *  file)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 263 of file BranchMapReader.cc.

References fwlite::internal::Strategy::bDesc_, beamvalidation::br, fwlite::internal::Strategy::branchDescriptionMap_, edm::BranchDescription::branchID(), edm::BranchDescription::branchType(), edm::BranchTypeToBranchEntryInfoBranchName(), fwlite::internal::BMRStrategy::currentFile_, entryInfoBranch_, eventEntryInfoVector_, edm::poolNames::eventMetaDataTreeName(), fwlite::internal::Strategy::getBranchRegistry(), edm::InEvent, edm::BranchDescription::init(), fwlite::internal::Strategy::mapperFilled_, pEventEntryInfoVector_, parseEventContent::prod, edm::ProductRegistry::productListUpdator(), edm::ProductRegistry::setFrozen(), and fwlite::internal::Strategy::updateFile().

Referenced by BranchMapReaderStrategyV8().

263  {
265  mapperFilled_ = false;
266  entryInfoBranch_ = nullptr;
267  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
268  if(nullptr != metaDataTree) {
269  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
270 // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
271  } else {
272  return false;
273  }
276 
277  branchDescriptionMap_.clear();
278  bDesc_.clear();
279 
281  edm::ProductRegistry* pReg = &reg;
282  TBranch *br = getBranchRegistry(&pReg);
283 
284  if(nullptr != br) {
286 
287  for(auto& item : prodList) {
288  edm::BranchDescription& prod = item.second;
289  if(edm::InEvent == prod.branchType()) {
290  // call to regenerate branchName
291  prod.init();
293  }
294  }
295  }
296  reg.setFrozen(false);
297  return nullptr != br;
298  }
BranchType const & branchType() const
edm::propagate_const< TFile * > currentFile_
std::map< BranchKey, BranchDescription > ProductList
edm::EventEntryInfoVector const * pEventEntryInfoVector_
virtual bool updateFile(TFile *file) override
std::vector< edm::BranchDescription > bDesc_
edm::EventEntryInfoVector eventEntryInfoVector_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
BranchID const & branchID() const
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:127
void setFrozen(bool initializeLookupInfo=true)
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:264
ProductList & productListUpdator()
edm::propagate_const< TBranch * > entryInfoBranch_
bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 247 of file BranchMapReader.cc.

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

247  {
248  if(newLumi != luminosityBlockEntry_) {
249  luminosityBlockEntry_ = newLumi;
250  mapperFilled_ = false;
251  }
252  return true;
253  }
bool fwlite::internal::BranchMapReaderStrategyV8::updateMap ( )
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 300 of file BranchMapReader.cc.

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

300  {
301  if(mapperFilled_) {
302  return true;
303  }
304 
306 
307  entryInfoBranch_->GetEntry(eventEntry_);
308 
309 // for(auto const& item : *pEventEntryInfoVector_) {
310 // eventInfoMap_.insert(item);
311 // }
312  mapperFilled_ = true;
313  return true;
314  }
assert(m_qm.get())
edm::propagate_const< TBranch * > entryInfoBranch_
bool fwlite::internal::BranchMapReaderStrategyV8::updateRun ( Long_t  runEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 255 of file BranchMapReader.cc.

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

255  {
256  if(newRun != runEntry_) {
257  runEntry_ = newRun;
258  mapperFilled_ = false;
259  }
260  return true;
261  }

Member Data Documentation

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

Definition at line 229 of file BranchMapReader.cc.

Referenced by branchListIndexes().

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

Definition at line 226 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

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

Definition at line 227 of file BranchMapReader.cc.

Referenced by updateFile().

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

Definition at line 228 of file BranchMapReader.cc.

Referenced by updateFile().