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(true)),
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  bool InputSource::readProcessBlock() { return false; }
270 
271  void InputSource::readRun_(RunPrincipal& runPrincipal) {
272  // Note: For the moment, we do not support saving and restoring the state of the
273  // random number generator if random numbers are generated during processing of runs
274  // (e.g. beginRun(), endRun())
276  }
277 
279  auto history = processHistoryRegistry().getMapped(lumiPrincipal.aux().processHistoryID());
280  lumiPrincipal.fillLuminosityBlockPrincipal(history);
281  }
282 
284  assert(state_ == IsEvent);
286  {
287  // block scope, in order to issue the PostSourceEvent signal before calling postRead and issueReports
288  EventSourceSentry sentry(*this, streamContext);
289 
290  callWithTryCatchAndPrint<void>([this, &ep]() { readEvent_(ep); }, "Calling InputSource::readEvent_");
291  }
292 
293  if (remainingEvents_ > 0)
295  ++readCount_;
296  setTimestamp(ep.time());
297  issueReports(ep.id(), ep.streamID());
298  }
299 
300  bool InputSource::readEvent(EventPrincipal& ep, EventID const& eventID, StreamContext& streamContext) {
301  bool result = false;
302 
303  if (not limitReached()) {
304  // the Pre/PostSourceEvent signals should be generated only if the event is actually found.
305  // this should be taken care of by an EventSourceSentry in the implementaion of readIt()
306 
307  //result = callWithTryCatchAndPrint<bool>( [this,&eventID,&ep](){ return readIt(eventID, ep); }, "Calling InputSource::readIt" );
308  result = readIt(eventID, ep, streamContext);
309 
310  if (result) {
311  if (remainingEvents_ > 0)
313  ++readCount_;
314  issueReports(ep.id(), ep.streamID());
315  }
316  }
317  return result;
318  }
319 
321  callWithTryCatchAndPrint<void>([this, &offset]() { skip(offset); }, "Calling InputSource::skip");
322  }
323 
324  bool InputSource::goToEvent(EventID const& eventID) {
325  return callWithTryCatchAndPrint<bool>([this, &eventID]() { return goToEvent_(eventID); },
326  "Calling InputSource::goToEvent_");
327  }
328 
330  state_ = IsInvalid;
332  setNewRun();
333  setNewLumi();
335  callWithTryCatchAndPrint<void>([this]() { rewind_(); }, "Calling InputSource::rewind_");
336  }
337 
338  void InputSource::issueReports(EventID const& eventID, StreamID streamID) {
339  if (isFwkInfoEnabled()) {
340  LogFwkVerbatim("FwkReport") << "Begin processing the " << readCount_ << suffix(readCount_) << " record. Run "
341  << eventID.run() << ", Event " << eventID.event() << ", LumiSection "
342  << eventID.luminosityBlock() << " on stream " << streamID.value() << " at "
343  << std::setprecision(3) << TimeOfDay();
344  }
345  if (!statusFileName_.empty()) {
346  std::ofstream statusFile(statusFileName_.c_str());
347  statusFile << eventID << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
348  statusFile.close();
349  }
350 
351  // At some point we may want to initiate checkpointing here
352  }
353 
355  throw Exception(errors::LogicError) << "InputSource::readIt()\n"
356  << "Random access is not implemented for this type of Input Source\n"
357  << "Contact a Framework Developer\n";
358  }
359 
361  throw Exception(errors::LogicError) << "InputSource::setRun()\n"
362  << "Run number cannot be modified for this type of Input Source\n"
363  << "Contact a Framework Developer\n";
364  }
365 
367  throw Exception(errors::LogicError) << "InputSource::setLumi()\n"
368  << "Luminosity Block ID cannot be modified for this type of Input Source\n"
369  << "Contact a Framework Developer\n";
370  }
371 
372  void InputSource::skip(int) {
373  throw Exception(errors::LogicError) << "InputSource::skip()\n"
374  << "Random access are not implemented for this type of Input Source\n"
375  << "Contact a Framework Developer\n";
376  }
377 
379  throw Exception(errors::LogicError) << "InputSource::goToEvent_()\n"
380  << "Random access is not implemented for this type of Input Source\n"
381  << "Contact a Framework Developer\n";
382  return true;
383  }
384 
386  throw Exception(errors::LogicError) << "InputSource::rewind()\n"
387  << "Random access are not implemented for this type of Input Source\n"
388  << "Contact a Framework Developer\n";
389  }
390 
392  if (-1 == remainingEvents_) {
393  return;
394  }
395  if (iSkipped < remainingEvents_) {
396  remainingEvents_ -= iSkipped;
397  } else {
398  remainingEvents_ = 0;
399  }
400  }
401 
403 
405 
407  return callWithTryCatchAndPrint<bool>([this]() { return randomAccess_(); }, "Calling InputSource::randomAccess_");
408  }
409 
411  return callWithTryCatchAndPrint<ProcessingController::ForwardState>([this]() { return forwardState_(); },
412  "Calling InputSource::forwardState_");
413  }
414 
416  return callWithTryCatchAndPrint<ProcessingController::ReverseState>([this]() { return reverseState_(); },
417  "Calling InputSource::reverseState__");
418  }
419 
421 
423 
424  bool InputSource::randomAccess_() const { return false; }
425 
428  }
429 
432  }
433 
435  assert(runAuxiliary());
436  return processHistoryRegistry_->reducedProcessHistoryID(runAuxiliary()->processHistoryID());
437  }
438 
440  assert(runAuxiliary());
441  return runAuxiliary()->run();
442  }
443 
446  return luminosityBlockAuxiliary()->luminosityBlock();
447  }
448 
450  : source_(source), sc_(sc) {
451  source.actReg()->preSourceSignal_(sc_.streamID());
452  }
453 
454  InputSource::EventSourceSentry::~EventSourceSentry() { source_.actReg()->postSourceSignal_(sc_.streamID()); }
455 
457  : source_(source), index_(index) {
458  source_.actReg()->preSourceLumiSignal_(index_);
459  }
460 
461  InputSource::LumiSourceSentry::~LumiSourceSentry() { source_.actReg()->postSourceLumiSignal_(index_); }
462 
464  : source_(source), index_(index) {
465  source_.actReg()->preSourceRunSignal_(index_);
466  }
467 
468  InputSource::RunSourceSentry::~RunSourceSentry() { source_.actReg()->postSourceRunSignal_(index_); }
469 
471  : post_(source.actReg()->postOpenFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
472  source.actReg()->preOpenFileSignal_(lfn, usedFallback);
473  }
474 
475  InputSource::FileOpenSentry::~FileOpenSentry() { post_(lfn_, usedFallback_); }
476 
478  : post_(source.actReg()->postCloseFileSignal_), lfn_(lfn), usedFallback_(usedFallback) {
479  source.actReg()->preCloseFileSignal_(lfn, usedFallback);
480  }
481 
482  InputSource::FileCloseSentry::~FileCloseSentry() { post_(lfn_, usedFallback_); }
483 } // 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:426
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:406
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:354
edm::InputSource::setNewLumi
void setNewLumi()
Definition: InputSource.h:357
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:411
edm::InputSource::RunSourceSentry
Definition: InputSource.h:277
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
edm::LogFwkVerbatim
Log< level::FwkInfo, true > LogFwkVerbatim
Definition: MessageLogger.h:129
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:362
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:415
edm::InputSource::goToEvent_
virtual bool goToEvent_(EventID const &eventID)
Definition: InputSource.cc:378
edm::errors::LogicError
Definition: EDMException.h:37
edm::InputSource::readRun_
virtual void readRun_(RunPrincipal &runPrincipal)
Definition: InputSource.cc:271
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::InputSource::endJob
virtual void endJob()
Definition: InputSource.cc:422
edm::ProcessContext
Definition: ProcessContext.h:27
edm::InputSource::skip
virtual void skip(int offset)
Definition: InputSource.cc:372
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:420
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::InputSourceDescription
Definition: InputSourceDescription.h:20
edm::InputSource::RunSourceSentry::~RunSourceSentry
~RunSourceSentry()
Definition: InputSource.cc:468
cms::cuda::assert
assert(be >=bs)
edm::InputSource::lumiAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > lumiAuxiliary_
Definition: InputSource.h:431
edm::InputSource::EventSourceSentry::EventSourceSentry
EventSourceSentry(InputSource const &source, StreamContext &sc)
Definition: InputSource.cc:449
ProcessHistoryRegistry.h
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:43
ProductRegistry.h
edm::InputSource::setRun
virtual void setRun(RunNumber_t r)
Definition: InputSource.cc:360
edm::InputSource::baseType
static const std::string & baseType()
Definition: InputSource.cc:113
edm::InputSource::LumiSourceSentry::~LumiSourceSentry
~LumiSourceSentry()
Definition: InputSource.cc:461
edm::InputSource::doBeginLumi
virtual void doBeginLumi(LuminosityBlockPrincipal &lbp, ProcessContext const *)
Called by framework at beginning of lumi block.
Definition: InputSource.cc:404
edm::EventID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
edm::InputSource::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: InputSource.cc:434
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:402
edm::InputSource::IsRun
Definition: InputSource.h:78
edm::InputSource::state_
ItemType state_
Definition: InputSource.h:429
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:470
ActivityRegistry.h
edm::InputSource::randomAccess_
virtual bool randomAccess_() const
Definition: InputSource.cc:424
edm::FileBlock
Definition: FileBlock.h:20
edm::InputSource::processHistoryRegistry_
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
Definition: InputSource.h:421
edm::InputSource::issueReports
void issueReports(EventID const &eventID, StreamID streamID)
issue an event report
Definition: InputSource.cc:338
edm::InputSource::readCount_
int readCount_
Definition: InputSource.h:415
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:387
edm::InputSource::readRunAuxiliary_
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_()=0
edm::InputSource::FileOpenSentry::~FileOpenSentry
~FileOpenSentry()
Definition: InputSource.cc:475
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:274
edm::LuminosityBlockIndex
Definition: LuminosityBlockIndex.h:33
ProcessHistory.h
edm::InputSource::EventSourceSentry::~EventSourceSentry
~EventSourceSentry()
Definition: InputSource.cc:454
edm::StreamContext
Definition: StreamContext.h:31
edm::InputSource::readLuminosityBlock_
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: InputSource.cc:278
edm::InputSource::rewind
void rewind()
Begin again at the first event.
Definition: InputSource.cc:329
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:245
edm::InputSource::lumiLimitReached
bool lumiLimitReached() const
Definition: InputSource.h:373
edm::InputSource::setTimestamp
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
Definition: InputSource.h:327
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
edm::Hash< ProcessHistoryType >
edm::InputSource::processingStart_
std::chrono::time_point< std::chrono::steady_clock > processingStart_
Definition: InputSource.h:417
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:482
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:456
edm::InputSource::processingMode
ProcessingMode processingMode() const
RunsLumisAndEvents (default), RunsAndLumis, or Runs.
Definition: InputSource.h:236
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:242
funct::true
true
Definition: Factorize.h:173
edm::LuminosityBlockAuxiliary::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: LuminosityBlockAuxiliary.h:32
edm::InputSource::processHistoryRegistry
ProcessHistoryRegistry const & processHistoryRegistry() const
Accessors for process history registry.
Definition: InputSource.h:158
edm::InputSource::registerProducts
virtual void registerProducts()
Register any produced products.
Definition: InputSource.cc:217
edm::ParameterSet
Definition: ParameterSet.h:47
edm::kBaseType
static const std::string kBaseType("EDAnalyzer")
edm::InputSource::EventSourceSentry
Definition: InputSource.h:251
edm::StreamContext::streamID
StreamID const & streamID() const
Definition: StreamContext.h:54
edm::InputSource::IsLumi
Definition: InputSource.h:78
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:412
edm::InputSource::readEvent
void readEvent(EventPrincipal &ep, StreamContext &)
Read next event.
Definition: InputSource.cc:283
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::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
edm::InputSource::RunSourceSentry::RunSourceSentry
RunSourceSentry(InputSource const &source, RunIndex id)
Definition: InputSource.cc:463
edm::InputSource::statusFileName_
std::string statusFileName_
Definition: InputSource.h:432
edm::InputSource::eventLimitReached
bool eventLimitReached() const
Definition: InputSource.h:372
edm::InputSource::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Accessor for current luminosity block number.
Definition: InputSource.cc:444
TopDecaySubset_cfi.runMode
runMode
define run mode.
Definition: TopDecaySubset_cfi.py:19
edm::InputSource::goToEvent
bool goToEvent(EventID const &eventID)
Definition: InputSource.cc:324
edm::InputSource::RunSourceSentry::source_
InputSource const & source_
Definition: InputSource.h:286
edm::InputSource::reverseState_
virtual ProcessingController::ReverseState reverseState_() const
Definition: InputSource.cc:430
edm::InputSource::rewind_
virtual void rewind_()
Definition: InputSource.cc:385
edm::InputSource::IsStop
Definition: InputSource.h:78
edm::InputSource::processingMode_
ProcessingMode processingMode_
Definition: InputSource.h:418
edm::InputSource::decreaseRemainingEventsBy
void decreaseRemainingEventsBy(int iSkipped)
Definition: InputSource.cc:391
edm::HistoryAppender
Definition: HistoryAppender.h:13
edm::InputSource::forwardState
ProcessingController::ForwardState forwardState() const
Definition: InputSource.cc:410
edm::InputSource::runAuxiliary_
std::shared_ptr< RunAuxiliary > runAuxiliary_
Definition: InputSource.h:430
edm::InputSource::RunSourceSentry::index_
RunIndex index_
Definition: InputSource.h:287
LuminosityBlockPrincipal.h
edm::InputSource::FileCloseSentry::FileCloseSentry
FileCloseSentry(InputSource const &source, std::string const &lfn, bool usedFallback)
Definition: InputSource.cc:477
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:366
edm::InputSource::ItemType
ItemType
Definition: InputSource.h:78
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:26
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::isFwkInfoEnabled
bool isFwkInfoEnabled()
Definition: MessageLogger.cc:20
edm::InputSource::actReg
std::shared_ptr< ActivityRegistry > actReg() const
Accessor for Activity Registry.
Definition: InputSource.h:239
edm::InputSource::LumiSourceSentry::source_
InputSource const & source_
Definition: InputSource.h:273
ExceptionHelpers.h
edm::InputSource::readProcessBlock
bool readProcessBlock()
Read next process block.
Definition: InputSource.cc:269
InputSource.h
edm::InputSource::setNewRun
void setNewRun()
Definition: InputSource.h:354
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:261
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:397
edm::InputSource::maxSecondsUntilRampdown_
int maxSecondsUntilRampdown_
Definition: InputSource.h:416
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:414
edm::InputSource::skipEvents
void skipEvents(int offset)
Definition: InputSource.cc:320
mps_fire.result
result
Definition: mps_fire.py:311
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:264
edm::EventID
Definition: EventID.h:31
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
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:439
edm::InputSource::readLuminosityBlock
void readLuminosityBlock(LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
Read next luminosity block (new lumi)
Definition: InputSource.cc:251