CMS 3D CMS Logo

BranchMapReader.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWLite
4 // Class : BranchMapReader
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Dan Riley
10 // Created: Tue May 20 10:31:32 EDT 2008
11 //
12 
13 // system include files
14 
15 // user include files
17 
30 
31 #include "TBranch.h"
32 #include "TFile.h"
33 #include "TTree.h"
34 
35 #include <cassert>
36 
37 namespace fwlite {
38  namespace internal {
39 
41 
42  BMRStrategy::BMRStrategy(TFile* file, int fileVersion)
43  : currentFile_(file),
44  eventTree_(nullptr),
45  luminosityBlockTree_(nullptr),
46  runTree_(nullptr),
47  eventEntry_(-1),
48  luminosityBlockEntry_(-1),
49  runEntry_(-1),
50  fileVersion_(fileVersion) {
51  // do in derived obects
52  // updateFile(file);
53  }
54 
56 
57  class Strategy : public BMRStrategy {
58  public:
59  typedef std::map<edm::BranchID, edm::BranchDescription> bidToDesc;
60 
61  Strategy(TFile* file, int fileVersion);
62  ~Strategy() override;
63  bool updateFile(TFile* file) override;
64  bool updateEvent(Long_t eventEntry) override {
65  eventEntry_ = eventEntry;
66  return true;
67  }
68  bool updateLuminosityBlock(Long_t luminosityBlockEntry) override {
69  luminosityBlockEntry_ = luminosityBlockEntry;
70  return true;
71  }
72  bool updateRun(Long_t runEntry) override {
73  runEntry_ = runEntry;
74  return true;
75  }
76  bool updateMap() override { return true; }
77  edm::BranchID productToBranchID(edm::ProductID const& pid) override;
78  edm::BranchDescription const& productToBranch(edm::ProductID const& pid) override;
79  edm::BranchDescription const& branchIDToBranch(edm::BranchID const& bid) const override;
80  std::vector<edm::BranchDescription> const& getBranchDescriptions() override;
83  }
84 
85  TBranch* getBranchRegistry(edm::ProductRegistry** pReg);
86 
88  std::vector<edm::BranchDescription> bDesc_;
91  };
92 
93  Strategy::Strategy(TFile* file, int fileVersion)
94  : BMRStrategy(file, fileVersion),
95  mapperFilled_(false),
96  thinnedAssociationsHelper_(new edm::ThinnedAssociationsHelper) {
97  // do in derived obects
98  // updateFile(file);
99  }
100 
102  // probably need to clean up something here...
103  }
104 
105  bool Strategy::updateFile(TFile* file) {
106  currentFile_ = file;
107  eventTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventTreeName().c_str()));
108  luminosityBlockTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::luminosityBlockTreeName().c_str()));
109  runTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::runTreeName().c_str()));
110  fileUUID_ = currentFile_->GetUUID();
111  branchDescriptionMap_.clear();
112  bDesc_.clear();
113  return nullptr != eventTree_;
114  }
115 
117  TBranch* bReg(nullptr);
118 
119  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
120  if (nullptr != metaDataTree) {
121  bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str());
122  bReg->SetAddress(ppReg);
123  bReg->GetEntry(0);
124  }
125  return bReg;
126  }
127 
128  std::vector<edm::BranchDescription> const& Strategy::getBranchDescriptions() {
129  if (bDesc_.empty()) {
130  for (auto const& item : branchDescriptionMap_) {
131  bDesc_.push_back(item.second);
132  }
133  }
134  return bDesc_;
135  }
136 
138  throw edm::Exception(edm::errors::UnimplementedFeature) << "Unsupported EDM file version";
139  }
140 
142  edm::BranchID bid = productToBranchID(pid);
143  bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
144  if (branchDescriptionMap_.end() == bdi) {
146  }
147  return bdi->second;
148  }
149 
151  bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
152  if (branchDescriptionMap_.end() == bdi) {
154  }
155  return bdi->second;
156  }
157 
159  public:
160  BranchMapReaderStrategyV1(TFile* file, int fileVersion);
161  bool updateFile(TFile* file) override;
162  bool updateMap() override;
164 
165  private:
167  };
168 
169  BranchMapReaderStrategyV1::BranchMapReaderStrategyV1(TFile* file, int fileVersion) : Strategy(file, fileVersion) {
170  updateFile(file);
171  }
172 
174  if (Strategy::updateFile(file)) {
175  mapperFilled_ = false;
176  return true;
177  }
178  return false;
179  }
180 
182  if (mapperFilled_) {
183  return true;
184  }
185 
186  branchDescriptionMap_.clear();
187  bDesc_.clear();
188 
190  edm::ProductRegistry* pReg = &reg;
191  TBranch* br = getBranchRegistry(&pReg);
192 
193  if (nullptr != br) {
195 
196  for (auto& item : prodList) {
197  edm::BranchDescription& prod = item.second;
198  if (edm::InEvent == prod.branchType()) {
199  // call to regenerate branchName
200  prod.init();
202  }
203  }
204  mapperFilled_ = true;
205  }
206  reg.setFrozen(false);
207  return nullptr != br;
208  }
209 
210  // v7 has differences in product status that are not implemented in BranchMapReader yet
212  public:
213  BranchMapReaderStrategyV7(TFile* file, int fileVersion);
215 
216  private:
218  };
219 
221  : BranchMapReaderStrategyV1(file, fileVersion) {
222  updateFile(file);
223  }
224 
226  public:
227  BranchMapReaderStrategyV8(TFile* file, int fileVersion);
228  bool updateFile(TFile* file) override;
229  bool updateEvent(Long_t eventEntry) override;
230  bool updateLuminosityBlock(Long_t luminosityBlockEntry) override;
231  bool updateRun(Long_t runEntry) override;
232  bool updateMap() override;
234 
235  private:
240  };
241 
243  : Strategy(file, fileVersion), eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
244  updateFile(file);
245  }
246 
248  // std::cout << "v8 updateevent " << newevent << std::endl;
249  if (newevent != eventEntry_) {
250  eventEntry_ = newevent;
251  mapperFilled_ = false;
252  }
253  return true;
254  }
255 
257  if (newLumi != luminosityBlockEntry_) {
258  luminosityBlockEntry_ = newLumi;
259  mapperFilled_ = false;
260  }
261  return true;
262  }
263 
265  if (newRun != runEntry_) {
266  runEntry_ = newRun;
267  mapperFilled_ = false;
268  }
269  return true;
270  }
271 
274  mapperFilled_ = false;
275  entryInfoBranch_ = nullptr;
276  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str()));
277  if (nullptr != metaDataTree) {
278  entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str());
279  // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl;
280  } else {
281  return false;
282  }
285 
286  branchDescriptionMap_.clear();
287  bDesc_.clear();
288 
290  edm::ProductRegistry* pReg = &reg;
291  TBranch* br = getBranchRegistry(&pReg);
292 
293  if (nullptr != br) {
295 
296  for (auto& item : prodList) {
297  edm::BranchDescription& prod = item.second;
298  if (edm::InEvent == prod.branchType()) {
299  // call to regenerate branchName
300  prod.init();
302  }
303  }
304  }
305  reg.setFrozen(false);
306  return nullptr != br;
307  }
308 
310  if (mapperFilled_) {
311  return true;
312  }
313 
315 
316  entryInfoBranch_->GetEntry(eventEntry_);
317 
318  // for(auto const& item : *pEventEntryInfoVector_) {
319  // eventInfoMap_.insert(item);
320  // }
321  mapperFilled_ = true;
322  return true;
323  }
324 
326  public:
327  BranchMapReaderStrategyV11(TFile* file, int fileVersion);
328  bool updateFile(TFile* file) override;
329  bool updateEvent(Long_t eventEntry) override;
330  bool updateLuminosityBlock(Long_t luminosityBlockEntry) override;
331  bool updateRun(Long_t runEntry) override;
332  bool updateMap() override;
333  edm::BranchID productToBranchID(edm::ProductID const& pid) override;
335 
336  private:
341  };
342 
344  : Strategy(file, fileVersion), eventHistoryTree_(nullptr), pHistory_(&history_) {
345  updateFile(file);
346  }
347 
349  // std::cout << "v11 updateevent " << newevent << std::endl;
350  if (newevent != eventEntry_) {
351  eventEntry_ = newevent;
352  mapperFilled_ = false;
353  }
354  return true;
355  }
356 
358  if (newlumi != luminosityBlockEntry_) {
359  luminosityBlockEntry_ = newlumi;
360  mapperFilled_ = false;
361  }
362  return true;
363  }
364 
366  if (newRun != runEntry_) {
367  runEntry_ = newRun;
368  mapperFilled_ = false;
369  }
370  return true;
371  }
372 
375  mapperFilled_ = false;
376  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
377 
378  if (nullptr == metaDataTree) {
380  << "No " << edm::poolNames::metaDataTreeName() << " TTree in file";
381  }
382  branchIDLists_ = std::make_unique<edm::BranchIDLists>();
383  edm::BranchIDLists* branchIDListsPtr = branchIDLists_.get();
384  if (metaDataTree->FindBranch(edm::poolNames::branchIDListBranchName().c_str()) != nullptr) {
385  TBranch* b = metaDataTree->GetBranch(edm::poolNames::branchIDListBranchName().c_str());
386  b->SetAddress(&branchIDListsPtr);
387  b->GetEntry(0);
388  // std::cout << "--> " << branchIDLists_->size() << std::endl;
389  } else {
390  throw edm::Exception(edm::errors::EventCorruption) << "FindBranch of branchIDList failed";
391  return false;
392  }
393 
394  eventHistoryTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventHistoryTreeName().c_str()));
395 
396  branchDescriptionMap_.clear();
397  bDesc_.clear();
398 
400  edm::ProductRegistry* pReg = &reg;
401  TBranch* br = getBranchRegistry(&pReg);
402 
403  if (nullptr != br) {
405 
406  for (auto& item : prodList) {
407  edm::BranchDescription& prod = item.second;
408  if (edm::InEvent == prod.branchType()) {
409  // call to regenerate branchName
410  prod.init();
412  // std::cout << "v11 updatefile " << prod.branchID() << std::endl;
413  }
414  }
415  }
416  reg.setFrozen(false);
417  return nullptr != br;
418  }
419 
421  if (!mapperFilled_) {
422  TBranch* eventHistoryBranch = eventHistoryTree_->GetBranch(edm::poolNames::eventHistoryBranchName().c_str());
423  if (!eventHistoryBranch) {
424  throw edm::Exception(edm::errors::EventCorruption) << "Failed to find history branch in event history tree";
425  return false;
426  }
427  // yes, SetAddress really does need to be called every time...
428  eventHistoryBranch->SetAddress(&pHistory_);
429  eventHistoryTree_->GetEntry(eventEntry_);
430  mapperFilled_ = true;
431  }
432  return true;
433  }
434 
436  updateMap();
438  }
439 
441  public:
442  BranchMapReaderStrategyV17(TFile* file, int fileVersion);
443  bool updateFile(TFile* file) override;
444  bool updateEvent(Long_t eventEntry) override;
445  bool updateLuminosityBlock(Long_t luminosityBlockEntry) override;
446  bool updateRun(Long_t runEntry) override;
447  bool updateMap() override;
448  edm::BranchID productToBranchID(edm::ProductID const& pid) override;
449  edm::BranchListIndexes const& branchListIndexes() const override { return branchListIndexes_; }
450 
451  private:
456  };
457 
459  : Strategy(file, fileVersion), eventsTree_(nullptr), pBranchListIndexes_(&branchListIndexes_) {
460  updateFile(file);
461  }
462 
464  // std::cout << "v11 updateevent " << newevent << std::endl;
465  if (newevent != eventEntry_) {
466  eventEntry_ = newevent;
467  mapperFilled_ = false;
468  }
469  return true;
470  }
471 
473  if (newlumi != luminosityBlockEntry_) {
474  luminosityBlockEntry_ = newlumi;
475  mapperFilled_ = false;
476  }
477  return true;
478  }
479 
481  if (newRun != runEntry_) {
482  runEntry_ = newRun;
483  mapperFilled_ = false;
484  }
485  return true;
486  }
487 
490  mapperFilled_ = false;
491  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
492  if (nullptr == metaDataTree) {
494  << "No " << edm::poolNames::metaDataTreeName() << " TTree in file";
495  }
496 
497  thinnedAssociationsHelper_ = std::make_unique<edm::ThinnedAssociationsHelper>();
498  edm::ThinnedAssociationsHelper* thinnedAssociationsHelperPtr = thinnedAssociationsHelper_.get();
499  if (metaDataTree->FindBranch(edm::poolNames::thinnedAssociationsHelperBranchName().c_str()) != nullptr) {
500  TBranch* b = metaDataTree->GetBranch(edm::poolNames::thinnedAssociationsHelperBranchName().c_str());
501  b->SetAddress(&thinnedAssociationsHelperPtr);
502  b->GetEntry(0);
503  }
504 
505  branchIDLists_ = std::make_unique<edm::BranchIDLists>();
506  edm::BranchIDLists* branchIDListsPtr = branchIDLists_.get();
507  if (metaDataTree->FindBranch(edm::poolNames::branchIDListBranchName().c_str()) != nullptr) {
508  TBranch* b = metaDataTree->GetBranch(edm::poolNames::branchIDListBranchName().c_str());
509  b->SetAddress(&branchIDListsPtr);
510  b->GetEntry(0);
511  // std::cout << "--> " << branchIDLists_->size() << std::endl;
512  } else {
513  throw edm::Exception(edm::errors::EventCorruption) << "FindBranch of branchIDList failed";
514  return false;
515  }
516 
517  eventsTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventTreeName().c_str()));
518 
519  branchDescriptionMap_.clear();
520  bDesc_.clear();
521 
523  edm::ProductRegistry* pReg = &reg;
524  TBranch* br = getBranchRegistry(&pReg);
525 
526  if (nullptr != br) {
528 
529  for (auto& item : prodList) {
530  edm::BranchDescription& prod = item.second;
531  if (edm::InEvent == prod.branchType()) {
532  // call to regenerate branchName
533  prod.init();
535  // std::cout << "v11 updatefile " << prod.branchID() << std::endl;
536  }
537  }
538  }
539  reg.setFrozen(false);
540  return nullptr != br;
541  }
542 
544  if (!mapperFilled_) {
545  TBranch* branchListIndexesBranch =
547  if (!branchListIndexesBranch) {
549  << "Failed to find branch list indexes branch in event tree";
550  return false;
551  }
552  // yes, SetAddress really does need to be called every time...
553  branchListIndexesBranch->SetAddress(&pBranchListIndexes_);
554  branchListIndexesBranch->GetEntry(eventEntry_);
555  mapperFilled_ = true;
556  }
557  return true;
558  }
559 
561  updateMap();
563  }
564  } // namespace internal
565 
566  //
567  // constants, enums and typedefs
568  //
569 
570  //
571  // static data member definitions
572  //
573 
574  //
575  // constructors and destructor
576  //
577 
578  BranchMapReader::BranchMapReader(TFile* file) : fileVersion_(-1) {
579  if (nullptr == file) {
580  throw cms::Exception("NoFile") << "The TFile pointer is null";
581  }
583  }
584 
585  //
586  // member functions
587  //
588 
590  TTree* metaDataTree = dynamic_cast<TTree*>(file->Get(edm::poolNames::metaDataTreeName().c_str()));
591  if (nullptr == metaDataTree) {
592  return 0;
593  }
594 
596  edm::FileFormatVersion* pV = &v;
597  TBranch* bVer = metaDataTree->GetBranch(edm::poolNames::fileFormatVersionBranchName().c_str());
598  bVer->SetAddress(&pV);
599  bVer->GetEntry(0);
600  fileVersion_ = v.value();
601  return v.value();
602  }
603 
604  bool BranchMapReader::updateEvent(Long_t newevent) { return strategy_->updateEvent(newevent); }
605 
606  bool BranchMapReader::updateLuminosityBlock(Long_t newlumi) { return strategy_->updateLuminosityBlock(newlumi); }
607 
608  bool BranchMapReader::updateRun(Long_t newRun) { return strategy_->updateRun(newRun); }
609 
611  if (nullptr == strategy_.get()) {
613  return true;
614  }
615 
616  TFile* currentFile(strategy_->currentFile_);
617  bool isNew(file != currentFile);
618 
619  if (!isNew) {
620  //could still have a new TFile which just happens to share the same memory address as the previous file
621  //will assume that if the Event tree's address and UUID are the same as before then we do not have
622  // to treat this like a new file
623  TTree* eventTreeTemp = dynamic_cast<TTree*>(currentFile->Get(edm::poolNames::eventTreeName().c_str()));
624  isNew = eventTreeTemp != strategy_->eventTree_ || strategy_->fileUUID_ != currentFile->GetUUID();
625  }
626  if (isNew) {
627  int fileVersion = getFileVersion(file);
628  if (fileVersion != strategy_->fileVersion_) {
629  strategy_ = newStrategy(file, fileVersion);
630  } else {
631  strategy_->updateFile(file);
632  }
633  }
634  return isNew;
635  }
636 
638  return strategy_->productToBranch(pid);
639  }
640 
641  std::vector<edm::BranchDescription> const& BranchMapReader::getBranchDescriptions() {
642  return strategy_->getBranchDescriptions();
643  }
644 
645  std::unique_ptr<internal::BMRStrategy> BranchMapReader::newStrategy(TFile* file, int fileVersion) {
646  std::unique_ptr<internal::BMRStrategy> s;
647 
648  if (fileVersion >= 17) {
649  s = std::make_unique<internal::BranchMapReaderStrategyV17>(file, fileVersion);
650  } else if (fileVersion >= 11) {
651  s = std::make_unique<internal::BranchMapReaderStrategyV11>(file, fileVersion);
652  } else if (fileVersion >= 8) {
653  s = std::make_unique<internal::BranchMapReaderStrategyV8>(file, fileVersion);
654  } else if (fileVersion >= 7) {
655  s = std::make_unique<internal::BranchMapReaderStrategyV7>(file, fileVersion);
656  } else {
657  s = std::make_unique<internal::BranchMapReaderStrategyV1>(file, fileVersion);
658  }
659  return s;
660  }
661 } // namespace fwlite
fwlite::internal::BranchMapReaderStrategyV7::branchListIndexes
edm::BranchListIndexes const & branchListIndexes() const override
Definition: BranchMapReader.cc:214
fwlite::internal::BranchMapReaderStrategyV8::branchListIndexes
edm::BranchListIndexes const & branchListIndexes() const override
Definition: BranchMapReader.cc:233
fwlite::internal::Strategy::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:105
ThinnedAssociationsHelper.h
fwlite::internal::BranchMapReaderStrategyV11
Definition: BranchMapReader.cc:325
edm::poolNames::branchIDListBranchName
std::string const & branchIDListBranchName()
Definition: BranchType.cc:183
fwlite::internal::Strategy::updateLuminosityBlock
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
Definition: BranchMapReader.cc:68
fwlite::internal::Strategy
Definition: BranchMapReader.cc:57
edm::poolNames::fileFormatVersionBranchName
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:189
edm::poolNames::runTreeName
std::string const & runTreeName()
Definition: BranchType.cc:226
fwlite::internal::BranchMapReaderStrategyV11::branchIDLists_
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
Definition: BranchMapReader.cc:337
fwlite::internal::BranchMapReaderStrategyV17::updateMap
bool updateMap() override
Definition: BranchMapReader.cc:543
funct::false
false
Definition: Factorize.h:29
fwlite::internal::BranchMapReaderStrategyV1::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:173
fwlite::internal::Strategy::bidToDesc
std::map< edm::BranchID, edm::BranchDescription > bidToDesc
Definition: BranchMapReader.cc:59
edm::poolNames::eventTreeName
std::string const & eventTreeName()
Definition: BranchType.cc:220
fwlite::internal::Strategy::thinnedAssociationsHelper
edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper() const override
Definition: BranchMapReader.cc:81
fwlite::internal::BranchMapReaderStrategyV11::updateRun
bool updateRun(Long_t runEntry) override
Definition: BranchMapReader.cc:365
fwlite::internal::Strategy::branchDescriptionMap_
bidToDesc branchDescriptionMap_
Definition: BranchMapReader.cc:87
edm::ProductRegistry::setFrozen
void setFrozen(bool initializeLookupInfo=true)
Definition: ProductRegistry.cc:153
fwlite::internal::Strategy::productToBranch
edm::BranchDescription const & productToBranch(edm::ProductID const &pid) override
Definition: BranchMapReader.cc:141
fwlite
Definition: TFileDirectory.h:16
edm::poolNames::eventMetaDataTreeName
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:222
propagate_const.h
fwlite::internal::Strategy::mapperFilled_
bool mapperFilled_
Definition: BranchMapReader.cc:89
fwlite::internal::BranchMapReaderStrategyV11::pHistory_
edm::History const * pHistory_
Definition: BranchMapReader.cc:340
fwlite::internal::BranchMapReaderStrategyV17::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:488
fwlite::internal::Strategy::bDesc_
std::vector< edm::BranchDescription > bDesc_
Definition: BranchMapReader.cc:88
edm
HLT enums.
Definition: AlignableModifier.h:19
fwlite::internal::BranchMapReaderStrategyV17::updateLuminosityBlock
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
Definition: BranchMapReader.cc:472
fwlite::internal::BMRStrategy::fileUUID_
TUUID fileUUID_
Definition: BranchMapReader.h:62
edm::errors::EventCorruption
Definition: EDMException.h:43
edm::poolNames::luminosityBlockTreeName
std::string const & luminosityBlockTreeName()
Definition: BranchType.cc:225
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
fwlite::internal::BranchMapReaderStrategyV7::BranchMapReaderStrategyV7
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:220
cms::cuda::assert
assert(be >=bs)
edm::propagate_const::get
constexpr element_type const * get() const
Definition: propagate_const.h:64
fwlite::internal::BMRStrategy::~BMRStrategy
virtual ~BMRStrategy()
Definition: BranchMapReader.cc:55
fwlite::internal::BranchMapReaderStrategyV11::updateMap
bool updateMap() override
Definition: BranchMapReader.cc:420
fwlite::internal::BMRStrategy::eventEntry_
Long_t eventEntry_
Definition: BranchMapReader.h:63
ProductRegistry.h
fwlite::internal::BranchMapReaderStrategyV8
Definition: BranchMapReader.cc:225
fwlite::internal::Strategy::Strategy
Strategy(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:93
findQualityFiles.v
v
Definition: findQualityFiles.py:179
fwlite::internal::BranchMapReaderStrategyV8::pEventEntryInfoVector_
edm::EventEntryInfoVector const * pEventEntryInfoVector_
Definition: BranchMapReader.cc:238
fwlite::internal::BranchMapReaderStrategyV11::eventHistoryTree_
edm::propagate_const< TTree * > eventHistoryTree_
Definition: BranchMapReader.cc:338
edm::poolNames::branchListIndexesBranchName
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:212
fwlite::BranchMapReader::updateLuminosityBlock
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
Definition: BranchMapReader.cc:606
fwlite::BranchMapReader::updateEvent
bool updateEvent(Long_t eventEntry)
Definition: BranchMapReader.cc:604
fwlite::internal::Strategy::updateEvent
bool updateEvent(Long_t eventEntry) override
Definition: BranchMapReader.cc:64
BranchMapReader.h
edm::BranchTypeToBranchEntryInfoBranchName
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:134
edm::ProductRegistry
Definition: ProductRegistry.h:37
fwlite::internal::BranchMapReaderStrategyV17::branchListIndexes
edm::BranchListIndexes const & branchListIndexes() const override
Definition: BranchMapReader.cc:449
EDMException.h
fwlite::BranchMapReader::updateFile
bool updateFile(TFile *file)
Definition: BranchMapReader.cc:610
fwlite::internal::Strategy::~Strategy
~Strategy() override
Definition: BranchMapReader.cc:101
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::propagate_const
Definition: propagate_const.h:32
fwlite::internal::BranchMapReaderStrategyV7::dummyBranchListIndexes_
edm::BranchListIndexes dummyBranchListIndexes_
Definition: BranchMapReader.cc:217
fwlite::internal::BranchMapReaderStrategyV8::eventEntryInfoVector_
edm::EventEntryInfoVector eventEntryInfoVector_
Definition: BranchMapReader.cc:237
edm::ProductRegistry::productListUpdator
ProductList & productListUpdator()
Definition: ProductRegistry.h:81
fwlite::internal::BMRStrategy::eventTree_
edm::propagate_const< TTree * > eventTree_
Definition: BranchMapReader.h:59
BranchListIndex.h
fwlite::internal::kDefaultBranchDescription
static const edm::BranchDescription kDefaultBranchDescription
Definition: BranchMapReader.cc:40
edm::BranchID
Definition: BranchID.h:14
fwlite::internal::BranchMapReaderStrategyV17::branchIDLists_
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
Definition: BranchMapReader.cc:452
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
fwlite::internal::BranchMapReaderStrategyV17::updateEvent
bool updateEvent(Long_t eventEntry) override
Definition: BranchMapReader.cc:463
fwlite::internal::BranchMapReaderStrategyV1::dummyBranchListIndexes_
edm::BranchListIndexes dummyBranchListIndexes_
Definition: BranchMapReader.cc:166
fwlite::internal::BranchMapReaderStrategyV7
Definition: BranchMapReader.cc:211
edm::InEvent
Definition: BranchType.h:11
b
double b
Definition: hdecay.h:118
edm::BranchIDLists
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
fwlite::internal::BMRStrategy::luminosityBlockEntry_
Long_t luminosityBlockEntry_
Definition: BranchMapReader.h:64
fwlite::internal::BranchMapReaderStrategyV1::branchListIndexes
edm::BranchListIndexes const & branchListIndexes() const override
Definition: BranchMapReader.cc:163
fwlite::internal::BranchMapReaderStrategyV11::BranchMapReaderStrategyV11
BranchMapReaderStrategyV11(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:343
geometryDiff.file
file
Definition: geometryDiff.py:13
fwlite::internal::Strategy::getBranchDescriptions
std::vector< edm::BranchDescription > const & getBranchDescriptions() override
Definition: BranchMapReader.cc:128
fwlite::BranchMapReader::BranchMapReader
BranchMapReader()
Definition: BranchMapReader.h:73
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
fwlite::internal::BranchMapReaderStrategyV17::productToBranchID
edm::BranchID productToBranchID(edm::ProductID const &pid) override
Definition: BranchMapReader.cc:560
fwlite::internal::BMRStrategy::currentFile_
edm::propagate_const< TFile * > currentFile_
Definition: BranchMapReader.h:58
fwlite::internal::BranchMapReaderStrategyV8::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:272
edm::FileFormatVersion
Definition: FileFormatVersion.h:7
edm::poolNames::productDescriptionBranchName
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:162
fwlite::BranchMapReader::productToBranch
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
Definition: BranchMapReader.cc:637
fwlite::internal::BranchMapReaderStrategyV17::eventsTree_
edm::propagate_const< TTree * > eventsTree_
Definition: BranchMapReader.cc:453
fwlite::internal::BranchMapReaderStrategyV8::dummyBranchListIndexes_
edm::BranchListIndexes dummyBranchListIndexes_
Definition: BranchMapReader.cc:239
FileFormatVersion.h
fwlite::internal::BranchMapReaderStrategyV11::history_
edm::History history_
Definition: BranchMapReader.cc:339
EventEntryInfo.h
beamvalidation.br
br
Definition: beamvalidation.py:397
fwlite::internal::Strategy::thinnedAssociationsHelper_
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: BranchMapReader.cc:90
BranchType.h
fwlite::internal::BMRStrategy::luminosityBlockTree_
edm::propagate_const< TTree * > luminosityBlockTree_
Definition: BranchMapReader.h:60
fwlite::internal::BranchMapReaderStrategyV17::updateRun
bool updateRun(Long_t runEntry) override
Definition: BranchMapReader.cc:480
ProductIDToBranchID.h
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
fwlite::internal::BMRStrategy
Definition: BranchMapReader.h:41
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
BranchIDList.h
fwlite::BranchMapReader::getBranchDescriptions
const std::vector< edm::BranchDescription > & getBranchDescriptions()
Definition: BranchMapReader.cc:641
fwlite::BranchMapReader::fileVersion_
int fileVersion_
Definition: BranchMapReader.h:117
edm::History::branchListIndexes
BranchListIndexes const & branchListIndexes() const
Definition: History.h:50
fwlite::internal::BranchMapReaderStrategyV1::BranchMapReaderStrategyV1
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:169
fwlite::internal::Strategy::updateRun
bool updateRun(Long_t runEntry) override
Definition: BranchMapReader.cc:72
fwlite::internal::BranchMapReaderStrategyV17
Definition: BranchMapReader.cc:440
fwlite::internal::Strategy::getBranchRegistry
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
Definition: BranchMapReader.cc:116
fwlite::internal::BranchMapReaderStrategyV1
Definition: BranchMapReader.cc:158
fwlite::internal::BranchMapReaderStrategyV1::updateMap
bool updateMap() override
Definition: BranchMapReader.cc:181
fwlite::BranchMapReader::getFileVersion
int getFileVersion() const
Definition: BranchMapReader.h:90
edm::poolNames::metaDataTreeName
std::string const & metaDataTreeName()
Definition: BranchType.cc:159
fwlite::internal::BMRStrategy::BMRStrategy
BMRStrategy(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:42
fwlite::internal::Strategy::updateMap
bool updateMap() override
Definition: BranchMapReader.cc:76
Exception
Definition: hltDiff.cc:245
fwlite::internal::Strategy::branchIDToBranch
edm::BranchDescription const & branchIDToBranch(edm::BranchID const &bid) const override
Definition: BranchMapReader.cc:150
fwlite::internal::BranchMapReaderStrategyV8::updateEvent
bool updateEvent(Long_t eventEntry) override
Definition: BranchMapReader.cc:247
fwlite::internal::BranchMapReaderStrategyV8::BranchMapReaderStrategyV8
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:242
edm::poolNames::thinnedAssociationsHelperBranchName
std::string const & thinnedAssociationsHelperBranchName()
Definition: BranchType.cc:186
edm::History
Definition: History.h:22
edm::EventEntryInfoVector
std::vector< EventEntryInfo > EventEntryInfoVector
Definition: EventEntryInfo.h:50
internal
Definition: ROOTFilePB.pb.h:38
edm::productIDToBranchID
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
Definition: ProductIDToBranchID.cc:11
fwlite::internal::BranchMapReaderStrategyV17::branchListIndexes_
edm::BranchListIndexes branchListIndexes_
Definition: BranchMapReader.cc:454
fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
Definition: BranchMapReader.cc:256
edm::BranchDescription
Definition: BranchDescription.h:32
fwlite::internal::BranchMapReaderStrategyV11::updateFile
bool updateFile(TFile *file) override
Definition: BranchMapReader.cc:373
fwlite::internal::BranchMapReaderStrategyV11::updateLuminosityBlock
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
Definition: BranchMapReader.cc:357
edm::poolNames::eventHistoryTreeName
std::string const & eventHistoryTreeName()
Definition: BranchType.cc:224
fwlite::internal::BranchMapReaderStrategyV11::productToBranchID
edm::BranchID productToBranchID(edm::ProductID const &pid) override
Definition: BranchMapReader.cc:435
fwlite::BranchMapReader::newStrategy
std::unique_ptr< internal::BMRStrategy > newStrategy(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:645
fwlite::internal::BMRStrategy::runEntry_
Long_t runEntry_
Definition: BranchMapReader.h:65
fwlite::internal::Strategy::productToBranchID
edm::BranchID productToBranchID(edm::ProductID const &pid) override
Definition: BranchMapReader.cc:137
History.h
fwlite::internal::BranchMapReaderStrategyV8::updateMap
bool updateMap() override
Definition: BranchMapReader.cc:309
fwlite::BranchMapReader::updateRun
bool updateRun(Long_t runEntry)
Definition: BranchMapReader.cc:608
fwlite::internal::BMRStrategy::runTree_
edm::propagate_const< TTree * > runTree_
Definition: BranchMapReader.h:61
fwlite::internal::BranchMapReaderStrategyV8::updateRun
bool updateRun(Long_t runEntry) override
Definition: BranchMapReader.cc:264
fwlite::BranchMapReader::strategy_
std::unique_ptr< internal::BMRStrategy > strategy_
Definition: BranchMapReader.h:116
fwlite::internal::BranchMapReaderStrategyV11::updateEvent
bool updateEvent(Long_t eventEntry) override
Definition: BranchMapReader.cc:348
fwlite::internal::BranchMapReaderStrategyV17::pBranchListIndexes_
edm::propagate_const< edm::BranchListIndexes * > pBranchListIndexes_
Definition: BranchMapReader.cc:455
fwlite::internal::BranchMapReaderStrategyV8::entryInfoBranch_
edm::propagate_const< TBranch * > entryInfoBranch_
Definition: BranchMapReader.cc:236
edm::errors::UnimplementedFeature
Definition: EDMException.h:38
edm::ProductID
Definition: ProductID.h:27
fwlite::internal::BranchMapReaderStrategyV11::branchListIndexes
edm::BranchListIndexes const & branchListIndexes() const override
Definition: BranchMapReader.cc:334
EventSelectionID.h
edm::poolNames::eventHistoryBranchName
std::string const & eventHistoryBranchName()
Definition: BranchType.cc:207
fwlite::internal::BranchMapReaderStrategyV17::BranchMapReaderStrategyV17
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:458