71 lines
1.5 KiB
C++
71 lines
1.5 KiB
C++
#ifndef DIGITIZER_CLASS_H
|
|
#define DIGITIZER_CLASS_H
|
|
|
|
|
|
#include <CAEN_FELib.h>
|
|
#include <cstdlib>
|
|
#include <string>
|
|
|
|
//#include "Parameter.h"
|
|
|
|
class Digitizer2Gen {
|
|
private:
|
|
uint64_t handle;
|
|
uint64_t ep_handle; ///end point handle
|
|
uint64_t ep_folder_handle; ///end point folder handle
|
|
bool isConnected;
|
|
int ret;
|
|
|
|
char retValue[256];
|
|
|
|
std::string modelName;
|
|
std::string cupVersion;
|
|
std::string DPPVersion;
|
|
std::string DPPType;
|
|
unsigned short serialNumber;
|
|
unsigned short adcBits;
|
|
unsigned short nChannels;
|
|
unsigned short adcRate;
|
|
unsigned short ch2ns;
|
|
|
|
std::string IPAddress;
|
|
std::string netMask;
|
|
std::string gateway;
|
|
|
|
|
|
void Initialization();
|
|
|
|
std::string ErrorMsg(const char * funcName);
|
|
|
|
public:
|
|
Digitizer2Gen();
|
|
~Digitizer2Gen();
|
|
|
|
int OpenDigitizer(const char * url);
|
|
int CloseDigitizer();
|
|
|
|
std::string ReadValue(const char * parameter);
|
|
void WriteValue(const char * parameter, std::string value);
|
|
void SendCommand(const char * parameter);
|
|
|
|
uint64_t GetHandle(const char * parameter);
|
|
uint64_t GetParentHandle(uint64_t handle);
|
|
std::string GetPath(uint64_t handle);
|
|
|
|
void StartACQ();
|
|
void StopACQ();
|
|
|
|
void SetPHADataFormat();
|
|
void ReadData();
|
|
|
|
void ProgramPHA();
|
|
|
|
unsigned short GetNChannels() {return nChannels;}
|
|
unsigned short GetCh2ns() {return ch2ns;}
|
|
uint64_t GetHandle() {return handle;}
|
|
|
|
|
|
};
|
|
|
|
#endif
|