flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
observable_problems_format_slha.hpp
Go to the documentation of this file.
1// ====================================================================
2// This file is part of FlexibleSUSY.
3//
4// FlexibleSUSY is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published
6// by the Free Software Foundation, either version 3 of the License,
7// or (at your option) any later version.
8//
9// FlexibleSUSY is distributed in the hope that it will be useful, but
10// WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with FlexibleSUSY. If not, see
16// <http://www.gnu.org/licenses/>.
17// ====================================================================
18
19#ifndef OBSERVABLE_PROBLEMS_FORMAT_SLHA_H
20#define OBSERVABLE_PROBLEMS_FORMAT_SLHA_H
21
22#include "observables.hpp"
25#include "slha_format.hpp"
26
27#include <string>
28
29namespace flexiblesusy {
30
31namespace observable_problems {
32
34template <class OutputIterator>
36public:
37 SLHA_output_iterator_adaptor(OutputIterator& oi_, int obs_idx_, int flag_)
38 : oi(oi_)
39 , obs_idx(obs_idx_)
40 , flag(flag_)
41 {
42 }
43
44 void operator=(const std::string& elem) {
45 oi = FORMAT_OBSINFO(obs_idx, flag, elem);
46 }
47
48 void operator++(int) { oi++; }
49
50private:
51 OutputIterator& oi;
52 int obs_idx{-1};
53 int flag{-1};
54};
55
56} // namespace observable_problems
57
58
60template <typename OutputIterator>
62{
63 const int problem_flag = 3;
65
66 {
67 SLHA_oi slha_oi(oi, 0, problem_flag);
68 copy_problem_strings(op.general, slha_oi);
69 }
70
71 {
72 SLHA_oi slha_oi(oi, observables::a_muon + 1, problem_flag);
73 copy_problem_strings(op.a_muon, slha_oi);
74 }
75}
76
77} // namespace flexiblesusy
78
79#endif
observable_problems::Problem_general general
general problems
observable_problems::Problem_a_muon a_muon
problems for a_muon
void slha_format_problems_and_warnings(const Observable_problems &op, OutputIterator oi)
copies problem strings to output iterator
void copy_problem_strings(const Observable_problems &op, OutputIterator oi)
copies problem strings to output iterator
#define FORMAT_OBSINFO(i, j, str)