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

Constructor & Destructor Documentation

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

Definition at line 215 of file BranchMapReader.cc.

References updateFile().

Member Function Documentation

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

Implements fwlite::internal::BMRStrategy.

Definition at line 207 of file BranchMapReader.cc.

References dummyBranchListIndexes_.

207 {return dummyBranchListIndexes_;}
bool fwlite::internal::BranchMapReaderStrategyV8::updateEvent ( Long_t  eventEntry)
virtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 221 of file BranchMapReader.cc.

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

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 246 of file BranchMapReader.cc.

References fwlite::internal::Strategy::bDesc_, scaleCards::br, fwlite::internal::Strategy::branchDescriptionMap_, edm::BranchTypeToBranchEntryInfoBranchName(), fwlite::internal::BMRStrategy::currentFile_, entryInfoBranch_, eventEntryInfoVector_, edm::poolNames::eventMetaDataTreeName(), fwlite::internal::Strategy::getBranchRegistry(), edm::InEvent, fwlite::internal::Strategy::mapperFilled_, pEventEntryInfoVector_, edm::ProductRegistry::productList(), and fwlite::internal::Strategy::updateFile().

Referenced by BranchMapReaderStrategyV8().

246  {
248  mapperFilled_ = false;
249  entryInfoBranch_ = 0;
250  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
251  if(0 != metaDataTree) {
252  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
253 // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
254  } else {
255  return false;
256  }
259 
260  branchDescriptionMap_.clear();
261  bDesc_.clear();
262 
264  edm::ProductRegistry* pReg = &reg;
265  TBranch *br = getBranchRegistry(&pReg);
266 
267  if(0 != br) {
268  edm::ProductRegistry::ProductList const& prodList = reg.productList();
269 
270  for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
271  if(edm::InEvent == it->second.branchType()) {
272  // call to regenerate branchName
273  it->second.init();
274  branchDescriptionMap_.insert(bidToDesc::value_type(it->second.branchID(), it->second));
275  }
276  }
277  }
278  return 0 != br;
279  }
std::map< BranchKey, BranchDescription > ProductList
std::vector< edm::BranchDescription > bDesc_
ProductList const & productList() const
edm::EventEntryInfoVector eventEntryInfoVector_
tuple br
Definition: scaleCards.py:54
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:126
Container::value_type value_type
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:258
virtual bool updateFile(TFile *file)
author Stefano ARGIRO author Bill Tanenbaum
edm::EventEntryInfoVector * pEventEntryInfoVector_
bool fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
virtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 230 of file BranchMapReader.cc.

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

230  {
231  if(newLumi != luminosityBlockEntry_) {
232  luminosityBlockEntry_ = newLumi;
233  mapperFilled_ = false;
234  }
235  return true;
236  }
bool fwlite::internal::BranchMapReaderStrategyV8::updateMap ( )
virtual

Reimplemented from fwlite::internal::Strategy.

Definition at line 281 of file BranchMapReader.cc.

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

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

Reimplemented from fwlite::internal::Strategy.

Definition at line 238 of file BranchMapReader.cc.

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

238  {
239  if(newRun != runEntry_) {
240  runEntry_ = newRun;
241  mapperFilled_ = false;
242  }
243  return true;
244  }

Member Data Documentation

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

Definition at line 212 of file BranchMapReader.cc.

Referenced by branchListIndexes().

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

Definition at line 209 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().

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

Definition at line 210 of file BranchMapReader.cc.

Referenced by updateFile().

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

Definition at line 211 of file BranchMapReader.cc.

Referenced by updateFile(), and updateMap().