CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes
edm::InputSource Class Referenceabstract

#include <InputSource.h>

Inheritance diagram for edm::InputSource:
edm::PoolSource edm::PuttableSourceBase edm::RawInputSource edm::RepeatingCachedRootSource edm::TestSource edm::IDGeneratorSourceBase< InputSource > edm::OneLumiPoolSource DQMRootSource dqmservices::DQMProtobufReader edm::IDGeneratorSourceBase< PuttableSourceBase > edm::RawInputSourceFromFiles edm::StreamerInputSource FedRawDataInputSource edm::EmptySource

Classes

class  EventSourceSentry
 
class  FileCloseSentry
 
class  FileOpenSentry
 
class  LumiSourceSentry
 
class  ProcessBlockSourceSentry
 
class  RunSourceSentry
 

Public Types

enum  ItemType {
  IsInvalid, IsStop, IsFile, IsRun,
  IsLumi, IsEvent, IsRepeat, IsSynchronize
}
 
enum  ProcessingMode { Runs, RunsAndLumis, RunsLumisAndEvents }
 

Public Member Functions

std::shared_ptr< ActivityRegistryactReg () const
 Accessor for Activity Registry. More...
 
std::shared_ptr< BranchIDListHelper > & branchIDListHelper ()
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper () const
 Accessors for branchIDListHelper. More...
 
void closeFile (FileBlock *, bool cleaningUpAfterException)
 close current file More...
 
void doBeginJob ()
 Called by framework at beginning of job. More...
 
virtual void doBeginLumi (LuminosityBlockPrincipal &lbp, ProcessContext const *)
 Called by framework at beginning of lumi block. More...
 
virtual void doBeginRun (RunPrincipal &rp, ProcessContext const *)
 Called by framework at beginning of run. More...
 
void doEndJob ()
 Called by framework at end of job. More...
 
void fillProcessBlockHelper ()
 Fill the ProcessBlockHelper with info for the current file. More...
 
ProcessingController::ForwardState forwardState () const
 
bool goToEvent (EventID const &eventID)
 
 InputSource (InputSource const &)=delete
 
 InputSource (ParameterSet const &, InputSourceDescription const &)
 Constructor. More...
 
void issueReports (EventID const &eventID, StreamID streamID)
 issue an event report More...
 
LuminosityBlockNumber_t luminosityBlock () const
 Accessor for current luminosity block number. More...
 
std::shared_ptr< LuminosityBlockAuxiliaryluminosityBlockAuxiliary () const
 Called by the framework to merge or insert lumi in principal cache. More...
 
int maxEvents () const
 
int maxLuminosityBlocks () const
 
ModuleDescription const & moduleDescription () const
 Accessor for 'module' description. More...
 
ItemType nextItemType ()
 Advances the source to the next item. More...
 
bool nextProcessBlock (ProcessBlockPrincipal &)
 Next process block, return false if there is none, sets the processName in the principal. More...
 
InputSourceoperator= (InputSource const &)=delete
 
std::shared_ptr< ProcessBlockHelper > & processBlockHelper ()
 
std::shared_ptr< ProcessBlockHelper const > processBlockHelper () const
 Accessors for processBlockHelper. More...
 
ProcessConfiguration const & processConfiguration () const
 Accessor for Process Configuration. More...
 
std::string const & processGUID () const
 Accessor for global process identifier. More...
 
ProcessHistoryRegistryprocessHistoryRegistry ()
 
ProcessHistoryRegistry const & processHistoryRegistry () const
 Accessors for process history registry. More...
 
ProcessingMode processingMode () const
 RunsLumisAndEvents (default), RunsAndLumis, or Runs. More...
 
std::shared_ptr< ProductRegistry > & productRegistry ()
 
std::shared_ptr< ProductRegistry const > productRegistry () const
 Accessors for product registry. More...
 
bool randomAccess () const
 
void readAndMergeLumi (LuminosityBlockPrincipal &lbp)
 Read next luminosity block (same as a prior lumi) More...
 
void readAndMergeRun (RunPrincipal &rp)
 Read next run (same as a prior run) More...
 
bool readEvent (EventPrincipal &ep, EventID const &, StreamContext &)
 Read a specific event. More...
 
void readEvent (EventPrincipal &ep, StreamContext &)
 Read next event. More...
 
std::shared_ptr< FileBlockreadFile ()
 Read next file. More...
 
