Skip to content
Snippets Groups Projects
Commit c61aecf3 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

mv one src pair; add m_ to private members

parent 5a854c9a
Branches
Tags
1 merge request!45various cleanup
......@@ -22,7 +22,7 @@ DetectorContext::DetectorContext(const IDetector2D* detector)
size_t DetectorContext::numberOfSimulationElements() const
{
return active_indices.size();
return m_active_indices.size();
}
//! Creates pixel for given element index. Element index is sequetial index in a vector
......@@ -31,19 +31,19 @@ size_t DetectorContext::numberOfSimulationElements() const
std::unique_ptr<IPixel> DetectorContext::createPixel(size_t element_index) const
{
return std::unique_ptr<IPixel>(pixels[element_index]->clone());
return std::unique_ptr<IPixel>(m_pixels[element_index]->clone());
}
size_t DetectorContext::detectorIndex(size_t element_index) const
{
return active_indices[element_index];
return m_active_indices[element_index];
}
void DetectorContext::setup_context(const IDetector2D* detector)
{
active_indices = detector->active_indices();
analyzer_operator = detector->detectionProperties().analyzerOperator();
pixels.reserve(active_indices.size());
for (auto detector_index : active_indices)
pixels.emplace_back(detector->createPixel(detector_index));
m_active_indices = detector->active_indices();
m_analyzer_operator = detector->detectionProperties().analyzerOperator();
m_pixels.reserve(m_active_indices.size());
for (auto detector_index : m_active_indices)
m_pixels.emplace_back(detector->createPixel(detector_index));
}
......@@ -46,9 +46,9 @@ public:
private:
void setup_context(const IDetector2D* detector);
Eigen::Matrix2cd analyzer_operator;
std::vector<std::unique_ptr<IPixel>> pixels; //! All unmasked pixels inside ROI.
std::vector<size_t> active_indices; //! The sequence of detector bin indices (unmasked, in ROI)
Eigen::Matrix2cd m_analyzer_operator;
std::vector<std::unique_ptr<IPixel>> m_pixels; //! All unmasked pixels inside ROI.
std::vector<size_t> m_active_indices; //! The sequence of bin indices (unmasked, in ROI)
};
#endif // BORNAGAIN_DEVICE_DETECTOR_DETECTORCONTEXT_H
......
......@@ -18,7 +18,7 @@
#include "Base/Types/CloneableVector.h"
#include "Base/Types/ICloneable.h"
#include "Device/Detector/DetectionProperties.h"
#include "Device/ProDetector/DetectionProperties.h"
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Unit/Axes.h"
......
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Device/Detector/DetectionProperties.cpp
//! @file Device/ProDetector/DetectionProperties.cpp
//! @brief Implements class DetectionProperties.
//!
//! @homepage http://www.bornagainproject.org
......@@ -12,7 +12,7 @@
//
// ************************************************************************************************
#include "Device/Detector/DetectionProperties.h"
#include "Device/ProDetector/DetectionProperties.h"
#include "Param/Base/RealParameter.h"
DetectionProperties::DetectionProperties(kvector_t direction, double efficiency,
......
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Device/Detector/DetectionProperties.h
//! @file Device/ProDetector/DetectionProperties.h
//! @brief Defines class DetectionProperties.
//!
//! @homepage http://www.bornagainproject.org
......
......@@ -2757,13 +2757,13 @@ Returns true if area defined by two bins is inside or on border of polygon (more
// File: namespace_0d11.xml
// File: namespace_0d32.xml
// File: namespace_0d28.xml
// File: namespace_0d55.xml
// File: namespace_0d51.xml
// File: namespace_0d63.xml
// File: namespace_0d59.xml
// File: namespace_0d90.xml
......@@ -3034,18 +3034,6 @@ make Swappable
";
// File: DetectionProperties_8cpp.xml
// File: DetectionProperties_8h.xml
// File: DetectorContext_8cpp.xml
// File: DetectorContext_8h.xml
// File: IDetector_8cpp.xml
......@@ -3217,6 +3205,18 @@ make Swappable
// File: Rectangle_8h.xml
// File: DetectionProperties_8cpp.xml
// File: DetectionProperties_8h.xml
// File: DetectorContext_8cpp.xml
// File: DetectorContext_8h.xml
// File: DetectorMask_8cpp.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment