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.existsAs<unsigned int>(
"firstEvent",
false) ? pset.getUntrackedParameter<unsigned int>(
"firstEvent", 1) - 1 :
31 pset.getUntrackedParameter<unsigned long long>(
"firstEvent", 1) - 1),
32 eventID_(pset.getUntrackedParameter<unsigned int>(
"firstRun", 1), pset.getUntrackedParameter<unsigned int>(
"firstLuminosityBlock", 1), zerothEvent_),
33 origEventID_(eventID_),
34 isRealData_(realData),
45 std::shared_ptr<RunAuxiliary>
52 std::shared_ptr<LuminosityBlockAuxiliary>
67 e.
commit_(std::vector<ProductResolverIndex>());
74 for(; offset < 0; ++
offset) {
77 for(; offset > 0; --
offset) {
197 if (numberEventsInRun_ < 1 || numberEventsInThisRun_ > 0) {
201 if (!(numberEventsInLumi_ < 1 || numberEventsInThisLumi_ > 0)) {
231 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInRun")->setComment(
"Number of events to generate in each run.");
232 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInLuminosityBlock")->setComment(
"Number of events to generate in each lumi.");
233 desc.
addUntracked<
unsigned long long>(
"firstTime", 1)->setComment(
"Time before first event (ns) (for timestamp).");
235 desc.
addUntracked<
unsigned int>(
"eventCreationDelay", 0)->setComment(
"Real time delay between generation of consecutive events (ms).");
239 ->
setComment(
"'firstEvent' is an XOR group because it can have type uint32 or uint64, default:1\n"
240 "Event number of first event to generate.");
242 desc.
addUntracked<
unsigned int>(
"firstLuminosityBlock", 1)->setComment(
"Luminosity block number of first lumi to generate.");
243 desc.
addUntracked<
unsigned int>(
"firstRun", 1)->setComment(
"Run number of first run to generate.");
void setComment(std::string const &value)
virtual std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_() override
static unsigned long long const kNanoSecPerSec
unsigned int numberEventsInLumi_
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_() override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static Timestamp invalidTimestamp()
virtual ItemType getNextItemType() overridefinal
virtual void readEvent_(EventPrincipal &eventPrincipal) override
virtual void beginLuminosityBlock(LuminosityBlock &) override
unsigned int eventCreationDelay_
virtual ~ProducerSourceBase() noexcept(false)
unsigned int numberEventsInThisLumi_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut, std::vector< BranchID > *previousParentage=0, ParentageID *previousParentageId=0)
LuminosityBlockNumber_t luminosityBlock() const
EventID previous(LuminosityBlockNumber_t const &lumi) const
EventID next(LuminosityBlockNumber_t const &lumi) const
virtual size_t fileIndex() const
virtual bool setRunAndEventInfo(EventID &id, TimeValue_t &time, EventAuxiliary::ExperimentType &etype)=0
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 long long TimeValue_t
virtual void endLuminosityBlock(LuminosityBlock &) override
static unsigned long long const kAveEventPerSec
virtual void rewind_() override
TimeValue_t timeBetweenEvents_
EventAuxiliary::ExperimentType eType_
unsigned int numberEventsInThisRun_
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
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)
volatile std::atomic< bool > shutdown_flag false
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)