void readLuminosityBlock (LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
 Read next luminosity block (new lumi) More...
 
std::shared_ptr< LuminosityBlockAuxiliaryreadLuminosityBlockAuxiliary ()
 Read next luminosity block Auxilary. More...
 
void readProcessBlock (ProcessBlockPrincipal &)
 Read next process block. More...
 
void readRun (RunPrincipal &runPrincipal, HistoryAppender &historyAppender)
 Read next run (new run) More...
 
std::shared_ptr< RunAuxiliaryreadRunAuxiliary ()
 Read next run Auxiliary. More...
 
ProcessHistoryID const & reducedProcessHistoryID () const
 
virtual void registerProducts ()
 Register any produced products. More...
 
int remainingEvents () const
 
int remainingLuminosityBlocks () const
 
void repeat ()
 Reset the remaining number of events/lumis to the maximum number. More...
 
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader ()
 Returns nullptr if no resource shared between the Source and a DelayedReader. More...
 
ProcessingController::ReverseState reverseState () const
 
void rewind ()
 Begin again at the first event. More...
 
RunNumber_t run () const
 Accessor for current run number. More...
 
std::shared_ptr< RunAuxiliaryrunAuxiliary () const
 Called by the framework to merge or insert run in principal cache. More...
 
void setLuminosityBlockNumber_t (LuminosityBlockNumber_t lb)
 Set the luminosity block ID. More...
 
void setRunNumber (RunNumber_t r)
 Set the run number. More...
 
void skipEvents (int offset)
 
std::shared_ptr< ThinnedAssociationsHelper > & thinnedAssociationsHelper ()
 
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper () const
 Accessors for thinnedAssociationsHelper. More...
 
Timestamp const & timestamp () const
 Accessor for the current time, as seen by the input source. More...
 
virtual ~InputSource () noexcept(false)
 Destructor. More...
 

Static Public Member Functions

static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Public Attributes

signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postEventReadFromSourceSignal_
 
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preEventReadFromSourceSignal_
 

Protected Member Functions

virtual void beginJob ()
 Begin protected makes it easier to do template programming. More...
 
void decreaseRemainingEventsBy (int iSkipped)
 
bool eventCached () const
 
bool newLumi () const
 
bool newRun () const
 
ProcessHistoryRegistryprocessHistoryRegistryForUpdate ()
 
ProductRegistryproductRegistryUpdate ()
 
void reset () const
 
void resetEventCached ()
 
void resetLuminosityBlockAuxiliary (bool isNewLumi=true) const
 
void resetNewLumi ()
 
void resetNewRun ()
 
void resetRunAuxiliary (bool isNewRun=true) const
 
void setEventCached ()
 Called by the framework to merge or ached() const {return eventCached_;}. More...
 
void setLuminosityBlockAuxiliary (LuminosityBlockAuxiliary *lbp)
 
void setNewLumi ()
 
void setNewRun ()
 
void setRunAuxiliary (RunAuxiliary *rp)
 
void setTimestamp (Timestamp const &theTime)
 To set the current time, as seen by the input source. More...
 
virtual void skip (int offset)
 
ItemType state () const
 

Private Member Functions

virtual void closeFile_ ()
 
virtual void endJob ()
 
bool eventLimitReached () const
 
virtual void fillProcessBlockHelper_ ()
 
virtual ProcessingController::ForwardState forwardState_ () const
 
virtual ItemType getNextItemType ()=0
 
virtual bool goToEvent_ (EventID const &eventID)
 
bool limitReached () const
 
bool lumiLimitReached () const
 
ItemType nextItemType_ ()
 
virtual bool nextProcessBlock_ (ProcessBlockPrincipal &)
 
virtual bool randomAccess_ () const
 
virtual void readEvent_ (EventPrincipal &eventPrincipal)=0
 
virtual std::shared_ptr< FileBlockreadFile_ ()
 
virtual bool readIt (EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext)
 
virtual void readLuminosityBlock_ (LuminosityBlockPrincipal &lumiPrincipal)
 
virtual std::shared_ptr< LuminosityBlockAuxiliaryreadLuminosityBlockAuxiliary_ ()=0
 
virtual void readProcessBlock_ (ProcessBlockPrincipal &)
 
virtual void readRun_ (RunPrincipal &runPrincipal)
 
virtual std::shared_ptr< RunAuxiliaryreadRunAuxiliary_ ()=0
 
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader_ ()
 
virtual ProcessingController::ReverseState reverseState_ () const
 
virtual void rewind_ ()
 
virtual void setLumi (LuminosityBlockNumber_t lb)
 
virtual void setRun (RunNumber_t r)
 

Private Attributes

std::shared_ptr< ActivityRegistryactReg_
 
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
 
bool eventCached_
 
std::shared_ptr< LuminosityBlockAuxiliarylumiAuxiliary_
 
int maxEvents_
 
int maxLumis_
 
int maxSecondsUntilRampdown_
 
const ModuleDescription moduleDescription_
 
bool newLumi_
 
bool newRun_
 
unsigned int numberOfEventsBeforeBigSkip_
 
edm::propagate_const< std::shared_ptr< ProcessBlockHelper > > processBlockHelper_
 
std::string processGUID_
 
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
 
ProcessingMode processingMode_
 
std::chrono::time_point< std::chrono::steady_clock > processingStart_
 
edm::propagate_const< std::shared_ptr< ProductRegistry > > productRegistry_
 
int readCount_
 
int remainingEvents_
 
int remainingLumis_
 
std::shared_ptr< RunAuxiliaryrunAuxiliary_
 
ItemType state_
 
std::string statusFileName_
 
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
 
Timestamp time_
 

Detailed Description

Definition at line 52 of file InputSource.h.

Member Enumeration Documentation

◆ ItemType

Enumerator
IsInvalid 
IsStop 
IsFile 
IsRun 
IsLumi 
IsEvent 
IsRepeat 
IsSynchronize 

Definition at line 54 of file InputSource.h.

◆ ProcessingMode

Enumerator
Runs 
RunsAndLumis 
RunsLumisAndEvents 

Definition at line 56 of file InputSource.h.

Constructor & Destructor Documentation

◆ InputSource() [1/2]

InputSource::InputSource ( ParameterSet const &  pset,
InputSourceDescription const &  desc 
)
explicit

Constructor.

Definition at line 47 of file InputSource.cc.

48  : actReg_(desc.actReg_),
49  maxEvents_(desc.maxEvents_),
51  maxLumis_(desc.maxLumis_),
53  readCount_(0),
54  maxSecondsUntilRampdown_(desc.maxSecondsUntilRampdown_),
56  moduleDescription_(desc.moduleDescription_),
57  productRegistry_(desc.productRegistry_),
58  processHistoryRegistry_(new ProcessHistoryRegistry),
59  branchIDListHelper_(desc.branchIDListHelper_),
60  processBlockHelper_(desc.processBlockHelper_),
61  thinnedAssociationsHelper_(desc.thinnedAssociationsHelper_),
63  time_(),
64  newRun_(true),
65  newLumi_(true),
66  eventCached_(false),
68  runAuxiliary_(),
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  }

References edm::errors::Configuration, Exception, maxSecondsUntilRampdown_, submitPVValidationJobs::now, processingMode(), processingMode_, processingStart_, muonDTDigis_cfi::pset, TopDecaySubset_cfi::runMode, Runs, RunsAndLumis, statusFileName_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~InputSource()

InputSource::~InputSource ( )
virtualnoexcept

Destructor.

Definition at line 103 of file InputSource.cc.

103 {}

◆ InputSource() [2/2]

edm::InputSource::InputSource ( InputSource const &  )
delete

Member Function Documentation

◆ actReg()

std::shared_ptr<ActivityRegistry> edm::InputSource::actReg ( ) const
inline

◆ baseType()

std::string const & InputSource::baseType ( )
static

Definition at line 115 of file InputSource.cc.

115 { return kBaseType; }

References edm::kBaseType().

◆ beginJob()

void InputSource::beginJob ( void  )
protectedvirtual

Begin protected makes it easier to do template programming.

Reimplemented in edm::RepeatingCachedRootSource, edm::IDGeneratorSourceBase< InputSource >, edm::IDGeneratorSourceBase< PuttableSourceBase >, and edm::PuttableSourceBase.

Definition at line 438 of file InputSource.cc.

438 {}

Referenced by doBeginJob().

◆ branchIDListHelper() [1/2]

std::shared_ptr<BranchIDListHelper>& edm::InputSource::branchIDListHelper ( )
inline

Definition at line 147 of file InputSource.h.

References branchIDListHelper_, and edm::get_underlying_safe().

◆ branchIDListHelper() [2/2]

std::shared_ptr<BranchIDListHelper const> edm::InputSource::branchIDListHelper ( ) const
inline

◆ closeFile()

void InputSource::closeFile ( FileBlock fb,
bool  cleaningUpAfterException 
)

close current file

Definition at line 229 of file InputSource.cc.

229  {
230  if (fb != nullptr)
231  fb->close();
232  callWithTryCatchAndPrint<void>(
233  [this]() { closeFile_(); }, "Calling InputSource::closeFile_", cleaningUpAfterException);
234  return;
235  }

References edm::FileBlock::close(), and closeFile_().

◆ closeFile_()

virtual void edm::InputSource::closeFile_ ( )
inlineprivatevirtual

Reimplemented in edm::PoolSource, and edm::RawInputSource.

Definition at line 401 of file InputSource.h.

401 {}

Referenced by closeFile().

◆ decreaseRemainingEventsBy()

void InputSource::decreaseRemainingEventsBy ( int  iSkipped)
protected

Called by inheriting classes when running multicore when the receiver has told them to skip some events.

Definition at line 409 of file InputSource.cc.

409  {
410  if (-1 == remainingEvents_) {
411  return;
412  }
413  if (iSkipped < remainingEvents_) {
414  remainingEvents_ -= iSkipped;
415  } else {
416  remainingEvents_ = 0;
417  }
418  }

References remainingEvents_.

◆ doBeginJob()

void InputSource::doBeginJob ( )

Called by framework at beginning of job.

Definition at line 207 of file InputSource.cc.

207 { this->beginJob(); }

References beginJob().

◆ doBeginLumi()

void InputSource::doBeginLumi ( LuminosityBlockPrincipal lbp,
ProcessContext const *   
)
virtual

Called by framework at beginning of lumi block.

Reimplemented in edm::PuttableSourceBase.

Definition at line 422 of file InputSource.cc.

422 {}

◆ doBeginRun()

void InputSource::doBeginRun ( RunPrincipal rp,
ProcessContext const *   
)
virtual

Called by framework at beginning of run.

Reimplemented in edm::PuttableSourceBase.

Definition at line 420 of file InputSource.cc.

420 {}

◆ doEndJob()

void InputSource::doEndJob ( )

Called by framework at end of job.

Definition at line 209 of file InputSource.cc.

209 { endJob(); }

References endJob().

Referenced by edm::EventProcessor::endJob().

◆ endJob()

void InputSource::endJob ( void  )
privatevirtual

Reimplemented in edm::PoolSource, MCatNLOSource, LH5Source, and LHESource.

