MIDAS
Loading...
Searching...
No Matches
v1740CONET2.hxx
Go to the documentation of this file.
1/*****************************************************************************/
10#ifndef V1740_HXX_INCLUDE
11#define V1740_HXX_INCLUDE
12
13#include <iostream>
14#include <sstream>
15#include <iomanip>
16
17extern "C" {
18#include "CAENComm.h"
19#include "ov1740drv.h"
20}
21#include "midas.h"
22
35{
36private:
37 int _handle,
41
46public:
47 int verbose;
51 // bool _settings_touched;
52
67 static const char *config_str[];
68
69 v1740CONET2(int link, int board, int moduleID);
71
82
83 int SetODBRecord(HNDLE h, void(*cb_func)(INT,INT,void*));
84 int InitializeForAcq();
85 bool IsConnected();
86 bool IsRunning();
87 std::string GetName();
88 void CheckBoardType();
89 void ShowRegs();
92 return _settings_touched;
93 }
94 void SetSettingsTouched(bool t) {
96 }
97 int GetHandle() { return _handle; }
98 int GetModuleID() { return _moduleID; }
99 int GetLink() { return _link; }
100 int GetBoard() { return _board; }
101
102};
103
104
105#endif // V1740_HXX_INCLUDE
bool _settings_touched
ODB settings touched.
bool IsRunning()
Get run status.
int GetHandle()
returns device handler
static const char * config_str[]
Configuration string for this module. (ODB: /Equipment/[eq_name]/Settings/[board_name]/)
struct v1740CONET2::V1740_CONFIG_SETTINGS config
instance of config structure
int GetBoard()
returns board number
~v1740CONET2()
Destructor for the module object.
bool GetSettingsTouched()
CAENComm_ErrorCode ReadEvent(DWORD *, int *)
Read event buffer.
int SetODBRecord(HNDLE h, void(*cb_func)(INT, INT, void *))
Set the ODB record for this module.
bool IsConnected()
Get connected status.
CAENComm_ErrorCode SendTrigger()
Send a software trigger to the board.
CAENComm_ErrorCode StartRun()
Start data acquisition.
int GetLink()
returns optical link number
int GetModuleID()
returns unique module ID
int _handle
Device handler.
void CheckBoardType()
Check board type.
CAENComm_ErrorCode Connect()
Connect the board through the optical link.
CAENComm_ErrorCode ReadReg(DWORD, DWORD *)
Read 32-bit register.
void SetSettingsTouched(bool t)
CAENComm_ErrorCode SetupPreset(int)
Setup board registers using preset (see ov1720.c:ov1720_Setup())
CAENComm_ErrorCode Disconnect()
Disconnect the board through the optical link.
CAENComm_ErrorCode StopRun()
Start data acquisition.
std::string GetName()
Get short string identifying the module's board number.
int _moduleID
Unique module ID.
int InitializeForAcq()
Initialize the hardware for data acquisition.
CAENComm_ErrorCode WriteReg(DWORD, DWORD)
Write to 32-bit register.
HNDLE _odb_handle
CAENComm_ErrorCode AcqCtl(uint32_t)
Control data acquisition.
int _link
Optical link number.
HNDLE GetODBHandle()
returns ODB handle
bool _settings_loaded
ODB settings loaded.
void ShowRegs()
Misc reg printout, for debug purposes.
int _board
Module/Board number.
bool _running
Run in progress.
unsigned int DWORD
Definition mcstd.h:51
INT HNDLE
Definition midas.h:132
int INT
Definition midas.h:129
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Settings structure for this v1740 module.
INT setup
Initial board setup mode number.
DWORD post_trigger
0x8114@[31.. 0]
DWORD group_config
0x8000@[19.. 0]
DWORD trigger_output
0x8110@[31.. 0]
INT buffer_organization
0x800C@[ 3.. 0]
DWORD dac[8]
0x1n98@[15.. 0]
DWORD trigger_source
0x810C@[31.. 0]
DWORD threshold[8]
0x1n80@[11.. 0]