AlcapDAQ
1
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/io.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include "midas.h"
#include "crate.h"
#include "diag.h"
#include "CAENDigitizer.h"
#include "CAENDigitizerType.h"
Go to the source code of this file.
Data Structures | |
struct | s_dt5720_odb |
Macros | |
#define | S_DT5720_ODB_STR "\[.]\n\software_trigger_mode = BYTE : 0\n\hardware_trigger_mode = BYTE : 0\n\self_trigger_mode = BYTE : 0\n\trigger_positive_edge = BOOL : y\n\max_events_per_block = DWORD : 1024\n\event_aligned_readout = BOOL : y\n\logic_level = STRING : [4] NIM\n\post_trigger_size = BYTE : 20\n\gpi_acquisition_mode = BOOL : n\n\zero_suppression_mode = BYTE : 0\n\event_packing = BOOL : n\n\ext_clock = BOOL : n\n\waveform length = DWORD : 64\n\\n\[Ch00]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch01]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch02]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch03]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\" |
Typedefs | |
typedef struct timespec | timer_start |
typedef struct s_dt5720_odb | S_DT5720_ODB_DEF |
Functions | |
static INT | dt5720_init () |
static void | dt5720_exit () |
static INT | dt5720_pre_bor () |
static INT | dt5720_eor () |
static INT | dt5720_poll_live () |
static INT | dt5720_read (char *pevent) |
static void | dt5720_readout () |
static BOOL | dt5720_update_digitizer () |
static BOOL | is_caen_error (CAEN_DGTZ_ErrorCode, int, const char *) |
static uint32_t | analog2adc_trigger (int) |
static uint32_t | analog2adc_offset (int) |
Variables | |
static int | handle |
static uint32_t | VME_BASE = 0x00000000 |
static char * | caen_data_buffer = NULL |
static uint32_t | caen_data_buffer_size = 0 |
static char * | data_buffer |
static uint32_t | data_buffer_size |
static uint32_t | data_size |
bool | block_sig |
struct readout_module | dt5720_module |
static S_DT5720_ODB_DEF | S_DT5720_ODB |
HNDLE | hDB |
#define S_DT5720_ODB_STR "\[.]\n\software_trigger_mode = BYTE : 0\n\hardware_trigger_mode = BYTE : 0\n\self_trigger_mode = BYTE : 0\n\trigger_positive_edge = BOOL : y\n\max_events_per_block = DWORD : 1024\n\event_aligned_readout = BOOL : y\n\logic_level = STRING : [4] NIM\n\post_trigger_size = BYTE : 20\n\gpi_acquisition_mode = BOOL : n\n\zero_suppression_mode = BYTE : 0\n\event_packing = BOOL : n\n\ext_clock = BOOL : n\n\waveform length = DWORD : 64\n\\n\[Ch00]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch01]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch02]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\n\\n\[Ch03]\n\enable = BOOL : n\n\offset = FLOAT : 0\n\self_trigger_threshhold = FLOAT : 0\" |
Definition at line 110 of file dt5720_module.c.
Referenced by dt5720_init().
typedef struct s_dt5720_odb S_DT5720_ODB_DEF |
typedef struct timespec timer_start |
Definition at line 53 of file dt5720_module.c.
|
static |
Definition at line 569 of file dt5720_module.c.
References s_dt5720_odb::ch00, s_dt5720_odb::ch01, s_dt5720_odb::ch02, s_dt5720_odb::ch03, s_dt5720_odb::offset, and printf().
Referenced by dt5720_update_digitizer().
|
static |
Definition at line 615 of file dt5720_module.c.
References s_dt5720_odb::ch00, s_dt5720_odb::ch01, s_dt5720_odb::ch02, s_dt5720_odb::ch03, s_dt5720_odb::offset, printf(), and s_dt5720_odb::self_trigger_threshold.
Referenced by dt5720_update_digitizer().
|
static |
Definition at line 255 of file dt5720_module.c.
References caen_data_buffer, CAEN_DGTZ_FreeReadoutBuffer(), CAEN_DGTZ_SWStopAcquisition(), handle, is_caen_error(), and SUCCESS.
|
static |
Definition at line 218 of file dt5720_module.c.
References CAEN_DGTZ_CloseDigitizer(), data_buffer, handle, and is_caen_error().
|
static |
Definition at line 150 of file dt5720_module.c.
References CAEN_DGTZ_BoardInfo_t::AMC_FirmwareRel, CAEN_DGTZ_ACQ_CONTROL_ADD, CAEN_DGTZ_GetInfo(), CAEN_DGTZ_OpenDigitizer(), CAEN_DGTZ_Reset(), CAEN_DGTZ_USB, CAEN_DGTZ_WriteRegister(), crate_number, s_dt5720_odb::ext_clock, FALSE, handle, hDB, hKey, is_caen_error(), CAEN_DGTZ_BoardInfo_t::ModelName, printf(), CAEN_DGTZ_BoardInfo_t::ROC_FirmwareRel, S_DT5720_ODB_STR, sprintf(), status, and VME_BASE.
|
static |
Definition at line 326 of file dt5720_module.c.
References dt5720_readout(), and SUCCESS.
|
static |
Definition at line 227 of file dt5720_module.c.
References caen_data_buffer, caen_data_buffer_size, CAEN_DGTZ_ClearData(), CAEN_DGTZ_MallocReadoutBuffer(), CAEN_DGTZ_SetAcquisitionMode(), CAEN_DGTZ_SW_CONTROLLED, CAEN_DGTZ_SWStartAcquisition(), data_size, dt5720_update_digitizer(), handle, is_caen_error(), printf(), and SUCCESS.
|
static |
Definition at line 271 of file dt5720_module.c.
References data_buffer, data_size, dt5720_readout(), sprintf(), and SUCCESS.
|
static |
Definition at line 303 of file dt5720_module.c.
References caen_data_buffer, CAEN_DGTZ_ReadData(), CAEN_DGTZ_SLAVE_TERMINATED_READOUT_MBLT, data_buffer, data_buffer_size, data_size, handle, and is_caen_error().
Referenced by dt5720_poll_live(), and dt5720_read().
|
static |
Definition at line 334 of file dt5720_module.c.
References analog2adc_offset(), analog2adc_trigger(), CAEN_DGTZ_BROAD_CH_CTRL_ADD, CAEN_DGTZ_DISABLE, CAEN_DGTZ_ENABLE, CAEN_DGTZ_IOLevel_NIM, CAEN_DGTZ_IOLevel_TTL, CAEN_DGTZ_ReadRegister(), CAEN_DGTZ_S_IN_CONTROLLED, CAEN_DGTZ_SetAcquisitionMode(), CAEN_DGTZ_SetChannelDCOffset(), CAEN_DGTZ_SetChannelEnableMask(), CAEN_DGTZ_SetChannelSelfTrigger(), CAEN_DGTZ_SetChannelTriggerThreshold(), CAEN_DGTZ_SetEventPackaging(), CAEN_DGTZ_SetExtTriggerInputMode(), CAEN_DGTZ_SetIOLevel(), CAEN_DGTZ_SetMaxNumEventsBLT(), CAEN_DGTZ_SetPostTriggerSize(), CAEN_DGTZ_SetRecordLength(), CAEN_DGTZ_SetSWTriggerMode(), CAEN_DGTZ_SetTriggerPolarity(), CAEN_DGTZ_SetZeroSuppressionMode(), CAEN_DGTZ_Success, CAEN_DGTZ_SW_CONTROLLED, CAEN_DGTZ_TRGMODE_ACQ_AND_EXTOUT, CAEN_DGTZ_TRGMODE_ACQ_ONLY, CAEN_DGTZ_TRGMODE_DISABLED, CAEN_DGTZ_TRGMODE_EXTOUT_ONLY, CAEN_DGTZ_TriggerOnFallingEdge, CAEN_DGTZ_TriggerOnRisingEdge, CAEN_DGTZ_WriteRegister(), CAEN_DGTZ_ZS_AMP, CAEN_DGTZ_ZS_NO, CAEN_DGTZ_ZS_ZLE, s_dt5720_odb::ch00, s_dt5720_odb::ch01, s_dt5720_odb::ch02, s_dt5720_odb::ch03, data_buffer, data_buffer_size, s_dt5720_odb::enable, s_dt5720_odb::event_packing, s_dt5720_odb::gpi_acquisition_mode, handle, s_dt5720_odb::hardware_trigger_mode, is_caen_error(), s_dt5720_odb::logic_level, s_dt5720_odb::max_events_per_block, s_dt5720_odb::post_trigger_size, s_dt5720_odb::self_trigger_mode, s_dt5720_odb::software_trigger_mode, s_dt5720_odb::trigger_positive_edge, s_dt5720_odb::wf_length, and s_dt5720_odb::zero_suppression_mode.
Referenced by dt5720_pre_bor().
|
static |
Definition at line 659 of file dt5720_module.c.
References CAEN_DGTZ_BadBoardType, CAEN_DGTZ_BadEventNumber, CAEN_DGTZ_BadInterruptLev, CAEN_DGTZ_CalibrationError, CAEN_DGTZ_ChannelBusy, CAEN_DGTZ_CommError, CAEN_DGTZ_DigitizerAlreadyOpen, CAEN_DGTZ_DigitizerMemoryCorrupted, CAEN_DGTZ_DigitizerNotFound, CAEN_DGTZ_DigitizerNotReady, CAEN_DGTZ_DPPFirmwareNotSupported, CAEN_DGTZ_EventNotFound, CAEN_DGTZ_FPIOModeInvalid, CAEN_DGTZ_FunctionNotAllowed, CAEN_DGTZ_GenericError, CAEN_DGTZ_InterruptNotConfigured, CAEN_DGTZ_InvalidBuffer, CAEN_DGTZ_InvalidChannelNumber, CAEN_DGTZ_InvalidEvent, CAEN_DGTZ_InvalidHandle, CAEN_DGTZ_InvalidLinkType, CAEN_DGTZ_InvalidParam, CAEN_DGTZ_MaxDevicesError, CAEN_DGTZ_NotYetImplemented, CAEN_DGTZ_OutOfMemory, CAEN_DGTZ_ReadDeviceRegisterFail, CAEN_DGTZ_Success, CAEN_DGTZ_Timeout, CAEN_DGTZ_WriteDeviceRegisterFail, CAEN_DGTZ_WrongAcqMode, FALSE, and TRUE.
Referenced by dt5720_eor(), dt5720_exit(), dt5720_init(), dt5720_pre_bor(), dt5720_readout(), and dt5720_update_digitizer().
bool block_sig |
Definition at line 52 of file dt5720_module.c.
|
static |
Definition at line 31 of file dt5720_module.c.
Referenced by dt5720_eor(), dt5720_pre_bor(), and dt5720_readout().
|
static |
Definition at line 32 of file dt5720_module.c.
Referenced by dt5720_pre_bor().
|
static |
Definition at line 33 of file dt5720_module.c.
Referenced by dt5720_exit(), dt5720_read(), dt5720_readout(), and dt5720_update_digitizer().
|
static |
Definition at line 34 of file dt5720_module.c.
Referenced by dt5720_readout(), and dt5720_update_digitizer().
|
static |
Definition at line 35 of file dt5720_module.c.
Referenced by dt5720_pre_bor(), dt5720_read(), and dt5720_readout().
struct readout_module dt5720_module |
Definition at line 55 of file dt5720_module.c.
|
static |
Definition at line 29 of file dt5720_module.c.
Referenced by dt5720_eor(), dt5720_exit(), dt5720_init(), dt5720_pre_bor(), dt5720_readout(), and dt5720_update_digitizer().
HNDLE hDB |
Definition at line 11 of file mucap_compress.cpp.
Referenced by caen_load(), comp_load(), dt5720_init(), eb_begin_of_run(), epics_ca_get(), epics_ca_init(), epics_ca_set(), fadc_load(), frontend_init(), ge_ln2_read(), hits_load(), load_fragment(), load_huffman(), logger_root(), main(), MCaenCompProcessRaw_init(), MDQ_DAQLivetime_eor(), MDQ_DigitizerOverflow_init(), MDQ_FADCBufferOverflow_init(), MDQ_FADCPacketLoss_init(), MDQ_IslandRate_eor(), MDQ_RunTime_eor(), MDQ_TDCCheck_eor(), MDQ_Thresholds_eor(), MMuSCAnalysisC_init(), module_init(), module_init_sort_and_stitch(), n2fadc_ndet_load(), n2fadc_tpc_load(), nfadc_load(), odb_connect(), odb_find_key(), odb_get_bool(), odb_get_boolarray(), odb_get_dword(), odb_get_int(), odb_get_word(), process_file(), read_separator_event(), register_equipment(), save_huffman(), scheduler(), stck_load(), tdc400_load(), tr_prestart(), tr_start(), update_odb(), UpdateDetectorBankNameMap(), and v1724_init().
|
static |
Definition at line 108 of file dt5720_module.c.
|
static |
Definition at line 30 of file dt5720_module.c.
Referenced by dt5720_init().