12 for(
int iCh=0; iCh<8; iCh++){
13 if (chMask & (1<<iCh)){
22 uint32_t goodData = ((
GetData32()[iPtr]>>31) & 0x1);
23 uint32_t nWords = (
GetData32()[iPtr] & 0xFFFFF);
25 std::vector<uint32_t> samples;
26 for(uint32_t iWord=0; iWord<nWords; iWord++){
29 samples.push_back((
GetData32()[iPtr]&0xFFF));
30 samples.push_back(((
GetData32()[iPtr]>>16)&0xFFF));
53 int nActiveChannels=0;
54 for(
int iCh=0; iCh<8; iCh++){
64 for(
int iCh=0; iCh<8; iCh++){
66 if(!(chMask & (1<<iCh))){
75 for(
int j = 0; j < N32samples; j++){
76 uint32_t samp1 = (
GetData32()[iPtr]&0xFFF);
77 uint32_t samp2 = ((
GetData32()[iPtr]>>16)&0xFFF);
111 std::cout <<
"V1720 decoder for bank " <<
GetName().c_str() << std::endl;
112 std::cout <<
"Bank size: " <<
GetEventSize() << std::endl;
115 std::cout <<
"Data is ZLE compressed." << std::endl;
117 std::cout <<
"Data is not ZLE compressed." << std::endl;
122 std::cout <<
"Trigger tag: " <<
GetTriggerTag() << std::endl;
125 std::cout <<
"Number of channels with data: " <<
GetNChannels() << std::endl;
133 std::cout <<
"Number of ZLE pulses: " << channelData.
GetNZlePulses() << std::endl;
135 std::cout <<
"Pulse: " << j << std::endl;
137 std::cout <<
"first sample bin: " << pulse.
GetFirstBin() << std::endl;
138 std::cout <<
"Samples ("<< pulse.
GetNSamples()<<
" total): " <<std::endl;
141 if(k%12 == 11) std::cout << std::endl;
143 std::cout << std::endl;
const uint32_t * GetData32() const
std::string GetName() const
int GetNZlePulses() const
Get the number of ZLE pulses (for compressed data)
void AddADCSample(uint32_t sample)
TV1720RawZlePulse GetZlePulse(int i) const
Get the ZLE pulse (for compressed data.
int GetChannelNumber() const
void AddZlePulse(TV1720RawZlePulse pulse)
void Print()
Print the bank contents in a structured way.
void HandlUncompressedData()
Helper method to handle uncompressed data.
uint32_t GetEventSize() const
Get the number of 32-bit words in bank.
void HandlZLECompressedData()
Helper method to handle ZLE compressed data.
std::vector< TV1720RawChannel > fMeasurements
Vector of V1720 measurements.
TV1720RawChannel GetChannelData(int i)
Get Channel Data.
TV1720RawData(int bklen, int bktype, const char *name, void *pdata)
Constructor.
int GetNChannels() const
Get Number of channels in this bank.
uint32_t fGlobalHeader0
The overall global headers.
uint32_t GetChannelMask() const
uint32_t GetEventCounter() const
Get event counter.
uint32_t GetTriggerTag() const
Get trigger tag.
bool IsZLECompressed() const
Is the V1720 data ZLE compressed?
Class to store information from a single V1720 ZLE pulse.
int GetSample(int i) const
Get the first bin for this pulse.
int GetNSamples() const
Get the number of samples.
int GetFirstBin() const
Get the first bin for this pulse.