CMS 3D CMS Logo

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
75  ProcessConfiguration const& processConfiguration,
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 noEventSort,
88  ProductSelectorRules const& productSelectorRules,
89  InputType inputType,
90  std::shared_ptr<BranchIDListHelper> branchIDListHelper,
92  std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
93  std::vector<BranchID> const* associationsFromSecondary,
94  std::shared_ptr<DuplicateChecker> duplicateChecker,
95  bool dropDescendantsOfDroppedProducts,
96  ProcessHistoryRegistry& processHistoryRegistry,
97  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
98  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
99  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
100  bool bypassVersionCheck,
101  bool labelRawDataLikeMC,
102  bool usingGoToEvent,
103  bool enablePrefetching,
104  bool enforceGUIDInFileName);
105 
106  // Constructor used by RootSecondaryFileSequence
108  ProcessConfiguration const& processConfiguration,
109  std::string const& logicalFileName,
110  std::shared_ptr<InputFile> filePtr,
111  unsigned int nStreams,
112  int treeMaxVirtualSize,
114  RunHelperBase* runHelper,
115  ProductSelectorRules const& productSelectorRules,
116  InputType inputType,
117  std::shared_ptr<BranchIDListHelper> branchIDListHelper,
118  std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
119  std::vector<BranchID> const* associationsFromSecondary,
120  bool dropDescendantsOfDroppedProducts,
121  ProcessHistoryRegistry& processHistoryRegistry,
122  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
123  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
124  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
125  bool bypassVersionCheck,
126  bool labelRawDataLikeMC,
127  bool enablePrefetching,
128  bool enforceGUIDInFileName)
129  : RootFile(fileName,
130  processConfiguration,
131  logicalFileName,
132  filePtr,
133  nullptr,
134  false,
135  -1,
136  -1,
137  nStreams,
138  0U,
139  treeMaxVirtualSize,
141  runHelper,
142  false,
143  productSelectorRules,
144  inputType,
146  nullptr,
147  thinnedAssociationsHelper,
148  associationsFromSecondary,
149  nullptr,
150  dropDescendantsOfDroppedProducts,
151  processHistoryRegistry,
152  indexesIntoFiles,
153  currentIndexIntoFile,
154  orderedProcessHistoryIDs,
155  bypassVersionCheck,
156  labelRawDataLikeMC,
157  false,
158  enablePrefetching,
159  enforceGUIDInFileName) {}
160 
161  // Constructor used by RootEmbeddedFileSequence
163  ProcessConfiguration const& processConfiguration,
164  std::string const& logicalFileName,
165  std::shared_ptr<InputFile> filePtr,
166  unsigned int nStreams,
167  unsigned int treeCacheSize,
168  int treeMaxVirtualSize,
169  RunHelperBase* runHelper,
170  ProductSelectorRules const& productSelectorRules,
171  InputType inputType,
172  ProcessHistoryRegistry& processHistoryRegistry,
173  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
174  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
175  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
176  bool bypassVersionCheck,
177  bool enablePrefetching,
178  bool enforceGUIDInFileName)
179  : RootFile(fileName,
180  processConfiguration,
181  logicalFileName,
182  filePtr,
183  nullptr,
184  false,
185  -1,
186  -1,
187  nStreams,
188  treeCacheSize,
189  treeMaxVirtualSize,
190  InputSource::RunsLumisAndEvents,
191  runHelper,
192  false,
193  productSelectorRules,
194  inputType,
195  nullptr,
196  nullptr,
197  nullptr,
198  nullptr,
199  nullptr,
200  false,
201  processHistoryRegistry,
202  indexesIntoFiles,
203  currentIndexIntoFile,
204  orderedProcessHistoryIDs,
205  bypassVersionCheck,
206  false,
207  false,
208  enablePrefetching,
209  enforceGUIDInFileName) {}
210 
211  ~RootFile();
212 
213  RootFile(RootFile const&) = delete; // Disallow copying and moving
214  RootFile& operator=(RootFile const&) = delete; // Disallow copying and moving
215 
216  void reportOpened(std::string const& inputType);
217  void close();
218  std::tuple<bool, bool> readCurrentEvent(EventPrincipal& cache, bool assertOnFailure = true);
220 
221  std::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
222  std::shared_ptr<RunAuxiliary> readRunAuxiliary_();
223  std::shared_ptr<RunAuxiliary> readFakeRunAuxiliary_();
224 
227  bool endOfProcessBlocksReached() const;
230 
231  void readRun_(RunPrincipal& runPrincipal);
232  void readFakeRun_(RunPrincipal& runPrincipal);
233  void readLuminosityBlock_(LuminosityBlockPrincipal& lumiPrincipal);
234  std::string const& file() const { return file_; }
235  std::shared_ptr<ProductRegistry const> productRegistry() const { return productRegistry_; }
236  // IndexIntoFile::EntryNumber_t const& entryNumber() const {return indexIntoFileIter().entry();}
237  // LuminosityBlockNumber_t const& luminosityBlockNumber() const {return indexIntoFileIter().lumi();}
238  // RunNumber_t const& runNumber() const {return indexIntoFileIter().run();}
239  RootTree const& eventTree() const { return eventTree_; }
240  RootTree const& lumiTree() const { return lumiTree_; }
241  RootTree const& runTree() const { return runTree_; }
243  int whyNotFastClonable() const { return whyNotFastClonable_; }
244  std::array<bool, NumBranchTypes> const& hasNewlyDroppedBranch() const { return hasNewlyDroppedBranch_; }
246  bool modifiedIDs() const { return daqProvenanceHelper_.get() != nullptr; }
247  std::shared_ptr<FileBlock> createFileBlock();
248  void updateFileBlock(FileBlock&);
249 
252  }
259 
260  void rewind() {
262  eventTree_.rewind();
263  lumiTree_.rewind();
264  runTree_.rewind();
266  for (auto& processBlockTree : processBlockTrees_) {
267  processBlockTree->rewindToInvalid();
268  }
269  }
271 
272  bool skipEntries(unsigned int& offset) { return eventTree_.skipEntries(offset); }
273  bool skipEvents(int& offset);
274  bool goToEvent(EventID const& eventID);
277  std::shared_ptr<BranchIDListHelper const> branchIDListHelper() const {
279  }
280  std::shared_ptr<BranchIDListHelper>& branchIDListHelper() { return get_underlying_safe(branchIDListHelper_); }
281  std::shared_ptr<IndexIntoFile const> indexIntoFileSharedPtr() const {
283  }
284  std::shared_ptr<IndexIntoFile>& indexIntoFileSharedPtr() { return get_underlying_safe(indexIntoFileSharedPtr_); }
285  bool wasLastEventJustRead() const;
286  bool wasFirstEventJustRead() const;
289  void initAssociationsFromSecondary(std::vector<BranchID> const&);
290 
291  void setSignals(
292  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* preEventReadSource,
293  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* postEventReadSource);
294 
295  private:
296  void makeProcessBlockRootTrees(std::shared_ptr<InputFile> filePtr,
297  int treeMaxVirtualSize,
298  bool enablePrefetching,
299  InputType inputType,
300  StoredProcessBlockHelper const& storedProcessBlockHelper);
301  bool skipThisEntry();
302  void setIfFastClonable(int remainingEvents, int remainingLumis);
303  void validateFile(InputType inputType, bool usingGoToEvent);
304  void fillIndexIntoFile();
308  bool fillEventHistory(EventAuxiliary& evtAux,
309  EventSelectionIDVector& eventSelectionIDs,
310  BranchListIndexes& branchListIndexes,
311  bool assertOnFailure = true);
312  std::shared_ptr<LuminosityBlockAuxiliary> fillLumiAuxiliary();
313  std::shared_ptr<RunAuxiliary> fillRunAuxiliary();
314  std::string const& newBranchToOldBranch(std::string const& newBranch) const;
316  void markBranchToBeDropped(bool dropDescendants,
317  BranchDescription const& branch,
318  std::set<BranchID>& branchesToDrop,
319  std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
321  ProductSelectorRules const&,
322  bool dropDescendants,
323  InputType,
325  ProcessBlockHelper const*);
327  std::set<std::string> const& processesWithKeptProcessBlockProducts,
328  ProcessBlockHelper const*);
329 
330  void readParentageTree(InputType inputType);
331  void readEntryDescriptionTree(EntryDescriptionMap& entryDescriptionMap,
332  InputType inputType); // backward compatibility
333  void readEventHistoryTree();
334  bool isDuplicateEvent();
335 
336  void initializeDuplicateChecker(std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
337  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile);
338 
339  std::unique_ptr<MakeProvenanceReader> makeProvenanceReaderMaker(InputType inputType);
340  std::shared_ptr<ProductProvenanceRetriever> makeProductProvenanceRetriever(unsigned int iStreamIndex);
341 
342  std::shared_ptr<RunAuxiliary const> savedRunAuxiliary() const { return get_underlying_safe(savedRunAuxiliary_); }
343  std::shared_ptr<RunAuxiliary>& savedRunAuxiliary() { return get_underlying_safe(savedRunAuxiliary_); }
344 
345  std::shared_ptr<BranchChildren const> branchChildren() const { return get_underlying_safe(branchChildren_); }
346  std::shared_ptr<BranchChildren>& branchChildren() { return get_underlying_safe(branchChildren_); }
347 
348  std::shared_ptr<ProductProvenanceRetriever const> eventProductProvenanceRetriever(size_t index) const {
350  }
351  std::shared_ptr<ProductProvenanceRetriever>& eventProductProvenanceRetriever(size_t index) {
353  }
354 
365  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs_;
370  std::vector<EventProcessHistoryID> eventProcessHistoryIDs_; // backward compatibility
371  std::vector<EventProcessHistoryID>::const_iterator eventProcessHistoryIter_; // backward compatibility
377  std::array<bool, NumBranchTypes> hasNewlyDroppedBranch_;
379  EventAuxiliary eventAuxCache_; //Should only be used by fillThisEventAuxiliary()
383  std::vector<edm::propagate_const<std::unique_ptr<RootTree>>> processBlockTrees_;
384  unsigned int currentProcessBlockTree_ = 0;
385  std::vector<edm::propagate_const<RootTree*>> treePointers_;
386  //Should only be used by fillThisEventAuxiliary()
388  std::shared_ptr<ProductRegistry const> productRegistry_;
389  std::shared_ptr<BranchIDLists const> branchIDLists_;
397  std::map<std::string, std::string> newBranchToOldBranch_;
406  std::vector<edm::propagate_const<std::shared_ptr<ProductProvenanceRetriever>>> eventProductProvenanceRetrievers_;
407  std::vector<ParentageID> parentageIDLookup_;
411  }; // class RootFile
412 
413 } // namespace edm
414 #endif
edm::RootFile::nextEventEntry
bool nextEventEntry()
Definition: RootFile.h:275
edm::RootFile::endOfProcessBlocksReached
bool endOfProcessBlocksReached() const
Definition: RootFile.cc:1671
ProvenanceFwd.h
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
edm::RootFile::eventSkipperByID_
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
Definition: RootFile.h:360
edm::RootFile::eventProductProvenanceRetrievers_
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
Definition: RootFile.h:406
edm::RootFile::eventProcessHistoryIter_
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
Definition: RootFile.h:371
edm::RootFile::makeProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
Definition: RootFile.cc:2142
edm::EventToProcessBlockIndexes
Definition: EventToProcessBlockIndexes.h:12
edm::RootFile::setToLastEntry
void setToLastEntry()
Definition: RootFile.h:270
edm::RootFile::readProcessBlock_
void readProcessBlock_(ProcessBlockPrincipal &)
Definition: RootFile.cc:1701
funct::false
false
Definition: Factorize.h:29
edm::RootFile::indexIntoFileSharedPtr_
edm::propagate_const< std::shared_ptr< IndexIntoFile > > indexIntoFileSharedPtr_
Definition: RootFile.h:363
edm::RootFile::productRegistry
std::shared_ptr< ProductRegistry const > productRegistry() const
Definition: RootFile.h:235
edm::RootFile::lumiTree_
RootTree lumiTree_
Definition: RootFile.h:381
edm::RootFile::processHistoryRegistry_
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
Definition: RootFile.h:358
edm::RootFile::indexIntoFileEnd_
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
Definition: RootFile.h:367
edm::RootFile::daqProvenanceHelper_
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
Definition: RootFile.h:408
edm::RootFile::runHelper_
edm::propagate_const< RunHelperBase * > runHelper_
Definition: RootFile.h:396
edm::RootFile::readParentageTree
void readParentageTree(InputType inputType)
Definition: RootFile.cc:680
edm::RootFile::eventHistoryTree_
edm::propagate_const< TTree * > eventHistoryTree_
Definition: RootFile.h:398
edm::RootFile::reportOpened
void reportOpened(std::string const &inputType)
Definition: RootFile.cc:1269
edm::RootFile::readLuminosityBlock_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: RootFile.cc:1774
propagate_const.h
edm::RootFile::RootFile
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:107
edm::RootFile::branchListIndexesUnchanged
bool branchListIndexesUnchanged() const
Definition: RootFile.h:245
edm::RootFile::close
void close()
Definition: RootFile.cc:1276
edm::RootFile::setEntryAtItem
bool setEntryAtItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.h:250
MicroEventContent_cff.branch
branch
Definition: MicroEventContent_cff.py:174
edm::RootFile::runTree
RootTree const & runTree() const
Definition: RootFile.h:241
edm
HLT enums.
Definition: AlignableModifier.h:19
mps_splice.entry
entry
Definition: mps_splice.py:68
edm::RootFile::initializeFirstProcessBlockEntry
bool initializeFirstProcessBlockEntry()
Definition: RootFile.cc:1662
edm::RootFile::lumiTree
RootTree const & lumiTree() const
Definition: RootFile.h:240
edm::RootFile::eventTree
RootTree const & eventTree() const
Definition: RootFile.h:239
edm::RootFile::indexIntoFileIter_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
Definition: RootFile.h:368
edm::RootFile::readRunAuxiliary_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: RootFile.cc:1584
edm::RootFile::indexIntoFileSharedPtr
std::shared_ptr< IndexIntoFile > & indexIntoFileSharedPtr()
Definition: RootFile.h:284
edm::DaqProvenanceHelper
Definition: DaqProvenanceHelper.h:27
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
edm::IndexIntoFile
Definition: IndexIntoFile.h:225
RootTree.h
edm::RootFile::branchIDListHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: RootFile.h:390
edm::RootFile::eventTree_
RootTree eventTree_
Definition: RootFile.h:380
EntryDescriptionID.h
edm::RootFile::currentProcessBlockTree_
unsigned int currentProcessBlockTree_
Definition: RootFile.h:384
IndexIntoFile.h
edm::RootFile::readEntryDescriptionTree
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
Definition: RootFile.cc:634
edm::get_underlying_safe
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:41
edm::RootFile::storedProcessBlockHelper_
edm::propagate_const< std::unique_ptr< StoredProcessBlockHelper > > storedProcessBlockHelper_
Definition: RootFile.h:392
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
edm::RootFile::isDuplicateEvent
bool isDuplicateEvent()
Definition: RootFile.cc:860
edm::RootFile::enforceGUIDInFileName_
bool enforceGUIDInFileName_
Definition: RootFile.h:375
edm::RootFile::skipThisEntry
bool skipThisEntry()
Definition: RootFile.cc:823
edm::FileID
Definition: FileID.h:14
edm::RootFile::fileFormatVersion
FileFormatVersion fileFormatVersion() const
Definition: RootFile.h:242
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
edm::RootFile::eventProcessHistoryIDs_
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
Definition: RootFile.h:370
edm::ProcessBlockPrincipal
Definition: ProcessBlockPrincipal.h:22
edm::RootFile
Definition: RootFile.h:71
edm::InputType
InputType
Definition: InputType.h:5
InputFile
Definition: FedRawDataInputSource.h:211
runTheMatrix.nStreams
nStreams
Definition: runTheMatrix.py:372
edm::RootFile::setEntryAtLumi
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1801
edm::RootFile::file
std::string const & file() const
Definition: RootFile.h:234
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::FileBlock
Definition: FileBlock.h:22
edm::RootFile::setEntryAtRun
bool setEntryAtRun(RunNumber_t run)
Definition: RootFile.cc:1809
edm::RootFile::inputType_
InputType inputType_
Definition: RootFile.h:410
edm::RootFile::fileThinnedAssociationsHelper_
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
Definition: RootFile.h:393
edm::RootFile::setAtEventEntry
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1582
edm::propagate_const
Definition: propagate_const.h:32
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::RootTree::skipEntries
bool skipEntries(unsigned int &offset)
Definition: RootTree.cc:398
edm::EventPrincipal
Definition: EventPrincipal.h:48
edm::RootFile::eventToProcessBlockIndexes_
EventToProcessBlockIndexes eventToProcessBlockIndexes_
Definition: RootFile.h:399
edm::RootFile::eventAuxCache_
EventAuxiliary eventAuxCache_
Definition: RootFile.h:379
edm::StreamContext
Definition: StreamContext.h:31
edm::RootFile::provenanceAdaptor_
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
Definition: RootFile.h:404
edm::RootFile::skipEvents
bool skipEvents(int &offset)
Definition: RootFile.cc:1433
edm::RootFile::modifiedIDs
bool modifiedIDs() const
Definition: RootFile.h:246
edm::RootFile::fillRunAuxiliary
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
Definition: RootFile.cc:1413
edm::RootFile::branchChildren_
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
Definition: RootFile.h:402
BranchListIndex.h
edm::RootFile::wasLastEventJustRead
bool wasLastEventJustRead() const
Definition: RootFile.cc:922
edm::ProcessBlockHelper
Definition: ProcessBlockHelper.h:19
edm::RootFile::operator=
RootFile & operator=(RootFile const &)=delete
edm::RootFile::treePointers_
std::vector< edm::propagate_const< RootTree * > > treePointers_
Definition: RootFile.h:385
edm::RootFile::processBlockHelper_
edm::propagate_const< ProcessBlockHelper * > processBlockHelper_
Definition: RootFile.h:391
edm::RootFile::getNextItemType
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
Definition: RootFile.cc:877
edm::RootFile::fillEventAuxiliary
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1306
edm::RootFile::RootFile
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 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
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
edm::RootFile::savedRunAuxiliary
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
Definition: RootFile.h:342
edm::RootFile::whyNotFastClonable_
int whyNotFastClonable_
Definition: RootFile.h:376
edm::RootFile::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: RootFile.h:394
edm::RootFile::setPosition
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
Definition: RootFile.cc:814
edm::RootFile::RootFile
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:162
edm::RootFile::updateFileBlock
void updateFileBlock(FileBlock &)
Definition: RootFile.cc:785
edm::RootFile::rewind
void rewind()
Definition: RootFile.h:260
edm::RootFile::hasNewlyDroppedBranch
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: RootFile.h:244
edm::RootFile::fillIndexIntoFile
void fillIndexIntoFile()
Definition: RootFile.cc:989
utilities.cache
def cache(function)
Definition: utilities.py:3
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
InputType.h
edm::EventAuxiliary
Definition: EventAuxiliary.h:14
edm::RootFile::indexIntoFile_
IndexIntoFile & indexIntoFile_
Definition: RootFile.h:364
edm::ProductSelectorRules
Definition: ProductSelectorRules.h:24
edm::RunHelperBase
Definition: RunHelper.h:15
edm::RootFile::branchIDListHelper
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
Definition: RootFile.h:280
edm::RootFile::newBranchToOldBranch
std::string const & newBranchToOldBranch(std::string const &newBranch) const
Definition: RootFile.cc:804
edm::RootFile::fid_
FileID fid_
Definition: RootFile.h:362
edm::RootFile::orderedProcessHistoryIDs_
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
Definition: RootFile.h:365
edm::InputSource::ProcessingMode
ProcessingMode
Definition: InputSource.h:56
edm::RootFile::savedRunAuxiliary_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
Definition: RootFile.h:372
edm::RootFile::storedMergeableRunProductMetadata_
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
Definition: RootFile.h:369
edm::RootFile::dropProcessesAndReorder
void dropProcessesAndReorder(StoredProcessBlockHelper &, std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelper const *)
Definition: RootFile.cc:2041
edm::FileFormatVersion
Definition: FileFormatVersion.h:7
edm::RootFile::hasNewlyDroppedBranch_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: RootFile.h:377
edm::RootFile::makeProvenanceReaderMaker
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
Definition: RootFile.cc:2126
edm::RootFile::savedRunAuxiliary
std::shared_ptr< RunAuxiliary > & savedRunAuxiliary()
Definition: RootFile.h:343
edm::IndexIntoFile::IndexIntoFileItr
Definition: IndexIntoFile.h:681
edm::RootFile::setEntryAtEvent
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.cc:1793
edm::RootFile::setIfFastClonable
void setIfFastClonable(int remainingEvents, int remainingLumis)
Definition: RootFile.cc:715
edm::RootFile::logicalFile_
const std::string logicalFile_
Definition: RootFile.h:356
edm::RootFile::initializeDuplicateChecker
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile)
Definition: RootFile.cc:1845
edm::RootFile::processingMode_
InputSource::ProcessingMode processingMode_
Definition: RootFile.h:395
edm::MakeProvenanceReader::~MakeProvenanceReader
virtual ~MakeProvenanceReader()=default
FileFormatVersion.h
edm::RootFile::validateFile
void validateFile(InputType inputType, bool usingGoToEvent)
Definition: RootFile.cc:1214
edm::RootFile::skipEntries
bool skipEntries(unsigned int &offset)
Definition: RootFile.h:272
edm::RootFile::markBranchToBeDropped
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
Definition: RootFile.cc:1885
edm::RootFile::fillEventHistory
bool fillEventHistory(EventAuxiliary &evtAux, EventSelectionIDVector &eventSelectionIDs, BranchListIndexes &branchListIndexes, bool assertOnFailure=true)
Definition: RootFile.cc:1331
edm::RootFile::filePtr_
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
Definition: RootFile.h:359
edm::RootFile::readFakeRunAuxiliary_
std::shared_ptr< RunAuxiliary > readFakeRunAuxiliary_()
edm::RootFile::processBlockTrees_
std::vector< edm::propagate_const< std::unique_ptr< RootTree > > > processBlockTrees_
Definition: RootFile.h:383
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::RootFile::readLuminosityBlockAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: RootFile.cc:1736
edm::RootFile::fillProcessBlockHelper_
void fillProcessBlockHelper_()
Definition: RootFile.cc:1650
edm::MakeProvenanceReader
Definition: RootFile.h:64
edm::RootFile::readFakeRun_
void readFakeRun_(RunPrincipal &runPrincipal)
edm::RootFile::branchChildren
std::shared_ptr< BranchChildren const > branchChildren() const
Definition: RootFile.h:345
edm::RootFile::eventProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever > & eventProductProvenanceRetriever(size_t index)
Definition: RootFile.h:351
edm::RootFile::eventToProcessBlockIndexesBranch_
edm::propagate_const< TBranch * > eventToProcessBlockIndexesBranch_
Definition: RootFile.h:400
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::RootFile::skipAnyEvents_
bool skipAnyEvents_
Definition: RootFile.h:373
edm::StoredProcessBlockHelper
Definition: StoredProcessBlockHelper.h:25
edm::RootFile::edProductClass_
edm::propagate_const< TClass * > edProductClass_
Definition: RootFile.h:409
edm::RootFile::fileFormatVersion_
FileFormatVersion fileFormatVersion_
Definition: RootFile.h:361
edm::RootFile::fillEventToProcessBlockIndexes
void fillEventToProcessBlockIndexes()
Definition: RootFile.cc:1311
edm::RootFile::createFileBlock
std::shared_ptr< FileBlock > createFileBlock()
Definition: RootFile.cc:759
edm::RootFile::readEventHistoryTree
void readEventHistoryTree()
Definition: RootFile.cc:1834
edm::EntryDescriptionMap
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
Definition: RootFile.h:62
BranchIDList.h
FileID.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::RootFile::initAssociationsFromSecondary
void initAssociationsFromSecondary(std::vector< BranchID > const &)
Definition: RootFile.cc:818
edm::RootFile::history_
edm::propagate_const< std::unique_ptr< History > > history_
Definition: RootFile.h:401
edm::RootFile::makeProcessBlockRootTrees
void makeProcessBlockRootTrees(std::shared_ptr< InputFile > filePtr, int treeMaxVirtualSize, bool enablePrefetching, InputType inputType, StoredProcessBlockHelper const &storedProcessBlockHelper)
Definition: RootFile.cc:2102
edm::RootFile::noEventSort_
bool noEventSort_
Definition: RootFile.h:374
edm::RootFile::readEvent
bool readEvent(EventPrincipal &cache)
Definition: RootFile.cc:1522
EventEntryDescription.h
edm::RootFile::setPresenceInProductRegistry
void setPresenceInProductRegistry(ProductRegistry &, StoredProcessBlockHelper const &)
Definition: RootFile.cc:1858
edm::RootFile::provenanceReaderMaker_
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
Definition: RootFile.h:405
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::RootFile::parentageIDLookup_
std::vector< ParentageID > parentageIDLookup_
Definition: RootFile.h:407
edm::RootFile::goToEvent
bool goToEvent(EventID const &eventID)
Definition: RootFile.cc:1489
EventProcessHistoryID.h
edm::RootTree::rewind
void rewind()
Definition: RootTree.h:128
edm::RootFile::lastEventEntryNumberRead_
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
Definition: RootFile.h:387
edm::RootFile::indexIntoFileSharedPtr
std::shared_ptr< IndexIntoFile const > indexIntoFileSharedPtr() const
Definition: RootFile.h:281
Frameworkfwd.h
InputSource.h
EventAuxiliary.h
edm::RootFile::containsItem
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: RootFile.cc:873
edm::RootFile::productRegistry_
std::shared_ptr< ProductRegistry const > productRegistry_
Definition: RootFile.h:388
edm::RootFile::whyNotFastClonable
int whyNotFastClonable() const
Definition: RootFile.h:243
edm::RootFile::setEntryAtNextEventInLumi
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1817
edm::RootFile::setSignals
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
Definition: RootFile.cc:2096
edm::RootFile::dropOnInputAndReorder
void dropOnInputAndReorder(ProductRegistry &, ProductSelectorRules const &, bool dropDescendants, InputType, StoredProcessBlockHelper &, ProcessBlockHelper const *)
Definition: RootFile.cc:1896
edm::IndexIntoFile::EntryNumber_t
long long EntryNumber_t
Definition: IndexIntoFile.h:231
edm::RootFile::branchChildren
std::shared_ptr< BranchChildren > & branchChildren()
Definition: RootFile.h:346
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::RootFile::newBranchToOldBranch_
std::map< std::string, std::string > newBranchToOldBranch_
Definition: RootFile.h:397
edm::BranchDescription
Definition: BranchDescription.h:32
DTskim_cfg.processingMode
processingMode
Definition: DTskim_cfg.py:82
edm::RootTree
Definition: RootTree.h:79
edm::RootFile::fillThisEventAuxiliary
EventAuxiliary const & fillThisEventAuxiliary()
Definition: RootFile.cc:1287
edm::RootFile::indexIntoFileBegin_
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
Definition: RootFile.h:366
edm::RootFile::~RootFile
~RootFile()
Definition: RootFile.cc:632
edm::InputSource
Definition: InputSource.h:52
History.h
edm::RootFile::nextProcessBlock_
bool nextProcessBlock_(ProcessBlockPrincipal &)
Definition: RootFile.cc:1673
edm::RootFile::readRun_
void readRun_(RunPrincipal &runPrincipal)
Definition: RootFile.cc:1709
edm::RunPrincipal
Definition: RunPrincipal.h:34
edm::RootFile::branchListIndexesUnchanged_
bool branchListIndexesUnchanged_
Definition: RootFile.h:378
EventToProcessBlockIndexes.h
event
Definition: event.py:1
edm::EventID
Definition: EventID.h:31
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::EventSelectionIDVector
std::vector< EventSelectionID > EventSelectionIDVector
Definition: EventSelectionID.h:16
get_underlying_safe.h
lumi
Definition: LumiSectionData.h:20
edm::RootFile::runTree_
RootTree runTree_
Definition: RootFile.h:382
edm::signalslot::Signal
Definition: DelayedReader.h:26
edm::RootTree::nextWithCache
bool nextWithCache()
Definition: RootTree.cc:211
edm::RootFile::readCurrentEvent
std::tuple< bool, bool > readCurrentEvent(EventPrincipal &cache, bool assertOnFailure=true)
Definition: RootFile.cc:1537
edm::RootFile::eventProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
Definition: RootFile.h:348
edm::RootFile::branchIDLists_
std::shared_ptr< BranchIDLists const > branchIDLists_
Definition: RootFile.h:389
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::RootFile::branchIDListHelper
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
Definition: RootFile.h:277
edm::RootFile::duplicateChecker_
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootFile.h:403
edm::MakeProvenanceReader::makeReader
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const =0
EventSelectionID.h
edm::RootFile::indexIntoFileIter
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
Definition: RootFile.cc:812
edm::RootFile::fillLumiAuxiliary
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
Definition: RootFile.cc:1390
edm::RootFile::wasFirstEventJustRead
bool wasFirstEventJustRead() const
Definition: RootFile.cc:928
edm::IndexIntoFile::EntryType
EntryType
Definition: IndexIntoFile.h:238
FWCoreCommonFwd.h
edm::RootFile::processConfiguration_
ProcessConfiguration const & processConfiguration_
Definition: RootFile.h:357
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
BranchChildren.h
edm::RootFile::file_
const std::string file_
Definition: RootFile.h:355