18 #include "CLHEP/Random/RandGauss.h"
35 empty_events(
pset.getUntrackedParameter<
bool>(
"emptyEvents",
false)),
36 meansize(
pset.getUntrackedParameter<unsigned
int>(
"meanSize", 1024)),
37 width(
pset.getUntrackedParameter<unsigned
int>(
"width", 1024)),
38 injected_errors_per_million_events(
pset.getUntrackedParameter<unsigned
int>(
"injectErrPpm", 0)),
39 tcdsFEDID_(
pset.getUntrackedParameter<unsigned
int>(
"tcdsFEDID", 1024)),
40 modulo_error_events(injected_errors_per_million_events ? 1000000 / injected_errors_per_million_events
46 produces<FEDRawDataCollection>();
61 auto ls =
e.luminosityBlock();
77 gettimeofday(&
now,
nullptr);
87 std::unique_ptr<FEDRawDataCollection> bare_product(fedcoll);
143 const_cast<uint32_t&>(bst->gpstimehigh) =
now->tv_sec;
144 const_cast<uint32_t&>(bst->gpstimelow) =
now->tv_usec;
145 const_cast<uint16_t&>(bst->lhcFillHigh) = 0;
146 const_cast<uint16_t&>(bst->lhcFillLow) = 0;
148 const_cast<uint32_t&>(
header->orbitHigh) = orbitnr & 0xffff00;
149 const_cast<uint16_t&>(
header->orbitLow) = orbitnr & 0xff;
150 const_cast<uint16_t&>(
header->bxid) = bxid;
152 const_cast<uint64_t&>(
header->eventNumber) = eID.
event();
153 const_cast<uint32_t&>(
header->lumiSection) =
ls;