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") : 0
U),
36 usingGoToEvent_(
false),
37 enablePrefetching_(
false),
38 enforceGUIDInFileName_(
pset.getUntrackedParameter<
bool>(
"enforceGUIDInFileName")) {
45 "Illegal to configure noRunLumiSort and limit the number of events or luminosityBlocks");
84 std::shared_ptr<FileBlock> fileBlock;
117 fileBlock = std::make_shared<FileBlock>();
121 fileBlock =
rootFile()->createFileBlock();
129 auto sentry = std::make_unique<InputSource::FileCloseSentry>(
input_,
lfn());
148 return std::make_shared<RootFile>(
fileNames()[0],
173 currentIndexIntoFile,
202 if (!mergeInfo.empty()) {
220 if (!mergeInfo.empty()) {
300 if (!atEnd &&
offset == 0) {
307 if (
offset > 0 || atEnd) {
352 rootFile()->setPosition(originalPosition);
377 bool closedOriginalFile =
false;
382 bool foundIt =
false;
388 closedOriginalFile =
true;
397 if (closedOriginalFile) {
401 rootFile()->setPosition(originalPosition);
414 desc.addUntracked<
unsigned int>(
"skipEvents", 0
U)
415 ->setComment(
"Skip the first 'skipEvents' events that otherwise would have been processed.");
416 desc.addUntracked<
bool>(
"noEventSort",
true)
418 "True: Process runs, lumis and events in the order they appear in the file (but see notes 1 and 2).\n" 419 "False: Process runs, lumis and events in each file in numerical order (run#, lumi#, event#) (but see note " 421 "Note 1: Events within the same lumi will always be processed contiguously.\n" 422 "Note 2: Lumis within the same run will always be processed contiguously.\n" 423 "Note 3: Any sorting occurs independently in each input file (no sorting across input files).");
424 desc.addUntracked<
bool>(
"noRunLumiSort",
false)
426 "True: Process runs, lumis and events in the order they appear in the file.\n" 427 "False: Follow settings based on 'noEventSort' setting.");
429 ->setComment(
"Size of ROOT TTree prefetch cache. Affects performance.");
433 "'strict': Branches in each input file must match those in the first file.\n" 434 "'permissive': Branches in each input file may be any subset of those in the first file.");
435 desc.addUntracked<
bool>(
"enforceGUIDInFileName",
false)
437 "True: file name part is required to be equal to the GUID of the file\n" 438 "False: file name can be anything");
446 if (!
rootFile()->wasLastEventJustRead()) {
460 if (!
rootFile()->wasFirstEventJustRead()) {
bool labelRawDataLikeMC() const
unsigned int treeCacheSize_
void closeFile_() override
def create(alignables, pedeDump, additionalData, outputFile, config)
void initFile_(bool skipBadFiles) override
unsigned long long EventNumber_t
bool skipBadFiles() const
ProductRegistry & productRegistryUpdate()
static void fillDescription(ParameterSetDescription &desc)
size_t goToFileSequenceOffset_
static void fillDescription(ParameterSetDescription &desc)
unsigned int const defaultCacheSize
unsigned int nStreams() const
int initialNumberOfEventsToSkip_
unsigned int LuminosityBlockNumber_t
ProcessHistoryRegistry & processHistoryRegistryForUpdate()
std::shared_ptr< DuplicateChecker const > duplicateChecker() const
static std::string const input
LuminosityBlockNumber_t luminosityBlock() const
std::shared_ptr< EventSkipperByID const > eventSkipperByID() const
RunHelperBase * runHelper()
bool goToEvent(EventID const &eventID)
int skipToOffsetInFinalFile_
ProcessingController::ForwardState forwardState() const
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)
void skipEvents(int offset)
~RootPrimaryFileSequence() override
void stagein(const std::string &url) const
size_t skipToFileSequenceNumber_
int treeMaxVirtualSize() const
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
BranchDescription::MatchMode branchesMustMatch_
bool enforceGUIDInFileName_
static void fillDescription(ParameterSetDescription &desc)
int remainingEvents() const
void updateFromInput(ProductList const &other)
ProductSelectorRules const & productSelectorRules() const
int remainingLuminosityBlocks() const
bool bypassVersionCheck() const
static const StorageFactory * get(void)
ProcessingController::ReverseState reverseState() const
bool dropDescendants() const
edm::propagate_const< std::shared_ptr< FileBlock > > fb_
EventNumber_t event() const
InputSource::ItemTypeInfo getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)