Definition at line 440 of file InputSource.cc.

440 {}

Referenced by doEndJob().

◆ eventCached()

bool edm::InputSource::eventCached ( ) const
inlineprotected

◆ eventLimitReached()

bool edm::InputSource::eventLimitReached ( ) const
inlineprivate

Definition at line 373 of file InputSource.h.

373 { return remainingEvents_ == 0; }

References remainingEvents_.

Referenced by limitReached(), nextItemType(), and readEvent().

◆ fillDescription()

void InputSource::fillDescription ( ParameterSetDescription desc)
static

Definition at line 117 of file InputSource.cc.

117  {
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  }

References submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::RawInputSource::fillDescription(), edm::PoolSource::fillDescriptions(), and edm::RepeatingCachedRootSource::fillDescriptions().

◆ fillDescriptions()

void InputSource::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 105 of file InputSource.cc.

105  {
107  desc.setUnknown();
108  descriptions.addDefault(desc);
109  }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

◆ fillProcessBlockHelper()

void InputSource::fillProcessBlockHelper ( )

Fill the ProcessBlockHelper with info for the current file.

Definition at line 271 of file InputSource.cc.

References fillProcessBlockHelper_().

◆ fillProcessBlockHelper_()

void InputSource::fillProcessBlockHelper_ ( )
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 283 of file InputSource.cc.

283 {}

Referenced by fillProcessBlockHelper().

◆ forwardState()

ProcessingController::ForwardState InputSource::forwardState ( ) const

Definition at line 428 of file InputSource.cc.

428  {
429  return callWithTryCatchAndPrint<ProcessingController::ForwardState>([this]() { return forwardState_(); },
430  "Calling InputSource::forwardState_");
431  }

References forwardState_().

◆ forwardState_()

ProcessingController::ForwardState InputSource::forwardState_ ( ) const
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 444 of file InputSource.cc.

444  {
446  }

References edm::ProcessingController::kUnknownForward.

Referenced by forwardState().

◆ getNextItemType()

virtual ItemType edm::InputSource::getNextItemType ( )
privatepure virtual

◆ goToEvent()

bool InputSource::goToEvent ( EventID const &  eventID)

Definition at line 342 of file InputSource.cc.

342  {
343  return callWithTryCatchAndPrint<bool>([this, &eventID]() { return goToEvent_(eventID); },
344  "Calling InputSource::goToEvent_");
345  }

References goToEvent_().

◆ goToEvent_()

bool InputSource::goToEvent_ ( EventID const &  eventID)
privatevirtual

Reimplemented in edm::RepeatingCachedRootSource, and edm::PoolSource.

Definition at line 396 of file InputSource.cc.

396  {
397  throw Exception(errors::LogicError) << "InputSource::goToEvent_()\n"
398  << "Random access is not implemented for this type of Input Source\n"
399  << "Contact a Framework Developer\n";
400  return true;
401  }

References Exception, and edm::errors::LogicError.

Referenced by goToEvent().

◆ issueReports()

void InputSource::issueReports ( EventID const &  eventID,
StreamID  streamID 
)

issue an event report

Definition at line 356 of file InputSource.cc.

356  {
357  if (isFwkInfoEnabled()) {
358  LogFwkVerbatim("FwkReport") << "Begin processing the " << readCount_ << suffix(readCount_) << " record. Run "
359  << eventID.run() << ", Event " << eventID.event() << ", LumiSection "
360  << eventID.luminosityBlock() << " on stream " << streamID.value() << " at "
361  << std::setprecision(3) << TimeOfDay();
362  }
363  if (!statusFileName_.empty()) {
364  std::ofstream statusFile(statusFileName_.c_str());
365  statusFile << eventID << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
366  statusFile.close();
367  }
368 
369  // At some point we may want to initiate checkpointing here
370  }

References edm::EventID::event(), edm::isFwkInfoEnabled(), edm::EventID::luminosityBlock(), readCount_, edm::EventID::run(), statusFileName_, createPayload::suffix, and edm::StreamID::value().

Referenced by readEvent().

◆ limitReached()

bool edm::InputSource::limitReached ( ) const
inlineprivate

Definition at line 388 of file InputSource.h.

388 { return eventLimitReached() || lumiLimitReached(); }

References eventLimitReached(), and lumiLimitReached().

Referenced by readEvent(), and readFile().

◆ lumiLimitReached()

bool edm::InputSource::lumiLimitReached ( ) const
inlineprivate

Definition at line 374 of file InputSource.h.

374  {
375  if (remainingLumis_ == 0) {
376  return true;
377  }
378  if (maxSecondsUntilRampdown_ <= 0) {
379  return false;
380  }
382  auto elapsed = end - processingStart_;
383  if (std::chrono::duration_cast<std::chrono::seconds>(elapsed).count() > maxSecondsUntilRampdown_) {
384  return true;
385  }
386  return false;
387  }

References submitPVResolutionJobs::count, mps_fire::end, maxSecondsUntilRampdown_, submitPVValidationJobs::now, processingStart_, and remainingLumis_.

Referenced by limitReached(), and nextItemType().

◆ luminosityBlock()

LuminosityBlockNumber_t InputSource::luminosityBlock ( ) const

◆ luminosityBlockAuxiliary()

std::shared_ptr<LuminosityBlockAuxiliary> edm::InputSource::luminosityBlockAuxiliary ( ) const
inline

◆ maxEvents()

int edm::InputSource::maxEvents ( ) const
inline

Accessor for maximum number of events to be read. -1 is used for unlimited.

Definition at line 174 of file InputSource.h.

174 { return maxEvents_; }

References maxEvents_.

◆ maxLuminosityBlocks()

int edm::InputSource::maxLuminosityBlocks ( ) const
inline

Accessor for maximum number of lumis to be read. -1 is used for unlimited.

Definition at line 182 of file InputSource.h.

182 { return maxLumis_; }

References maxLumis_.

◆ moduleDescription()

ModuleDescription const& edm::InputSource::moduleDescription ( ) const
inline

◆ newLumi()

bool edm::InputSource::newLumi ( ) const
inlineprotected

◆ newRun()

bool edm::InputSource::newRun ( ) const
inlineprotected

◆ nextItemType()

InputSource::ItemType InputSource::nextItemType ( )

Advances the source to the next item.

Definition at line 151 of file InputSource.cc.

151  {
152  ItemType oldState = state_;
153  if (eventLimitReached()) {
154  // If the maximum event limit has been reached, stop.
155  state_ = IsStop;
156  } else if (lumiLimitReached()) {
157  // If the maximum lumi limit has been reached, stop
158  // when reaching a new file, run, or lumi.
159  if (oldState == IsInvalid || oldState == IsFile || oldState == IsRun || processingMode() != RunsLumisAndEvents) {
160  state_ = IsStop;
161  } else {
162  ItemType newState = nextItemType_();
163  if (newState == IsEvent) {
165  state_ = IsEvent;
166  } else {
167  state_ = IsStop;
168  }
169  }
170  } else {
171  ItemType newState = nextItemType_();
172  if (newState == IsStop) {
173  state_ = IsStop;
174  } else if (newState == IsSynchronize) {
176  } else if (newState == IsFile || oldState == IsInvalid) {
177  state_ = IsFile;
178  } else if (newState == IsRun || oldState == IsFile) {
180  state_ = IsRun;
181  } else if (newState == IsLumi || oldState == IsRun) {
182  assert(processingMode() != Runs);
184  state_ = IsLumi;
185  } else {
187  state_ = IsEvent;
188  }
189  }
190  if (state_ == IsStop) {
191  lumiAuxiliary_.reset();
192  runAuxiliary_.reset();
193  }
194  return state_;
195  }

