Commit a226de99 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Detector: delete default destructor, actually use destructor correctly

parent 211d2f19
......@@ -8,8 +8,7 @@
using namespace ROOT::Math;
using namespace corryvreckan;
Detector::Detector() {}
Detector::Detector(const Configuration& config) : Detector() {
Detector::Detector(const Configuration& config) {
// Get information from the conditions file:
auto m_displacement = config.get<ROOT::Math::XYZPoint>("position", ROOT::Math::XYZPoint());
auto m_orientation = config.get<ROOT::Math::XYZVector>("orientation", ROOT::Math::XYZVector());
......
......@@ -31,9 +31,14 @@ namespace corryvreckan {
class Detector {
public:
// Constructors and desctructors
Detector();
Detector() = delete;
Detector(const Configuration& config);
~Detector() {}
~Detector() {
delete m_translations;
delete m_rotations;
delete m_localToGlobal;
delete m_globalToLocal;
}
// Functions to retrieve basic information
std::string type() { return m_detectorType; }
......
Supports Markdown
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