31 z = 1.* rand() / RAND_MAX;
32 y = 1.* rand() / RAND_MAX;
34 x = z * 6.28318530717958623;
35 return mean + sigma*sin(x)*sqrt(-2*log(y));
45 fIsGo4RandomFormat(true),
70 if (fGenerTimeout > 0.) {
71 fTimeoutSwitch = !fTimeoutSwitch;
75 if ((fTotalSizeLimit>0) && (fTotalSize / 1024. / 1024. > fTotalSizeLimit))
return dabc::di_EndOfStream;
88 bool eventdone =
true;
90 for (
unsigned subcnt = 0; subcnt < fNumSubevents; subcnt++)
91 if (iter.
NewSubevent(fSubeventSize, fFirstProcId + subcnt + 1, fFirstProcId + subcnt)) {
93 if ((fFullId!=0) && (fNumSubevents==1))
96 unsigned subsz = fSubeventSize;
98 uint32_t* value = (uint32_t*) iter.
rawdata();
100 if (fIsGo4RandomFormat) {
101 unsigned numval = fSubeventSize /
sizeof(uint32_t);
102 for (
unsigned nval=0;nval<numval;nval++)
103 *value++ = (uint32_t)
Gauss_Rnd(nval*100 + 2000, 500./(nval+1));
105 subsz = numval *
sizeof(uint32_t);
107 if (subsz>0) *value++ = fEventCount;
108 if (subsz>4) *value++ = fFirstProcId + subcnt;
117 if (!eventdone)
break;
Reference on memory from memory pool.
BufferSize_t GetTotalSize() const
Return total size of all buffer segments.
Represents command with its arguments.
Uniform Resource Locator interpreter.
bool GetOptionBool(const std::string &optname, bool dflt=false) const
int GetOptionInt(const std::string &optname, int dflt=0) const
Reference on dabc::Worker
Write iterator for MBS events/subevents.
bool FinishSubEvent(uint32_t rawdatasz=0)
SubeventHeader * subevnt() const
bool NewSubevent(uint32_t minrawsize=0, uint8_t crate=0, uint16_t procid=0, uint8_t control=0)
bool NewEvent(EventNumType event_number=0, uint32_t subeventsize=0)