CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RootFile.h
Go to the documentation of this file.
1 #ifndef IOPool_Input_RootFile_h
2 #define IOPool_Input_RootFile_h
3 
4 /*----------------------------------------------------------------------
5 
6 RootFile.h // used by ROOT input sources
7 
8 ----------------------------------------------------------------------*/
9 
10 #include "RootTree.h"
14 #include "DataFormats/Provenance/interface/EntryDescriptionID.h" // backward compatibility
16 #include "DataFormats/Provenance/interface/EventEntryDescription.h" // backward compatibility
17 #include "DataFormats/Provenance/interface/EventProcessHistoryID.h" // backward compatibility
31 
32 #include "TBranch.h"
33 
34 #include <array>
35 #include <map>
36 #include <memory>
37 #include <set>
38 #include <string>
39 #include <tuple>
40 #include <vector>
41 
42 namespace edm {
43 
44  //------------------------------------------------------------
45  // Class RootFile: supports file reading.
46 
47  class BranchID;
48  class BranchIDListHelper;
49  class ProductProvenanceRetriever;
50  struct DaqProvenanceHelper;
51  class DuplicateChecker;
52  class EventSkipperByID;
53  class ProcessHistoryRegistry;
54  class ProductSelectorRules;
55  class InputFile;
56  class ProvenanceReaderBase;
57  class ProvenanceAdaptor;
58  class StoredMergeableRunProductMetadata;
59  class RunHelperBase;
60  class ThinnedAssociationsHelper;
61 
62  using EntryDescriptionMap = std::map<EntryDescriptionID, EventEntryDescription>;
63 
65  public:
66  virtual std::unique_ptr<ProvenanceReaderBase> makeReader(RootTree& eventTree,
67  DaqProvenanceHelper const* daqProvenanceHelper) const = 0;
68  virtual ~MakeProvenanceReader() = default;
69  };
70 
71  class RootFile {
72  public:
73  // Constructor used by RootPrimaryFileSequence
76  std::string const& logicalFileName,
77  std::shared_ptr<InputFile> filePtr,
78  std::shared_ptr<EventSkipperByID> eventSkipperByID,
79  bool skipAnyEvents,
80  int remainingEvents,
81  int remainingLumis,
82  unsigned int nStreams,
83  unsigned int treeCacheSize,
84  int treeMaxVirtualSize,
86  RunHelperBase* runHelper,
87  bool noRunLumiSort,
88  bool noEventSort,
89  ProductSelectorRules const& productSelectorRules,
90  InputType inputType,
91  std::shared_ptr<BranchIDListHelper> branchIDListHelper,
93  std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
94  std::vector<BranchID> const* associationsFromSecondary,
95  std::shared_ptr<DuplicateChecker> duplicateChecker,
96  bool dropDescendantsOfDroppedProducts,
97  ProcessHistoryRegistry& processHistoryRegistry,
98  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
99  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
100  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
101  bool bypassVersionCheck,
102  bool labelRawDataLikeMC,
103  bool usingGoToEvent,
104  bool enablePrefetching,
105  bool enforceGUIDInFileName);
106 
107  // Constructor used by RootSecondaryFileSequence
108  RootFile(std::string const& fileName,
109  ProcessConfiguration const& processConfiguration,
110  std::string const& logicalFileName,
111  std::shared_ptr<InputFile> filePtr,
112  unsigned int nStreams,
113  int treeMaxVirtualSize,
114  InputSource::ProcessingMode processingMode,
115  RunHelperBase* runHelper,
116  ProductSelectorRules const& productSelectorRules,
117  InputType inputType,
118  std::shared_ptr<BranchIDListHelper> branchIDListHelper,
119  std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
120  std::vector<BranchID> const* associationsFromSecondary,
121  bool dropDescendantsOfDroppedProducts,
122  ProcessHistoryRegistry& processHistoryRegistry,
123  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
124  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
125  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
126  bool bypassVersionCheck,
127  bool labelRawDataLikeMC,
128  bool enablePrefetching,
129  bool enforceGUIDInFileName)
130  : RootFile(fileName,
131  processConfiguration,
132  logicalFileName,
133  filePtr,
134  nullptr,
135  false,
136  -1,
137  -1,
138  nStreams,
139  0U,
140  treeMaxVirtualSize,
141  processingMode,
142  runHelper,
143  false,
144  false,
145  productSelectorRules,
146  inputType,
147  branchIDListHelper,
148  nullptr,
149  thinnedAssociationsHelper,
150  associationsFromSecondary,
151  nullptr,
152  dropDescendantsOfDroppedProducts,
153  processHistoryRegistry,
154  indexesIntoFiles,
155  currentIndexIntoFile,
156  orderedProcessHistoryIDs,
157  bypassVersionCheck,
158  labelRawDataLikeMC,
159  false,
160  enablePrefetching,
161  enforceGUIDInFileName) {}
162 
163  // Constructor used by RootEmbeddedFileSequence
164  RootFile(std::string const& fileName,
165  ProcessConfiguration const& processConfiguration,
166  std::string const& logicalFileName,
167  std::shared_ptr<InputFile> filePtr,
168  unsigned int nStreams,
169  unsigned int treeCacheSize,
170  int treeMaxVirtualSize,
171  RunHelperBase* runHelper,
172  ProductSelectorRules const& productSelectorRules,
173  InputType inputType,
174  ProcessHistoryRegistry& processHistoryRegistry,
175  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
176  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
177  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
178  bool bypassVersionCheck,
179  bool enablePrefetching,
180  bool enforceGUIDInFileName)
181  : RootFile(fileName,
182  processConfiguration,
183  logicalFileName,
184  filePtr,
185  nullptr,
186  false,
187  -1,
188  -1,
189  nStreams,
190  treeCacheSize,
191  treeMaxVirtualSize,
192  InputSource::RunsLumisAndEvents,
193  runHelper,
194  false,
195  false,
196  productSelectorRules,
197  inputType,
198  nullptr,
199  nullptr,
200  nullptr,
201  nullptr,
202  nullptr,
203  false,
204  processHistoryRegistry,
205  indexesIntoFiles,
206  currentIndexIntoFile,
207  orderedProcessHistoryIDs,
208  bypassVersionCheck,
209  false,
210  false,
211  enablePrefetching,
212  enforceGUIDInFileName) {}
213 
214  ~RootFile();
215 
216  RootFile(RootFile const&) = delete; // Disallow copying and moving
217  RootFile& operator=(RootFile const&) = delete; // Disallow copying and moving
218 
219  void reportOpened(std::string const& inputType);
220  void close();
221  std::tuple<bool, bool> readCurrentEvent(EventPrincipal& cache, bool assertOnFailure = true);
223 
224  std::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
225  std::shared_ptr<RunAuxiliary> readRunAuxiliary_();
226  std::shared_ptr<RunAuxiliary> readFakeRunAuxiliary_();
227 
230  bool endOfProcessBlocksReached() const;
233 
234  void readRun_(RunPrincipal& runPrincipal);
235  void readFakeRun_(RunPrincipal& runPrincipal);
236  void readLuminosityBlock_(LuminosityBlockPrincipal& lumiPrincipal);
237  std::string const& file() const { return file_; }
238  std::shared_ptr<ProductRegistry const> productRegistry() const { return productRegistry_; }
239  // IndexIntoFile::EntryNumber_t const& entryNumber() const {return indexIntoFileIter().entry();}
240  // LuminosityBlockNumber_t const& luminosityBlockNumber() const {return indexIntoFileIter().lumi();}
241  // RunNumber_t const& runNumber() const {return indexIntoFileIter().run();}
242  RootTree const& eventTree() const { return eventTree_; }
243  RootTree const& lumiTree() const { return lumiTree_; }
244  RootTree const& runTree() const { return runTree_; }
246  int whyNotFastClonable() const { return whyNotFastClonable_; }
247  std::array<bool, NumBranchTypes> const& hasNewlyDroppedBranch() const { return hasNewlyDroppedBranch_; }
249  bool modifiedIDs() const { return daqProvenanceHelper_.get() != nullptr; }
250  std::shared_ptr<FileBlock> createFileBlock();
251  void updateFileBlock(FileBlock&);
252 
254  return (event != 0) ? setEntryAtEvent(run, lumi, event) : (lumi ? setEntryAtLumi(run, lumi) : setEntryAtRun(run));
255  }
262 
263  void rewind() {
265  eventTree_.rewind();
266  lumiTree_.rewind();
267  runTree_.rewind();
269  for (auto& processBlockTree : processBlockTrees_) {
270  processBlockTree->rewindToInvalid();
271  }
272  }
274 
275  bool skipEntries(unsigned int& offset) { return eventTree_.skipEntries(offset); }
276  bool skipEvents(int& offset);
277  bool goToEvent(EventID const& eventID);
280  std::shared_ptr<BranchIDListHelper const> branchIDListHelper() const {
282  }
283  std::shared_ptr<BranchIDListHelper>& branchIDListHelper() { return get_underlying_safe(branchIDListHelper_); }
284  std::shared_ptr<IndexIntoFile const> indexIntoFileSharedPtr() const {
286  }
287  std::shared_ptr<IndexIntoFile>& indexIntoFileSharedPtr() { return get_underlying_safe(indexIntoFileSharedPtr_); }
288  bool wasLastEventJustRead() const;
289  bool wasFirstEventJustRead() const;
292  void initAssociationsFromSecondary(std::vector<BranchID> const&);
293 
294  void setSignals(
295  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* preEventReadSource,
296  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* postEventReadSource);
297 
298  private:
299  void makeProcessBlockRootTrees(std::shared_ptr<InputFile> filePtr,
300  int treeMaxVirtualSize,
301  bool enablePrefetching,
302  InputType inputType,
303  StoredProcessBlockHelper const& storedProcessBlockHelper);
304  bool skipThisEntry();
305  void setIfFastClonable(int remainingEvents, int remainingLumis);
306  void validateFile(InputType inputType, bool usingGoToEvent);
307  void fillIndexIntoFile();
311  bool fillEventHistory(EventAuxiliary& evtAux,
312  EventSelectionIDVector& eventSelectionIDs,
313  BranchListIndexes& branchListIndexes,
314  bool assertOnFailure = true);
315  std::shared_ptr<LuminosityBlockAuxiliary> fillLumiAuxiliary();
316  std::shared_ptr<RunAuxiliary> fillRunAuxiliary();
317  std::string const& newBranchToOldBranch(std::string const& newBranch) const;
319  void markBranchToBeDropped(bool dropDescendants,
320  BranchDescription const& branch,
321  std::set<BranchID>& branchesToDrop,
322  std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
324  ProductSelectorRules const&,
325  bool dropDescendants,
326  InputType,
328  ProcessBlockHelper const*);
330  std::set<std::string> const& processesWithKeptProcessBlockProducts,
331  ProcessBlockHelper const*);
332 
333  void readParentageTree(InputType inputType);
334  void readEntryDescriptionTree(EntryDescriptionMap& entryDescriptionMap,
335  InputType inputType); // backward compatibility
336  void readEventHistoryTree();
337  bool isDuplicateEvent();
338 
339  void initializeDuplicateChecker(std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
340  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile);
341 
342  std::unique_ptr<MakeProvenanceReader> makeProvenanceReaderMaker(InputType inputType);
343  std::shared_ptr<ProductProvenanceRetriever> makeProductProvenanceRetriever(unsigned int iStreamIndex);
344 
345  std::shared_ptr<RunAuxiliary const> savedRunAuxiliary() const { return get_underlying_safe(savedRunAuxiliary_); }
346  std::shared_ptr<RunAuxiliary>& savedRunAuxiliary() { return get_underlying_safe(savedRunAuxiliary_); }
347 
348  std::shared_ptr<BranchChildren const> branchChildren() const { return get_underlying_safe(branchChildren_); }
349  std::shared_ptr<BranchChildren>& branchChildren() { return get_underlying_safe(branchChildren_); }
350 
351  std::shared_ptr<ProductProvenanceRetriever const> eventProductProvenanceRetriever(size_t index) const {
353  }
354  std::shared_ptr<ProductProvenanceRetriever>& eventProductProvenanceRetriever(size_t index) {
356  }
357 
368  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs_;
373  std::vector<EventProcessHistoryID> eventProcessHistoryIDs_; // backward compatibility
374  std::vector<EventProcessHistoryID>::const_iterator eventProcessHistoryIter_; // backward compatibility
381  std::array<bool, NumBranchTypes> hasNewlyDroppedBranch_;
383  EventAuxiliary eventAuxCache_; //Should only be used by fillThisEventAuxiliary()
387  std::vector<edm::propagate_const<std::unique_ptr<RootTree>>> processBlockTrees_;
388  unsigned int currentProcessBlockTree_ = 0;
389  std::vector<edm::propagate_const<RootTree*>> treePointers_;
390  //Should only be used by fillThisEventAuxiliary()
392  std::shared_ptr<ProductRegistry const> productRegistry_;
393  std::shared_ptr<BranchIDLists const> branchIDLists_;
401  std::map<std::string, std::string> newBranchToOldBranch_;
410  std::vector<edm::propagate_const<std::shared_ptr<ProductProvenanceRetriever>>> eventProductProvenanceRetrievers_;
411  std::vector<ParentageID> parentageIDLookup_;
415  }; // class RootFile
416 
417 } // namespace edm
418 #endif
bool setEntryAtItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.h:253
bool noRunLumiSort_
Definition: RootFile.h:377
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
Definition: RootFile.h:397
InputType
Definition: InputType.h:5
EventToProcessBlockIndexes eventToProcessBlockIndexes_
Definition: RootFile.h:403
RootTree const & lumiTree() const
Definition: RootFile.h:243
std::shared_ptr< BranchIDLists const > branchIDLists_
Definition: RootFile.h:393
bool skipEvents(int &offset)
Definition: RootFile.cc:1440
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootFile.h:407
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
Definition: RootFile.h:280
FileFormatVersion fileFormatVersion() const
Definition: RootFile.h:245
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
Definition: RootFile.cc:1397
RootFile & operator=(RootFile const &)=delete
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
Definition: RootFile.cc:640
virtual ~MakeProvenanceReader()=default
bool branchListIndexesUnchanged() const
Definition: RootFile.h:248
bool nextEventEntry()
Definition: RootFile.h:278
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1313
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1833
bool enforceGUIDInFileName_
Definition: RootFile.h:379
int whyNotFastClonable_
Definition: RootFile.h:380
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
Definition: RootFile.h:363
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: RootFile.h:398
std::map< std::string, std::string > newBranchToOldBranch_
Definition: RootFile.h:401
edm::propagate_const< std::shared_ptr< IndexIntoFile > > indexIntoFileSharedPtr_
Definition: RootFile.h:366
bool setEntryAtRun(RunNumber_t run)
Definition: RootFile.cc:1825
void readRun_(RunPrincipal &runPrincipal)
Definition: RootFile.cc:1719
RootTree lumiTree_
Definition: RootFile.h:385
InputType inputType_
Definition: RootFile.h:414
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
Definition: RootFile.h:361
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
Definition: RootFile.h:412
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
Definition: RootFile.h:375
unsigned long long EventNumber_t
processConfiguration
Definition: Schedule.cc:687
void dropProcessesAndReorder(StoredProcessBlockHelper &, std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelper const *)
Definition: RootFile.cc:2057
EventAuxiliary eventAuxCache_
Definition: RootFile.h:383
bool initializeFirstProcessBlockEntry()
Definition: RootFile.cc:1672
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile)
Definition: RootFile.cc:1861
InputSource::ProcessingMode processingMode_
Definition: RootFile.h:399
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
Definition: RootFile.h:371
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
Definition: RootFile.h:351
bool skipEntries(unsigned int &offset)
Definition: RootFile.h:275
bool fillEventHistory(EventAuxiliary &evtAux, EventSelectionIDVector &eventSelectionIDs, BranchListIndexes &branchListIndexes, bool assertOnFailure=true)
Definition: RootFile.cc:1338
EventAuxiliary const & fillThisEventAuxiliary()
Definition: RootFile.cc:1294
std::shared_ptr< IndexIntoFile > & indexIntoFileSharedPtr()
Definition: RootFile.h:287
std::shared_ptr< ProductRegistry const > productRegistry() const
Definition: RootFile.h:238
uint16_t size_type
unsigned int LuminosityBlockNumber_t
edm::propagate_const< ProcessBlockHelper * > processBlockHelper_
Definition: RootFile.h:395
std::vector< EventSelectionID > EventSelectionIDVector
edm::propagate_const< TClass * > edProductClass_
Definition: RootFile.h:413
FileFormatVersion fileFormatVersion_
Definition: RootFile.h:364
unsigned int currentProcessBlockTree_
Definition: RootFile.h:388
void fillEventToProcessBlockIndexes()
Definition: RootFile.cc:1318
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
Definition: RootFile.cc:821
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, unsigned int nStreams, unsigned int treeCacheSize, int treeMaxVirtualSize, RunHelperBase *runHelper, ProductSelectorRules const &productSelectorRules, InputType inputType, ProcessHistoryRegistry &processHistoryRegistry, std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool enablePrefetching, bool enforceGUIDInFileName)
Definition: RootFile.h:164
void updateFileBlock(FileBlock &)
Definition: RootFile.cc:792
void rewind()
Definition: RootFile.h:263
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
Definition: RootFile.h:410
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
Definition: RootFile.h:374
void setToLastEntry()
Definition: RootFile.h:273
bool skipThisEntry()
Definition: RootFile.cc:830
FileID fid_
Definition: RootFile.h:365
long long EntryNumber_t
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: RootFile.cc:880
std::string const logicalFile_
Definition: RootFile.h:359
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
Definition: RootFile.h:370
void readParentageTree(InputType inputType)
Definition: RootFile.cc:686
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
Definition: RootFile.h:372
bool noEventSort_
Definition: RootFile.h:378
bool wasLastEventJustRead() const
Definition: RootFile.cc:929
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1817
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, unsigned int nStreams, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunHelperBase *runHelper, ProductSelectorRules const &productSelectorRules, InputType inputType, std::shared_ptr< BranchIDListHelper > branchIDListHelper, std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper, std::vector< BranchID > const *associationsFromSecondary, bool dropDescendantsOfDroppedProducts, ProcessHistoryRegistry &processHistoryRegistry, std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool labelRawDataLikeMC, bool enablePrefetching, bool enforceGUIDInFileName)
Definition: RootFile.h:108
void setPresenceInProductRegistry(ProductRegistry &, StoredProcessBlockHelper const &)
Definition: RootFile.cc:1874
void close()
Definition: RootFile.cc:1283
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const =0
RootTree const & runTree() const
Definition: RootFile.h:244
bool modifiedIDs() const
Definition: RootFile.h:249
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
Definition: RootFile.h:391
std::shared_ptr< RunAuxiliary > readFakeRunAuxiliary_()
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: RootFile.cc:1594
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: RootFile.cc:1746
int whyNotFastClonable() const
Definition: RootFile.h:246
void fillProcessBlockHelper_()
Definition: RootFile.cc:1660
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
Definition: RootFile.h:408
std::shared_ptr< ProductProvenanceRetriever > & eventProductProvenanceRetriever(size_t index)
Definition: RootFile.h:354
edm::propagate_const< TBranch * > eventToProcessBlockIndexesBranch_
Definition: RootFile.h:404
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
Definition: RootFile.cc:1420
bool skipAnyEvents_
Definition: RootFile.h:376
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
Definition: RootFile.cc:2112
RootTree eventTree_
Definition: RootFile.h:384
std::shared_ptr< FileBlock > createFileBlock()
Definition: RootFile.cc:766
std::vector< edm::propagate_const< RootTree * > > treePointers_
Definition: RootFile.h:389
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: RootFile.h:247
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
Definition: RootFile.cc:884
bool isDuplicateEvent()
Definition: RootFile.cc:867
list lumi
Definition: dqmdumpme.py:53
bool wasFirstEventJustRead() const
Definition: RootFile.cc:935
bool nextProcessBlock_(ProcessBlockPrincipal &)
Definition: RootFile.cc:1683
edm::propagate_const< std::unique_ptr< History > > history_
Definition: RootFile.h:405
IndexIntoFile & indexIntoFile_
Definition: RootFile.h:367
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
Definition: RootFile.h:283
RootTree runTree_
Definition: RootFile.h:386
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
Definition: RootFile.h:409
bool goToEvent(EventID const &eventID)
Definition: RootFile.cc:1496
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
Definition: RootFile.h:345
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1592
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: RootFile.h:381
std::shared_ptr< RunAuxiliary > & savedRunAuxiliary()
Definition: RootFile.h:346
ProcessConfiguration const & processConfiguration_
Definition: RootFile.h:360
std::shared_ptr< ProductRegistry const > productRegistry_
Definition: RootFile.h:392
void setIfFastClonable(int remainingEvents, int remainingLumis)
Definition: RootFile.cc:721
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
Definition: RootFile.h:406
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
Definition: RootFile.h:362
std::shared_ptr< BranchChildren const > branchChildren() const
Definition: RootFile.h:348
void dropOnInputAndReorder(ProductRegistry &, ProductSelectorRules const &, bool dropDescendants, InputType, StoredProcessBlockHelper &, ProcessBlockHelper const *)
Definition: RootFile.cc:1912
std::vector< edm::propagate_const< std::unique_ptr< RootTree > > > processBlockTrees_
Definition: RootFile.h:387
std::shared_ptr< BranchChildren > & branchChildren()
Definition: RootFile.h:349
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
Definition: RootFile.cc:2158
std::string const & file() const
Definition: RootFile.h:237
void readProcessBlock_(ProcessBlockPrincipal &)
Definition: RootFile.cc:1711
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
Definition: RootFile.h:369
edm::propagate_const< RunHelperBase * > runHelper_
Definition: RootFile.h:400
bool branchListIndexesUnchanged_
Definition: RootFile.h:382
bool endOfProcessBlocksReached() const
Definition: RootFile.cc:1681
void fillIndexIntoFile()
Definition: RootFile.cc:996
edm::propagate_const< TTree * > eventHistoryTree_
Definition: RootFile.h:402
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: RootFile.cc:1784
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, std::shared_ptr< EventSkipperByID > eventSkipperByID, bool skipAnyEvents, int remainingEvents, int remainingLumis, unsigned int nStreams, unsigned int treeCacheSize, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunHelperBase *runHelper, bool noRunLumiSort, bool noEventSort, ProductSelectorRules const &productSelectorRules, InputType inputType, std::shared_ptr< BranchIDListHelper > branchIDListHelper, ProcessBlockHelper *, std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper, std::vector< BranchID > const *associationsFromSecondary, std::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, ProcessHistoryRegistry &processHistoryRegistry, std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool labelRawDataLikeMC, bool usingGoToEvent, bool enablePrefetching, bool enforceGUIDInFileName)
Definition: RootFile.cc:145
static int position[264][3]
Definition: ReadPGInfo.cc:289
bool skipEntries(unsigned int &offset)
Definition: RootTree.cc:410
std::tuple< bool, bool > readCurrentEvent(EventPrincipal &cache, bool assertOnFailure=true)
Definition: RootFile.cc:1547
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
Definition: RootFile.h:368
void initAssociationsFromSecondary(std::vector< BranchID > const &)
Definition: RootFile.cc:825
list entry
Definition: mps_splice.py:68
std::shared_ptr< IndexIntoFile const > indexIntoFileSharedPtr() const
Definition: RootFile.h:284
void makeProcessBlockRootTrees(std::shared_ptr< InputFile > filePtr, int treeMaxVirtualSize, bool enablePrefetching, InputType inputType, StoredProcessBlockHelper const &storedProcessBlockHelper)
Definition: RootFile.cc:2118
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
Definition: RootFile.cc:2142
bool readEvent(EventPrincipal &cache)
Definition: RootFile.cc:1532
unsigned int RunNumber_t
bool nextWithCache()
Definition: RootTree.cc:211
std::vector< ParentageID > parentageIDLookup_
Definition: RootFile.h:411
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.cc:1809
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
Definition: RootFile.h:62
void rewind()
Definition: RootTree.h:128
RootTree const & eventTree() const
Definition: RootFile.h:242
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: RootFile.h:394
void validateFile(InputType inputType, bool usingGoToEvent)
Definition: RootFile.cc:1221
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
Definition: RootFile.cc:819
std::string const & newBranchToOldBranch(std::string const &newBranch) const
Definition: RootFile.cc:811
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
Definition: RootFile.cc:1901
edm::propagate_const< std::unique_ptr< StoredProcessBlockHelper > > storedProcessBlockHelper_
Definition: RootFile.h:396
void readFakeRun_(RunPrincipal &runPrincipal)
std::string const file_
Definition: RootFile.h:358
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
Definition: RootFile.h:373
void readEventHistoryTree()
Definition: RootFile.cc:1850
def cache
Definition: utilities.py:3
void reportOpened(std::string const &inputType)
Definition: RootFile.cc:1276