29 orderedProcessHistoryIDs_(),
31 initialNumberOfEventsToSkip_(pset.getUntrackedParameter<unsigned int>(
"skipEvents")),
32 noRunLumiSort_(pset.getUntrackedParameter<bool>(
"noRunLumiSort")),
33 noEventSort_(noRunLumiSort_ ?
true : pset.getUntrackedParameter<bool>(
"noEventSort")),
34 treeCacheSize_(noEventSort_ ? pset.getUntrackedParameter<unsigned int>(
"cacheSize") : 0U),
36 usingGoToEvent_(
false),
37 enablePrefetching_(
false),
38 enforceGUIDInFileName_(pset.getUntrackedParameter<bool>(
"enforceGUIDInFileName")) {
76 std::shared_ptr<FileBlock> fileBlock;
109 fileBlock = std::make_shared<FileBlock>();
113 fileBlock =
rootFile()->createFileBlock();
140 return std::make_shared<RootFile>(
fileNames()[0],
165 currentIndexIntoFile,
194 if (!mergeInfo.empty()) {
212 if (!mergeInfo.empty()) {
279 while (offset != 0) {
280 bool atEnd =
rootFile()->skipEvents(offset);
281 if ((offset > 0 || atEnd) && !
nextFile()) {
291 bool atEnd =
rootFile()->skipEvents(offset);
292 if (!atEnd && offset == 0) {
299 if (offset > 0 || atEnd) {
314 if ((offset > 0 || atEnd) && !
nextFile()) {
322 while (offset != 0) {
324 bool atEnd =
rootFile()->skipEvents(offset);
325 if ((offset > 0 || atEnd) && !
nextFile()) {
344 rootFile()->setPosition(originalPosition);
369 bool closedOriginalFile =
false;
374 bool foundIt =
false;
380 closedOriginalFile =
true;
389 if (closedOriginalFile) {
393 rootFile()->setPosition(originalPosition);
407 ->setComment(
"Skip the first 'skipEvents' events that otherwise would have been processed.");
410 "True: Process runs, lumis and events in the order they appear in the file (but see notes 1 and 2).\n"
411 "False: Process runs, lumis and events in each file in numerical order (run#, lumi#, event#) (but see note "
413 "Note 1: Events within the same lumi will always be processed contiguously.\n"
414 "Note 2: Lumis within the same run will always be processed contiguously.\n"
415 "Note 3: Any sorting occurs independently in each input file (no sorting across input files).");
418 "True: Process runs, lumis and events in the order they appear in the file.\n"
419 "False: Follow settings based on 'noEventSort' setting.");
421 ->setComment(
"Size of ROOT TTree prefetch cache. Affects performance.");
425 "'strict': Branches in each input file must match those in the first file.\n"
426 "'permissive': Branches in each input file may be any subset of those in the first file.");
429 "True: file name part is required to be equal to the GUID of the file\n"
430 "False: file name can be anything");
438 if (!
rootFile()->wasLastEventJustRead()) {
452 if (!
rootFile()->wasFirstEventJustRead()) {
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int treeCacheSize_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
InputSource::ItemType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
void closeFile_() override
void initFile_(bool skipBadFiles) override
ProcessingController::ForwardState forwardState() const
unsigned long long EventNumber_t
static void fillDescription(ParameterSetDescription &desc)
size_t goToFileSequenceOffset_
static void fillDescription(ParameterSetDescription &desc)
LuminosityBlockNumber_t luminosityBlock() const
unsigned int const defaultCacheSize
int initialNumberOfEventsToSkip_
unsigned int LuminosityBlockNumber_t
static std::string const input
RunHelperBase * runHelper()
ProcessingController::ReverseState reverseState() const
bool goToEvent(EventID const &eventID)
int skipToOffsetInFinalFile_
std::shared_ptr< FileBlock > readFile_()
RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
void skipEventsAtBeginning(int offset)
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
RootPrimaryFileSequence(ParameterSet const &pset, PoolSource &input, InputFileCatalog const &catalog)
std::string merge(ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive)
unsigned int nStreams() const
bool dropDescendants() const
bool bypassVersionCheck() const
void skipEvents(int offset)
~RootPrimaryFileSequence() override
size_t skipToFileSequenceNumber_
int treeMaxVirtualSize() const
bool skipBadFiles() const
std::shared_ptr< EventSkipperByID const > eventSkipperByID() const
bool labelRawDataLikeMC() const
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
BranchDescription::MatchMode branchesMustMatch_
bool enforceGUIDInFileName_
static void fillDescription(ParameterSetDescription &desc)
void updateFromInput(ProductList const &other)
int remainingEvents() const
void stagein(const std::string &url) const
std::shared_ptr< DuplicateChecker const > duplicateChecker() const
static const StorageFactory * get(void)
tuple size
Write out results.
edm::propagate_const< std::shared_ptr< FileBlock > > fb_
int remainingLuminosityBlocks() const
ProductSelectorRules const & productSelectorRules() const