master
a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models
Loading...
Searching...
No Matches
JustSingleValueBlock.hpp
Go to the documentation of this file.
1
/*
2
* JustSingleValueBlock.hpp
3
*
4
* Created on: Mar 12, 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 JUSTSINGLEVALUEBLOCK_HPP_
15
#define JUSTSINGLEVALUEBLOCK_HPP_
16
17
#include "../SlhaBlock.hpp"
18
#include "
InterpreterClasses/JustSingleValue.hpp
"
19
20
namespace
LHPC
21
{
22
namespace
SLHA
23
{
24
// this template class interprets all the blocks with the same name, though
25
// differing scale values, which are interpreted as having a single value.
26
template
<
class
ValueClass >
27
class
JustSingleValueBlock
:
public
SlhaBlock
< ValueClass,
28
InterpreterClass::JustSingleValue< ValueClass > >
29
{
30
public
:
31
JustSingleValueBlock
( std::string
const
&
blockName
,
32
ValueClass
const
&
defaultUnsetValue
,
33
bool
const
isVerbose
=
false
);
34
virtual
35
~JustSingleValueBlock
();
36
37
ValueClass&
38
operator()
();
39
// this returns operator() of the lowest-scale interpreter.
40
ValueClass
const
&
41
operator()
()
const
;
42
// const version of above.
43
bool
44
hasEntry
()
const
;
45
// this returns hasEntry() of the lowest-scale interpreter.
46
};
47
48
49
50
51
52
template
<
class
ValueClass >
53
inline
54
JustSingleValueBlock< ValueClass >::JustSingleValueBlock
(
55
std::string
const
& blockName,
56
ValueClass
const
& defaultUnsetValue,
57
bool
const
isVerbose ) :
58
SlhaBlock
< ValueClass,
59
InterpreterClass::JustSingleValue< ValueClass > >(
60
blockName,
61
defaultUnsetValue,
62
isVerbose )
63
{
64
// just an initialization list.
65
}
66
67
template
<
class
ValueClass >
68
inline
69
JustSingleValueBlock< ValueClass >::~JustSingleValueBlock
()
70
{
71
// does nothing.
72
}
73
74
75
template
<
class
ValueClass >
76
inline
ValueClass&
77
JustSingleValueBlock< ValueClass >::operator()
()
78
// this returns operator() of the lowest-scale interpreter.
79
{
80
return
this->dataBlocks[ this->lowestScaleIndex ]();
81
}
82
83
template
<
class
ValueClass >
84
inline
ValueClass
const
&
85
JustSingleValueBlock< ValueClass >::operator()
() const
86
// const version of above.
87
{
88
return
this->dataBlocks[ this->lowestScaleIndex ]();
89
}
90
91
template
<
class
ValueClass >
92
inline
bool
93
JustSingleValueBlock< ValueClass >::hasEntry
() const
94
// this returns hasEntry() of the lowest-scale interpreter.
95
{
96
return
this->dataBlocks[ this->lowestScaleIndex ].hasEntry();
97
}
98
99
}
// end of SLHA namespace
100
101
}
// end of LHPC namespace
102
103
#endif
/* JUSTSINGLEVALUEBLOCK_HPP_ */
JustSingleValue.hpp
LHPC::SLHA::BaseSlhaBlock::blockName
std::string blockName
Definition
BaseSlhaBlock.hpp:76
LHPC::SLHA::JustSingleValueBlock
Definition
JustSingleValueBlock.hpp:29
LHPC::SLHA::JustSingleValueBlock::operator()
ValueClass const & operator()() const
Definition
JustSingleValueBlock.hpp:85
LHPC::SLHA::JustSingleValueBlock::JustSingleValueBlock
JustSingleValueBlock(std::string const &blockName, ValueClass const &defaultUnsetValue, bool const isVerbose=false)
Definition
JustSingleValueBlock.hpp:54
LHPC::SLHA::JustSingleValueBlock::~JustSingleValueBlock
virtual ~JustSingleValueBlock()
Definition
JustSingleValueBlock.hpp:69
LHPC::SLHA::JustSingleValueBlock::hasEntry
bool hasEntry() const
Definition
JustSingleValueBlock.hpp:93
LHPC::SLHA::JustSingleValueBlock::operator()
ValueClass & operator()()
Definition
JustSingleValueBlock.hpp:77
LHPC::SLHA::SlhaBlock
Definition
SlhaBlock.hpp:55
LHPC::SLHA::SlhaBlock< ValueClass, InterpreterClass::JustSingleValue< ValueClass > >::isVerbose
bool const isVerbose
Definition
SlhaBlock.hpp:138
LHPC::SLHA::SlhaBlock< ValueClass, InterpreterClass::JustSingleValue< ValueClass > >::defaultUnsetValue
ValueClass const defaultUnsetValue
Definition
SlhaBlock.hpp:139
LHPC
Definition
FourMomentum.hpp:24
LHPC
include
SLHA
BlockClasses
JustSingleValueBlock.hpp
Generated on Tue Aug 4 2026 for $\texttt{HEPfit}$ using
1.9.8