#ifndef DATA_H #define DATA_H #include #include #include #include #include ///memset #include ///cout #include #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