CMS 3D CMS Logo

InputSource.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
4 
23 
24 #include <cassert>
25 #include <fstream>
26 #include <iomanip>
27 
28 namespace edm {
29 
30  namespace {
31  std::string const& suffix(int count) {
32  static std::string const st("st");
33  static std::string const nd("nd");
34  static std::string const rd("rd");
35  static std::string const th("th");
36  // *0, *4 - *9 use "th".
37  int lastDigit = count % 10;
38  if (lastDigit >= 4 || lastDigit == 0)
39  return th;
40  // *11, *12, or *13 use "th".
41  if (count % 100 - lastDigit == 10)
42  return th;
43  return (lastDigit == 1 ? st : (lastDigit == 2 ? nd : rd));
44  }
45  } // namespace
46 
48  : actReg_(desc.actReg_),
49  maxEvents_(desc.maxEvents_),
50  remainingEvents_(maxEvents_),
51  maxLumis_(desc.maxLumis_),
52  remainingLumis_(maxLumis_),
53  readCount_(0),
54  maxSecondsUntilRampdown_(desc.maxSecondsUntilRampdown_),
55  processingMode_(RunsLumisAndEvents),
56  moduleDescription_(desc.moduleDescription_),
57  productRegistry_(desc.productRegistry_),
58  processHistoryRegistry_(new ProcessHistoryRegistry),
59  branchIDListHelper_(desc.branchIDListHelper_),
60  processBlockHelper_(desc.processBlockHelper_),
61  thinnedAssociationsHelper_(desc.thinnedAssociationsHelper_),
62  processGUID_(edm::processGUID().toBinary()),
63  time_(),
64  newRun_(true),
65  newLumi_(true),
66  eventCached_(false),
67  state_(IsInvalid),
68  runAuxiliary_(),
69  lumiAuxiliary_(),
70  statusFileName_(),
71  numberOfEventsBeforeBigSkip_(0) {
72  if (pset.getUntrackedParameter<bool>("writeStatusFile", false)) {
73  std::ostringstream statusfilename;
74  statusfilename << "source_" << getpid();
75  statusFileName_ = statusfilename.str();
76  }
77  if (maxSecondsUntilRampdown_ > 0) {
79  }
80 
81  std::string const defaultMode("RunsLumisAndEvents");
82  std::string const runMode("Runs");
83  std::string const runLumiMode("RunsAndLumis");
84 
85  // The default value provided as the second argument to the getUntrackedParameter function call
86  // is not used when the ParameterSet has been validated and the parameters are not optional
87  // in the description. As soon as all primary input sources and all modules with a secondary
88  // input sources have defined descriptions, the defaults in the getUntrackedParameterSet function
89  // calls can and should be deleted from the code.
90  std::string processingMode = pset.getUntrackedParameter<std::string>("processingMode", defaultMode);
91  if (processingMode == runMode) {
93  } else if (processingMode == runLumiMode) {
95  } else if (processingMode != defaultMode) {
97  << "InputSource::InputSource()\n"
98  << "The 'processingMode' parameter for sources has an illegal value '" << processingMode << "'\n"
99  << "Legal values are '" << defaultMode << "', '" << runLumiMode << "', or '" << runMode << "'.\n";
100  }
101  }
102 
104 
107  desc.setUnknown();
108  descriptions.addDefault(desc);
109  }
110 
112 
113  static std::string const kBaseType("Source");
114 
116 
118  std::string defaultString("RunsLumisAndEvents");
119  desc.addUntracked<std::string>("processingMode", defaultString)
120  ->setComment(
121  "'RunsLumisAndEvents': process runs, lumis, and events.\n"
122  "'RunsAndLumis': process runs and lumis (not events).\n"
123  "'Runs': process runs (not lumis or events).");
124  desc.addUntracked<bool>("writeStatusFile", false)
125  ->setComment("Write a status file. Intended for use by workflow management.");
126  }
127 
128  // This next function is to guarantee that "runs only" mode does not return events or lumis,
129  // and that "runs and lumis only" mode does not return events.
130  // For input sources that are not random access (e.g. you need to read through the events
131  // to get to the lumis and runs), this is all that is involved to implement these modes.
132  // For input sources where events or lumis can be skipped, getNextItemType() should
133  // implement the skipping internally, so that the performance gain is realized.
134  // If this is done for a source, the 'if' blocks in this function will never be entered
135  // for that source.
137  ItemType itemType = callWithTryCatchAndPrint<ItemType>([this]() { return getNextItemType(); },
138  "Calling InputSource::getNextItemType");
139 
140  if (itemType == IsEvent && processingMode() != RunsLumisAndEvents) {
141  skipEvents(1);
142  return nextItemType_();
143  }
144  if (itemType == IsLumi && processingMode() == Runs) {
145  // QQQ skipLuminosityBlock_();
146  return nextItemType_();
147  }
148  return itemType;
149  }
150 
152  ItemType oldState = state_;
153  if (eventLimitReached()) {
154  // If the maximum event limit has been reached, stop.
155  state_ = IsStop;
156  } else if (lumiLimitReached()) {
157  // If the maximum lumi limit has been reached, stop
158  // when reaching a new file, run, or lumi.
159  if (oldState == IsInvalid || oldState == IsFile || oldState == IsRun || processingMode() != RunsLumisAndEvents) {
160  state_ = IsStop;
161  } else {
162  ItemType newState = nextItemType_();
163  if (newState == IsEvent) {
165  state_ = IsEvent;
166  } else {
167  state_ = IsStop;
168  }
169  }
170  } else {
171  ItemType newState = nextItemType_();
172  if (newState == IsStop) {
173  state_ = IsStop;
174  } else if (newState == IsSynchronize) {
176  } else if (newState == IsFile || oldState == IsInvalid) {
177  state_ = IsFile;
178  } else if (newState == IsRun || oldState == IsFile) {
180  state_ = IsRun;
181  } else if (newState == IsLumi || oldState == IsRun) {
182  assert(processingMode() != Runs);
184  state_ = IsLumi;
185  } else {
187  state_ = IsEvent;
188  }
189  }
190  if (state_ == IsStop) {
191  lumiAuxiliary_.reset();
192  runAuxiliary_.reset();
193  }
194  return state_;
195  }
196 
197  std::shared_ptr<LuminosityBlockAuxiliary> InputSource::readLuminosityBlockAuxiliary() {
198  return callWithTryCatchAndPrint<std::shared_ptr<LuminosityBlockAuxiliary> >(
199  [this]() { return readLuminosityBlockAuxiliary_(); }, "Calling InputSource::readLuminosityBlockAuxiliary_");
200  }
201 
202  std::shared_ptr<RunAuxiliary> InputSource::readRunAuxiliary() {
203  return callWithTryCatchAndPrint<std::shared_ptr<RunAuxiliary> >([this]() { return readRunAuxiliary_(); },
204  "Calling InputSource::readRunAuxiliary_");
205  }
206 
207  void InputSource::doBeginJob() { this->beginJob(); }
208 
210 
211  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> InputSource::resourceSharedWithDelayedReader() {
213  }
214 
215  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> InputSource::resourceSharedWithDelayedReader_() {
216  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
217  }
218 
220 
221  // Return a dummy file block.
222  std::shared_ptr<FileBlock> InputSource::readFile() {
223  assert(state_ == IsFile);
224  assert(!limitReached());
225  return callWithTryCatchAndPrint<std::shared_ptr<FileBlock> >([this]() { return readFile_(); },
226  "Calling InputSource::readFile_");
227  }
228 
229  void InputSource::closeFile(FileBlock* fb, bool cleaningUpAfterException) {
230  if (fb != nullptr)
231  fb->close();
232  callWithTryCatchAndPrint<void>(
233  [this]() { closeFile_(); }, "Calling InputSource::closeFile_", cleaningUpAfterException);
234  return;
235  }
236 
237  // Return a dummy file block.
238  // This function must be overridden for any input source that reads a file
239  // containing Products.
240  std::shared_ptr<FileBlock> InputSource::readFile_() { return std::make_shared<FileBlock>(); }
241 
243  RunSourceSentry sentry(*this, runPrincipal.index());
244  callWithTryCatchAndPrint<void>([this, &runPrincipal]() { readRun_(runPrincipal); },
245  "Calling InputSource::readRun_");
246  }
247 
249  RunSourceSentry sentry(*this, rp.index());
250  callWithTryCatchAndPrint<void>([this, &rp]() { readRun_(rp); }, "Calling InputSource::readRun_");
251  }
252 
254  LumiSourceSentry sentry(*this, lumiPrincipal.index());
255  callWithTryCatchAndPrint<void>([this, &lumiPrincipal]() { readLuminosityBlock_(lumiPrincipal); },
256  "Calling InputSource::readLuminosityBlock_");
257  if (remainingLumis_ > 0) {
258  --remainingLumis_;
259  }
260  }
261 
263  LumiSourceSentry sentry(*this, lbp.index());
264  callWithTryCatchAndPrint<void>([this, &lbp]() { readLuminosityBlock_(lbp); },
265  "Calling InputSource::readLuminosityBlock_");
266  if (remainingLumis_ > 0) {
267  --remainingLumis_;
268  }
269  }
270 
272 
274  return nextProcessBlock_(processBlockPrincipal);
275  }
276 
278  ProcessBlockSourceSentry sentry(*this, processBlockPrincipal.processName());
279  callWithTryCatchAndPrint<void>([this, &processBlockPrincipal]() { readProcessBlock_(processBlockPrincipal); },
280  "Calling InputSource::readProcessBlock_");
281  }
282 
284 
286 
288 
289  void InputSource::readRun_(RunPrincipal& runPrincipal) {
290  // Note: For the moment, we do not support saving and restoring the state of the
291  // random number generator if random numbers are generated during processing of runs
292  // (e.g. beginRun(), endRun())
294  }
295 
297  auto history = processHistoryRegistry().getMapped(lumiPrincipal.aux().processHistoryID());
298  lumiPrincipal.fillLuminosityBlockPrincipal(history);
299  }
300 
302  assert(state_ == IsEvent);
304  {
305  // block scope, in order to issue the PostSourceEvent signal before calling postRead and issueReports
306  EventSourceSentry sentry(*this, streamContext);
307 
308  callWithTryCatchAndPrint<void>([this, &ep]() { readEvent_(ep); }, "Calling InputSource::readEvent_");
309  }
310 
311  if (remainingEvents_ > 0)
313  ++readCount_;
314  setTimestamp(ep.time());
315  issueReports(ep.id(), ep.streamID());
316  }
317 
318  bool InputSource::readEvent(EventPrincipal& ep, EventID const& eventID, StreamContext& streamContext) {
319  bool result = false;
320 
321  if (not limitReached()) {
322  // the Pre/PostSourceEvent signals should be generated only if the event is actually found.
323  // this should be taken care of by an EventSourceSentry in the implementaion of readIt()
324 
325  //result = callWithTryCatchAndPrint<bool>( [this,&eventID,&ep](){ return readIt(eventID, ep); }, "Calling InputSource::readIt" );
326  result = readIt(eventID, ep, streamContext);
327 
328  if (result) {
329  if (remainingEvents_ > 0)
331  ++readCount_;
332  issueReports(ep.id(), ep.streamID());
333  }
334  }
335  return result;
336  }
337 
339  callWithTryCatchAndPrint<void>([this, &offset]() { skip(offset); }, "Calling InputSource::skip");
340  }
341 
342  bool InputSource::goToEvent(EventID const& eventID) {
343  return callWithTryCatchAndPrint<bool>([this, &eventID]() { return goToEvent_(eventID); },
344  "Calling InputSource::goToEvent_");
345  }
346 
348  state_ = IsInvalid;
350  setNewRun();
351  setNewLumi();
353  callWithTryCatchAndPrint<void>([this]() { rewind_(); }, "Calling InputSource::rewind_");
354  }
355 
356  void InputSource::issueReports(EventID const& eventID, StreamID streamID) {
357  if (isFwkInfoEnabled()) {
358  LogFwkVerbatim("FwkReport") << "Begin processing the " << readCount_ << suffix(readCount_) << " record. Run "
359  << eventID.run() << ", Event " << eventID.event() << ", LumiSection "
360  << eventID.luminosityBlock() << " on stream " << streamID.value() << " at "
361  << std::setprecision(3) << TimeOfDay();
362  }
363  if (!statusFileName_.empty()) {
364  std::ofstream statusFile(statusFileName_.c_str());
365  statusFile << eventID << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
366  statusFile.close();
367  }
368 
369  // At some point we may want to initiate checkpointing here
370  }
371 
373  throw Exception(errors::LogicError) << "InputSource::readIt()\n"
374  << "Random access is not implemented for this type of Input Source\n"
375  << "Contact a Framework Developer\n";
376  }
377 
379  throw Exception(errors::LogicError) << "InputSource::setRun()\n"
380  << "Run number cannot be modified for this type of Input Source\n"
381  << "Contact a Framework Developer\n";
382  }
383 
385  throw Exception(errors::LogicError) << "InputSource::setLumi()\n"
386  << "Luminosity Block ID cannot be modified for this type of Input Source\n"
387  << "Contact a Framework Developer\n";
388  }
389 
390  void InputSource::skip(int) {
391  throw Exception(errors::LogicError) << "InputSource::skip()\n"
392  << "Random access are not implemented for this type of Input Source\n"
393  << "Contact a Framework Developer\n";
394  }
395 
397  throw Exception(errors::LogicError) << "InputSource::goToEvent_()\n"
398  << "Random access is not implemented for this type of Input Source\n"
399  << "Contact a Framework Developer\n";
400  return true;
401  }
402 
404  throw Exception(errors::LogicError) << "InputSource::rewind()\n"
405  << "Random access are not implemented for this type of Input Source\n"
406  << "Contact a Framework Developer\n";
407  }
408 
410  if (-1 == remainingEvents_) {
411  return;
412  }
413  if (iSkipped < remainingEvents_) {
414  remainingEvents_ -= iSkipped;
415  } else {
416  remainingEvents_ = 0;
417  }
418  }
419 
421 
423 
425  return callWithTryCatchAndPrint<bool>([this]() { return randomAccess_(); }, "Calling InputSource::randomAccess_");
426  }
427 
429  return callWithTryCatchAndPrint<ProcessingController::ForwardState>([this]() { return forwardState_(); },
430  "Calling InputSource::forwardState_");
431  }
432 
434  return callWithTryCatchAndPrint<ProcessingController::ReverseState>([this]() { return reverseState_(); },
435  "Calling InputSource::reverseState__");
436  }
437 
439 
441 
442  bool InputSource::randomAccess_() const { return false; }
443 
446  }
447 
450  }
451 
453  assert(runAuxiliary());
454  return processHistoryRegistry_->reducedProcessHistoryID(runAuxiliary()->processHistoryID());
455  }
456 
458  assert(runAuxiliary());
459  return runAuxiliary()->run();
460  }
461 
464  return luminosityBlockAuxiliary()->luminosityBlock();
465  }
466 
468  : source_(source), sc_(sc) {
469  source.actReg()->preSourceSignal_(sc_.streamID());
470  }
471 
472  InputSource::EventSourceSentry::~EventSourceSentry() { source_.actReg()->postSourceSignal_(sc_.streamID()); }
473 
475  : source_(source), index_(index) {
476  source_.actReg()->preSourceLumiSignal_(index_);
477  }
478 
479  InputSource::LumiSourceSentry::~LumiSourceSentry() { source_.actReg()->postSourceLumiSignal_(index_); }
480 
482  : source_(source), index_(index) {
483  source_.actReg()->preSourceRunSignal_(index_);
484  }
485 
486  InputSource::RunSourceSentry::~RunSourceSentry() { source_.actReg()->postSourceRunSignal_(index_); }
487 
489  std::string const& processName)
490  : source_(source), processName_(processName) {
491  source_.actReg()->preSourceProcessBlockSignal_();
492  }
493 
495  source_.actReg()->postSourceProcessBlockSignal_(processName_);
496  }
497 
499  : post_(source.actReg()->postOpenFileSignal_), lfn_(lfn) {
500  source.actReg()->preOpenFileSignal_(lfn);
501  }
502 
504 
506  : post_(source.actReg()->postCloseFileSignal_), lfn_(lfn) {
507  source.actReg()->preCloseFileSignal_(lfn);
508  }
509 
511 } // namespace edm
bool lumiLimitReached() const
Definition: InputSource.h:374
virtual void setRun(RunNumber_t r)
Definition: InputSource.cc:378
ProcessingController::ForwardState forwardState() const
Definition: InputSource.cc:428
std::shared_ptr< RunAuxiliary > runAuxiliary_
Definition: InputSource.h:435
void doBeginJob()
Called by framework at beginning of job.
Definition: InputSource.cc:207
virtual std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()=0
std::shared_ptr< LuminosityBlockAuxiliary > lumiAuxiliary_
Definition: InputSource.h:436
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: InputSource.cc:452
std::shared_ptr< RunAuxiliary > runAuxiliary() const
Called by the framework to merge or insert run in principal cache.
Definition: InputSource.h:232
void decreaseRemainingEventsBy(int iSkipped)
Definition: InputSource.cc:409
virtual void closeFile_()
Definition: InputSource.h:401
static std::string const source("source")
virtual void doBeginRun(RunPrincipal &rp, ProcessContext const *)
Called by framework at beginning of run.
Definition: InputSource.cc:420
bool randomAccess() const
Definition: InputSource.cc:424
void doEndJob()
Called by framework at end of job.
Definition: InputSource.cc:209
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
static const std::string & baseType()
Definition: InputSource.cc:115
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader()
Returns nullptr if no resource shared between the Source and a DelayedReader.
Definition: InputSource.cc:211
void readAndMergeRun(RunPrincipal &rp)
Read next run (same as a prior run)
Definition: InputSource.cc:248
std::string statusFileName_
Definition: InputSource.h:437
std::shared_ptr< ActivityRegistry > actReg() const
Accessor for Activity Registry.
Definition: InputSource.h:229
ProcessHistoryID const & processHistoryID() const
virtual void registerProducts()
Register any produced products.
Definition: InputSource.cc:219
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: InputSource.cc:384
virtual void fillProcessBlockHelper_()
Definition: InputSource.cc:283
bool isFwkInfoEnabled()
RunNumber_t run() const
Accessor for current run number.
Definition: InputSource.cc:457
void fillProcessBlockHelper()
Fill the ProcessBlockHelper with info for the current file.
Definition: InputSource.cc:271
virtual void rewind_()
Definition: InputSource.cc:403
std::shared_ptr< RunAuxiliary > readRunAuxiliary()
Read next run Auxiliary.
Definition: InputSource.cc:202
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
Definition: InputSource.h:328
Guid const & processGUID()
Definition: processGUID.cc:4
assert(be >=bs)
unsigned int LuminosityBlockNumber_t
virtual void readEvent_(EventPrincipal &eventPrincipal)=0
void closeFile(FileBlock *, bool cleaningUpAfterException)
close current file
Definition: InputSource.cc:229
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
virtual bool goToEvent_(EventID const &eventID)
Definition: InputSource.cc:396
void close()
Definition: FileBlock.cc:33
std::chrono::time_point< std::chrono::steady_clock > processingStart_
Definition: InputSource.h:421
EventSourceSentry(InputSource const &source, StreamContext &sc)
Definition: InputSource.cc:467
virtual bool nextProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:285
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader_()
Definition: InputSource.cc:215
void addDefault(ParameterSetDescription const &psetDescription)
std::shared_ptr< FileBlock > readFile()
Read next file.
Definition: InputSource.cc:222
void readRun(RunPrincipal &runPrincipal, HistoryAppender &historyAppender)
Read next run (new run)
Definition: InputSource.cc:242
virtual void beginJob()
Begin protected makes it easier to do template programming.
Definition: InputSource.cc:438
virtual ProcessingController::ForwardState forwardState_() const
Definition: InputSource.cc:444
ProcessingMode processingMode_
Definition: InputSource.h:422
int maxSecondsUntilRampdown_
Definition: InputSource.h:420
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary()
Read next luminosity block Auxilary.
Definition: InputSource.cc:197
virtual void doBeginLumi(LuminosityBlockPrincipal &lbp, ProcessContext const *)
Called by framework at beginning of lumi block.
Definition: InputSource.cc:422
ProcessingController::ReverseState reverseState() const
Definition: InputSource.cc:433
virtual ItemType getNextItemType()=0
StreamID const & streamID() const
Definition: StreamContext.h:55
void issueReports(EventID const &eventID, StreamID streamID)
issue an event report
Definition: InputSource.cc:356
virtual std::shared_ptr< FileBlock > readFile_()
Definition: InputSource.cc:240
virtual bool readIt(EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext)
Definition: InputSource.cc:372
bool eventLimitReached() const
Definition: InputSource.h:373
bool goToEvent(EventID const &eventID)
Definition: InputSource.cc:342
RunIndex index() const
Definition: RunPrincipal.h:56
virtual ProcessingController::ReverseState reverseState_() const
Definition: InputSource.cc:448
bool nextProcessBlock(ProcessBlockPrincipal &)
Next process block, return false if there is none, sets the processName in the principal.
Definition: InputSource.cc:273
runMode
define run mode.
void resetEventCached()
Definition: InputSource.h:363
ProcessHistoryRegistry const & processHistoryRegistry() const
Accessors for process history registry.
Definition: InputSource.h:139
virtual ~InputSource() noexcept(false)
Destructor.
Definition: InputSource.cc:103
RunNumber_t run() const
Definition: EventID.h:38
FileOpenSentry(InputSource const &source, std::string const &lfn)
Definition: InputSource.cc:498
Log< level::FwkInfo, true > LogFwkVerbatim
void readAndMergeLumi(LuminosityBlockPrincipal &lbp)
Read next luminosity block (same as a prior lumi)
Definition: InputSource.cc:262
void skipEvents(int offset)
Definition: InputSource.cc:338
std::string const & processName() const
virtual void readRun_(RunPrincipal &runPrincipal)
Definition: InputSource.cc:289
LumiSourceSentry(InputSource const &source, LuminosityBlockIndex id)
Definition: InputSource.cc:474
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: InputSource.cc:105
bool limitReached() const
Definition: InputSource.h:388
virtual void readProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:287
void readEvent(EventPrincipal &ep, StreamContext &)
Read next event.
Definition: InputSource.cc:301
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
LuminosityBlockNumber_t luminosityBlock() const
Accessor for current luminosity block number.
Definition: InputSource.cc:462
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_()=0
ItemType nextItemType_()
Definition: InputSource.cc:136
HLT enums.
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
Definition: InputSource.h:425
virtual bool randomAccess_() const
Definition: InputSource.cc:442
std::shared_ptr< LuminosityBlockAuxiliary > luminosityBlockAuxiliary() const
Called by the framework to merge or insert lumi in principal cache.
Definition: InputSource.h:235
ProcessBlockSourceSentry(InputSource const &, std::string const &)
Definition: InputSource.cc:488
LuminosityBlockIndex index() const
static std::string const kBaseType("Source")
static void fillDescription(ParameterSetDescription &desc)
Definition: InputSource.cc:117
void rewind()
Begin again at the first event.
Definition: InputSource.cc:347
unsigned int RunNumber_t
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: InputSource.cc:296
LuminosityBlockAuxiliary const & aux() const
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:25
unsigned int value() const
Definition: StreamID.h:43
void readLuminosityBlock(LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
Read next luminosity block (new lumi)
Definition: InputSource.cc:253
ItemType nextItemType()
Advances the source to the next item.
Definition: InputSource.cc:151
InputSource(ParameterSet const &, InputSourceDescription const &)
Constructor.
Definition: InputSource.cc:47
RunSourceSentry(InputSource const &source, RunIndex id)
Definition: InputSource.cc:481
virtual void endJob()
Definition: InputSource.cc:440
static void prevalidate(ConfigurationDescriptions &)
Definition: InputSource.cc:111
virtual void skip(int offset)
Definition: InputSource.cc:390
void readProcessBlock(ProcessBlockPrincipal &)
Read next process block.
Definition: InputSource.cc:277
EventNumber_t event() const
Definition: EventID.h:40
FileCloseSentry(InputSource const &source, std::string const &lfn)
Definition: InputSource.cc:505
ProcessingMode processingMode() const
RunsLumisAndEvents (default), RunsAndLumis, or Runs.
Definition: InputSource.h:226