Skip to content
Snippets Groups Projects
Commit 4267f09d authored by Arafat Nourredine's avatar Arafat Nourredine
Browse files

minor changes : Rename a data member

parent 700645dd
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
...@@ -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 correctyion 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_xy(); 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment