27 numberEventsInRun_(pset.getUntrackedParameter<unsigned
int>(
"numberEventsInRun", remainingEvents())),
28 numberEventsInLumi_(pset.getUntrackedParameter<unsigned
int>(
"numberEventsInLuminosityBlock", remainingEvents())),
29 presentTime_(pset.getUntrackedParameter<unsigned long long>(
"firstTime", 1ULL)),
30 origTime_(presentTime_),
31 timeBetweenEvents_(pset.getUntrackedParameter<unsigned long long>(
"timeBetweenEvents", kNanoSecPerSec/kAveEventPerSec)),
32 eventCreationDelay_(pset.getUntrackedParameter<unsigned
int>(
"eventCreationDelay", 0)),
33 numberEventsInThisRun_(0),
34 numberEventsInThisLumi_(0),
35 zerothEvent_(pset.existsAs<unsigned
int>(
"firstEvent",
false) ? pset.getUntrackedParameter<unsigned
int>(
"firstEvent", 1) - 1 :
36 pset.getUntrackedParameter<unsigned long long>(
"firstEvent", 1) - 1),
37 eventID_(pset.getUntrackedParameter<unsigned
int>(
"firstRun", 1), pset.getUntrackedParameter<unsigned
int>(
"firstLuminosityBlock", 1), zerothEvent_),
38 origEventID_(eventID_),
39 isRealData_(realData),
51 std::shared_ptr<RunAuxiliary>
58 std::shared_ptr<LuminosityBlockAuxiliary>
74 e.
commit_(std::vector<ProductResolverIndex>());
81 for(; offset < 0; ++
offset) {
84 for(; offset > 0; --
offset) {
189 if (numberEventsInRun_ < 1 || numberEventsInThisRun_ > 0) {
193 if (!(numberEventsInLumi_ < 1 || numberEventsInThisLumi_ > 0)) {
223 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInRun")->setComment(
"Number of events to generate in each run.");
224 desc.
addOptionalUntracked<
unsigned int>(
"numberEventsInLuminosityBlock")->setComment(
"Number of events to generate in each lumi.");
225 desc.
addUntracked<
unsigned long long>(
"firstTime", 1)->setComment(
"Time before first event (ns) (for timestamp).");
226 desc.
addUntracked<
unsigned long long>(
"timeBetweenEvents", kNanoSecPerSec/
kAveEventPerSec)->setComment(
"Time between consecutive events (ns) (for timestamp).");
227 desc.
addUntracked<
unsigned int>(
"eventCreationDelay", 0)->setComment(
"Real time delay between generation of consecutive events (ms).");
231 ->
setComment(
"'firstEvent' is an XOR group because it can have type uint32 or uint64, default:1\n" 232 "Event number of first event to generate.");
234 desc.
addUntracked<
unsigned int>(
"firstLuminosityBlock", 1)->setComment(
"Luminosity block number of first lumi to generate.");
235 desc.
addUntracked<
unsigned int>(
"firstRun", 1)->setComment(
"Run number of first run to generate.");
void setComment(std::string const &value)
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_() override
static unsigned long long const kNanoSecPerSec
unsigned int numberEventsInLumi_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_() override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static Timestamp invalidTimestamp()
void readEvent_(EventPrincipal &eventPrincipal) override
unsigned int eventCreationDelay_
unsigned int numberEventsInThisLumi_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
~ProducerSourceBase() noexcept(false) override
LuminosityBlockNumber_t luminosityBlock() const
ItemType getNextItemType() final
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
ProducerSourceBase(ParameterSet const &pset, InputSourceDescription const &desc, bool realData)
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut, ParentageID *previousParentageId=0)
static void fillDescription(ParameterSetDescription &desc)
unsigned long long TimeValue_t
static unsigned long long const kAveEventPerSec
void setProducer(ProducerBase const *iProd, std::vector< BranchID > *previousParentage, std::vector< BranchID > *gotBranchIDsFromAcquire=0)
TimeValue_t timeBetweenEvents_
EventAuxiliary::ExperimentType eType_
unsigned int numberEventsInThisRun_
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
EventID const & eventID() const
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)
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)