CMS 3D CMS Logo

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