1 #ifndef art_Framework_IO_Root_RootInputFile_h 2 #define art_Framework_IO_Root_RootInputFile_h 51 class DuplicateChecker;
52 class EventRangeHandler;
53 class GroupSelectorRules;
54 class UpdateOutputCallbacks;
67 int64_t saveMemoryObjectThreshold,
69 bool missingOK =
false);
79 TTree* metaTree()
const;
80 TBranch* auxBranch()
const;
81 TBranch* productProvenanceBranch()
const;
87 TTree* tree_{
nullptr};
88 TTree* metaTree_{
nullptr};
89 TBranch* auxBranch_{
nullptr};
90 TBranch* productProvenanceBranch_{
nullptr};
111 std::unique_ptr<TFile>&& filePtr,
113 unsigned int eventsToSkip,
114 bool compactSubRunRanges,
116 unsigned int treeCacheSize,
118 int64_t saveMemoryObjectThreashold,
119 bool delayedReadEventProducts,
120 bool delayedReadSubRunProducts,
121 bool delayedReadRunProducts,
126 std::shared_ptr<DuplicateChecker> duplicateChecker,
127 bool dropDescendantsOfDroppedProducts,
128 bool readIncomingParameterSets,
130 std::vector<std::string>
const& secondaryFileNames,
136 void close(
bool reallyClose);
137 std::unique_ptr<ResultsPrincipal> readResults();
138 std::unique_ptr<RunPrincipal> readRun();
139 std::unique_ptr<SubRunPrincipal> readSubRun(
141 std::unique_ptr<EventPrincipal> readEvent();
142 bool readRunForSecondaryFile(
RunID);
143 bool readSubRunForSecondaryFile(
SubRunID);
144 bool readEventForSecondaryFile(
EventID eID);
148 bool fastClonable()
const;
149 std::unique_ptr<FileBlock> createFileBlock();
150 bool setEntry_Event(
EventID const&
id,
bool exact =
true);
151 bool setEntry_SubRun(
SubRunID const&
id,
bool exact =
true);
152 bool setEntry_Run(
RunID const&
id,
bool exact =
true);
154 void setToLastEntry();
156 void previousEntry();
157 void advanceEntry(std::size_t
n);
158 unsigned eventsToSkip()
const;
159 int skipEvents(
int offset);
160 int setForcedRunOffset(
RunNumber_t const& forcedRunNumber);
163 std::shared_ptr<FileIndex> fileIndexSharedPtr()
const;
164 EventID eventIDForFileIndexPosition()
const;
165 std::vector<std::string>
const& secondaryFileNames()
const;
166 std::vector<std::unique_ptr<RootInputFile>>
const& secondaryFiles()
const;
167 void openSecondaryFile(
int const idx);
168 std::unique_ptr<RangeSetHandler> runRangeSetHandler();
169 std::unique_ptr<RangeSetHandler> subRunRangeSetHandler();
184 void fillAuxiliary_SubRun(
EntryNumber const entry);
186 void fillAuxiliary_Results(
EntryNumber const entry);
187 std::unique_ptr<RangeSetHandler> fillAuxiliary_SubRun(
189 std::unique_ptr<RangeSetHandler> fillAuxiliary_Run(
192 void overrideRunNumber(
SubRunID&
id);
193 void overrideRunNumber(
EventID&
id,
bool isRealData);
195 bool dropDescendants,
197 void readParentageTree(
unsigned int treeCacheSize);
198 void readEventHistoryTree(
unsigned int treeCacheSize);
199 void initializeDuplicateChecker();
200 std::pair<EntryNumbers, bool> getEntryNumbers(
BranchType);
201 std::unique_ptr<RunPrincipal> readCurrentRun(
EntryNumbers const&);
202 std::unique_ptr<SubRunPrincipal> readCurrentSubRun(
205 std::unique_ptr<EventPrincipal> readCurrentEvent(
206 std::pair<EntryNumbers, bool>
const&);
215 std::unique_ptr<cet::sqlite::Connection> sqliteDB_{
nullptr};
231 std::shared_ptr<FileIndex> fileIndexSharedPtr_{
new FileIndex};
236 bool fastClonable_{
false};
242 std::unique_ptr<BranchIDLists> branchIDLists_{};
243 TTree* eventHistoryTree_{
nullptr};
244 std::vector<std::unique_ptr<RootInputFile>> secondaryFiles_{};
253 std::unique_ptr<RangeSetHandler> subRunRangeSetHandler_{
nullptr};
254 std::unique_ptr<RangeSetHandler> runRangeSetHandler_{
nullptr};
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
void mergeAuxiliary(RunAuxiliary &left, RunAuxiliary const &right)
static ProductTables invalid()
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
std::vector< Element >::const_iterator const_iterator
IDNumber_t< Level::Event > EventNumber_t
IDNumber_t< Level::Run > RunNumber_t