CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
InputSource.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
4 
26 
27 #include <cassert>
28 #include <fstream>
29 #include <iomanip>
30 
31 namespace edm {
32 
33  namespace {
34  std::string const& suffix(int count) {
35  static std::string const st("st");
36  static std::string const nd("nd");
37  static std::string const rd("rd");
38  static std::string const th("th");
39  // *0, *4 - *9 use "th".
40  int lastDigit = count % 10;
41  if(lastDigit >= 4 || lastDigit == 0) return th;
42  // *11, *12, or *13 use "th".
43  if(count % 100 - lastDigit == 10) return th;
44  return (lastDigit == 1 ? st : (lastDigit == 2 ? nd : rd));
45  }
46  template <typename T>
47  boost::shared_ptr<T> createSharedPtrToStatic(T* ptr) {
48  return boost::shared_ptr<T>(ptr, do_nothing_deleter());
49  }
50 
52  deleteFromProcessHistory(ProcessHistoryID const& phid, std::string const& processName) {
53  // Delete the current process from the process history. This must be done to maintain consistency
54  // for runs or lumis when the principal cache is flushed, because the process history modified flag,
55  // stored in the principal, is lost when the cache is flushed.
56  if(!phid.isValid()) {
57  return phid;
58  }
59  ProcessHistory ph;
61  assert(found);
62  ProcessHistory newPH;
63  newPH.reserve(ph.size());
64  for(ProcessHistory::const_iterator it = ph.begin(), itEnd = ph.end(); it != itEnd; ++it) {
65  if(processName != it->processName()) {
66  newPH.push_back(*it);
67  }
68  }
70  return newPH.id();
71  }
72  }
73 
76  actReg_(desc.actReg_),
77  principalCache_(desc.principalCache_),
78  maxEvents_(desc.maxEvents_),
79  remainingEvents_(maxEvents_),
80  maxLumis_(desc.maxLumis_),
81  remainingLumis_(maxLumis_),
82  readCount_(0),
83  processingMode_(RunsLumisAndEvents),
84  moduleDescription_(desc.moduleDescription_),
85  productRegistry_(createSharedPtrToStatic<ProductRegistry const>(desc.productRegistry_)),
86  primary_(pset.getParameter<std::string>("@module_label") == std::string("@main_input")),
87  processGUID_(primary_ ? createGlobalIdentifier() : std::string()),
88  time_(),
89  doneReadAhead_(false),
90  state_(IsInvalid),
91  runAuxiliary_(),
92  lumiAuxiliary_(),
93  runPrematurelyRead_(false),
94  lumiPrematurelyRead_(false),
95  statusFileName_() {
96 
97  if(pset.getUntrackedParameter<bool>("writeStatusFile", false)) {
98  std::ostringstream statusfilename;
99  statusfilename << "source_" << getpid();
100  statusFileName_ = statusfilename.str();
101  }
102 
103  // Secondary input sources currently do not have a product registry.
104  if(primary_) {
105  assert(desc.productRegistry_ != 0);
106  }
107  std::string const defaultMode("RunsLumisAndEvents");
108  std::string const runMode("Runs");
109  std::string const runLumiMode("RunsAndLumis");
110 
111  // The default value provided as the second argument to the getUntrackedParameter function call
112  // is not used when the ParameterSet has been validated and the parameters are not optional
113  // in the description. As soon as all primary input sources and all modules with a secondary
114  // input sources have defined descriptions, the defaults in the getUntrackedParameterSet function
115  // calls can and should be deleted from the code.
116  std::string processingMode = pset.getUntrackedParameter<std::string>("processingMode", defaultMode);
117  if(processingMode == runMode) {
119  } else if(processingMode == runLumiMode) {
121  } else if(processingMode != defaultMode) {
123  << "InputSource::InputSource()\n"
124  << "The 'processingMode' parameter for sources has an illegal value '" << processingMode << "'\n"
125  << "Legal values are '" << defaultMode << "', '" << runLumiMode << "', or '" << runMode << "'.\n";
126  }
127  }
128 
130 
131  void
134  desc.setUnknown();
135  descriptions.addDefault(desc);
136  }
137 
138  static std::string const kBaseType("Source");
139 
140  std::string const&
142  return kBaseType;
143  }
144 
145  void
147  std::string defaultString("RunsLumisAndEvents");
148  desc.addUntracked<std::string>("processingMode", defaultString)->setComment(
149  "'RunsLumisAndEvents': process runs, lumis, and events.\n"
150  "'RunsAndLumis': process runs and lumis (not events).\n"
151  "'Runs': process runs (not lumis or events).");
152  desc.addUntracked<bool>("writeStatusFile", false)->setComment("Write a status file. Intended for use by workflow management.");
153  }
154 
155  EventPrincipal* const
157  return &principalCache().eventPrincipal();
158  }
159 
160  // This next function is to guarantee that "runs only" mode does not return events or lumis,
161  // and that "runs and lumis only" mode does not return events.
162  // For input sources that are not random access (e.g. you need to read through the events
163  // to get to the lumis and runs), this is all that is involved to implement these modes.
164  // For input sources where events or lumis can be skipped, getNextItemType() should
165  // implement the skipping internally, so that the performance gain is realized.
166  // If this is done for a source, the 'if' blocks in this function will never be entered
167  // for that source.
170  ItemType itemType = getNextItemType();
171  if(itemType == IsEvent && processingMode() != RunsLumisAndEvents) {
172  readEvent_();
173  return nextItemType_();
174  }
175  if(itemType == IsLumi && processingMode() == Runs) {
176  // QQQ skipLuminosityBlock_();
177  return nextItemType_();
178  }
179  return itemType;
180  }
181 
184  if(doneReadAhead_) {
185  return state_;
186  }
187  doneReadAhead_ = true;
188  ItemType oldState = state_;
189  if(eventLimitReached()) {
190  // If the maximum event limit has been reached, stop.
191  state_ = IsStop;
192  } else if(lumiLimitReached()) {
193  // If the maximum lumi limit has been reached, stop
194  // when reaching a new file, run, or lumi.
195  if(oldState == IsInvalid || oldState == IsFile || oldState == IsRun || processingMode() != RunsLumisAndEvents) {
196  state_ = IsStop;
197  } else {
198  ItemType newState = nextItemType_();
199  if(newState == IsEvent) {
200  assert (processingMode() == RunsLumisAndEvents);
201  state_ = IsEvent;
202  } else {
203  state_ = IsStop;
204  }
205  }
206  } else {
207  ItemType newState = nextItemType_();
208  if(newState == IsStop) {
209  state_ = IsStop;
210  } else if(newState == IsFile || oldState == IsInvalid) {
211  state_ = IsFile;
212  } else if(newState == IsRun || oldState == IsFile) {
214  state_ = IsRun;
215  } else if(newState == IsLumi || oldState == IsRun) {
216  assert (processingMode() != Runs);
218  state_ = IsLumi;
219  } else {
220  assert (processingMode() == RunsLumisAndEvents);
221  state_ = IsEvent;
222  }
223  }
224  if(state_ == IsStop) {
225  lumiAuxiliary_.reset();
226  runAuxiliary_.reset();
227  }
228  return state_;
229  }
230 
231  void
233  this->beginJob();
234  }
235 
236  void
238  endJob();
239  }
240 
241  void
243  if(!typeLabelList().empty()) {
245  }
246  }
247 
248  // Return a dummy file block.
249  boost::shared_ptr<FileBlock>
251  assert(doneReadAhead_);
252  assert(state_ == IsFile);
253  assert(!limitReached());
254  doneReadAhead_ = false;
255  boost::shared_ptr<FileBlock> fb = readFile_();
256  return fb;
257  }
258 
259  void
260  InputSource::closeFile(boost::shared_ptr<FileBlock> fb) {
261  fb->close();
262  closeFile_();
263  return;
264  }
265 
266  // Return a dummy file block.
267  // This function must be overridden for any input source that reads a file
268  // containing Products.
269  boost::shared_ptr<FileBlock>
271  return boost::shared_ptr<FileBlock>(new FileBlock);
272  }
273 
274  boost::shared_ptr<RunPrincipal> const
277  }
278 
279  boost::shared_ptr<LuminosityBlockPrincipal> const
282  }
283 
284  void
286  if(runPrematurelyRead_) {
287  runPrematurelyRead_ = false;
288  return;
289  }
290  RunSourceSentry(*this);
292  if(!merged) {
293  boost::shared_ptr<RunPrincipal> rp(new RunPrincipal(runAuxiliary(), productRegistry_, processConfiguration()));
294  principalCache_->insert(rp);
295  }
297  }
298 
299  int
301  assert(doneReadAhead_);
302  assert(state_ == IsRun);
303  assert(!limitReached());
304  doneReadAhead_ = false;
305  return principalCache_->runPrincipal().run();
306  }
307 
308  void
311  lumiPrematurelyRead_ = false;
312  return;
313  }
314  LumiSourceSentry(*this);
316  if(!merged) {
317  boost::shared_ptr<LuminosityBlockPrincipal> lb(
322  principalCache_->insert(lb);
323  }
325  }
326 
327  int
329  assert(doneReadAhead_);
330  assert(state_ == IsLumi);
331  assert(!limitReached());
332  doneReadAhead_ = false;
333  --remainingLumis_;
334  assert(principalCache_->lumiPrincipal().luminosityBlock() == luminosityBlockAuxiliary()->luminosityBlock());
336  }
337 
338  boost::shared_ptr<RunPrincipal>
339  InputSource::readRun_(boost::shared_ptr<RunPrincipal> rpCache) {
340  // Note: For the moment, we do not support saving and restoring the state of the
341  // random number generator if random numbers are generated during processing of runs
342  // (e.g. beginRun(), endRun())
343  rpCache->fillRunPrincipal();
344  return rpCache;
345  }
346 
347  boost::shared_ptr<LuminosityBlockPrincipal>
348  InputSource::readLuminosityBlock_(boost::shared_ptr<LuminosityBlockPrincipal> lbCache) {
349  lbCache->fillLuminosityBlockPrincipal();
350  return lbCache;
351  }
352 
354  InputSource::readEvent(boost::shared_ptr<LuminosityBlockPrincipal> lbCache) {
355  assert(doneReadAhead_);
356  assert(state_ == IsEvent);
357  assert(!eventLimitReached());
358  doneReadAhead_ = false;
359 
361  if(result != 0) {
362  assert(lbCache->run() == result->run());
363  assert(lbCache->luminosityBlock() == result->luminosityBlock());
364  Event event(*result, moduleDescription());
365  postRead(event);
367  ++readCount_;
368  setTimestamp(result->time());
369  issueReports(result->id());
370  }
371  return result;
372  }
373 
375  InputSource::readEvent(EventID const& eventID) {
376  EventPrincipal* result = 0;
377 
378  if(!limitReached()) {
379  result = readIt(eventID);
380  if(result != 0) {
381  Event event(*result, moduleDescription());
382  postRead(event);
384  ++readCount_;
385  issueReports(result->id());
386  }
387  }
388  return result;
389  }
390 
391  void
393  doneReadAhead_ = false;
394  this->skip(offset);
395  }
396 
397  bool
398  InputSource::goToEvent(EventID const& eventID) {
399  doneReadAhead_ = false;
400  return this->goToEvent_(eventID);
401  }
402 
403  void
405  if(isInfoEnabled()) {
406  LogVerbatim("FwkReport") << "Begin processing the " << readCount_
407  << suffix(readCount_) << " record. Run " << eventID.run()
408  << ", Event " << eventID.event()
409  << ", LumiSection " << eventID.luminosityBlock()
410  << " at " << std::setprecision(3) << TimeOfDay();
411  }
412  if(!statusFileName_.empty()) {
413  std::ofstream statusFile(statusFileName_.c_str());
414  statusFile << eventID << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
415  statusFile.close();
416  }
417 
418  // At some point we may want to initiate checkpointing here
419  }
420 
424  << "InputSource::readIt()\n"
425  << "Random access is not implemented for this type of Input Source\n"
426  << "Contact a Framework Developer\n";
427  }
428 
429  void
432  << "InputSource::setRun()\n"
433  << "Run number cannot be modified for this type of Input Source\n"
434  << "Contact a Framework Developer\n";
435  }
436 
437  void
440  << "InputSource::setLumi()\n"
441  << "Luminosity Block ID cannot be modified for this type of Input Source\n"
442  << "Contact a Framework Developer\n";
443  }
444 
445  void
448  << "InputSource::skip()\n"
449  << "Random access is not implemented for this type of Input Source\n"
450  << "Contact a Framework Developer\n";
451  }
452 
453  bool
456  << "InputSource::goToEvent_()\n"
457  << "Random access is not implemented for this type of Input Source\n"
458  << "Contact a Framework Developer\n";
459  return true;
460  }
461 
462 
463  void
466  << "InputSource::rewind()\n"
467  << "Rewind is not implemented for this type of Input Source\n"
468  << "Contact a Framework Developer\n";
469  }
470 
471  void
473  if(-1 == remainingEvents_) {
474  return;
475  }
476  if(iSkipped < remainingEvents_) {
477  remainingEvents_ -= iSkipped;
478  } else {
479  remainingEvents_ = 0;
480  }
481  }
482 
483  void
486  if(rng.isAvailable()) {
487  rng->postEventRead(event);
488  }
489  }
490 
491  void
493  Run run(rp, moduleDescription());
494  beginRun(run);
495  run.commit_();
496  }
497 
498  void
500  rp.setEndTime(time_);
501  Run run(rp, moduleDescription());
502  endRun(run);
503  run.commit_();
504  runPrematurelyRead_ = false;
505  }
506 
507  void
511  lb.commit_();
512  }
513 
514  void
516  lbp.setEndTime(time_);
518  endLuminosityBlock(lb);
519  lb.commit_();
520  lumiPrematurelyRead_ = false;
521  }
522 
523  void
526  }
527 
528  void
529  InputSource::doPostForkReacquireResources(boost::shared_ptr<multicore::MessageReceiverForSource> iReceiver) {
530  postForkReacquireResources(iReceiver);
531  }
532 
533  void
535 
536  void
538 
539  void
541 
542  void
544 
545  void
547 
548  void
550 
551  void
553 
554  void
556 
557  void
558  InputSource::postForkReacquireResources(boost::shared_ptr<multicore::MessageReceiverForSource>) {}
559 
560  bool
562  return false;
563  }
564 
568  }
569 
573  }
574 
575  ProcessHistoryID const&
577  assert(runAuxiliary());
578  return runAuxiliary()->processHistoryID();
579  }
580 
583  assert(runAuxiliary());
584  return runAuxiliary()->run();
585  }
586 
589  assert(luminosityBlockAuxiliary());
590  return luminosityBlockAuxiliary()->luminosityBlock();
591  }
592 
593  InputSource::SourceSentry::SourceSentry(Sig& pre, Sig& post) : post_(post) {
594  pre();
595  }
596 
598  post_();
599  }
600 
602  sentry_(source.actReg()->preSourceSignal_, source.actReg()->postSourceSignal_) {
603  }
604 
606  sentry_(source.actReg()->preSourceLumiSignal_, source.actReg()->postSourceLumiSignal_) {
607  }
608 
610  sentry_(source.actReg()->preSourceRunSignal_, source.actReg()->postSourceRunSignal_) {
611  }
612 
614  sentry_(source.actReg()->preOpenFileSignal_, source.actReg()->postOpenFileSignal_) {
615  }
616 
618  sentry_(source.actReg()->preCloseFileSignal_, source.actReg()->postCloseFileSignal_) {
619  }
620 }
RunNumber_t run() const
Definition: EventID.h:42
collection_type::const_iterator const_iterator
virtual ~InputSource()
Destructor.
Definition: InputSource.cc:129
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
virtual void setRun(RunNumber_t r)
Definition: InputSource.cc:430
void doBeginRun(RunPrincipal &rp)
Called by framework at beginning of run.
Definition: InputSource.cc:492
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, int run)
EventPrincipal *const eventPrincipalCache()
Definition: InputSource.cc:156
bool runPrematurelyRead_
Definition: InputSource.h:381
virtual void endRun(Run &)
Definition: InputSource.cc:546
virtual void preForkReleaseResources()
Definition: InputSource.cc:555
void issueReports(EventID const &eventID)
issue an event report
Definition: InputSource.cc:404
void doBeginJob()
Called by framework at beginning of job.
Definition: InputSource.cc:232
boost::shared_ptr< ActivityRegistry > actReg() const
Accessor for Activity Registry.
Definition: InputSource.h:236
void decreaseRemainingEventsBy(int iSkipped)
Definition: InputSource.cc:472
virtual void closeFile_()
Definition: InputSource.h:342
Timestamp time_
Definition: InputSource.h:376
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void readAndCacheLumi()
Read next luminosity block.
Definition: InputSource.cc:309
RunNumber_t run() const
void doEndJob()
Called by framework at end of job.
Definition: InputSource.cc:237
RunSourceSentry(InputSource const &source)
Definition: InputSource.cc:609
void closeFile(boost::shared_ptr< FileBlock >)
close current file
Definition: InputSource.cc:260
boost::shared_ptr< RunPrincipal > const runPrincipal() const
Definition: InputSource.cc:275
std::string statusFileName_
Definition: InputSource.h:383
void registerProducts()
Register any produced products.
Definition: InputSource.cc:242
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: InputSource.cc:438
EventID const & id() const
void doBeginLumi(LuminosityBlockPrincipal &lbp)
Called by framework at beginning of lumi block.
Definition: InputSource.cc:508
virtual void rewind_()
Definition: InputSource.cc:464
virtual void skip(int)
Definition: InputSource.cc:446
bool getMapped(key_type const &k, value_type &result) const
ProcessingMode processingMode() const
RunsLumisAndEvents (default), RunsAndLumis, or Runs.
Definition: InputSource.h:233
boost::shared_ptr< LuminosityBlockAuxiliary > luminosityBlockAuxiliary() const
Called by the framework to merge or insert lumi in principal cache.
Definition: InputSource.h:242
FileCloseSentry(InputSource const &source)
Definition: InputSource.cc:617
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
Definition: InputSource.h:297
RunNumber_t run() const
Accessor for current run number.
Definition: InputSource.cc:582
boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipalPtr(ProcessHistoryID const &phid, int run, int lumi)
boost::shared_ptr< RunAuxiliary > runAuxiliary_
Definition: InputSource.h:379
LuminosityBlockNumber_t luminosityBlock() const
bool lumiPrematurelyRead_
Definition: InputSource.h:382
RunNumber_t run() const
Definition: RunPrincipal.h:47
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
bool insertMapped(value_type const &v)
sigc::signal< void > Sig
Definition: InputSource.h:253
unsigned int LuminosityBlockNumber_t
Definition: EventID.h:31
boost::shared_ptr< LuminosityBlockPrincipal > const luminosityBlockPrincipal() const
Definition: InputSource.cc:280
virtual void beginLuminosityBlock(LuminosityBlock &)
Definition: InputSource.cc:537
virtual void postForkReacquireResources(boost::shared_ptr< multicore::MessageReceiverForSource >)
Definition: InputSource.cc:558
bool limitReached() const
Definition: InputSource.h:331
int markLumi()
Mark lumi as read.
Definition: InputSource.cc:328
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:63
Timestamp const & time() const
virtual bool goToEvent_(EventID const &eventID)
Definition: InputSource.cc:454
virtual boost::shared_ptr< LuminosityBlockPrincipal > readLuminosityBlock_(boost::shared_ptr< LuminosityBlockPrincipal > lbCache)
Definition: InputSource.cc:348
TypeLabelList & typeLabelList()
used by the fwk to register the list of products of this module
virtual ProcessingController::ForwardState forwardState_() const
Definition: InputSource.cc:566
void postRead(Event &event)
Definition: InputSource.cc:484
virtual boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > rpCache)
Definition: InputSource.cc:339
void addDefault(ParameterSetDescription const &psetDescription)
boost::shared_ptr< RunPrincipal > runPrincipalPtr(ProcessHistoryID const &phid, int run)
bool lumiLimitReached() const
Definition: InputSource.h:330
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginJob()
Definition: InputSource.cc:549
ProcessingMode processingMode_
Definition: InputSource.h:371
void setEndTime(Timestamp const &time)
void doEndRun(RunPrincipal &rp)
Called by framework at end of run.
Definition: InputSource.cc:499
virtual ItemType getNextItemType()=0
tuple result
Definition: query.py:137
static const std::string & baseType()
Definition: InputSource.cc:141
void commit_()
Definition: Run.cc:77
EventSourceSentry(InputSource const &source)
Definition: InputSource.cc:601
ProcessHistoryID const & processHistoryID() const
Accessor for the input process history ID of the current run.
Definition: InputSource.cc:576
bool isAvailable() const
Definition: Service.h:47
EventPrincipal & eventPrincipal()
bool goToEvent(EventID const &eventID)
Definition: InputSource.cc:398
void doPreForkReleaseResources()
Called by the framework before forking the process.
Definition: InputSource.cc:524
SourceSentry(Sig &pre, Sig &post)
Definition: InputSource.cc:593
#define end
Definition: vmac.h:38
virtual EventPrincipal * readIt(EventID const &)
Definition: InputSource.cc:422
boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary()
Read next luminosity block Auxilary.
Definition: InputSource.h:106
unsigned int offset(bool)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
PrincipalCache * principalCache_
Definition: InputSource.h:365
PrincipalCache const & principalCache() const
Definition: InputSource.h:316
Hash< ProcessHistoryType > ProcessHistoryID
boost::shared_ptr< ProductRegistry const > productRegistry_
Definition: InputSource.h:373
void doPostForkReacquireResources(boost::shared_ptr< multicore::MessageReceiverForSource >)
Definition: InputSource.cc:529
LuminosityBlockNumber_t luminosityBlock() const
Accessor for current luminosity block number.
Definition: InputSource.cc:588
bool eventLimitReached() const
Definition: InputSource.h:329
void skipEvents(int offset)
Definition: InputSource.cc:392
virtual void beginRun(Run &)
Definition: InputSource.cc:543
boost::shared_ptr< LuminosityBlockAuxiliary > lumiAuxiliary_
Definition: InputSource.h:380
void doEndLumi(LuminosityBlockPrincipal &lbp)
Called by framework at end of lumi block.
Definition: InputSource.cc:515
virtual boost::shared_ptr< FileBlock > readFile_()
Definition: InputSource.cc:270
ProductRegistry & productRegistryUpdate() const
Definition: InputSource.h:299
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: InputSource.cc:132
string const
Definition: compareJSON.py:14
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, int run, int lumi)
bool merge(boost::shared_ptr< RunAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg)
boost::shared_ptr< RunAuxiliary > runAuxiliary() const
Called by the framework to merge or insert run in principal cache.
Definition: InputSource.h:239
virtual bool randomAccess_() const
Definition: InputSource.cc:561
static const std::string kBaseType("EDAnalyzer")
bool isInfoEnabled()
ItemType nextItemType_()
Definition: InputSource.cc:169
virtual void wakeUp_()
Definition: InputSource.cc:534
#define begin
Definition: vmac.h:31
author Stefano ARGIRO author Bill Tanenbaum
boost::shared_ptr< RunAuxiliary > readRunAuxiliary()
Read next run Auxiliary.
Definition: InputSource.h:111
bool insert(boost::shared_ptr< RunPrincipal > rp)
virtual ProcessingController::ReverseState reverseState_() const
Definition: InputSource.cc:571
virtual EventPrincipal * readEvent_()=0
static void fillDescription(ParameterSetDescription &desc)
Definition: InputSource.cc:146
bool const primary_
Definition: InputSource.h:374
ModuleDescription const & moduleDescription() const
Accessor for &#39;module&#39; description.
Definition: InputSource.h:187
unsigned int RunNumber_t
Definition: EventRange.h:32
static ThreadSafeRegistry * instance()
boost::shared_ptr< FileBlock > readFile()
Read next file.
Definition: InputSource.cc:250
ProcessConfiguration const & processConfiguration() const
Accessor for Process Configuration.
Definition: InputSource.h:190
static void addToRegistry(TypeLabelList::const_iterator const &iBegin, TypeLabelList::const_iterator const &iEnd, ModuleDescription const &iDesc, ProductRegistry &iReg, bool iIsListener=false)
void readAndCacheRun()
Read next run.
Definition: InputSource.cc:285
long double T
LumiSourceSentry(InputSource const &source)
Definition: InputSource.cc:605
ItemType nextItemType()
Definition: InputSource.cc:183
InputSource(ParameterSet const &, InputSourceDescription const &)
Constructor.
Definition: InputSource.cc:74
virtual void endJob()
Definition: InputSource.cc:552
int markRun()
Mark run as read.
Definition: InputSource.cc:300
std::string createGlobalIdentifier()
Definition: Run.h:32
virtual void endLuminosityBlock(LuminosityBlock &)
Definition: InputSource.cc:540
EventPrincipal * readEvent(boost::shared_ptr< LuminosityBlockPrincipal > lbCache)
Definition: InputSource.cc:354
FileOpenSentry(InputSource const &source)
Definition: InputSource.cc:613