|
MIDAS
|
#include <v1740CONET2.hxx>

Classes | |
| struct | V1740_CONFIG_SETTINGS |
| Settings structure for this v1740 module. More... | |
Public Member Functions | |
| v1740CONET2 (int link, int board, int moduleID) | |
| Constructor for the module object. | |
| ~v1740CONET2 () | |
| Destructor for the module object. | |
| CAENComm_ErrorCode | Connect () |
| Connect the board through the optical link. | |
| CAENComm_ErrorCode | Disconnect () |
| Disconnect the board through the optical link. | |
| CAENComm_ErrorCode | StartRun () |
| Start data acquisition. | |
| CAENComm_ErrorCode | StopRun () |
| Start data acquisition. | |
| CAENComm_ErrorCode | SetupPreset (int) |
| Setup board registers using preset (see ov1720.c:ov1720_Setup()) | |
| CAENComm_ErrorCode | AcqCtl (uint32_t) |
| Control data acquisition. | |
| CAENComm_ErrorCode | ReadReg (DWORD, DWORD *) |
| Read 32-bit register. | |
| CAENComm_ErrorCode | WriteReg (DWORD, DWORD) |
| Write to 32-bit register. | |
| CAENComm_ErrorCode | ReadEvent (DWORD *, int *) |
| Read event buffer. | |
| CAENComm_ErrorCode | SendTrigger () |
| Send a software trigger to the board. | |
| int | SetODBRecord (HNDLE h, void(*cb_func)(INT, INT, void *)) |
| Set the ODB record for this module. | |
| int | InitializeForAcq () |
| Initialize the hardware for data acquisition. | |
| bool | IsConnected () |
| Get connected status. | |
| bool | IsRunning () |
| Get run status. | |
| std::string | GetName () |
| Get short string identifying the module's board number. | |
| void | CheckBoardType () |
| Check board type. | |
| void | ShowRegs () |
| Misc reg printout, for debug purposes. | |
| HNDLE | GetODBHandle () |
| returns ODB handle | |
| bool | GetSettingsTouched () |
| void | SetSettingsTouched (bool t) |
| int | GetHandle () |
| returns device handler | |
| int | GetModuleID () |
| returns unique module ID | |
| int | GetLink () |
| returns optical link number | |
| int | GetBoard () |
| returns board number | |
Public Attributes | |
| int | verbose |
| struct v1740CONET2::V1740_CONFIG_SETTINGS | config |
| instance of config structure | |
Static Public Attributes | |
| static const char * | config_str [] |
| Configuration string for this module. (ODB: /Equipment/[eq_name]/Settings/[board_name]/) | |
Private Attributes | |
| int | _handle |
| Device handler. | |
| int | _link |
| Optical link number. | |
| int | _board |
| Module/Board number. | |
| int | _moduleID |
| Unique module ID. | |
| HNDLE | _odb_handle |
| bool | _settings_loaded |
| ODB settings loaded. | |
| bool | _settings_touched |
| ODB settings touched. | |
| bool | _running |
| Run in progress. | |
Driver class for the v1740 module using the CAEN CONET2 (optical) interface. Contains all the methods necessary to:
Definition at line 34 of file v1740CONET2.hxx.
Constructor for the module object.
Set the basic hardware parameters
| [in] | link | Optical link number |
| [in] | board | Board number on the optical link |
| [in] | moduleID | Unique ID assigned to module |
Definition at line 58 of file v1740CONET2.cxx.
| v1740CONET2::~v1740CONET2 | ( | ) |
Destructor for the module object.
Nothing to do.
Definition at line 73 of file v1740CONET2.cxx.
| CAENComm_ErrorCode v1740CONET2::AcqCtl | ( | uint32_t | operation | ) |
Control data acquisition.
Write to Acquisition Control reg
| [in] | operation | acquisition mode (see v1720.h) |
Definition at line 217 of file v1740CONET2.cxx.


| void v1740CONET2::CheckBoardType | ( | ) |
Check board type.
Check if board type is v1740, if not issue a warning
Definition at line 453 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::Connect | ( | ) |
Connect the board through the optical link.
Definition at line 109 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::Disconnect | ( | ) |
Disconnect the board through the optical link.
Definition at line 129 of file v1740CONET2.cxx.

|
inline |
returns board number
Definition at line 100 of file v1740CONET2.hxx.
|
inline |
returns device handler
Definition at line 97 of file v1740CONET2.hxx.

|
inline |
returns optical link number
Definition at line 99 of file v1740CONET2.hxx.
|
inline |
returns unique module ID
Definition at line 98 of file v1740CONET2.hxx.
| string v1740CONET2::GetName | ( | ) |
|
inline |
returns ODB handle
Definition at line 90 of file v1740CONET2.hxx.
|
inline |
returns true if odb settings touched
Definition at line 91 of file v1740CONET2.hxx.
| int v1740CONET2::InitializeForAcq | ( | ) |
Initialize the hardware for data acquisition.
Set the registers using a preset if setup != 0 in the config string, or set them manually otherwise.
Definition at line 382 of file v1740CONET2.cxx.


| bool v1740CONET2::IsConnected | ( | ) |
Get connected status.
Definition at line 91 of file v1740CONET2.cxx.

| bool v1740CONET2::IsRunning | ( | ) |
Get run status.
Definition at line 100 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::ReadEvent | ( | DWORD * | data, |
| int * | dwords_read | ||
| ) |
Read event buffer.
Read the event buffer for this module using BLT (32-bit) cycles. This function reads nothing if EVENT_SIZE register was zero.
| [out] | data | Where to write content of event buffer |
| [out] | dwords_read | Number of DWORDs read from the buffer |
Definition at line 270 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::ReadReg | ( | DWORD | address, |
| DWORD * | val | ||
| ) |
Read 32-bit register.
| [in] | address | address of the register to read |
| [out] | val | value read from register |
Definition at line 232 of file v1740CONET2.cxx.


| CAENComm_ErrorCode v1740CONET2::SendTrigger | ( | ) |
Send a software trigger to the board.
Send a software trigger to the board. May require software triggers to be enabled in register.
Definition at line 321 of file v1740CONET2.cxx.

Set the ODB record for this module.
Create a record for the board with settings from the configuration string (v1740CONET2::config_str) if it doesn't exist or merge with existing record. Create hotlink with callback function for when the record is updated. Get the handle to the record.
Ex: For a frontend with index number 2 and board number 0, this record will be created/merged:
/Equipment/FEv1740I2/Settings/Board0
| [in] | h | main ODB handle |
| [in] | cb_func | Callback function to call when record is updated |
Definition at line 343 of file v1740CONET2.cxx.

set _settings_touched
Definition at line 94 of file v1740CONET2.hxx.
| CAENComm_ErrorCode v1740CONET2::SetupPreset | ( | int | mode | ) |
Setup board registers using preset (see ov1720.c:ov1720_Setup())
Setup board registers using a preset defined in the midas file ov1720.c
| [in] | mode | Configuration mode number |
Definition at line 201 of file v1740CONET2.cxx.


| void v1740CONET2::ShowRegs | ( | ) |
Misc reg printout, for debug purposes.
Definition at line 468 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::StartRun | ( | ) |
Start data acquisition.
Write to Acquisition Control reg to put board in RUN mode. If ODB settings have been changed, re-initialize the board with the new settings. Set _running flag true.
Definition at line 153 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::StopRun | ( | ) |
Start data acquisition.
Write to Acquisition Control reg to put board in STOP mode. Set _running flag false.
Definition at line 184 of file v1740CONET2.cxx.

| CAENComm_ErrorCode v1740CONET2::WriteReg | ( | DWORD | address, |
| DWORD | val | ||
| ) |
Write to 32-bit register.
| [in] | address | address of the register to write to |
| [in] | val | value to write to the register |
Definition at line 248 of file v1740CONET2.cxx.


|
private |
Module/Board number.
Definition at line 39 of file v1740CONET2.hxx.
|
private |
Device handler.
Definition at line 37 of file v1740CONET2.hxx.
|
private |
Optical link number.
Definition at line 38 of file v1740CONET2.hxx.
|
private |
Unique module ID.
Definition at line 40 of file v1740CONET2.hxx.
|
private |
Definition at line 42 of file v1740CONET2.hxx.
|
private |
Run in progress.
Definition at line 45 of file v1740CONET2.hxx.
|
private |
ODB settings loaded.
Definition at line 43 of file v1740CONET2.hxx.
|
private |
ODB settings touched.
Definition at line 44 of file v1740CONET2.hxx.
| struct v1740CONET2::V1740_CONFIG_SETTINGS v1740CONET2::config |
instance of config structure
Configuration string for this module. (ODB: /Equipment/[eq_name]/Settings/[board_name]/)
Definition at line 18 of file v1740CONET2.hxx.
| int v1740CONET2::verbose |
Make the driver verbose 0: off 1: normal 2: very verbose
Definition at line 47 of file v1740CONET2.hxx.