|
|
Go to the documentation of this file.
36 int lastDigit =
count % 10;
37 if (lastDigit >= 4 || lastDigit == 0)
40 if (
count % 100 - lastDigit == 10)
42 return (lastDigit == 1 ? st : (lastDigit == 2 ? nd : rd));
47 : actReg_(
desc.actReg_),
48 maxEvents_(
desc.maxEvents_),
49 remainingEvents_(maxEvents_),
50 maxLumis_(
desc.maxLumis_),
51 remainingLumis_(maxLumis_),
53 maxSecondsUntilRampdown_(
desc.maxSecondsUntilRampdown_),
54 processingMode_(RunsLumisAndEvents),
55 moduleDescription_(
desc.moduleDescription_),
56 productRegistry_(
desc.productRegistry_),
58 branchIDListHelper_(
desc.branchIDListHelper_),
59 thinnedAssociationsHelper_(
desc.thinnedAssociationsHelper_),
69 numberOfEventsBeforeBigSkip_(0) {
70 if (
pset.getUntrackedParameter<
bool>(
"writeStatusFile",
false)) {
71 std::ostringstream statusfilename;
72 statusfilename <<
"source_" << getpid();
79 std::string const defaultMode(
"RunsLumisAndEvents");
95 <<
"InputSource::InputSource()\n"
96 <<
"The 'processingMode' parameter for sources has an illegal value '" <<
processingMode <<
"'\n"
97 <<
"Legal values are '" << defaultMode <<
"', '" << runLumiMode <<
"', or '" <<
runMode <<
"'.\n";
119 "'RunsLumisAndEvents': process runs, lumis, and events.\n"
120 "'RunsAndLumis': process runs and lumis (not events).\n"
121 "'Runs': process runs (not lumis or events).");
122 desc.addUntracked<
bool>(
"writeStatusFile",
false)
123 ->setComment(
"Write a status file. Intended for use by workflow management.");
136 "Calling InputSource::getNextItemType");
176 }
else if (newState ==
IsRun || oldState ==
IsFile) {
179 }
else if (newState ==
IsLumi || oldState ==
IsRun) {
196 return callWithTryCatchAndPrint<std::shared_ptr<LuminosityBlockAuxiliary> >(
201 return callWithTryCatchAndPrint<std::shared_ptr<RunAuxiliary> >([
this]() {
return readRunAuxiliary_(); },
202 "Calling InputSource::readRunAuxiliary_");
214 return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(
nullptr,
nullptr);
223 return callWithTryCatchAndPrint<std::unique_ptr<FileBlock> >([
this]() {
return readFile_(); },
224 "Calling InputSource::readFile_");
230 callWithTryCatchAndPrint<void>(
231 [
this]() {
closeFile_(); },
"Calling InputSource::closeFile_", cleaningUpAfterException);
242 callWithTryCatchAndPrint<void>([
this, &runPrincipal]() {
readRun_(runPrincipal); },
243 "Calling InputSource::readRun_");
248 callWithTryCatchAndPrint<void>([
this, &rp]() {
readRun_(rp); },
"Calling InputSource::readRun_");
253 callWithTryCatchAndPrint<void>([
this, &lumiPrincipal]() {
readLuminosityBlock_(lumiPrincipal); },
254 "Calling InputSource::readLuminosityBlock_");
263 "Calling InputSource::readLuminosityBlock_");
290 callWithTryCatchAndPrint<void>([
this, &
ep]() {
readEvent_(
ep); },
"Calling InputSource::readEvent_");
321 callWithTryCatchAndPrint<void>([
this, &
offset]() {
skip(
offset); },
"Calling InputSource::skip");
325 return callWithTryCatchAndPrint<bool>([
this, &eventID]() {
return goToEvent_(eventID); },
326 "Calling InputSource::goToEvent_");
335 callWithTryCatchAndPrint<void>([
this]() {
rewind_(); },
"Calling InputSource::rewind_");
341 << eventID.
run() <<
", Event " << eventID.
event() <<
", LumiSection "
347 statusFile << eventID <<
" time: " << std::setprecision(3) <<
TimeOfDay() <<
'\n';
356 <<
"Random access is not implemented for this type of Input Source\n"
357 <<
"Contact a Framework Developer\n";
362 <<
"Run number cannot be modified for this type of Input Source\n"
363 <<
"Contact a Framework Developer\n";
368 <<
"Luminosity Block ID cannot be modified for this type of Input Source\n"
369 <<
"Contact a Framework Developer\n";
374 <<
"Random access are not implemented for this type of Input Source\n"
375 <<
"Contact a Framework Developer\n";
380 <<
"Random access is not implemented for this type of Input Source\n"
381 <<
"Contact a Framework Developer\n";
387 <<
"Random access are not implemented for this type of Input Source\n"
388 <<
"Contact a Framework Developer\n";
407 return callWithTryCatchAndPrint<bool>([
this]() {
return randomAccess_(); },
"Calling InputSource::randomAccess_");
411 return callWithTryCatchAndPrint<ProcessingController::ForwardState>([
this]() {
return forwardState_(); },
412 "Calling InputSource::forwardState_");
416 return callWithTryCatchAndPrint<ProcessingController::ReverseState>([
this]() {
return reverseState_(); },
417 "Calling InputSource::reverseState__");
450 : source_(
source), sc_(sc) {
471 : post_(
source.
actReg()->postOpenFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
472 source.actReg()->preOpenFileSignal_(lfn, usedFallback);
478 : post_(
source.
actReg()->postCloseFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
479 source.actReg()->preCloseFileSignal_(lfn, usedFallback);
static const std::string source("source")
Log< level::FwkInfo, true > LogFwkVerbatim
EventSourceSentry(InputSource const &source, StreamContext &sc)
unsigned int value() const
LuminosityBlockNumber_t luminosityBlock() const
unsigned int LuminosityBlockNumber_t
LuminosityBlockAuxiliary const & aux() const
FileOpenSentry(InputSource const &source, std::string const &lfn, bool usedFallback)
LuminosityBlockIndex index_
LumiSourceSentry(InputSource const &source, LuminosityBlockIndex id)
ProcessHistoryID const & processHistoryID() const
static const std::string kBaseType("EDAnalyzer")
StreamID const & streamID() const
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
EventNumber_t event() const
std::string createGlobalIdentifier(bool binary=false)
RunSourceSentry(InputSource const &source, RunIndex id)
InputSource const & source_
FileCloseSentry(InputSource const &source, std::string const &lfn, bool usedFallback)
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
InputSource const & source_
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
LuminosityBlockIndex index() const
void addDefault(ParameterSetDescription const &psetDescription)