/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus * * MAUS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MAUS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MAUS. If not, see . * */ #ifndef _SRC_COMMON_CPP_DATASTRUCTURE_DOUBLEPAIR_HH_ #define _SRC_COMMON_CPP_DATASTRUCTURE_DOUBLEPAIR_HH_ // C++ headers #include #include #include "src/common_cpp/Utils/VersionNumber.hh" namespace MAUS { /** @class DoublePair * @author A. Dobbs * @date 2017/11/01 * @brief A wrapper for std::pair to ease writing to JSON or ROOT */ class DoublePair : public std::pair { public: DoublePair() { this->first = 0.0; this->second = 0.0; } //NOLINT DoublePair(double f, double s) { this->first = f; this->second = s; } //NOLINT virtual ~DoublePair() {} double get_first() const { return this->first; } void set_first(double f) { this->first = f; } double get_second() const { return this->second; } void set_second(double s) { this->second = s; } private: MAUS_VERSIONED_CLASS_DEF(DoublePair); }; typedef std::vector DoublePairArray; } // ~namespace MAUS #endif