References cms::cuda::assert(), eventLimitReached(), IsEvent, IsFile, IsInvalid, IsLumi, IsRun, IsStop, IsSynchronize, lumiAuxiliary_, lumiLimitReached(), nextItemType_(), processingMode(), readLuminosityBlockAuxiliary(), readRunAuxiliary(), runAuxiliary_, Runs, RunsLumisAndEvents, and state_.

◆ nextItemType_()

InputSource::ItemType InputSource::nextItemType_ ( )
private

Definition at line 136 of file InputSource.cc.

136  {
137  ItemType itemType = callWithTryCatchAndPrint<ItemType>([this]() { return getNextItemType(); },
138  "Calling InputSource::getNextItemType");
139 
140  if (itemType == IsEvent && processingMode() != RunsLumisAndEvents) {
141  skipEvents(1);
142  return nextItemType_();
143  }
144  if (itemType == IsLumi && processingMode() == Runs) {
145  // QQQ skipLuminosityBlock_();
146  return nextItemType_();
147  }
148  return itemType;
149  }

References getNextItemType(), IsEvent, IsLumi, processingMode(), Runs, RunsLumisAndEvents, and skipEvents().

Referenced by nextItemType().

◆ nextProcessBlock()

bool InputSource::nextProcessBlock ( ProcessBlockPrincipal processBlockPrincipal)

Next process block, return false if there is none, sets the processName in the principal.

Definition at line 273 of file InputSource.cc.

273  {
274  return nextProcessBlock_(processBlockPrincipal);
275  }

References nextProcessBlock_().

◆ nextProcessBlock_()

bool InputSource::nextProcessBlock_ ( ProcessBlockPrincipal )
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 285 of file InputSource.cc.

285 { return false; }

Referenced by nextProcessBlock().

◆ operator=()

InputSource& edm::InputSource::operator= ( InputSource const &  )
delete

◆ prevalidate()

void InputSource::prevalidate ( ConfigurationDescriptions )
static

Definition at line 111 of file InputSource.cc.

111 {}

◆ processBlockHelper() [1/2]

std::shared_ptr<ProcessBlockHelper>& edm::InputSource::processBlockHelper ( )
inline

Definition at line 153 of file InputSource.h.

References edm::get_underlying_safe(), and processBlockHelper_.

◆ processBlockHelper() [2/2]

std::shared_ptr<ProcessBlockHelper const> edm::InputSource::processBlockHelper ( ) const
inline

Accessors for processBlockHelper.

Definition at line 150 of file InputSource.h.

150  {
152  }

References edm::get_underlying_safe(), and processBlockHelper_.

Referenced by edm::RootPrimaryFileSequence::makeRootFile().

◆ processConfiguration()

ProcessConfiguration const& edm::InputSource::processConfiguration ( ) const
inline

◆ processGUID()

std::string const& edm::InputSource::processGUID ( ) const
inline

Accessor for global process identifier.

Definition at line 195 of file InputSource.h.

195 { return processGUID_; }

References processGUID_.

Referenced by FedRawDataInputSource::read(), edm::TestSource::readEvent_(), LH5Source::readEvent_(), and LHESource::readEvent_().

◆ processHistoryRegistry() [1/2]

ProcessHistoryRegistry& edm::InputSource::processHistoryRegistry ( )
inline

Definition at line 141 of file InputSource.h.

141 { return *processHistoryRegistry_; }

References processHistoryRegistry_.

◆ processHistoryRegistry() [2/2]

ProcessHistoryRegistry const& edm::InputSource::processHistoryRegistry ( ) const
inline

◆ processHistoryRegistryForUpdate()

ProcessHistoryRegistry& edm::InputSource::processHistoryRegistryForUpdate ( )
inlineprotected

◆ processingMode()

ProcessingMode edm::InputSource::processingMode ( ) const
inline

◆ productRegistry() [1/2]

std::shared_ptr<ProductRegistry>& edm::InputSource::productRegistry ( )
inline

Definition at line 137 of file InputSource.h.

References edm::get_underlying_safe(), and productRegistry_.

◆ productRegistry() [2/2]

std::shared_ptr<ProductRegistry const> edm::InputSource::productRegistry ( ) const
inline

◆ productRegistryUpdate()

ProductRegistry& edm::InputSource::productRegistryUpdate ( )
inlineprotected

◆ randomAccess()

bool InputSource::randomAccess ( ) const

Definition at line 424 of file InputSource.cc.

424  {
425  return callWithTryCatchAndPrint<bool>([this]() { return randomAccess_(); }, "Calling InputSource::randomAccess_");
426  }

References randomAccess_().

◆ randomAccess_()

bool InputSource::randomAccess_ ( ) const
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 442 of file InputSource.cc.

442 { return false; }

Referenced by randomAccess().

◆ readAndMergeLumi()

void InputSource::readAndMergeLumi ( LuminosityBlockPrincipal lbp)

Read next luminosity block (same as a prior lumi)

Definition at line 262 of file InputSource.cc.

262  {
263  LumiSourceSentry sentry(*this, lbp.index());
264  callWithTryCatchAndPrint<void>([this, &lbp]() { readLuminosityBlock_(lbp); },
265  "Calling InputSource::readLuminosityBlock_");
266  if (remainingLumis_ > 0) {
267  --remainingLumis_;
268  }
269  }

References edm::LuminosityBlockPrincipal::index(), readLuminosityBlock_(), and remainingLumis_.

◆ readAndMergeRun()

void InputSource::readAndMergeRun ( RunPrincipal rp)

Read next run (same as a prior run)

Definition at line 248 of file InputSource.cc.

248  {
249  RunSourceSentry sentry(*this, rp.index());
250  callWithTryCatchAndPrint<void>([this, &rp]() { readRun_(rp); }, "Calling InputSource::readRun_");
251  }

References edm::RunPrincipal::index(), and readRun_().

◆ readEvent() [1/2]

bool InputSource::readEvent ( EventPrincipal ep,
EventID const &  eventID,
StreamContext streamContext 
)

Read a specific event.

Definition at line 318 of file InputSource.cc.

318  {
319  bool result = false;
320 
321  if (not limitReached()) {
322  // the Pre/PostSourceEvent signals should be generated only if the event is actually found.
323  // this should be taken care of by an EventSourceSentry in the implementaion of readIt()
324 
325  //result = callWithTryCatchAndPrint<bool>( [this,&eventID,&ep](){ return readIt(eventID, ep); }, "Calling InputSource::readIt" );
326  result = readIt(eventID, ep, streamContext);
327 
328  if (result) {
329  if (remainingEvents_ > 0)
331  ++readCount_;
332  issueReports(ep.id(), ep.streamID());
333  }
334  }
335  return result;
336  }

References SiStripBadComponentsDQMServiceTemplate_cfg::ep, issueReports(), limitReached(), readCount_, readIt(), remainingEvents_, and mps_fire::result.

◆ readEvent() [2/2]

void InputSource::readEvent ( EventPrincipal ep,
StreamContext streamContext 
)

Read next event.

Definition at line 301 of file InputSource.cc.

301  {
302  assert(state_ == IsEvent);
304  {
305  // block scope, in order to issue the PostSourceEvent signal before calling postRead and issueReports
306  EventSourceSentry sentry(*this, streamContext);
307 
308  callWithTryCatchAndPrint<void>([this, &ep]() { readEvent_(ep); }, "Calling InputSource::readEvent_");
309  }
310 
311  if (remainingEvents_ > 0)
313  ++readCount_;
314  setTimestamp(ep.time());
315  issueReports(ep.id(), ep.streamID());
316  }

References cms::cuda::assert(), SiStripBadComponentsDQMServiceTemplate_cfg::ep, eventLimitReached(), IsEvent, issueReports(), readCount_, readEvent_(), remainingEvents_, setTimestamp(), and state_.

◆ readEvent_()

virtual void edm::InputSource::readEvent_ ( EventPrincipal eventPrincipal)
privatepure virtual

◆ readFile()

std::shared_ptr< FileBlock > InputSource::readFile ( )

Read next file.

Definition at line 222 of file InputSource.cc.

222  {
223  assert(state_ == IsFile);
224  assert(!limitReached());
225  return callWithTryCatchAndPrint<std::shared_ptr<FileBlock> >([this]() { return readFile_(); },
226  "Calling InputSource::readFile_");
227  }

References cms::cuda::assert(), IsFile, limitReached(), readFile_(), and state_.

◆ readFile_()

std::shared_ptr< FileBlock > InputSource::readFile_ ( )
privatevirtual

Reimplemented in DQMRootSource, edm::PoolSource, and edm::RawInputSource.

Definition at line 240 of file InputSource.cc.

240 { return std::make_shared<FileBlock>(); }

Referenced by readFile().

◆ readIt()

bool InputSource::readIt ( EventID const &  id,
EventPrincipal eventPrincipal,
StreamContext streamContext 
)
privatevirtual

Reimplemented in edm::RepeatingCachedRootSource, and edm::PoolSource.

Definition at line 372 of file InputSource.cc.

372  {
373  throw Exception(errors::LogicError) << "InputSource::readIt()\n"
374  << "Random access is not implemented for this type of Input Source\n"
375  << "Contact a Framework Developer\n";
376  }

References Exception, and edm::errors::LogicError.

Referenced by readEvent().

◆ readLuminosityBlock()

void InputSource::readLuminosityBlock ( LuminosityBlockPrincipal lumiPrincipal,
HistoryAppender historyAppender 
)

Read next luminosity block (new lumi)

Definition at line 253 of file InputSource.cc.

253  {
254  LumiSourceSentry sentry(*this, lumiPrincipal.index());
255  callWithTryCatchAndPrint<void>([this, &lumiPrincipal]() { readLuminosityBlock_(lumiPrincipal); },
256  "Calling InputSource::readLuminosityBlock_");
257  if (remainingLumis_ > 0) {
258  --remainingLumis_;
259  }
260  }

References edm::LuminosityBlockPrincipal::index(), readLuminosityBlock_(), and remainingLumis_.

◆ readLuminosityBlock_()

void InputSource::readLuminosityBlock_ ( LuminosityBlockPrincipal lumiPrincipal)
privatevirtual

◆ readLuminosityBlockAuxiliary()

std::shared_ptr< LuminosityBlockAuxiliary > InputSource::readLuminosityBlockAuxiliary ( )

Read next luminosity block Auxilary.

Definition at line 197 of file InputSource.cc.

197  {
198  return callWithTryCatchAndPrint<std::shared_ptr<LuminosityBlockAuxiliary> >(
199  [this]() { return readLuminosityBlockAuxiliary_(); }, "Calling InputSource::readLuminosityBlockAuxiliary_");
200  }

References readLuminosityBlockAuxiliary_().

Referenced by nextItemType().

◆ readLuminosityBlockAuxiliary_()

virtual std::shared_ptr<LuminosityBlockAuxiliary> edm::InputSource::readLuminosityBlockAuxiliary_ ( )
privatepure virtual

◆ readProcessBlock()

void InputSource::readProcessBlock ( ProcessBlockPrincipal processBlockPrincipal)

Read next process block.

Definition at line 277 of file InputSource.cc.

277  {
278  ProcessBlockSourceSentry sentry(*this, processBlockPrincipal.processName());
279  callWithTryCatchAndPrint<void>([this, &processBlockPrincipal]() { readProcessBlock_(processBlockPrincipal); },
280  "Calling InputSource::readProcessBlock_");
281  }

References edm::ProcessBlockPrincipal::processName(), and readProcessBlock_().

◆ readProcessBlock_()

void InputSource::readProcessBlock_ ( ProcessBlockPrincipal )
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 287 of file InputSource.cc.

287 {}

Referenced by readProcessBlock().

◆ readRun()

void InputSource::readRun ( RunPrincipal runPrincipal,
HistoryAppender historyAppender 
)

Read next run (new run)

Definition at line 242 of file InputSource.cc.

242  {
243  RunSourceSentry sentry(*this, runPrincipal.index());
244  callWithTryCatchAndPrint<void>([this, &runPrincipal]() { readRun_(runPrincipal); },
245  "Calling InputSource::readRun_");
246  }

References edm::RunPrincipal::index(), and readRun_().

◆ readRun_()

void InputSource::readRun_ ( RunPrincipal runPrincipal)
privatevirtual

Reimplemented in edm::RepeatingCachedRootSource, edm::PoolSource, LH5Source, LHESource, DQMRootSource, and dqmservices::DQMProtobufReader.

Definition at line 289 of file InputSource.cc.

289  {
290  // Note: For the moment, we do not support saving and restoring the state of the
291  // random number generator if random numbers are generated during processing of runs
292  // (e.g. beginRun(), endRun())
293  runPrincipal.fillRunPrincipal(processHistoryRegistry());
294  }

References edm::RunPrincipal::fillRunPrincipal(), and processHistoryRegistry().

Referenced by readAndMergeRun(), and readRun().

◆ readRunAuxiliary()

std::shared_ptr< RunAuxiliary > InputSource::readRunAuxiliary ( )

Read next run Auxiliary.

Definition at line 202 of file InputSource.cc.

202  {
203  return callWithTryCatchAndPrint<std::shared_ptr<RunAuxiliary> >([this]() { return readRunAuxiliary_(); },
204  "Calling InputSource::readRunAuxiliary_");
205  }

References readRunAuxiliary_().

Referenced by nextItemType().

◆ readRunAuxiliary_()

virtual std::shared_ptr<RunAuxiliary> edm::InputSource::readRunAuxiliary_ ( )
privatepure virtual

◆ reducedProcessHistoryID()

ProcessHistoryID const & InputSource::reducedProcessHistoryID ( ) const

Accessor for the reduced process history ID of the current run. This is the ID of the input process history which does not include the current process.

Definition at line 452 of file InputSource.cc.

452  {
453  assert(runAuxiliary());
454  return processHistoryRegistry_->reducedProcessHistoryID(runAuxiliary()->processHistoryID());
455  }

References cms::cuda::assert(), processHistoryRegistry_, and runAuxiliary().

◆ registerProducts()

void InputSource::registerProducts ( )
virtual

Register any produced products.

Reimplemented in edm::PuttableSourceBase.

Definition at line 219 of file InputSource.cc.

219 {}

◆ remainingEvents()

int edm::InputSource::remainingEvents ( ) const
inline

Accessor for remaining number of events to be read. -1 is used for unlimited.

Definition at line 178 of file InputSource.h.

178 { return remainingEvents_; }

References remainingEvents_.

Referenced by edm::RepeatingCachedRootSource::makeRootFile(), and edm::RootPrimaryFileSequence::remainingEvents().

◆ remainingLuminosityBlocks()

int edm::InputSource::remainingLuminosityBlocks ( ) const
inline

Accessor for remaining number of lumis to be read. -1 is used for unlimited.

Definition at line 186 of file InputSource.h.

186 { return remainingLumis_; }

References remainingLumis_.

Referenced by edm::RepeatingCachedRootSource::makeRootFile(), and edm::RootPrimaryFileSequence::remainingLuminosityBlocks().

◆ repeat()

void edm::InputSource::repeat ( )
inline

Reset the remaining number of events/lumis to the maximum number.

Definition at line 164 of file InputSource.h.

164  {
167  }

References maxEvents_, maxLumis_, remainingEvents_, and remainingLumis_.

◆ reset()

void edm::InputSource::reset ( void  ) const
inlineprotected

◆ resetEventCached()

void edm::InputSource::resetEventCached ( )
inlineprotected

◆ resetLuminosityBlockAuxiliary()

void edm::InputSource::resetLuminosityBlockAuxiliary ( bool  isNewLumi = true) const
inlineprotected

◆ resetNewLumi()

void edm::InputSource::resetNewLumi ( )
inlineprotected

◆ resetNewRun()

void edm::InputSource::resetNewRun ( )
inlineprotected

Definition at line 356 of file InputSource.h.

356 { newRun_ = false; }

References newRun_.

Referenced by edm::RawInputSource::readRunAuxiliary_(), LHESource::readRunAuxiliary_(), and LH5Source::readRunAuxiliary_().

◆ resetRunAuxiliary()

void edm::InputSource::resetRunAuxiliary ( bool  isNewRun = true) const
inlineprotected

◆ resourceSharedWithDelayedReader()

std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > InputSource::resourceSharedWithDelayedReader ( )

Returns nullptr if no resource shared between the Source and a DelayedReader.

Definition at line 211 of file InputSource.cc.

211  {
213  }

References resourceSharedWithDelayedReader_().

◆ resourceSharedWithDelayedReader_()

std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > InputSource::resourceSharedWithDelayedReader_ ( )
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 215 of file InputSource.cc.

215  {
216  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
217  }

Referenced by resourceSharedWithDelayedReader().

◆ reverseState()

ProcessingController::ReverseState InputSource::reverseState ( ) const

Definition at line 433 of file InputSource.cc.

433  {
434  return callWithTryCatchAndPrint<ProcessingController::ReverseState>([this]() { return reverseState_(); },
435  "Calling InputSource::reverseState__");
436  }

References reverseState_().

◆ reverseState_()

ProcessingController::ReverseState InputSource::reverseState_ ( ) const
privatevirtual

Reimplemented in edm::PoolSource.

Definition at line 448 of file InputSource.cc.

448  {
450  }

References edm::ProcessingController::kUnknownReverse.

Referenced by reverseState().

◆ rewind()

void InputSource::rewind ( )

Begin again at the first event.

Definition at line 347 of file InputSource.cc.

347  {
348  state_ = IsInvalid;
350  setNewRun();
351  setNewLumi();
353  callWithTryCatchAndPrint<void>([this]() { rewind_(); }, "Calling InputSource::rewind_");
354  }

References IsInvalid, maxEvents_, remainingEvents_, resetEventCached(), rewind_(), setNewLumi(), setNewRun(), and state_.

◆ rewind_()

void InputSource::rewind_ ( )
privatevirtual

Reimplemented in edm::PoolSource, edm::IDGeneratorSourceBase< InputSource >, edm::IDGeneratorSourceBase< PuttableSourceBase >, FedRawDataInputSource, and edm::RawInputSource.

Definition at line 403 of file InputSource.cc.

403  {
404  throw Exception(errors::LogicError) << "InputSource::rewind()\n"
405  << "Random access are not implemented for this type of Input Source\n"
406  << "Contact a Framework Developer\n";
407  }

References Exception, and edm::errors::LogicError.

Referenced by rewind().

◆ run()

RunNumber_t InputSource::run ( ) const

◆ runAuxiliary()

std::shared_ptr<RunAuxiliary> edm::InputSource::runAuxiliary ( ) const
inline

◆ setEventCached()

void edm::InputSource::setEventCached ( )
inlineprotected

Called by the framework to merge or ached() const {return eventCached_;}.

Definition at line 362 of file InputSource.h.

362 { eventCached_ = true; }

References eventCached_.

Referenced by FedRawDataInputSource::checkNext(), and edm::StreamerInputSource::deserializeEvent().

◆ setLumi()

void InputSource::setLumi ( LuminosityBlockNumber_t  lb)
privatevirtual

Definition at line 384 of file InputSource.cc.

384  {
385  throw Exception(errors::LogicError) << "InputSource::setLumi()\n"
386  << "Luminosity Block ID cannot be modified for this type of Input Source\n"
387  << "Contact a Framework Developer\n";
388  }

References Exception, and edm::errors::LogicError.

Referenced by setLuminosityBlockNumber_t().

◆ setLuminosityBlockAuxiliary()

void edm::InputSource::setLuminosityBlockAuxiliary ( LuminosityBlockAuxiliary lbp)
inlineprotected

Definition at line 337 of file InputSource.h.

337  {
338  lumiAuxiliary_.reset(lbp);
339  newLumi_ = true;
340  }

References lumiAuxiliary_, and newLumi_.

Referenced by edm::StreamerInputSource::deserializeEvent(), and FedRawDataInputSource::maybeOpenNewLumiSection().

◆ setLuminosityBlockNumber_t()

void edm::InputSource::setLuminosityBlockNumber_t ( LuminosityBlockNumber_t  lb)
inline

Set the luminosity block ID.

Definition at line 127 of file InputSource.h.

127 { setLumi(lb); }

References setLumi().

◆ setNewLumi()

void edm::InputSource::setNewLumi ( )
inlineprotected

Definition at line 358 of file InputSource.h.

358 { newLumi_ = true; }

References newLumi_.

Referenced by edm::RawInputSource::getNextItemType(), and rewind().

◆ setNewRun()

void edm::InputSource::setNewRun ( )
inlineprotected

Definition at line 355 of file InputSource.h.

355 { newRun_ = true; }

References newRun_.

Referenced by FedRawDataInputSource::FedRawDataInputSource(), edm::RawInputSource::getNextItemType(), and rewind().

◆ setRun()

void InputSource::setRun ( RunNumber_t  r)
privatevirtual

Reimplemented in edm::StreamerInputSource.

Definition at line 378 of file InputSource.cc.

378  {
379  throw Exception(errors::LogicError) << "InputSource::setRun()\n"
380  << "Run number cannot be modified for this type of Input Source\n"
381  << "Contact a Framework Developer\n";
382  }

References Exception, and edm::errors::LogicError.

Referenced by setRunNumber().

◆ setRunAuxiliary()

void edm::InputSource::setRunAuxiliary ( RunAuxiliary rp)
inlineprotected

Definition at line 333 of file InputSource.h.

333  {
334  runAuxiliary_.reset(rp);
335  newRun_ = newLumi_ = true;
336  }

References newLumi_, newRun_, and runAuxiliary_.

Referenced by edm::StreamerInputSource::deserializeEvent(), and FedRawDataInputSource::FedRawDataInputSource().

◆ setRunNumber()

void edm::InputSource::setRunNumber ( RunNumber_t  r)
inline

Set the run number.

Definition at line 124 of file InputSource.h.

124 { setRun(r); }

References alignCSCRings::r, and setRun().

◆ setTimestamp()

void edm::InputSource::setTimestamp ( Timestamp const &  theTime)
inlineprotected

To set the current time, as seen by the input source.

Definition at line 328 of file InputSource.h.

328 { time_ = theTime; }

References time_.

Referenced by edm::RawInputSource::RawInputSource(), and readEvent().

◆ skip()

void InputSource::skip ( int  offset)
protectedvirtual

Reimplemented in dqmservices::DQMStreamerReader, edm::StreamerFileReader, edm::RepeatingCachedRootSource, edm::PoolSource, edm::IDGeneratorSourceBase< InputSource >, and edm::IDGeneratorSourceBase< PuttableSourceBase >.

Definition at line 390 of file InputSource.cc.

390  {
391  throw Exception(errors::LogicError) << "InputSource::skip()\n"
392  << "Random access are not implemented for this type of Input Source\n"
393  << "Contact a Framework Developer\n";
394  }

References Exception, and edm::errors::LogicError.

Referenced by skipEvents().

◆ skipEvents()

void InputSource::skipEvents ( int  offset)

Skip the number of events specified. Offset may be negative.

Definition at line 338 of file InputSource.cc.

338  {
339  callWithTryCatchAndPrint<void>([this, &offset]() { skip(offset); }, "Calling InputSource::skip");
340  }

References hltrates_dqm_sourceclient-live_cfg::offset, and skip().

Referenced by nextItemType_().

◆ state()

ItemType edm::InputSource::state ( ) const
inlineprotected

◆ thinnedAssociationsHelper() [1/2]

std::shared_ptr<ThinnedAssociationsHelper>& edm::InputSource::thinnedAssociationsHelper ( )
inline

Definition at line 159 of file InputSource.h.

159  {
161  }

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

◆ thinnedAssociationsHelper() [2/2]

std::shared_ptr<ThinnedAssociationsHelper const> edm::InputSource::thinnedAssociationsHelper ( ) const
inline

◆ timestamp()

Timestamp const& edm::InputSource::timestamp ( ) const
inline

Accessor for the current time, as seen by the input source.

Definition at line 210 of file InputSource.h.

210 { return time_; }

References time_.

Member Data Documentation

◆ actReg_

std::shared_ptr<ActivityRegistry> edm::InputSource::actReg_
private

Definition at line 414 of file InputSource.h.

Referenced by actReg().

◆ branchIDListHelper_

edm::propagate_const<std::shared_ptr<BranchIDListHelper> > edm::InputSource::branchIDListHelper_
private

Definition at line 426 of file InputSource.h.

Referenced by branchIDListHelper().

◆ eventCached_

bool edm::InputSource::eventCached_
private

Definition at line 433 of file InputSource.h.

Referenced by eventCached(), resetEventCached(), and setEventCached().

◆ lumiAuxiliary_

std::shared_ptr<LuminosityBlockAuxiliary> edm::InputSource::lumiAuxiliary_
mutableprivate

◆ maxEvents_

int edm::InputSource::maxEvents_
private

Definition at line 415 of file InputSource.h.

Referenced by maxEvents(), repeat(), and rewind().

◆ maxLumis_

int edm::InputSource::maxLumis_
private

Definition at line 417 of file InputSource.h.

Referenced by maxLuminosityBlocks(), and repeat().

◆ maxSecondsUntilRampdown_

int edm::InputSource::maxSecondsUntilRampdown_
private

Definition at line 420 of file InputSource.h.

Referenced by InputSource(), and lumiLimitReached().

◆ moduleDescription_

const ModuleDescription edm::InputSource::moduleDescription_
private

Definition at line 423 of file InputSource.h.

Referenced by moduleDescription().

◆ newLumi_

bool edm::InputSource::newLumi_
mutableprivate

◆ newRun_

bool edm::InputSource::newRun_
mutableprivate

Definition at line 431 of file InputSource.h.

Referenced by newRun(), resetNewRun(), resetRunAuxiliary(), setNewRun(), and setRunAuxiliary().

◆ numberOfEventsBeforeBigSkip_

unsigned int edm::InputSource::numberOfEventsBeforeBigSkip_
private

Definition at line 439 of file InputSource.h.

◆ postEventReadFromSourceSignal_

signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> edm::InputSource::postEventReadFromSourceSignal_

Definition at line 322 of file InputSource.h.

◆ preEventReadFromSourceSignal_

signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> edm::InputSource::preEventReadFromSourceSignal_

Definition at line 321 of file InputSource.h.

◆ processBlockHelper_

edm::propagate_const<std::shared_ptr<ProcessBlockHelper> > edm::InputSource::processBlockHelper_
private

Definition at line 427 of file InputSource.h.

Referenced by processBlockHelper().

◆ processGUID_

std::string edm::InputSource::processGUID_
private

Definition at line 429 of file InputSource.h.

Referenced by processGUID().

◆ processHistoryRegistry_

edm::propagate_const<std::unique_ptr<ProcessHistoryRegistry> > edm::InputSource::processHistoryRegistry_
private

◆ processingMode_

ProcessingMode edm::InputSource::processingMode_
private

Definition at line 422 of file InputSource.h.

Referenced by InputSource(), and processingMode().

◆ processingStart_

std::chrono::time_point<std::chrono::steady_clock> edm::InputSource::processingStart_
private

Definition at line 421 of file InputSource.h.

Referenced by InputSource(), and lumiLimitReached().

◆ productRegistry_

edm::propagate_const<std::shared_ptr<ProductRegistry> > edm::InputSource::productRegistry_
private

Definition at line 424 of file InputSource.h.

Referenced by productRegistry(), and productRegistryUpdate().

◆ readCount_

int edm::InputSource::readCount_
private

Definition at line 419 of file InputSource.h.

Referenced by issueReports(), and readEvent().

◆ remainingEvents_

int edm::InputSource::remainingEvents_
private

◆ remainingLumis_

int edm::InputSource::remainingLumis_
private

◆ runAuxiliary_

std::shared_ptr<RunAuxiliary> edm::InputSource::runAuxiliary_
mutableprivate

Definition at line 435 of file InputSource.h.

Referenced by nextItemType(), resetRunAuxiliary(), runAuxiliary(), and setRunAuxiliary().

◆ state_

ItemType edm::InputSource::state_
mutableprivate

Definition at line 434 of file InputSource.h.

Referenced by nextItemType(), readEvent(), readFile(), reset(), rewind(), and state().

◆ statusFileName_

std::string edm::InputSource::statusFileName_
private

Definition at line 437 of file InputSource.h.

Referenced by InputSource(), and issueReports().

◆ thinnedAssociationsHelper_

edm::propagate_const<std::shared_ptr<ThinnedAssociationsHelper> > edm::InputSource::thinnedAssociationsHelper_
private

Definition at line 428 of file InputSource.h.

Referenced by thinnedAssociationsHelper().

◆ time_

Timestamp edm::InputSource::time_
private

Definition at line 430 of file InputSource.h.

Referenced by setTimestamp(), and timestamp().

edm::InputSource::maxLumis_
int maxLumis_
Definition: InputSource.h:417
edm::InputSource::readFile_
virtual std::shared_ptr< FileBlock > readFile_()
Definition: InputSource.cc:240
edm::InputSource::getNextItemType
virtual ItemType getNextItemType()=0
edm::InputSource::forwardState_
virtual ProcessingController::ForwardState forwardState_() const
Definition: InputSource.cc:444
edm::InputSource::readRunAuxiliary
std::shared_ptr< RunAuxiliary > readRunAuxiliary()
Read next run Auxiliary.
Definition: InputSource.cc:202
edm::InputSource::fillProcessBlockHelper_
virtual void fillProcessBlockHelper_()
Definition: InputSource.cc:283
edm::InputSource::readIt
virtual bool readIt(EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext)
Definition: InputSource.cc:372
edm::InputSource::setNewLumi
void setNewLumi()
Definition: InputSource.h:358
edm::InputSource::maxEvents_
int maxEvents_
Definition: InputSource.h:415
edm::LogFwkVerbatim
Log< level::FwkInfo, true > LogFwkVerbatim
Definition: MessageLogger.h:129
edm::ProcessingController::kUnknownReverse
Definition: ProcessingController.h:42
edm::InputSource::resetEventCached
void resetEventCached()
Definition: InputSource.h:363
edm::InputSource::productRegistry_
edm::propagate_const< std::shared_ptr< ProductRegistry > > productRegistry_
Definition: InputSource.h:424
edm::InputSource::goToEvent_
virtual bool goToEvent_(EventID const &eventID)
Definition: InputSource.cc:396
edm::InputSource::newRun_
bool newRun_
Definition: InputSource.h:431
edm::InputSource::readProcessBlock_
virtual void readProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:287
edm::errors::LogicError
Definition: EDMException.h:37
edm::InputSource::readRun_
virtual void readRun_(RunPrincipal &runPrincipal)
Definition: InputSource.cc:289
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
edm::InputSource::endJob
virtual void endJob()
Definition: InputSource.cc:440
edm::InputSource::skip
virtual void skip(int offset)
Definition: InputSource.cc:390
edm::InputSource::readLuminosityBlockAuxiliary_
virtual std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()=0
edm::InputSource::beginJob
virtual void beginJob()
Begin protected makes it easier to do template programming.
Definition: InputSource.cc:438
cms::cuda::assert
assert(be >=bs)
edm::InputSource::lumiAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > lumiAuxiliary_
Definition: InputSource.h:436
edm::get_underlying_safe
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:41
edm::InputSource::setRun
virtual void setRun(RunNumber_t r)
Definition: InputSource.cc:378
edm::InputSource::branchIDListHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: InputSource.h:426
edm::InputSource::nextItemType_
ItemType nextItemType_()
Definition: InputSource.cc:136
createPayload.suffix
suffix
Definition: createPayload.py:281
edm::InputSource::IsRun
Definition: InputSource.h:54
edm::InputSource::state_
ItemType state_
Definition: InputSource.h:434
edm::InputSource::randomAccess_
virtual bool randomAccess_() const
Definition: InputSource.cc:442
edm::InputSource::processHistoryRegistry_
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
Definition: InputSource.h:425
edm::ModuleDescription::processConfiguration
ProcessConfiguration const & processConfiguration() const
Definition: ModuleDescription.cc:45
edm::InputSource::issueReports
void issueReports(EventID const &eventID, StreamID streamID)
issue an event report
Definition: InputSource.cc:356
edm::InputSource::readCount_
int readCount_
Definition: InputSource.h:419
edm::InputSource::limitReached
bool limitReached() const
Definition: InputSource.h:388
edm::InputSource::readRunAuxiliary_
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_()=0
edm::InputSource::moduleDescription
ModuleDescription const & moduleDescription() const
Accessor for 'module' description.
Definition: InputSource.h:189
edm::InputSource::readLuminosityBlock_
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: InputSource.cc:296
edm::InputSource::IsSynchronize
Definition: InputSource.h:54
mps_fire.end
end
Definition: mps_fire.py:242
edm::InputSource::luminosityBlockAuxiliary
std::shared_ptr< LuminosityBlockAuxiliary > luminosityBlockAuxiliary() const
Called by the framework to merge or insert lumi in principal cache.
Definition: InputSource.h:233
edm::InputSource::lumiLimitReached
bool lumiLimitReached() const
Definition: InputSource.h:374
edm::InputSource::setTimestamp
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
Definition: InputSource.h:328
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
edm::InputSource::IsRepeat
Definition: InputSource.h:54
edm::InputSource::processingStart_
std::chrono::time_point< std::chrono::steady_clock > processingStart_
Definition: InputSource.h:421
edm::InputSource::RunsAndLumis
Definition: InputSource.h:56
edm::InputSource::nextProcessBlock_
virtual bool nextProcessBlock_(ProcessBlockPrincipal &)
Definition: InputSource.cc:285
edm::InputSource::processingMode
ProcessingMode processingMode() const
RunsLumisAndEvents (default), RunsAndLumis, or Runs.
Definition: InputSource.h:224
edm::InputSource::IsFile
Definition: InputSource.h:54
edm::InputSource::runAuxiliary
std::shared_ptr< RunAuxiliary > runAuxiliary() const
Called by the framework to merge or insert run in principal cache.
Definition: InputSource.h:230
edm::InputSource::processHistoryRegistry
ProcessHistoryRegistry const & processHistoryRegistry() const
Accessors for process history registry.
Definition: InputSource.h:140
edm::kBaseType
static const std::string kBaseType("EDAnalyzer")
edm::InputSource::IsLumi
Definition: InputSource.h:54
edm::InputSource::remainingEvents_
int remainingEvents_
Definition: InputSource.h:416
edm::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
edm::InputSource::statusFileName_
std::string statusFileName_
Definition: InputSource.h:437
edm::InputSource::eventLimitReached
bool eventLimitReached() const
Definition: InputSource.h:373
edm::InputSource::moduleDescription_
const ModuleDescription moduleDescription_
Definition: InputSource.h:423
TopDecaySubset_cfi.runMode
runMode
define run mode.
Definition: TopDecaySubset_cfi.py:19
edm::InputSource::reverseState_
virtual ProcessingController::ReverseState reverseState_() const
Definition: InputSource.cc:448
edm::InputSource::rewind_
virtual void rewind_()
Definition: InputSource.cc:403
edm::InputSource::IsStop
Definition: InputSource.h:54
edm::InputSource::processingMode_
ProcessingMode processingMode_
Definition: InputSource.h:422
edm::InputSource::runAuxiliary_
std::shared_ptr< RunAuxiliary > runAuxiliary_
Definition: InputSource.h:435
edm::InputSource::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: InputSource.h:428
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::InputSource::eventCached_
bool eventCached_
Definition: InputSource.h:433
edm::InputSource::actReg_
std::shared_ptr< ActivityRegistry > actReg_
Definition: InputSource.h:414
alignCSCRings.r
r
Definition: alignCSCRings.py:93
edm::InputSource::Runs
Definition: InputSource.h:56
edm::InputSource::readLuminosityBlockAuxiliary
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary()
Read next luminosity block Auxilary.
Definition: InputSource.cc:197
edm::InputSource::setLumi
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: InputSource.cc:384
edm::InputSource::ItemType
ItemType
Definition: InputSource.h:54
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::isFwkInfoEnabled
bool isFwkInfoEnabled()
Definition: MessageLogger.cc:20
edm::InputSource::newLumi_
bool newLumi_
Definition: InputSource.h:432
edm::InputSource::setNewRun
void setNewRun()
Definition: InputSource.h:355
edm::InputSource::readEvent_
virtual void readEvent_(EventPrincipal &eventPrincipal)=0
Exception
Definition: hltDiff.cc:245
edm::ProcessHistoryRegistry::getMapped
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
Definition: ProcessHistoryRegistry.cc:29
ParameterSetDescription
edm::ProcessingController::kUnknownForward
Definition: ProcessingController.h:35
edm::InputSource::closeFile_
virtual void closeFile_()
Definition: InputSource.h:401
edm::InputSource::maxSecondsUntilRampdown_
int maxSecondsUntilRampdown_
Definition: InputSource.h:420
edm::InputSource::resourceSharedWithDelayedReader_
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader_()
Definition: InputSource.cc:215
edm::InputSource::time_
Timestamp time_
Definition: InputSource.h:430
edm::InputSource::resetLuminosityBlockAuxiliary
void resetLuminosityBlockAuxiliary(bool isNewLumi=true) const
Definition: InputSource.h:345
edm::InputSource::remainingLumis_
int remainingLumis_
Definition: InputSource.h:418
edm::InputSource::numberOfEventsBeforeBigSkip_
unsigned int numberOfEventsBeforeBigSkip_
Definition: InputSource.h:439
edm::InputSource::resetRunAuxiliary
void resetRunAuxiliary(bool isNewRun=true) const
Definition: InputSource.h:341
edm::InputSource::skipEvents
void skipEvents(int offset)
Definition: InputSource.cc:338
mps_fire.result
result
Definition: mps_fire.py:311
edm::InputSource::IsEvent
Definition: InputSource.h:54
edm::InputSource::processGUID_
std::string processGUID_
Definition: InputSource.h:429
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::InputSource::IsInvalid
Definition: InputSource.h:54
edm::errors::Configuration
Definition: EDMException.h:36
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::InputSource::RunsLumisAndEvents
Definition: InputSource.h:56
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::InputSource::processBlockHelper_
edm::propagate_const< std::shared_ptr< ProcessBlockHelper > > processBlockHelper_
Definition: InputSource.h:427