|
|
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).");
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_");
288 callWithTryCatchAndPrint<void>([
this, &
ep]() {
readEvent_(
ep); },
"Calling InputSource::readEvent_");
319 callWithTryCatchAndPrint<void>([
this, &
offset]() {
skip(
offset); },
"Calling InputSource::skip");
323 return callWithTryCatchAndPrint<bool>([
this, &eventID]() {
return goToEvent_(eventID); },
324 "Calling InputSource::goToEvent_");
333 callWithTryCatchAndPrint<void>([
this]() {
rewind_(); },
"Calling InputSource::rewind_");
339 << eventID.
run() <<
", Event " << eventID.
event() <<
", LumiSection "
345 statusFile << eventID <<
" time: " << std::setprecision(3) <<
TimeOfDay() <<
'\n';
354 <<
"Random access is not implemented for this type of Input Source\n"
355 <<
"Contact a Framework Developer\n";
360 <<
"Run number cannot be modified for this type of Input Source\n"
361 <<
"Contact a Framework Developer\n";
366 <<
"Luminosity Block ID cannot be modified for this type of Input Source\n"
367 <<
"Contact a Framework Developer\n";
372 <<
"Random access are not implemented for this type of Input Source\n"
373 <<
"Contact a Framework Developer\n";
378 <<
"Random access is not implemented for this type of Input Source\n"
379 <<
"Contact a Framework Developer\n";
385 <<
"Random access are not implemented for this type of Input Source\n"
386 <<
"Contact a Framework Developer\n";
405 return callWithTryCatchAndPrint<bool>([
this]() {
return randomAccess_(); },
"Calling InputSource::randomAccess_");
409 return callWithTryCatchAndPrint<ProcessingController::ForwardState>([
this]() {
return forwardState_(); },
410 "Calling InputSource::forwardState_");
414 return callWithTryCatchAndPrint<ProcessingController::ReverseState>([
this]() {
return reverseState_(); },
415 "Calling InputSource::reverseState__");
448 : source_(
source), sc_(sc) {
469 : post_(
source.
actReg()->postOpenFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
470 source.actReg()->preOpenFileSignal_(lfn, usedFallback);
476 : post_(
source.
actReg()->postCloseFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
477 source.actReg()->preCloseFileSignal_(lfn, usedFallback);
static const std::string source("source")
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
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static const std::string kBaseType("EDAnalyzer")
StreamID const & streamID() const
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
EventNumber_t event() const
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)
std::string createGlobalIdentifier()