CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
fwlite::internal::BranchMapReaderStrategyV1 Class Reference
Inheritance diagram for fwlite::internal::BranchMapReaderStrategyV1:
fwlite::internal::Strategy fwlite::internal::BMRStrategy fwlite::internal::BranchMapReaderStrategyV7

Public Member Functions

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

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 132 of file BranchMapReader.cc.

Constructor & Destructor Documentation

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

Definition at line 140 of file BranchMapReader.cc.

References updateFile().

141  : Strategy(file, fileVersion) {
142  updateFile(file);
143  }
list file
Definition: dbtoweb.py:253
Strategy(TFile *file, int fileVersion)

Member Function Documentation

bool fwlite::internal::BranchMapReaderStrategyV1::updateFile ( TFile *  file)
virtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 145 of file BranchMapReader.cc.

References fwlite::internal::Strategy::mapperFilled_, and fwlite::internal::Strategy::updateFile().

Referenced by BranchMapReaderStrategyV1(), and fwlite::internal::BranchMapReaderStrategyV7::BranchMapReaderStrategyV7().

145  {
146  if (Strategy::updateFile(file)) {
147  mapperFilled_ = false;
148  return true;
149  }
150  return false;
151  }
list file
Definition: dbtoweb.py:253
virtual bool updateFile(TFile *file)
bool fwlite::internal::BranchMapReaderStrategyV1::updateMap ( )
virtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 153 of file BranchMapReader.cc.

References fwlite::internal::Strategy::bDesc_, beamvalidation::br, fwlite::internal::Strategy::branchDescriptionMap_, fwlite::internal::Strategy::getBranchRegistry(), edm::InEvent, fwlite::internal::Strategy::mapperFilled_, and edm::ProductRegistry::productList().

153  {
154  if (mapperFilled_) {
155  return true;
156  }
157 
158  branchDescriptionMap_.clear();
159  bDesc_.clear();
160 
162  edm::ProductRegistry* pReg = &reg;
163  TBranch* br = getBranchRegistry(&pReg);
164 
165  if (0 != br) {
166  const edm::ProductRegistry::ProductList& prodList = reg.productList();
167 
168  for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
169  if (edm::InEvent == it->second.branchType()) {
170  // call to regenerate branchName
171  it->second.init();
172  branchDescriptionMap_.insert(bidToDesc::value_type(it->second.branchID(), it->second));
173  }
174  }
175  mapperFilled_ = true;
176  }
177  return 0 != br;
178  }
std::map< BranchKey, BranchDescription > ProductList
Container::value_type value_type
std::vector< edm::BranchDescription > bDesc_
ProductList const & productList() const
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
author Stefano ARGIRO author Bill Tanenbaum