|
|
Go to the documentation of this file. 1 #ifndef IOPool_Input_RootFile_h
2 #define IOPool_Input_RootFile_h
40 class BranchIDListHelper;
41 class ProductProvenanceRetriever;
42 struct DaqProvenanceHelper;
43 class DuplicateChecker;
44 class EventSkipperByID;
45 class ProcessHistoryRegistry;
46 class ProductSelectorRules;
48 class ProvenanceReaderBase;
49 class ProvenanceAdaptor;
50 class StoredMergeableRunProductMetadata;
69 std::shared_ptr<InputFile> filePtr,
70 std::shared_ptr<EventSkipperByID> eventSkipperByID,
75 unsigned int treeCacheSize,
76 int treeMaxVirtualSize,
83 std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
84 std::vector<BranchID>
const* associationsFromSecondary,
85 std::shared_ptr<DuplicateChecker> duplicateChecker,
86 bool dropDescendantsOfDroppedProducts,
88 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
90 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
91 bool bypassVersionCheck,
92 bool labelRawDataLikeMC,
94 bool enablePrefetching,
95 bool enforceGUIDInFileName);
100 std::shared_ptr<InputFile> filePtr,
102 int treeMaxVirtualSize,
108 std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
109 std::vector<BranchID>
const* associationsFromSecondary,
110 bool dropDescendantsOfDroppedProducts,
112 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
114 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
115 bool bypassVersionCheck,
116 bool labelRawDataLikeMC,
117 bool enablePrefetching,
118 bool enforceGUIDInFileName)
120 processConfiguration,
133 productSelectorRules,
136 thinnedAssociationsHelper,
137 associationsFromSecondary,
139 dropDescendantsOfDroppedProducts,
140 processHistoryRegistry,
142 currentIndexIntoFile,
143 orderedProcessHistoryIDs,
148 enforceGUIDInFileName) {}
153 std::shared_ptr<InputFile> filePtr,
155 unsigned int treeCacheSize,
156 int treeMaxVirtualSize,
161 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
163 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
164 bool bypassVersionCheck,
165 bool enablePrefetching,
166 bool enforceGUIDInFileName)
168 processConfiguration,
181 productSelectorRules,
188 processHistoryRegistry,
190 currentIndexIntoFile,
191 orderedProcessHistoryIDs,
196 enforceGUIDInFileName) {}
285 std::set<BranchID>& branchesToDrop,
286 std::map<BranchID, BranchID>
const& droppedToKeptAlias)
const;
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
edm::propagate_const< std::shared_ptr< IndexIntoFile > > indexIntoFileSharedPtr_
std::shared_ptr< ProductRegistry const > productRegistry() const
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
edm::propagate_const< RunHelperBase * > runHelper_
void readParentageTree(InputType inputType)
edm::propagate_const< TTree * > eventHistoryTree_
void reportOpened(std::string const &inputType)
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
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)
bool branchListIndexesUnchanged() const
bool setEntryAtItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
RootTree const & runTree() const
RootTree const & lumiTree() const
RootTree const & eventTree() const
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
std::shared_ptr< IndexIntoFile > & indexIntoFileSharedPtr()
bool readCurrentEvent(EventPrincipal &cache)
std::vector< BranchListIndex > BranchListIndexes
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
bool enforceGUIDInFileName_
FileFormatVersion fileFormatVersion() const
unsigned int LuminosityBlockNumber_t
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
void dropOnInput(ProductRegistry ®, ProductSelectorRules const &rules, bool dropDescendants, InputType inputType)
std::string const & file() const
bool setEntryAtRun(RunNumber_t run)
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, 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)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
bool skipEntries(unsigned int &offset)
EventAuxiliary eventAuxCache_
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
bool skipEvents(int &offset)
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
bool wasLastEventJustRead() const
RootFile & operator=(RootFile const &)=delete
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
unsigned long long EventNumber_t
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
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)
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
RootTreePtrArray treePointers_
IndexIntoFile & indexIntoFile_
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
void readEvent(EventPrincipal &cache)
std::string const & newBranchToOldBranch(std::string const &newBranch) const
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
std::shared_ptr< RunAuxiliary > & savedRunAuxiliary()
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
void setIfFastClonable(int remainingEvents, int remainingLumis)
const std::string logicalFile_
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile)
InputSource::ProcessingMode processingMode_
virtual ~MakeProvenanceReader()=default
void validateFile(InputType inputType, bool usingGoToEvent)
bool skipEntries(unsigned int &offset)
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
std::shared_ptr< RunAuxiliary > readFakeRunAuxiliary_()
static int position[264][3]
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
void readFakeRun_(RunPrincipal &runPrincipal)
void fillEventHistory(EventAuxiliary &evtAux, EventSelectionIDVector &eventSelectionIDs, BranchListIndexes &branchListIndexes)
std::shared_ptr< BranchChildren const > branchChildren() const
std::shared_ptr< ProductProvenanceRetriever > & eventProductProvenanceRetriever(size_t index)
edm::propagate_const< TClass * > edProductClass_
FileFormatVersion fileFormatVersion_
void readEventHistoryTree()
std::array< RootTree *, NumBranchTypes > RootTreePtrArray
void initAssociationsFromSecondary(std::vector< BranchID > const &)
RootTreePtrArray & treePointers()
edm::propagate_const< std::unique_ptr< History > > history_
std::unique_ptr< FileBlock > createFileBlock() const
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
std::vector< ParentageID > parentageIDLookup_
bool goToEvent(EventID const &eventID)
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
std::shared_ptr< IndexIntoFile const > indexIntoFileSharedPtr() const
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
std::shared_ptr< ProductRegistry const > productRegistry_
int whyNotFastClonable() const
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
std::shared_ptr< BranchChildren > & branchChildren()
std::map< std::string, std::string > newBranchToOldBranch_
EventAuxiliary const & fillThisEventAuxiliary()
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
void readRun_(RunPrincipal &runPrincipal)
bool branchListIndexesUnchanged_
std::vector< EventSelectionID > EventSelectionIDVector
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
std::shared_ptr< BranchIDLists const > branchIDLists_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const =0
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
bool wasFirstEventJustRead() const
ProcessConfiguration const & processConfiguration_