#include #include #include #include #include "ClassDigitizer2Gen.h" int main(int argc, char* argv[]){ printf("##########################################\n"); printf("\t CAEN firmware DPP-PHA testing \n"); printf("##########################################\n"); const char * url = "dig2://192.168.0.100/"; Digitizer2Gen * digi = new Digitizer2Gen(); digi->OpenDigitizer(url); digi->ProgramPHA(); //printf("%s \n", digi->ReadValue("/ch/0/par/ChRealtimeMonitor").c_str()); //printf("%s \n", digi->ReadValue("/ch/0/par/Energy_Nbit").c_str()); //printf("%s \n", digi->ReadValue("/par/MaxRawDataSize").c_str()); /*///======================= Play with handle uint64_t parHandle; parHandle = digi->GetHandle("/ch/0/par/ChRealtimeMonitor"); printf("%lu|%lX\n", parHandle, parHandle); parHandle = digi->GetHandle("/ch/1/par/ChRealtimeMonitor"); printf("%lu|%lX\n", parHandle, parHandle); printf("%s\n", digi->GetPath(parHandle).c_str()); parHandle = digi->GetParentHandle(parHandle); printf("%lu|%lX\n", parHandle, parHandle); printf("%s\n", digi->GetPath(parHandle).c_str()); parHandle = digi->GetParentHandle(parHandle); printf("%lu|%lX\n", parHandle, parHandle); printf("%s\n", digi->GetPath(parHandle).c_str()); parHandle = digi->GetParentHandle(parHandle); printf("%lu|%lX\n", parHandle, parHandle); printf("%s\n", digi->GetPath(parHandle).c_str()); parHandle = digi->GetParentHandle(parHandle); printf("%lu|%lX\n", parHandle, parHandle); printf("%s\n", digi->GetPath(parHandle).c_str()); */ digi->SetPHADataFormat(); digi->StartACQ(); usleep(1e6); //digi->ReadData(); digi->StopACQ(); digi->CloseDigitizer(); delete digi; }