Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MythenWAXS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
Acquisition
1D
MythenWAXS
Commits
4267f09d
Commit
4267f09d
authored
7 years ago
by
Arafat Nourredine
Browse files
Options
Downloads
Patches
Plain Diff
minor changes : Rename a data member
parent
700645dd
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MythenPool.cpp
+28
-32
28 additions, 32 deletions
src/MythenPool.cpp
src/MythenPool.h
+26
-25
26 additions, 25 deletions
src/MythenPool.h
with
54 additions
and
57 deletions
src/MythenPool.cpp
+
28
−
32
View file @
4267f09d
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
namespace
MythenWAXS_ns
namespace
MythenWAXS_ns
{
{
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//- MythenPool Ctor
//- MythenPool Ctor
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
@@ -65,7 +64,6 @@ void MythenPool::set_state(Tango::DevState state)
...
@@ -65,7 +64,6 @@ void MythenPool::set_state(Tango::DevState state)
}
}
}
}
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
@@ -79,7 +77,6 @@ Tango::DevState MythenPool::get_state()
...
@@ -79,7 +77,6 @@ Tango::DevState MythenPool::get_state()
}
}
}
}
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
@@ -273,7 +270,7 @@ void MythenPool::stop()
...
@@ -273,7 +270,7 @@ void MythenPool::stop()
const
std
::
vector
<
float
>&
MythenPool
::
get_frame_x
()
const
std
::
vector
<
float
>&
MythenPool
::
get_frame_x
()
{
{
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
return
m_x_values
;
return
m_
frame_
x_values
;
}
}
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
@@ -282,7 +279,7 @@ const std::vector<float>& MythenPool::get_frame_x()
...
@@ -282,7 +279,7 @@ const std::vector<float>& MythenPool::get_frame_x()
const
std
::
vector
<
float
>&
MythenPool
::
get_frame_y
()
const
std
::
vector
<
float
>&
MythenPool
::
get_frame_y
()
{
{
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
return
m_y_values
;
return
m_
frame_
y_values
;
}
}
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
@@ -291,8 +288,8 @@ void MythenPool::compute_frame_xy()
...
@@ -291,8 +288,8 @@ void MythenPool::compute_frame_xy()
{
{
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
yat
::
MutexLock
scoped_lock
(
m_proxy_lock
);
m_x_values
.
clear
();
m_
frame_
x_values
.
clear
();
m_y_values
.
clear
();
m_
frame_
y_values
.
clear
();
unsigned
nb_total_modules
=
0
;
unsigned
nb_total_modules
=
0
;
//get the motor position tth2C
//get the motor position tth2C
double
theta_position
;
double
theta_position
;
...
@@ -322,12 +319,12 @@ void MythenPool::compute_frame_xy()
...
@@ -322,12 +319,12 @@ void MythenPool::compute_frame_xy()
(
180.0
/
M_PI
)
*
atan
((
m_centers
.
at
(
nb_total_modules
+
j
)
-
(
1279
-
k
))
*
m_prop
.
pixel_size
/
m_distances
.
at
(
nb_total_modules
+
j
));
(
180.0
/
M_PI
)
*
atan
((
m_centers
.
at
(
nb_total_modules
+
j
)
-
(
1279
-
k
))
*
m_prop
.
pixel_size
/
m_distances
.
at
(
nb_total_modules
+
j
));
//NB: Mythen modules are mounted in opposite sens, why we use (1279-k) instead of k !!
//NB: Mythen modules are mounted in opposite sens, why we use (1279-k) instead of k !!
m_x_values
.
push_back
(
twotheta
);
m_
frame_
x_values
.
push_back
(
twotheta
);
m_y_values
.
push_back
(
frame
.
at
(
k
)
*
m_scales
.
at
(
nb_total_modules
+
j
));
m_
frame_
y_values
.
push_back
(
frame
.
at
(
k
)
*
m_scales
.
at
(
nb_total_modules
+
j
));
}
}
}
}
INFO_STREAM
<<
"m_x_values.size() = "
<<
m_x_values
.
size
()
<<
std
::
endl
;
INFO_STREAM
<<
"m_
frame_
x_values.size() = "
<<
m_
frame_
x_values
.
size
()
<<
std
::
endl
;
INFO_STREAM
<<
"m_y_values.size() = "
<<
m_y_values
.
size
()
<<
std
::
endl
;
INFO_STREAM
<<
"m_
frame_
y_values.size() = "
<<
m_
frame_
y_values
.
size
()
<<
std
::
endl
;
nb_total_modules
+=
nb_modules
;
nb_total_modules
+=
nb_modules
;
INFO_STREAM
<<
"
\n
"
<<
std
::
endl
;
INFO_STREAM
<<
"
\n
"
<<
std
::
endl
;
INFO_STREAM
<<
"nb_total_modules = "
<<
nb_total_modules
<<
std
::
endl
;
INFO_STREAM
<<
"nb_total_modules = "
<<
nb_total_modules
<<
std
::
endl
;
...
@@ -453,7 +450,6 @@ void MythenPool::compute_state_status()
...
@@ -453,7 +450,6 @@ void MythenPool::compute_state_status()
if
(
m_state
!=
Tango
::
INIT
)
if
(
m_state
!=
Tango
::
INIT
)
{
{
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
try
try
{
{
//more than one proxy mythen devices
//more than one proxy mythen devices
...
...
This diff is collapsed.
Click to expand it.
src/MythenPool.h
+
26
−
25
View file @
4267f09d
...
@@ -89,53 +89,51 @@ public:
...
@@ -89,53 +89,51 @@ public:
/// dtor
/// dtor
virtual
~
MythenPool
();
virtual
~
MythenPool
();
/// get the last state
of the task
/// get the last state
Tango
::
DevState
get_state
();
Tango
::
DevState
get_state
();
/// get the last status
of the task
/// get the last status
std
::
string
get_status
();
std
::
string
get_status
();
/// start the acquisition
/// start the acquisition
on all Mythen2Detector devices
void
snap
();
void
snap
();
/// stop the acquisition
/// stop the acquisition
on all Mythen2Detector devices
void
stop
();
void
stop
();
/// write energy
/// write energy
on all modules of all Mythen2Detector devices
void
write_energy
(
float
);
void
write_energy
(
float
);
///
get the last status of the task
///
write threshold on all modules of all Mythen2Detector devices
void
write_threshold
(
float
);
void
write_threshold
(
float
);
/// write
threshold
/// write
exposure on all Mythen2Detector devices
void
write_exposure_time
(
double
);
void
write_exposure_time
(
double
);
/// write nbFrames
/// write nbFrames
on all Mythen2Detector devices
void
write_nb_frames
(
long
);
void
write_nb_frames
(
long
);
/// write flatfield correct
y
ion flag
/// write flatfield correction flag
on all Mythen2Detector devices
void
write_flatfield_correction
(
bool
);
void
write_flatfield_correction
(
bool
);
/// write rate correction flag
/// write rate correction flag
on all Mythen2Detector devices
void
write_rate_correction
(
bool
);
void
write_rate_correction
(
bool
);
/// write badchannel interpolation flag
/// write badchannel interpolation flag
on all Mythen2Detector devices
void
write_badchannel_interpolation
(
bool
);
void
write_badchannel_interpolation
(
bool
);
/// read the total nb of modules
/// read the total nb of modules
of all Mythen2Detector devices
long
get_nb_modules
();
long
get_nb_modules
();
/// read the total nb of channels
/// read the total nb of channels
of all Mythen2Detector devices
long
get_nb_channels
();
long
get_nb_channels
();
/// read the frame (x)
/// read the frame (x)
(twotheta angle in degrees)
const
std
::
vector
<
float
>&
get_frame_x
();
const
std
::
vector
<
float
>&
get_frame_x
();
/// read the frame (x)
const
std
::
vector
<
float
>&
get_frame_y
();
///
compute
the frame
///
read
the frame
(y) (intensity)
void
compute
_frame_
x
y
();
const
std
::
vector
<
float
>&
get
_frame_y
();
protected:
protected:
/// [yat4tango::DeviceTask implementation]
/// [yat4tango::DeviceTask implementation]
...
@@ -147,19 +145,22 @@ protected:
...
@@ -147,19 +145,22 @@ protected:
/// fix the status in a scoped_lock
/// fix the status in a scoped_lock
void
set_status
(
const
std
::
string
&
status
);
void
set_status
(
const
std
::
string
&
status
);
/// compute internal state/status
of task
/// compute internal state/status
void
compute_state_status
();
void
compute_state_status
();
/// decode property
coefs
/// decode
equation parameters
property
void
decode_equation_parameters
();
void
decode_equation_parameters
();
/// compute the frameX & frameY
void
compute_frame_xy
();
///owner device server
///owner device server
Tango
::
DeviceImpl
*
m_device
;
Tango
::
DeviceImpl
*
m_device
;
///
task
state
/// state
Tango
::
DevState
m_state
;
Tango
::
DevState
m_state
;
///
task
status
/// status
std
::
stringstream
m_status
;
std
::
stringstream
m_status
;
/// lock for general state
/// lock for general state
...
@@ -172,8 +173,8 @@ protected:
...
@@ -172,8 +173,8 @@ protected:
std
::
vector
<
yat
::
SharedPtr
<
yat4tango
::
DeviceProxyHelper
>
>
m_proxy_mythens
;
std
::
vector
<
yat
::
SharedPtr
<
yat4tango
::
DeviceProxyHelper
>
>
m_proxy_mythens
;
yat
::
SharedPtr
<
yat4tango
::
DeviceProxyHelper
>
m_proxy_motor
;
yat
::
SharedPtr
<
yat4tango
::
DeviceProxyHelper
>
m_proxy_motor
;
std
::
vector
<
float
>
m_x_values
;
std
::
vector
<
float
>
m_
frame_
x_values
;
std
::
vector
<
float
>
m_y_values
;
std
::
vector
<
float
>
m_
frame_
y_values
;
std
::
vector
<
float
>
m_deltas
;
std
::
vector
<
float
>
m_deltas
;
std
::
vector
<
float
>
m_centers
;
std
::
vector
<
float
>
m_centers
;
std
::
vector
<
float
>
m_distances
;
std
::
vector
<
float
>
m_distances
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment