22 numberEventsInRun_(pset.getUntrackedParameter<unsigned int>(
"numberEventsInRun", remainingEvents())),
23 numberEventsInLumi_(pset.getUntrackedParameter<unsigned int>(
"numberEventsInLuminosityBlock", remainingEvents())),
24 presentTime_(pset.getUntrackedParameter<unsigned long long>(
"firstTime", 1ULL)),
25 origTime_(presentTime_),
27 eventCreationDelay_(pset.getUntrackedParameter<unsigned int>(
"eventCreationDelay", 0)),
28 numberEventsInThisRun_(0),
29 numberEventsInThisLumi_(0),
30 zerothEvent_(pset.getUntrackedParameter<unsigned int>(
"firstEvent", 1) - 1),
31 eventID_(pset.getUntrackedParameter<unsigned int>(
"firstRun", 1), pset.getUntrackedParameter<unsigned int>(
"firstLuminosityBlock", 1), zerothEvent_),
32 origEventID_(eventID_),
33 isRealData_(realData),
44 boost::shared_ptr<RunAuxiliary>
51 boost::shared_ptr<LuminosityBlockAuxiliary>
73 for(; offset < 0; ++
offset) {
76 for(; offset > 0; --
offset) {
196 if (numberEventsInRun_ < 1 || numberEventsInThisRun_ > 0) {
200 if (!(numberEventsInLumi_ < 1 || numberEventsInThisLumi_ > 0)) {
229 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInRun")->setComment(
"Number of events to generate in each run.");
230 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInLuminosityBlock")->setComment(
"Number of events to generate in each lumi.");
231 desc.
addUntracked<
unsigned long long>(
"firstTime", 1)->setComment(
"Time before first event (ns) (for timestamp).");
233 desc.
addUntracked<
unsigned int>(
"eventCreationDelay", 0)->setComment(
"Real time delay between generation of consecutive events (ms).");
234 desc.
addUntracked<
unsigned int>(
"firstEvent", 1)->setComment(
"Event number of first event to generate.");
235 desc.
addUntracked<
unsigned int>(
"firstLuminosityBlock", 1)->setComment(
"Luminosity block number of first lumi to generate.");
236 desc.
addUntracked<
unsigned int>(
"firstRun", 1)->setComment(
"Run number of first run to generate.");
static unsigned long long const kNanoSecPerSec
unsigned int numberEventsInLumi_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static Timestamp invalidTimestamp()
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_() override
virtual void readEvent_(EventPrincipal &eventPrincipal) override
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_() override
virtual void beginLuminosityBlock(LuminosityBlock &) override
unsigned int eventCreationDelay_
unsigned int numberEventsInThisLumi_
LuminosityBlockNumber_t luminosityBlock() const
EventID previous(LuminosityBlockNumber_t const &lumi) const
EventID next(LuminosityBlockNumber_t const &lumi) const
virtual size_t fileIndex() const
virtual void endRun(Run &) override
ProducerSourceBase(ParameterSet const &pset, InputSourceDescription const &desc, bool realData)
virtual void beginJob() override
virtual void beginRun(Run &) override
static void fillDescription(ParameterSetDescription &desc)
unsigned int offset(bool)
unsigned long long TimeValue_t
virtual void endLuminosityBlock(LuminosityBlock &) override
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
static unsigned long long const kAveEventPerSec
virtual void rewind_() override
TimeValue_t timeBetweenEvents_
EventAuxiliary::ExperimentType eType_
virtual bool setRunAndEventInfo(EventID &id, TimeValue_t &time)=0
void commit_(std::vector< BranchID > *previousParentage=0, ParentageID *previousParentageId=0)
unsigned int numberEventsInThisRun_
virtual bool noFiles() const
virtual void produce(Event &e)=0
EventID nextRunFirstEvent(LuminosityBlockNumber_t const &lumi) const
void advanceToNext(EventID &eventID, TimeValue_t &time)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
virtual ~ProducerSourceBase()
virtual ItemType getNextItemType() override
virtual void skip(int offset) override
EventID previousRunLastEvent(LuminosityBlockNumber_t const &lumi) const
unsigned int numberEventsInRun_
void retreatToPrevious(EventID &eventID, TimeValue_t &time)
virtual void initialize(EventID &id, TimeValue_t &time, TimeValue_t &interval)