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_(),
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  ItemTypeInfo itemTypeInfo = callWithTryCatchAndPrint<ItemTypeInfo>([this]() { return getNextItemType(); },
138  "Calling InputSource::getNextItemType");
139 
140  if (itemTypeInfo == ItemType::IsEvent && processingMode() != RunsLumisAndEvents) {
141  skipEvents(1);
142  return nextItemType_();
143  }
144  if (itemTypeInfo == ItemType::IsLumi && processingMode() == Runs) {
145  // QQQ skipLuminosityBlock_();
146  return nextItemType_();
147  }
148  return itemTypeInfo;
149  }
150 
152  ItemType oldType = state_.itemType();
153  if (eventLimitReached()) {
154  // If the maximum event limit has been reached, stop.
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 (oldType == ItemType::IsInvalid || oldType == ItemType::IsFile || oldType == ItemType::IsRun ||
162  } else {
163  ItemTypeInfo newState = nextItemType_();
164  if (newState == ItemType::IsEvent) {
167  } else {
169  }
170  }
171  } else {
172  ItemTypeInfo newState = nextItemType_();
173  if (newState == ItemType::IsStop) {
175  } else if (newState == ItemType::IsSynchronize) {
177  } else if (newState == ItemType::IsFile || oldType == ItemType::IsInvalid) {
179  } else if (newState == ItemType::IsRun || oldType == ItemType::IsFile) {
181  state_ = (newState == ItemType::IsRun) ? newState : ItemTypeInfo(ItemType::IsRun);
182  } else if (newState == ItemType::IsLumi || oldType == ItemType::IsRun) {
183  assert(processingMode() != Runs);
185  state_ = (newState == ItemType::IsLumi) ? newState : ItemTypeInfo(ItemType::IsLumi);
186  } else {
189  }
190  }
191  if (state_ == ItemType::IsStop) {
192  lumiAuxiliary_.reset();
193  runAuxiliary_.reset();
194  }
195  return state_;
196  }
197 
198  std::shared_ptr<LuminosityBlockAuxiliary> InputSource::readLuminosityBlockAuxiliary() {
199  return callWithTryCatchAndPrint<std::shared_ptr<LuminosityBlockAuxiliary> >(
200  [this]() { return readLuminosityBlockAuxiliary_(); }, "Calling InputSource::readLuminosityBlockAuxiliary_");
201  }
202 
203  std::shared_ptr<RunAuxiliary> InputSource::readRunAuxiliary() {
204  return callWithTryCatchAndPrint<std::shared_ptr<RunAuxiliary> >([this]() { return readRunAuxiliary_(); },
205  "Calling InputSource::readRunAuxiliary_");
206  }
207 
208  void InputSource::doBeginJob() { this->beginJob(); }
209 
211 
212  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> InputSource::resourceSharedWithDelayedReader() {
214  }
215 
216  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> InputSource::resourceSharedWithDelayedReader_() {
217  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
218  }
219 
221 
222  // Return a dummy file block.
223  std::shared_ptr<FileBlock> InputSource::readFile() {
225  assert(!limitReached());
226  return callWithTryCatchAndPrint<std::shared_ptr<FileBlock> >([this]() { return readFile_(); },
227  "Calling InputSource::readFile_");
228  }
229 
230  void InputSource::closeFile(FileBlock* fb, bool cleaningUpAfterException) {
231  if (fb != nullptr)
232  fb->close();
233  callWithTryCatchAndPrint<void>(
234  [this]() { closeFile_(); }, "Calling InputSource::closeFile_", cleaningUpAfterException);
235  return;
236  }
237 
238  // Return a dummy file block.
239  // This function must be overridden for any input source that reads a file
240  // containing Products.
241  std::shared_ptr<FileBlock> InputSource::readFile_() { return std::make_shared<FileBlock>(); }
242 
244  RunSourceSentry sentry(*this, runPrincipal.index());
245  callWithTryCatchAndPrint<void>([this, &runPrincipal]() { readRun_(runPrincipal); },
246  "Calling InputSource::readRun_");
247  }
248 
250  RunSourceSentry sentry(*this, rp.index());
251  callWithTryCatchAndPrint<void>([this, &rp]() { readRun_(rp); }, "Calling InputSource::readRun_");
252  }
253 
255  LumiSourceSentry sentry(*this, lumiPrincipal.index());
256  callWithTryCatchAndPrint<void>([this, &lumiPrincipal]() { readLuminosityBlock_(lumiPrincipal); },
257  "Calling InputSource::readLuminosityBlock_");
258  if (remainingLumis_ > 0) {
259  --remainingLumis_;
260  }
261  }
262 
264  LumiSourceSentry sentry(*this, lbp.index());
265  callWithTryCatchAndPrint<void>([this, &lbp]() { readLuminosityBlock_(lbp); },
266  "Calling InputSource::readLuminosityBlock_");
267  if (remainingLumis_ > 0) {
268  --remainingLumis_;
269  }
270  }
271 
273 
275  return nextProcessBlock_(processBlockPrincipal);
276  }
277 
279  ProcessBlockSourceSentry sentry(*this, processBlockPrincipal.processName());
280  callWithTryCatchAndPrint<void>([this, &processBlockPrincipal]() { readProcessBlock_(processBlockPrincipal); },
281  "Calling InputSource::readProcessBlock_");
282  }
283 
285 
287 
289 
290  void InputSource::readRun_(RunPrincipal& runPrincipal) {
291  // Note: For the moment, we do not support saving and restoring the state of the
292  // random number generator if random numbers are generated during processing of runs
293  // (e.g. beginRun(), endRun())
295  }
296 
298  auto history = processHistoryRegistry().getMapped(lumiPrincipal.aux().processHistoryID());
299  lumiPrincipal.fillLuminosityBlockPrincipal(history);
300  }
301 
305  {
306  // block scope, in order to issue the PostSourceEvent signal before calling postRead and issueReports
307  EventSourceSentry sentry(*this, streamContext);
308 
309  callWithTryCatchAndPrint<void>([this, &ep]() { readEvent_(ep); }, "Calling InputSource::readEvent_");
310  }
311 
312  if (remainingEvents_ > 0)
314  ++readCount_;
315  setTimestamp(ep.time());
316  issueReports(ep.id(), ep.streamID());
317  }
318 
319  bool InputSource::readEvent(EventPrincipal& ep, EventID const& eventID, StreamContext& streamContext) {
320  bool result = false;
321 
322  if (not limitReached()) {
323  // the Pre/PostSourceEvent signals should be generated only if the event is actually found.
324  // this should be taken care of by an EventSourceSentry in the implementaion of readIt()
325 
326  //result = callWithTryCatchAndPrint<bool>( [this,&eventID,&ep](){ return readIt(eventID, ep); }, "Calling InputSource::readIt" );
327  result = readIt(eventID, ep, streamContext);
328 
329  if (result) {
330  if (remainingEvents_ > 0)
332  ++readCount_;
333  issueReports(ep.id(), ep.streamID());
334  }
335  }
336  return result;
337  }
338 
340  callWithTryCatchAndPrint<void>([this, &offset]() { skip(offset); }, "Calling InputSource::skip");
341  }
342 
343  bool InputSource::goToEvent(EventID const& eventID) {
344  return callWithTryCatchAndPrint<bool>([this, &eventID]() { return goToEvent_(eventID); },
345  "Calling InputSource::goToEvent_");
346  }
347 
349  state_ = ItemTypeInfo();
351  setNewRun();
352  setNewLumi();
354  callWithTryCatchAndPrint<void>([this]() { rewind_(); }, "Calling InputSource::rewind_");
355  }
356 
357  void InputSource::issueReports(EventID const& eventID, StreamID streamID) {
358  if (isFwkInfoEnabled()) {
359  LogFwkVerbatim("FwkReport") << "Begin processing the " << readCount_ << suffix(readCount_) << " record. Run "
360  << eventID.run() << ", Event " << eventID.event() << ", LumiSection "
361  << eventID.luminosityBlock() << " on stream " << streamID.value() << " at "
362  << std::setprecision(3) << TimeOfDay();
363  }
364  if (!statusFileName_.empty()) {
365  std::ofstream statusFile(statusFileName_.c_str());
366  statusFile << eventID << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
367  statusFile.close();
368  }
369 
370  // At some point we may want to initiate checkpointing here
371  }
372 
374  throw Exception(errors::LogicError) << "InputSource::readIt()\n"
375  << "Random access is not implemented for this type of Input Source\n"
376  << "Contact a Framework Developer\n";
377  }
378 
380  throw Exception(errors::LogicError) << "InputSource::setRun()\n"
381  << "Run number cannot be modified for this type of Input Source\n"
382  << "Contact a Framework Developer\n";
383  }
384 
386  throw Exception(errors::LogicError) << "InputSource::setLumi()\n"
387  << "Luminosity Block ID cannot be modified for this type of Input Source\n"
388  << "Contact a Framework Developer\n";
389  }
390 
391  void InputSource::skip(int) {
392  throw Exception(errors::LogicError) << "InputSource::skip()\n"
393  << "Random access are not implemented for this type of Input Source\n"
394  << "Contact a Framework Developer\n";
395  }
396 
398  throw Exception(errors::LogicError) << "InputSource::goToEvent_()\n"
399  << "Random access is not implemented for this type of Input Source\n"
400  << "Contact a Framework Developer\n";
401  return true;
402  }
403 
405  throw Exception(errors::LogicError) << "InputSource::rewind()\n"
406  << "Random access are not implemented for this type of Input Source\n"
407  << "Contact a Framework Developer\n";
408  }
409 
411  if (-1 == remainingEvents_) {
412  return;
413  }
414  if (iSkipped < remainingEvents_) {
415  remainingEvents_ -= iSkipped;
416  } else {
417  remainingEvents_ = 0;
418  }
419  }
420 
422 
424 
426  return callWithTryCatchAndPrint<bool>([this]() { return randomAccess_(); }, "Calling InputSource::randomAccess_");
427  }
428 
430  return callWithTryCatchAndPrint<ProcessingController::ForwardState>([this]() { return forwardState_(); },
431  "Calling InputSource::forwardState_");
432  }
433 
435  return callWithTryCatchAndPrint<ProcessingController::ReverseState>([this]() { return reverseState_(); },
436  "Calling InputSource::reverseState__");
437  }
438 
440 
442 
443  bool InputSource::randomAccess_() const { return false; }
444 
447  }
448 
451  }
452 
454  assert(runAuxiliary());
455  return processHistoryRegistry_->reducedProcessHistoryID(runAuxiliary()->processHistoryID());
456  }
457 
459  assert(runAuxiliary());
460  return runAuxiliary()->run();
461  }
462 
465  return luminosityBlockAuxiliary()->luminosityBlock();
466  }
467 
469  : source_(source), sc_(sc) {
470  source.actReg()->preSourceSignal_(sc_.streamID());
471  }
472 
473  InputSource::EventSourceSentry::~EventSourceSentry() { source_.actReg()->postSourceSignal_(sc_.streamID()); }
474 
476  : source_(source), index_(index) {
477  source_.actReg()->preSourceLumiSignal_(index_);
478  }
479 
480  InputSource::LumiSourceSentry::~LumiSourceSentry() { source_.actReg()->postSourceLumiSignal_(index_); }
481 
483  : source_(source), index_(index) {
484  source_.actReg()->preSourceRunSignal_(index_);
485  }
486 
487  InputSource::RunSourceSentry::~RunSourceSentry() { source_.actReg()->postSourceRunSignal_(index_); }
488 
490  std::string const& processName)
491  : source_(source), processName_(processName) {
492  source_.actReg()->preSourceProcessBlockSignal_();
493  }
494 
496  source_.actReg()->postSourceProcessBlockSignal_(processName_);
497  }
498 
500  : post_(source.actReg()->postOpenFileSignal_), lfn_(lfn) {
501  source.actReg()->preOpenFileSignal_(lfn);
502  }
503 
505 
507  : post_(source.actReg()->postCloseFileSignal_), lfn_(lfn) {
508  source.actReg()->preCloseFileSignal_(lfn);
509  }
510 
512 } // namespace edm
bool lumiLimitReached() const
Definition: InputSource.h:403
virtual void setRun(RunNumber_t r)
Definition: InputSource.cc:379
ProcessingController::ForwardState forwardState() const
Definition: InputSource.cc:429
std::shared_ptr< RunAuxiliary > runAuxiliary_
Definition: InputSource.h:464
void doBeginJob()
Called by framework at beginning of job.
Definition: InputSource.cc:208
virtual std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()=0
std::shared_ptr< LuminosityBlockAuxiliary > lumiAuxiliary_
Definition: InputSource.h:465
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: InputSource.cc:453
std::shared_ptr< RunAuxiliary > runAuxiliary() const
Called by the framework to merge or insert run in principal cache.
Definition: InputSource.h:261
void decreaseRemainingEventsBy(int iSkipped)
Definition: InputSource.cc:410
virtual void closeFile_()
Definition: InputSource.h:430
static std::string const source("source")
virtual void doBeginRun(RunPrincipal &rp, ProcessContext const *)
Called by framework at beginning of run.
Definition: InputSource.cc:421
bool randomAccess() const
Definition: InputSource.cc:425
void doEndJob()
Called by framework at end of job.
Definition: InputSource.cc:210
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:212
void readAndMergeRun(RunPrincipal &rp)
Read next run (same as a prior run)
Definition: InputSource.cc:249
std::string statusFileName_
Definition: InputSource.h:466
std::shared_ptr< ActivityRegistry > actReg() const
Accessor for Activity Registry.
Definition: InputSource.h:258
ProcessHistoryID const & processHistoryID() const
ItemTypeInfo state_
Definition: InputSource.h:463
virtual void registerProducts()
Register any produced products.
Definition: InputSource.cc:220
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: InputSource.cc:385
virtual void fillProcessBlockHelper_()
Definition: InputSource.cc:284
bool isFwkInfoEnabled()
RunNumber_t run() const
Accessor for current run number.
Definition: InputSource.cc:458
void fillProcessBlockHelper()
Fill the ProcessBlockHelper with info for the current file.
Definition: InputSource.cc:272
virtual void rewind_()
Definition: InputSource.cc:404
std::shared_ptr< RunAuxiliary > readRunAuxiliary()
Read next run Auxiliary.
Definition: InputSource.cc:203
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
Definition: InputSource.h:357
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:230
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
virtual bool goToEvent_(EventID const &eventID)
Definition: InputSource.cc:397
void close()
Definition: FileBlock.cc:33
std::chrono::time_point< std::chrono::steady_clock > processingStart_
Definition: InputSource.h:450
EventSourceSentry(InputSource const &source, StreamContext &sc)
Definition: InputSource.cc:468
virtual bool nextProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:286
ItemTypeInfo nextItemType()
Advances the source to the next item.
Definition: InputSource.cc:151
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader_()
Definition: InputSource.cc:216
void addDefault(ParameterSetDescription const &psetDescription)
std::shared_ptr< FileBlock > readFile()
Read next file.
Definition: InputSource.cc:223
void readRun(RunPrincipal &runPrincipal, HistoryAppender &historyAppender)
Read next run (new run)
Definition: InputSource.cc:243
virtual void beginJob()
Begin protected makes it easier to do template programming.
Definition: InputSource.cc:439
virtual ProcessingController::ForwardState forwardState_() const
Definition: InputSource.cc:445
ProcessingMode processingMode_
Definition: InputSource.h:451
int maxSecondsUntilRampdown_
Definition: InputSource.h:449
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary()
Read next luminosity block Auxilary.
Definition: InputSource.cc:198
virtual void doBeginLumi(LuminosityBlockPrincipal &lbp, ProcessContext const *)
Called by framework at beginning of lumi block.
Definition: InputSource.cc:423
ProcessingController::ReverseState reverseState() const
Definition: InputSource.cc:434
StreamID const & streamID() const
Definition: StreamContext.h:55
void issueReports(EventID const &eventID, StreamID streamID)
issue an event report
Definition: InputSource.cc:357
virtual std::shared_ptr< FileBlock > readFile_()
Definition: InputSource.cc:241
virtual bool readIt(EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext)
Definition: InputSource.cc:373
bool eventLimitReached() const
Definition: InputSource.h:402
virtual ItemTypeInfo getNextItemType()=0
bool goToEvent(EventID const &eventID)
Definition: InputSource.cc:343
RunIndex index() const
Definition: RunPrincipal.h:56
virtual ProcessingController::ReverseState reverseState_() const
Definition: InputSource.cc:449
bool nextProcessBlock(ProcessBlockPrincipal &)
Next process block, return false if there is none, sets the processName in the principal.
Definition: InputSource.cc:274
runMode
define run mode.
void resetEventCached()
Definition: InputSource.h:392
ProcessHistoryRegistry const & processHistoryRegistry() const
Accessors for process history registry.
Definition: InputSource.h:168
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:499
Log< level::FwkInfo, true > LogFwkVerbatim
void readAndMergeLumi(LuminosityBlockPrincipal &lbp)
Read next luminosity block (same as a prior lumi)
Definition: InputSource.cc:263
void skipEvents(int offset)
Definition: InputSource.cc:339
std::string const & processName() const
virtual void readRun_(RunPrincipal &runPrincipal)
Definition: InputSource.cc:290
LumiSourceSentry(InputSource const &source, LuminosityBlockIndex id)
Definition: InputSource.cc:475
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: InputSource.cc:105
bool limitReached() const
Definition: InputSource.h:417
virtual void readProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:288
void readEvent(EventPrincipal &ep, StreamContext &)
Read next event.
Definition: InputSource.cc:302
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
LuminosityBlockNumber_t luminosityBlock() const
Accessor for current luminosity block number.
Definition: InputSource.cc:463
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_()=0
HLT enums.
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
Definition: InputSource.h:454
virtual bool randomAccess_() const
Definition: InputSource.cc:443
std::shared_ptr< LuminosityBlockAuxiliary > luminosityBlockAuxiliary() const
Called by the framework to merge or insert lumi in principal cache.
Definition: InputSource.h:264
ProcessBlockSourceSentry(InputSource const &, std::string const &)
Definition: InputSource.cc:489
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:348
unsigned int RunNumber_t
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: InputSource.cc:297
LuminosityBlockAuxiliary const & aux() const
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:25
unsigned int value() const
Definition: StreamID.h:43
ItemTypeInfo nextItemType_()
Definition: InputSource.cc:136
void readLuminosityBlock(LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
Read next luminosity block (new lumi)
Definition: InputSource.cc:254
InputSource(ParameterSet const &, InputSourceDescription const &)
Constructor.
Definition: InputSource.cc:47
RunSourceSentry(InputSource const &source, RunIndex id)
Definition: InputSource.cc:482
virtual void endJob()
Definition: InputSource.cc:441
static void prevalidate(ConfigurationDescriptions &)
Definition: InputSource.cc:111
virtual void skip(int offset)
Definition: InputSource.cc:391
void readProcessBlock(ProcessBlockPrincipal &)
Read next process block.
Definition: InputSource.cc:278
EventNumber_t event() const
Definition: EventID.h:40
FileCloseSentry(InputSource const &source, std::string const &lfn)
Definition: InputSource.cc:506
ProcessingMode processingMode() const
RunsLumisAndEvents (default), RunsAndLumis, or Runs.
Definition: InputSource.h:255