139 fHeader.fTriggerCounter = triggerid;
141 fHeader.fFreqRefClock = 997+rand()/(RAND_MAX/7);
168 vector<uint16_t> evtbuf;
173 fChHeader[
i].fStartCell = int64_t(1023)*rand()/RAND_MAX;
177 for (
int ii=0; ii<
fChHeader[
i].fRegionOfInterest; ii++)
182 data[rel] += 6.*rand()/RAND_MAX + 5*exp(-rel/10);
183 data[rel] += 15*sin(2*3.1415*abs/512);
188 int p = 5.*rand()/RAND_MAX+ 20;
189 double rndm = 500.*rand()/RAND_MAX+500;
190 for (
int ii=0; ii<
fChHeader[
i].fRegionOfInterest; ii++)
191 data[ii] += rndm*exp(-0.5*(ii-p)*(ii-p)/25);
194 const vector<uint16_t> buf =
fChHeader[
i].HtoN();
196 evtbuf.insert(evtbuf.end(), buf.begin(), buf.end());
197 evtbuf.insert(evtbuf.end(),
data.begin(),
data.end());
205 const vector<uint16_t> h =
fHeader.HtoN();
207 evtbuf.insert(evtbuf.begin(), h.begin(), h.end());
Adds some functionality to boost::posix_time::ptime for our needs.
FAD::ChannelHeader fChHeader[kNumChannels]
void AsyncWrite(ba::ip::tcp::socket *socket, const ba::const_buffers_1 &buffers)
vector< boost::shared_ptr< ba::ip::tcp::socket > > fSockets
deque< vector< uint16_t > > fOutQueue