55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
#ifndef DATA_H
|
|
#define DATA_H
|
|
|
|
#include <stdio.h>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <cmath>
|
|
#include <cstring> ///memset
|
|
#include <iostream> ///cout
|
|
#include <bitset>
|
|
|
|
#include "CAENDigitizer.h"
|
|
#include "CAENDigitizerType.h"
|
|
|
|
#include "macro.h"
|
|
|
|
class Data{
|
|
|
|
public:
|
|
|
|
int nByte; /// number of byte
|
|
char *buffer; /// readout buffer
|
|
uint32_t NumEvents[MaxNChannels];
|
|
uint32_t AllocatedSize;
|
|
uint32_t BufferSize;
|
|
CAEN_DGTZ_DPP_PHA_Event_t *Events[MaxNChannels]; /// events buffer
|
|
CAEN_DGTZ_DPP_PHA_Waveforms_t *Waveform[MaxNChannels]; /// waveforms buffer
|
|
|
|
public:
|
|
Data(){
|
|
nByte = 0;
|
|
buffer = NULL;
|
|
AllocatedSize = 0;
|
|
BufferSize = 0;
|
|
for( int i = 0 ; i < MaxNChannels; i++){
|
|
NumEvents[i] = 0;
|
|
Events[i] = NULL;
|
|
Waveform[i] = NULL;
|
|
}
|
|
}
|
|
|
|
~Data(){
|
|
for( int i = 0 ; i < MaxNChannels; i++){
|
|
delete Events [i];
|
|
delete Waveform [i];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif
|