25 unsigned int nStreams) :
30 orderedProcessHistoryIDs_(),
40 initialNumberOfEventsToSkip_(pset.getUntrackedParameter<unsigned int>(
"skipEvents", 0U)),
41 noEventSort_(pset.getUntrackedParameter<bool>(
"noEventSort",
true)),
42 skipBadFiles_(pset.getUntrackedParameter<bool>(
"skipBadFiles",
false)),
43 bypassVersionCheck_(pset.getUntrackedParameter<bool>(
"bypassVersionCheck",
false)),
44 treeCacheSize_(noEventSort_ ? pset.getUntrackedParameter<unsigned int>(
"cacheSize", roottree::
defaultCacheSize) : 0U),
45 treeMaxVirtualSize_(pset.getUntrackedParameter<int>(
"treeMaxVirtualSize", -1)),
46 setRun_(pset.getUntrackedParameter<unsigned int>(
"setRunNumber", 0U)),
47 productSelectorRules_(pset,
"inputCommands",
"InputSource"),
49 dropDescendants_(pset.getUntrackedParameter<bool>(
"dropDescendantsOfDroppedBranches",
true)),
50 labelRawDataLikeMC_(pset.getUntrackedParameter<bool>(
"labelRawDataLikeMC",
true)),
51 usingGoToEvent_(
false),
52 enablePrefetching_(
false) {
94 std::unique_ptr<FileBlock>
108 return std::unique_ptr<FileBlock>(
new FileBlock);
110 return rootFile()->createFileBlock();
117 std::unique_ptr<InputSource::FileCloseSentry>
137 return std::make_shared<RootFile>(
156 std::vector<BranchID>(),
161 currentIndexIntoFile,
182 if(!mergeInfo.empty()) {
202 if(!mergeInfo.empty()) {
265 bool atEnd =
rootFile()->skipEvents(offset);
266 if((offset > 0 || atEnd) && !
nextFile()) {
290 bool closedOriginalFile =
false;
295 typedef std::vector<std::shared_ptr<IndexIntoFile> >::const_iterator Iter;
313 closedOriginalFile =
true;
322 if(closedOriginalFile) {
326 rootFile()->setPosition(originalPosition);
345 ->setComment(
"Skip the first 'skipEvents' events that otherwise would have been processed.");
347 ->setComment(
"True: Process runs, lumis and events in the order they appear in the file (but see notes 1 and 2).\n"
348 "False: Process runs, lumis and events in each file in numerical order (run#, lumi#, event#) (but see note 3).\n"
349 "Note 1: Events within the same lumi will always be processed contiguously.\n"
350 "Note 2: Lumis within the same run will always be processed contiguously.\n"
351 "Note 3: Any sorting occurs independently in each input file (no sorting across input files).");
353 ->setComment(
"True: Ignore any missing or unopenable input file.\n"
354 "False: Throw exception if missing or unopenable input file.");
356 ->setComment(
"True: Bypass release version check.\n"
357 "False: Throw exception if reading file in a release prior to the release in which the file was written.");
359 ->setComment(
"Size of ROOT TTree prefetch cache. Affects performance.");
361 ->setComment(
"Size of ROOT TTree TBasket cache. Affects performance.");
363 ->setComment(
"If non-zero, change number of first run to this number. Apply same offset to all runs. Allowed only for simulation.");
364 desc.
addUntracked<
bool>(
"dropDescendantsOfDroppedBranches",
true)
365 ->setComment(
"If True, also drop on input any descendent of any branch dropped on input.");
368 ->setComment(
"'strict': Branches in each input file must match those in the first file.\n"
369 "'permissive': Branches in each input file may be any subset of those in the first file.");
371 ->setComment(
"If True: replace module label for raw data to match MC. Also use 'LHC' as process.");
381 if(!
rootFile()->wasLastEventJustRead()) {
396 if(!
rootFile()->wasFirstEventJustRead()) {
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void stagein(const std::string &url)
static void fillDescription(ParameterSetDescription &desc, char const *parameterName)
unsigned int treeCacheSize_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
InputSource::ItemType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
virtual void closeFile_() override
virtual void initFile_(bool skipBadFiles) override
ProcessingController::ForwardState forwardState() const
bool skipEvents(int offset)
unsigned long long EventNumber_t
static void fillDescription(ParameterSetDescription &desc)
std::shared_ptr< DuplicateChecker > duplicateChecker_
static void fillDescription(ParameterSetDescription &desc)
std::unique_ptr< FileBlock > readFile_()
LuminosityBlockNumber_t luminosityBlock() const
RootPrimaryFileSequence(ParameterSet const &pset, PoolSource &input, InputFileCatalog const &catalog, unsigned int nStreams)
unsigned int const defaultCacheSize
int initialNumberOfEventsToSkip_
unsigned int LuminosityBlockNumber_t
static std::string const input
virtual ~RootPrimaryFileSequence()
std::shared_ptr< EventSkipperByID > eventSkipperByID_
ProcessingController::ReverseState reverseState() const
static StorageFactory * get(void)
bool goToEvent(EventID const &eventID)
virtual RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
int const treeMaxVirtualSize_
std::string merge(ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive)
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
std::shared_ptr< RootFile > RootFileSharedPtr
ProductSelectorRules productSelectorRules_
BranchDescription::MatchMode branchesMustMatch_
static void fillDescription(ParameterSetDescription &desc)
void updateFromInput(ProductList const &other)
void activateTimeout(const std::string &url)
int remainingEvents() const
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
int remainingLuminosityBlocks() const