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 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 ~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_
 
- 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 202 of file BranchMapReader.cc.

Constructor & Destructor Documentation

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

Definition at line 218 of file BranchMapReader.cc.

References updateFile().

219  : Strategy(file, fileVersion),
221  updateFile(file);
222  }
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 210 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 224 of file BranchMapReader.cc.

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

224  {
225  // std::cout << "v8 updateevent " << newevent << std::endl;
226  if(newevent != eventEntry_) {
227  eventEntry_ = newevent;
228  mapperFilled_ = false;
229  }
230  return true;
231  }
bool fwlite::internal::BranchMapReaderStrategyV8::updateFile ( TFile *  file)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

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

249  {
251  mapperFilled_ = false;
252  entryInfoBranch_ = 0;
253  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
254  if(0 != metaDataTree) {
255  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
256 // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
257  } else {
258  return false;
259  }
262 
263  branchDescriptionMap_.clear();
264  bDesc_.clear();
265 
267  edm::ProductRegistry* pReg = &reg;
268  TBranch *br = getBranchRegistry(&pReg);
269 
270  if(0 != br) {
272 
273  for(auto& item : prodList) {
274  edm::BranchDescription& prod = item.second;
275  if(edm::InEvent == prod.branchType()) {
276  // call to regenerate branchName
277  prod.init();
279  }
280  }
281  }
282  reg.setFrozen(false);
283  return 0 != br;
284  }
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:126
void setFrozen(bool initializeLookupInfo=true)
Container::value_type value_type
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:258
ProductList & productListUpdator()
edm::EventEntryInfoVector * pEventEntryInfoVector_
bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 233 of file BranchMapReader.cc.

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

233  {
234  if(newLumi != luminosityBlockEntry_) {
235  luminosityBlockEntry_ = newLumi;
236  mapperFilled_ = false;
237  }
238  return true;
239  }
bool fwlite::internal::BranchMapReaderStrategyV8::updateMap ( )
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 286 of file BranchMapReader.cc.

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

286  {
287  if(mapperFilled_) {
288  return true;
289  }
290 
291  assert(entryInfoBranch_);
292 
293  entryInfoBranch_->GetEntry(eventEntry_);
294 
295  for(std::vector<edm::EventEntryInfo>::const_iterator it = pEventEntryInfoVector_->begin(),
296  itEnd = pEventEntryInfoVector_->end();
297  it != itEnd; ++it) {
298 // eventInfoMap_.insert(*it);
299  }
300  mapperFilled_ = true;
301  return true;
302  }
edm::EventEntryInfoVector * pEventEntryInfoVector_
bool fwlite::internal::BranchMapReaderStrategyV8::updateRun ( Long_t  runEntry)
overridevirtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 241 of file BranchMapReader.cc.

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

241  {
242  if(newRun != runEntry_) {
243  runEntry_ = newRun;
244  mapperFilled_ = false;
245  }
246  return true;
247  }

Member Data Documentation

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

Definition at line 215 of file BranchMapReader.cc.

Referenced by branchListIndexes().

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

Definition at line 212 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

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

Definition at line 213 of file BranchMapReader.cc.

Referenced by updateFile().

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

Definition at line 214 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().