1 #ifndef IOPool_Input_RootFile_h
2 #define IOPool_Input_RootFile_h
40 class BranchIDListHelper;
41 class ProductProvenanceRetriever;
42 class DaqProvenanceHelper;
43 class DuplicateChecker;
44 class EventSkipperByID;
45 class ProcessHistoryRegistry;
46 class ProductSelectorRules;
48 class ProvenanceReaderBase;
49 class ProvenanceAdaptor;
66 std::shared_ptr<InputFile> filePtr,
67 std::shared_ptr<EventSkipperByID> eventSkipperByID,
71 unsigned int nStreams,
72 unsigned int treeCacheSize,
73 int treeMaxVirtualSize,
80 std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
81 std::vector<BranchID>
const* associationsFromSecondary,
82 std::shared_ptr<DuplicateChecker> duplicateChecker,
83 bool dropDescendantsOfDroppedProducts,
85 std::vector<std::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
86 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
87 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
88 bool bypassVersionCheck,
89 bool labelRawDataLikeMC,
91 bool enablePrefetching,
92 bool enforceGUIDInFileName);
97 std::shared_ptr<InputFile> filePtr,
98 unsigned int nStreams,
99 int treeMaxVirtualSize,
105 std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
106 std::vector<BranchID>
const* associationsFromSecondary,
107 bool dropDescendantsOfDroppedProducts,
109 std::vector<std::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
110 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
111 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
112 bool bypassVersionCheck,
113 bool labelRawDataLikeMC,
114 bool enablePrefetching,
115 bool enforceGUIDInFileName) :
RootFile(
116 fileName, processConfiguration, logicalFileName, filePtr,
117 nullptr,
false, -1, -1, nStreams, 0U, treeMaxVirtualSize,
118 processingMode, runHelper,
119 false, productSelectorRules, inputType, branchIDListHelper,
120 thinnedAssociationsHelper, associationsFromSecondary,
121 nullptr, dropDescendantsOfDroppedProducts, processHistoryRegistry,
122 indexesIntoFiles, currentIndexIntoFile, orderedProcessHistoryIDs,
123 bypassVersionCheck, labelRawDataLikeMC,
124 false, enablePrefetching, enforceGUIDInFileName) {}
129 std::shared_ptr<InputFile> filePtr,
130 unsigned int nStreams,
131 int treeMaxVirtualSize,
136 std::vector<std::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
137 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
138 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
139 bool bypassVersionCheck,
140 bool enablePrefetching,
141 bool enforceGUIDInFileName) :
RootFile(
142 fileName, processConfiguration, logicalFileName, filePtr,
143 nullptr,
false, -1, -1, nStreams, 0U, treeMaxVirtualSize,
147 indexesIntoFiles, currentIndexIntoFile, orderedProcessHistoryIDs,
148 bypassVersionCheck,
false,
149 false, enablePrefetching, enforceGUIDInFileName) {}
238 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile);
void dropOnInput(ProductRegistry ®, ProductSelectorRules const &rules, bool dropDescendants, InputType inputType)
EventID const & eventID() const
bool setEntryAtItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
RootTree const & lumiTree() const
std::shared_ptr< BranchIDLists const > branchIDLists_
bool skipEvents(int &offset)
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
FileFormatVersion fileFormatVersion() const
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
RootFile & operator=(RootFile const &)=delete
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
bool branchListIndexesUnchanged() const
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
bool enforceGUIDInFileName_
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, unsigned int nStreams, 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)
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::map< std::string, std::string > newBranchToOldBranch_
edm::propagate_const< std::shared_ptr< IndexIntoFile > > indexIntoFileSharedPtr_
bool setEntryAtRun(RunNumber_t run)
void readRun_(RunPrincipal &runPrincipal)
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
unsigned long long EventNumber_t
InputSource::ProcessingMode processingMode_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
bool skipEntries(unsigned int &offset)
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)
std::unique_ptr< FileBlock > createFileBlock() const
std::shared_ptr< IndexIntoFile > & indexIntoFileSharedPtr()
bool readCurrentEvent(EventPrincipal &cache)
std::shared_ptr< ProductRegistry const > productRegistry() const
unsigned int LuminosityBlockNumber_t
bool fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
std::vector< EventSelectionID > EventSelectionIDVector
edm::propagate_const< TClass * > edProductClass_
FileFormatVersion fileFormatVersion_
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
std::string const logicalFile_
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
void readParentageTree(InputType inputType)
bool wasLastEventJustRead() const
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const =0
RootTree const & runTree() const
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
std::shared_ptr< RunAuxiliary > readFakeRunAuxiliary_()
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
EventAuxiliary const & eventAux() const
EventSelectionIDVector eventSelectionIDs_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
int whyNotFastClonable() const
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
std::shared_ptr< ProductProvenanceRetriever > & eventProductProvenanceRetriever(size_t index)
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
BranchListIndexes branchListIndexes_
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool wasFirstEventJustRead() const
edm::propagate_const< std::unique_ptr< History > > history_
IndexIntoFile & indexIntoFile_
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
void readEvent(EventPrincipal &cache)
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
bool goToEvent(EventID const &eventID)
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::shared_ptr< RunAuxiliary > & savedRunAuxiliary()
ProcessConfiguration const & processConfiguration_
std::shared_ptr< ProductRegistry const > productRegistry_
void setIfFastClonable(int remainingEvents, int remainingLumis)
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
std::shared_ptr< BranchChildren const > branchChildren() const
std::shared_ptr< BranchChildren > & branchChildren()
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
std::string const & file() const
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
EventID const & id() const
std::array< RootTree *, NumBranchTypes > RootTreePtrArray
edm::propagate_const< RunHelperBase * > runHelper_
bool branchListIndexesUnchanged_
edm::propagate_const< TTree * > eventHistoryTree_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
RootTreePtrArray treePointers_
static int position[264][3]
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile)
bool skipEntries(unsigned int &offset)
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
void initAssociationsFromSecondary(std::vector< BranchID > const &)
RootTreePtrArray & treePointers()
std::shared_ptr< IndexIntoFile const > indexIntoFileSharedPtr() const
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
std::vector< ParentageID > parentageIDLookup_
void fillThisEventAuxiliary()
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
volatile std::atomic< bool > shutdown_flag false
void markBranchToBeDropped(bool dropDescendants, BranchID const &branchID, std::set< BranchID > &branchesToDrop) const
RootTree const & eventTree() const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
void validateFile(InputType inputType, bool usingGoToEvent)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
std::string const & newBranchToOldBranch(std::string const &newBranch) const
void readFakeRun_(RunPrincipal &runPrincipal)
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
void readEventHistoryTree()
void reportOpened(std::string const &inputType)