Commit c6e5204b authored by Abdelali Elaazzouzi's avatar Abdelali Elaazzouzi

Merge branch 'V3.2_191' of https://code.ill.fr/instrument-control/nomad-modules.git into V3.2_191

parents be14e9b1 be9cec3d
......@@ -67,7 +67,6 @@ GGCAENV1740QdivController::GGCAENV1740QdivController(const string& name) :
localinitfloat64(poleZero, SAVE, "poleZero");
localinitint32(attenuationSect1, SAVE, "attenuationSect1");
localinitint32(attenuationSect2, SAVE, "attenuationSect2");
localinitint32(enableBlocs, SAVE | HEX, "enableBlocs");
localinitint32(negativeInput, SAVE, "negativeInput");
numberEventPerAgregate.init(this, SAVE, "numberEventPerAgregate");
numberOfFlushEvent.init(this, SAVE, "numberOfFlushEvent");
......@@ -161,11 +160,11 @@ void GGCAENV1740QdivController::postConfiguration() {
registerRefresher(channelEnable, &GGCAENV1740QdivController::refreshLocalChannelEnable, this);
registerRefresher(trgThreshold, &GGCAENV1740QdivController::refreshLocalTrgThreshold, this);
registerUpdater(logic1, &GGCAENV1740QdivController::computeLogicCoefs, this );
registerUpdater(logic2, &GGCAENV1740QdivController::computeLogicCoefs, this );
registerUpdater(logic3, &GGCAENV1740QdivController::computeLogicCoefs, this );
registerUpdater(logic4, &GGCAENV1740QdivController::computeLogicCoefs, this );
registerUpdater(logic5, &GGCAENV1740QdivController::computeLogicCoefs, this );
registerUpdater(logic1, &GGCAENV1740QdivController::computeIllCoefs, this );
registerUpdater(logic2, &GGCAENV1740QdivController::computeIllCoefs, this );
registerUpdater(logic3, &GGCAENV1740QdivController::computeIllCoefs, this );
registerUpdater(logic4, &GGCAENV1740QdivController::computeIllCoefs, this );
registerUpdater(logic5, &GGCAENV1740QdivController::computeIllCoefs, this );
registerRefresher(scopeAuto,&GGCAENV1740QdivController::refreshScopeAutoProperty, this );
registerRefresher(scopeIn, &GGCAENV1740QdivController::refreshScopeModeProperty, this);
......@@ -305,16 +304,8 @@ void GGCAENV1740QdivController::refreshDisplayChannelProperty(int32 value) throw
*/
void GGCAENV1740QdivController::setNbChannels(int32 value) {
//cout << "GGCAENV1740QdivController::setNbChannels : " << value << endl;
gateOffset.resize(value);
dcOffset.resize(value);
preTrig.resize(value);
displayChannelEnable.resize(value);
displayTrgThreshold.resize(value);
logic1.resize(value);
logic2.resize(value);
logic3.resize(value);
logic4.resize(value);
logic5.resize(value);
GGController::setNbChannels(value);
}
......@@ -532,20 +523,11 @@ void GGCAENV1740QdivController::computeIllCoefs(int32 index) {
writeParameter(0x1018 + 0x100 * index, ((int32) (exp(-2.36216 * ts) * 16384 + 0.5)) & 0x3FFFF);
writeParameter(0x101C + 0x100 * index, ((int32) (2 * exp(-1.18108 * ts) * cos(1.06037 * ts) * 16384 + 0.5)) & 0x3FFFF);
writeParameter(0x1028 + 0x100 * index, ((int32) (32768 / (62.5 * poleZero.get(index)))) & 0x3FFFF);
int32 enableblocs = logic5.get(index)<<4 | logic4.get(index)<<3 | logic3.get(index)<<2 | logic2.get(index)<<1 | logic1.get(index);
writeParameter(0x102C + 0x100 * index,
(0x3FFF
& ((0x000F & attenuationSect1.get(index)) | (0x00F0 & attenuationSect2.get(index) << 4)
| (0xFF00 & enableBlocs.get(index) << 8) | (0xF000 & negativeInput.get(index) << 13))));
}
/*
* computeLogicCoefs
*/
void GGCAENV1740QdivController::computeLogicCoefs(int32 index){
enableBlocs.set(index , logic5.get(index)<<4 | logic4.get(index)<<3 | logic3.get(index)<<2 | logic2.get(index)<<1 | logic1.get(index) );
//cout << "computeLogicCoefs -> enableBlocs " << hex << enableBlocs.get(index) << dec << endl;
computeIllCoefs(index);
| (0xFF00 & enableblocs << 8) | (0xF000 & negativeInput.get(index) << 13))));
}
/*
......@@ -759,7 +741,6 @@ void GGCAENV1740QdivController::setToAllDynamicInt32Property(DynamicProperty<int
void GGCAENV1740QdivController::copyToAllBlocs() {
int32 currentBloc = displayChannel();
int32 val1 ;
// displayChannelEnable
val1 = displayChannelEnable.get(0);
......
......@@ -80,7 +80,6 @@ public:
DynamicProperty<float64> poleZero;
DynamicProperty<int32> attenuationSect1;
DynamicProperty<int32> attenuationSect2;
DynamicProperty<int32> enableBlocs;
DynamicProperty<int32> negativeInput;
Property<int32> numberEventPerAgregate;
Property<int32> numberOfFlushEvent;
......@@ -151,7 +150,6 @@ private:
void refreshRecordLengthProperty(int32 value);
void computeIllCoefs(int32 index);
void computeLogicCoefs(int32 index);
void writeCalibration();
virtual void start();
......
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="d22collimationsetup">
<property name="selected_colSetup" type="float64" max_length="4">
<property name="selected_colSetup" type="float64" max_length="5">
</property>
<property name="direction_colInfo" type="string">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment