ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Options.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Options.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include <iosfwd>
12 #include <optional>
13 #include <string>
14 #include <utility>
15 #include <vector>
16 
17 namespace FW {
18 namespace Options {
19 
30 struct Interval {
31  std::optional<double> lower;
32  std::optional<double> upper;
33 };
34 
42 std::istream& operator>>(std::istream& is, Interval& interval);
43 
45 std::ostream& operator<<(std::ostream& os, const Interval& interval);
46 
47 } // namespace Options
48 } // namespace FW
49 
50 using read_series = std::vector<int>;
51 using read_range = std::vector<double>;
52 using read_strings = std::vector<std::string>;
53 
54 // Overloads must exist in the `std` namespace so ADL-lookup can find them.
55 namespace std {
56 
57 std::ostream& operator<<(std::ostream& os, const read_series& vec);
58 
59 std::ostream& operator<<(std::ostream& os, const read_range& vec);
60 
61 std::ostream& operator<<(std::ostream& os, const read_strings& vec);
62 
63 } // namespace std