a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
BaseSlhaBlock.hpp
Go to the documentation of this file.
1/*
2 * BaseSlhaBlock.hpp
3 *
4 * Created on: Mar 15, 2012
5 * Author: Ben O'Leary (benjamin.oleary@gmail.com)
6 * Copyright 2012 Ben O'Leary
7 *
8 * This file is part of LesHouchesParserClasses, released under the
9 * GNU General Public License. Please see the accompanying
10 * README.LHPC_CPP.txt file for a full list of files, brief documentation
11 * on how to use these classes, and further details on the license.
12 */
13
14#ifndef BASESLHABLOCK_HPP_
15#define BASESLHABLOCK_HPP_
16
17#include <string>
18#include <map>
20#include "BaseStringBlock.hpp"
21#include "../../MEC/RunningConstant.hpp"
22#include "../../MEC/RunningConstantError.hpp"
23
24namespace LHPC
25{
26 namespace SLHA
27 {
28 typedef
30
31 /* this abstract base class allows other classes to know basic functions
32 * of the SLHA block interpreter class without needing to know the specific
33 * interpretation.
34 */
36 {
37 public:
38 BaseSlhaBlock( std::string const& blockName );
39 virtual
41
42 std::string const&
43 getName() const;
44 // this returns the name in uppercase.
45 bool
46 nameMatches( std::string const& nameToCompare ) const;
47 // this returns true if nameToCompare matches the block name ignoring
48 // case.
49 virtual bool
50 isFmassBlock() const;
51 // this returns false. only a specific derived class should over-ride it
52 // to return true if it is actually an interpreter for an FMASS block.
53 virtual std::multimap< int, RunningConstant > const*
54 getFmassMap() const;
55 // this returns NULL. only a specific derived class should over-ride it
56 // to return a non-NULL pointer.
57 virtual bool
58 isFmasserrBlock() const;
59 // this returns false. only a specific derived class should over-ride it
60 // to return true if it is actually an interpreter for an FMASSERR block.
61 virtual std::multimap< int, RunningConstantError > const*
62 getFmasserrMap() const;
63 // this returns NULL. only a specific derived class should over-ride it
64 // to return a non-NULL pointer.
65 virtual bool
66 isMassBlock() const;
67 // this returns false. only a specific derived class should over-ride it
68 // to return true if it is actually an interpreter for a MASS block.
69 virtual std::map< int, double > const*
70 getMassMap() const;
71 // this returns NULL. only a specific derived class should over-ride it
72 // to return a non-NULL pointer.
73
74
75 protected:
76 std::string blockName;
77 };
78
79
80
81
82 inline std::string const&
84 // this returns the name in uppercase.
85 {
86 return blockName;
87 }
88
89 inline bool
90 BaseSlhaBlock::nameMatches( std::string const& nameToCompare ) const
91 // this returns true if nameToCompare matches the block name ignoring
92 // case.
93 {
95 blockName );
96 }
97
98 inline bool
100 // this returns false. only a specific derived class should over-ride it
101 // to return true if it is actually an interpreter for an FMASS block.
102 {
103 return false;
104 }
105
106 inline std::multimap< int, RunningConstant > const*
108 {
109 return NULL;
110 }
111
112 inline bool
114 // this returns false. only a specific derived class should over-ride it
115 // to return true if it is actually an interpreter for an FMASS block.
116 {
117 return false;
118 }
119
120 inline std::multimap< int, RunningConstantError > const*
122 {
123 return NULL;
124 }
125
126 inline bool
128 // this returns false. only a specific derived class should over-ride it
129 // to return true if it is actually an interpreter for a MASS block.
130 {
131 return false;
132 }
133
134 inline std::map< int, double > const*
136 {
137 return NULL;
138 }
139
140 }
141
142}
143
144#endif /* BASESLHABLOCK_HPP_ */
static bool stringsMatchIgnoringCase(std::string const &firstString, std::string const &secondString)
BaseSlhaBlock(std::string const &blockName)
virtual bool isMassBlock() const
virtual std::multimap< int, RunningConstant > const * getFmassMap() const
virtual bool isFmassBlock() const
std::string const & getName() const
virtual std::map< int, double > const * getMassMap() const
virtual std::multimap< int, RunningConstantError > const * getFmasserrMap() const
bool nameMatches(std::string const &nameToCompare) const
virtual bool isFmasserrBlock() const
BOL::PushedToObserver< BlockClass::BaseStringBlock > StringBlockObserver