Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
ae11ef43
Commit
ae11ef43
authored
Nov 07, 2022
by
Paolo Mutti
Browse files
caen changes
parent
dcfc6b10
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/controllers/npp/CAENCfdController.cpp
View file @
ae11ef43
...
...
@@ -55,6 +55,8 @@ CAENCfdController::CAENCfdController(const string& name) : CAENAdcController(nam
dynamicRange
.
init
(
this
,
NOSAVE
,
"dynamic_range"
);
baselineDelay
.
init
(
this
,
NOSAVE
,
"base_delay"
);
adcTemperature
.
init
(
this
,
NOSAVE
,
"adc_temperature"
,
"ADCTemp"
);
modelName
.
init
(
this
,
NOSAVE
,
"model_name"
);
useInhibit
.
init
(
this
,
NOSAVE
,
"use_inhibit"
);
m_dgtzDriver
.
init
(
this
,
"cfd_driver"
);
...
...
@@ -96,6 +98,7 @@ void CAENCfdController::postConfiguration() {
registerRefresher
(
cfdDelay
,
&
CAENCfdController
::
refreshCfdDelayProperty
,
this
);
registerRefresher
(
cfdThreshold
,
&
CAENCfdController
::
refreshCfdThresholdProperty
,
this
);
registerRefresher
(
dynamicRange
,
&
CAENCfdController
::
refreshDynamicRangeProperty
,
this
);
registerRefresher
(
useInhibit
,
&
CAENCfdController
::
refreshUseInhibitProperty
,
this
);
registerUpdater
(
m_dgtzDriver
->
adcTemperature
,
&
CAENCfdController
::
updateAdcTemperatureProperty
,
this
);
...
...
@@ -335,6 +338,12 @@ void CAENCfdController::refreshDynamicRangeProperty(int32 aValue) {
boost
::
thread
td
(
boost
::
bind
(
&
CAENCfdController
::
writeParam
,
this
));
}
void
CAENCfdController
::
refreshUseInhibitProperty
(
int32
aValue
)
{
m_dgtzDriver
->
useInhibit
.
set
(
aValue
);
boost
::
thread
td
(
boost
::
bind
(
&
CAENCfdController
::
writeParam
,
this
));
}
void
CAENCfdController
::
updateBoardProperties
()
{
modelName
.
update
(
m_dgtzDriver
->
modelName
());
if
(
modelName
()
==
"V1724"
)
{
...
...
@@ -352,6 +361,7 @@ void CAENCfdController::updateBoardProperties() {
maxRange
=
m_dgtzDriver
->
nbChannels
()
-
1
;
nbBits
.
update
(
m_dgtzDriver
->
nbBits
());
dppAcqMode
.
update
(
m_dgtzDriver
->
dppAcqMode
());
modelName
.
update
(
m_dgtzDriver
->
modelName
());
}
void
CAENCfdController
::
writeParam
()
{
...
...
@@ -386,6 +396,7 @@ void CAENCfdController::initChannel(int32 aChannel) {
m_dgtzDriver
->
dynamicRange
.
set
(
aChannel
,
dynamicRange
());
m_dgtzDriver
->
baselineDelay
.
set
(
aChannel
,
baselineDelay
());
m_dgtzDriver
->
channelActive
.
set
(
aChannel
,
channelActive
());
m_dgtzDriver
->
useInhibit
.
set
(
useInhibit
());
// Update channel mask
int32
mask
=
0
;
...
...
src/controllers/npp/CAENCfdController.h
View file @
ae11ef43
...
...
@@ -76,6 +76,10 @@ public:
Property
<
float64
>
baselineHoldOff
;
Property
<
float64
>
triggerHoldOff
;
// Board properties
Property
<
int32
>
useInhibit
;
Property
<
std
::
string
>
modelName
;
protected:
DriverPtr
<
caen_cfd
::
CAENCfdDriver
>
m_dgtzDriver
;
...
...
@@ -108,6 +112,7 @@ private:
void
refreshCfdDelayProperty
(
int32
aValue
)
;
void
refreshCfdThresholdProperty
(
int32
aValue
)
;
void
refreshDynamicRangeProperty
(
int32
aValue
)
;
void
refreshUseInhibitProperty
(
int32
aValue
)
;
virtual
void
updateBoardProperties
();
void
updateNbBitsProperty
();
...
...
src/controllers/npp/CAENPhaController.cpp
View file @
ae11ef43
...
...
@@ -103,10 +103,15 @@ void CAENPhaController::postConfiguration() {
registerRefresher
(
dcOffset
,
&
CAENPhaController
::
refreshDcOffsetProperty
,
this
);
registerRefresher
(
preTrigger
,
&
CAENPhaController
::
refreshPreTriggerProperty
,
this
);
registerRefresher
(
pulsePolarity
,
&
CAENPhaController
::
refreshPulsePolarityProperty
,
this
);
<<<<<<<
Updated
upstream
registerRefresher
(
dynamicRange
,
&
CAENPhaController
::
refreshDynamicRangeProperty
,
this
);
registerRefresher
(
useInhibit
,
&
CAENPhaController
::
refreshUseInhibitProperty
,
this
);
registerUpdater
(
m_dgtzDriver
->
adcTemperature
,
&
CAENPhaController
::
updateAdcTemperatureProperty
,
this
);
=======
registerRefresher
(
useFirstDerivative
,
&
CAENPhaController
::
refreshUseFirstDerivativeProperty
,
this
);
registerRefresher
(
useInhibit
,
&
CAENPhaController
::
refreshUseInhibitProperty
,
this
);
>>>>>>>
Stashed
changes
updateBoardProperties
();
}
...
...
@@ -377,6 +382,12 @@ void CAENPhaController::refreshUseInhibitProperty(int32 aValue) {
boost
::
thread
td
(
boost
::
bind
(
&
CAENPhaController
::
writeParam
,
this
));
}
void
CAENPhaController
::
refreshUseInhibitProperty
(
int32
aValue
)
{
m_dgtzDriver
->
useInhibit
.
set
(
aValue
);
boost
::
thread
td
(
boost
::
bind
(
&
CAENPhaController
::
writeParam
,
this
));
}
void
CAENPhaController
::
updateBoardProperties
()
{
modelName
.
update
(
m_dgtzDriver
->
modelName
());
if
(
modelName
()
==
"V1724"
)
{
...
...
@@ -394,6 +405,7 @@ void CAENPhaController::updateBoardProperties() {
maxRange
=
m_dgtzDriver
->
nbChannels
()
-
1
;
nbBits
.
update
(
m_dgtzDriver
->
nbBits
());
dppAcqMode
.
update
(
m_dgtzDriver
->
dppAcqMode
());
useInhibit
.
update
(
m_dgtzDriver
->
useInhibit
());
}
void
CAENPhaController
::
writeParam
()
{
...
...
src/controllers/npp/CAENPhaController.h
View file @
ae11ef43
...
...
@@ -82,6 +82,9 @@ public:
// Board properties
Property
<
int32
>
useInhibit
;
// Board properties
Property
<
int32
>
useInhibit
;
protected:
DriverPtr
<
caen_pha
::
CAENPhaDriver
>
m_dgtzDriver
;
...
...
src/controllers/npp/gui/cfd_controler/cfd_controllerView.xml
View file @
ae11ef43
...
...
@@ -14,6 +14,9 @@
<switchable_composite
switcher_key=
"acqModeSwitcher"
switch_values=
"2"
>
<text
role=
"cfd_controller1"
property=
"record_length"
prefix=
"cfd_controller.recordLength"
/>
</switchable_composite>
<newLine/>
<simple_label
prefix=
"cfd_controller.useInhibit"
/>
<check
role=
"cfd_controller1"
property=
"use_inhibit"
checkBoxValues=
"cfd_controller.useInhibit"
/>
</group>
<newLine/>
...
...
src/drivers/caen/caen_cfd/CAENCfdDriver.h
View file @
ae11ef43
...
...
@@ -80,6 +80,8 @@ public:
Property
<
int32
>
channelMask
;
Property
<
int32
>
oscilloscopeTrace
;
Property
<
int32
>
useInhibit
;
// Channels properties in dppParams
DynamicProperty
<
int32
>
trapezoidFlatTop
;
DynamicProperty
<
int32
>
trapezoidRiseTime
;
...
...
src/drivers/caen/caen_cfd/RealCAENCfdDriver.cpp
View file @
ae11ef43
...
...
@@ -50,6 +50,13 @@ void RealCAENCfdDriver::init() {
// Set channel enable
setChannelEnable
();
// Channel CTRL register only for V1724 (individual trigger, sequencial readout)
if
(
owner
()
->
model
()
==
CAEN_DGTZ_V1724
)
{
int32
aValue
=
0x01000114
;
owner
()
->
write
(
0x8000
,
driver
::
Vme
::
LONGWORD_WIDTH
,
1
,
(
void
*
)
&
aValue
);
}
// Set acquisition mode
setAcqMode
();
...
...
@@ -207,7 +214,7 @@ void RealCAENCfdDriver::setAcqMode() {
}
/*!
* \brief
Set acquisition mode command implementation
* \brief
Enable channels
*/
void
RealCAENCfdDriver
::
setChannelEnable
()
{
...
...
src/drivers/caen/caen_cfd/RealCAENCfdDriver.h
View file @
ae11ef43
...
...
@@ -98,6 +98,11 @@ public:
*/
virtual
void
calibrateADC
();
/*!
* \brief Calibrate ADC for V1725 and V1730 models
*/
virtual
void
calibrateADC
();
private:
void
LockTempCalibration
(
uint32_t
ch
);
...
...
src/drivers/caen/caen_cfd/gui/caen_cfdProperties.xml
View file @
ae11ef43
...
...
@@ -2,9 +2,6 @@
<controller
type=
"caen_cfd"
>
<property
name=
"nb_channels"
type=
"int32"
max_length=
"2"
>
</property>
<dynamic_property
name=
"decay_time"
size_property=
"nb_channels"
type=
"int32"
max_length=
"6"
>
</dynamic_property>
...
...
@@ -79,10 +76,10 @@
<dynamic_property
name=
"use_first_derivative"
size_property=
"nb_channels"
type=
"int32"
>
</dynamic_property>
s
<dynamic_property
name=
"cfd_active"
size_property=
"nb_channels"
type=
"int32"
max_length=
"2"
>
<dynamic_property
name=
"cfd_active"
size_property=
"nb_channels"
type=
"int32"
max_length=
"2"
>
</dynamic_property>
s
<dynamic_property
name=
"cfd_active_str"
size_property=
"nb_channels"
type=
"string"
max_length=
"8"
>
<dynamic_property
name=
"cfd_active_str"
size_property=
"nb_channels"
type=
"string"
max_length=
"8"
>
</dynamic_property>
<dynamic_property
name=
"cfd_fraction"
size_property=
"nb_channels"
type=
"int32"
max_length=
"3"
>
...
...
src/drivers/caen/caen_pha/CAENPhaDriver.h
View file @
ae11ef43
...
...
@@ -89,7 +89,6 @@ public:
Property
<
int32
>
useInhibit
;
// Channels properties in dppParams
DynamicProperty
<
int32
>
signalDecayTime
;
// M - range 0:65535
DynamicProperty
<
int32
>
trapezoidFlatTop
;
// m - range 0:1023
DynamicProperty
<
int32
>
trapezoidRiseTime
;
// k - range 0:1023
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment