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_
 
TBranch * entryInfoBranch_
 
edm::EventEntryInfoVector eventEntryInfoVector_
 
edm::EventEntryInfoVectorpEventEntryInfoVector_
 

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_
 
std::unique_ptr
< edm::ThinnedAssociationsHelper
thinnedAssociationsHelper_
 
- Public Attributes inherited from fwlite::internal::BMRStrategy
TFile * currentFile_
 
Long_t eventEntry_
 
TTree * eventTree_
 
TUUID fileUUID_
 
int fileVersion_
 
Long_t luminosityBlockEntry_
 
TTree * luminosityBlockTree_
 
Long_t runEntry_
 
TTree * runTree_
 

Detailed Description

Definition at line 215 of file BranchMapReader.cc.

Constructor & Destructor Documentation

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

Definition at line 231 of file BranchMapReader.cc.

References updateFile().

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

Member Function Documentation

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

Implements fwlite::internal::BMRStrategy.

Definition at line 223 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 237 of file BranchMapReader.cc.

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

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 262 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().

262  {
264  mapperFilled_ = false;
265  entryInfoBranch_ = 0;
266  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
267  if(0 != metaDataTree) {
268  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
269 // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
270  } else {
271  return false;
272  }
275 
276  branchDescriptionMap_.clear();
277  bDesc_.clear();
278 
280  edm::ProductRegistry* pReg = &reg;
281  TBranch *br = getBranchRegistry(&pReg);
282 
283  if(0 != br) {
285 
286  for(auto& item : prodList) {
287  edm::BranchDescription& prod = item.second;
288  if(edm::InEvent == prod.branchType()) {
289  // call to regenerate branchName
290  prod.init();
292  }
293  }
294  }
295  reg.setFrozen(false);
296  return 0 != br;
297  }
BranchType const & branchType() const
std::map< BranchKey, BranchDescription > ProductList
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)
Container::value_type value_type
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:264
ProductList & productListUpdator()
edm::EventEntryInfoVector * pEventEntryInfoVector_
bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 246 of file BranchMapReader.cc.

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

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 299 of file BranchMapReader.cc.

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

299  {
300  if(mapperFilled_) {
301  return true;
302  }
303 
305 
306  entryInfoBranch_->GetEntry(eventEntry_);
307 
308  for(std::vector<edm::EventEntryInfo>::const_iterator it = pEventEntryInfoVector_->begin(),
309  itEnd = pEventEntryInfoVector_->end();
310  it != itEnd; ++it) {
311 // eventInfoMap_.insert(*it);
312  }
313  mapperFilled_ = true;
314  return true;
315  }
assert(m_qm.get())
edm::EventEntryInfoVector * pEventEntryInfoVector_
bool fwlite::internal::BranchMapReaderStrategyV8::updateRun ( Long_t  runEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 254 of file BranchMapReader.cc.

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

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

Member Data Documentation

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

Definition at line 228 of file BranchMapReader.cc.

Referenced by branchListIndexes().

TBranch* fwlite::internal::BranchMapReaderStrategyV8::entryInfoBranch_
private

Definition at line 225 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

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

Definition at line 226 of file BranchMapReader.cc.

Referenced by updateFile().

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

Definition at line 227 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().