12 #include <QtCore/QDataStream>
24 using Streaming::operator >>;
32 throw runtime_error(
"deserializeNormalAgat(): The Acqiris Device does not exist.");
40 evt.
id() = evtHead.id;
41 instr.id() = evt.
id();
43 instr.channels().resize(evtHead.nbrChannels);
45 for (
size_t iChan(0); iChan < evtHead.nbrChannels; ++iChan)
48 if (evtHead.usedChannelBitmask & (0x1 << iChan))
56 Channel &chan(instr.channels()[iChan]);
58 chan.offset() = chanHead.offset_mV*1e-3;
59 chan.gain() = chanHead.gain_mVperLSB*1e-3;
60 chan.sampleInterval() = evtHead.samplingInterval;
63 waveform.resize(evtHead.nbrSamples);
65 fill(waveform.begin(),waveform.end(),chanHead.offset_mV/chanHead.gain_mVperLSB);
67 for (
size_t iPuls(0); iPuls < chanHead.nbrPulses; ++iPuls)
73 size_t datasize = pulsHead.
length * evtHead.nbrBits/8;
75 stream.
readRawData(reinterpret_cast<char*>(&waveform[pulsHead.idxPos]),
77 nBytesRead += datasize;
std::vector< int16_t > waveform_t
define the waveform
Event to store all LCLS Data.
contains the layout of the lma file headers.
file contains declaration of the CASSEvent
readRawData(char *s, int len)
size_t operator()(QDataStream &stream, CASSEvent &evt)
deserialize stream
devices_t & devices()
setters
file contains the declaration of the acqiris part of the CASSEvent
file contains global definitions for project cass
contains functions to deserialize the data stream sent by agat.
A Channel of an Acqiris Instrument.
size_t & channelNbr()
setter