|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef EXPRESSIONEVALUATION_STACKELEMENT_H
9 #define EXPRESSIONEVALUATION_STACKELEMENT_H
126 template<
typename T >
129 template<
typename T >
133 template<
typename T >
136 template<
typename T >
140 template<
typename T >
143 template<
typename T >
147 template<
typename T >
150 template<
typename T >
155 template<
typename T >
159 template<
typename T >
163 template<
typename T >
167 template<
typename T >
192 template<
typename T >
195 template<
typename T >
219 template <
class T_CompHelper>
237 template<
typename T >
295 template<
typename T >
297 template<
typename T >
336 #endif // EXPRESSIONEVALUATION_STACKELEMENT_H
StackElement(int val)
Constructor creating the object with a signed integer value.
StackElement & operator*=(StackElement &rhs)
Multiply the object by a scalar type.
StackElement _atan()
Function taking the arc tangent value of the object.
ElementType
Type of the data held by this object.
StackElement _sum()
Function calculating a sum value.
StackElement & operator+=(const T &rhs)
StackElement & operator*=(const T &rhs)
StackElement _exp()
Function taking the natural exponent of the object.
StackElement operator*(StackElement &rhs)
Operator multiplying the object by a value.
StackElement operator-(const T &rhs)
bool isProxy() const
Check if the object takes its value from a StoreGate object.
StackElement valueFromProxy() const
Set the internal variables of the object based on the objects in SG.
StackElement _acosh()
Function taking the arc cosine hyperbolic value of the object.
void makeVectorIfNecessary(const StackElement &other)
The macro is not needed anymore:
ElementType getType() const
Get the variable type of the object.
std::vector< int > m_vecIntVal
The value of the object represented as a vector of integers.
friend std::ostream & operator<<(std::ostream &os, const StackElement &el)
Declare the print operator as a friend of the class.
void ensureCompatibleVectors(const T &other) const
@ SE_DOUBLE
The type is a double.
StackElement _pow(const T &n)
Function raising the object's value to the n'th power.
StackElement _log()
Function taking the logarithm of the object.
StackElement _cos()
Function taking the cosine value of the object.
void makeDoubleIfNecessary(const StackElement &other)
StackElement _neq(StackElement &other)
StackElement _acos()
Function taking the arc cosine value of the object.
StackElement & operator*=(const std::vector< T > &rhs)
Multiply the object by a vector type.
T scalarValue() const
Evaluate the value of the object into the requested scalar type.
StackElement operator+(const T &rhs)
StackElement _asin()
Function taking the arc sinus value of the object.
StackElement & operator-=(const T &rhs)
StackElement _and(StackElement &other)
StackElement(const std::vector< int > &val)
Constructor creating the object with a vector of integers value.
void makeDouble()
Function constructing internal double values in case integer values were given to the object initiall...
std::vector< T > vectorValue(std::size_t sizeIfScalar=0)
Evaluate the value of the object into the requested vector type.
StackElement _atanh()
Function taking the arc tangent hyperbolic value of the object.
StackElement(std::vector< int > &&val)
Constructor creating the object with a vector of integers value.
void makeInt()
Function constructing internal integer values in case double values were given to the object initiall...
StackElement(const std::vector< double > &val)
Constructor creating the object with a vector of doubles value.
StackElement & operator+=(const std::vector< T > &rhs)
Add a vector type to the object.
StackElement operator/(StackElement &rhs)
Operator dividing the object by a value.
StackElement _lt(StackElement &other)
StackElement & operator/=(const std::vector< T > &rhs)
Divide the object by a vector type.
StackElement(double val)
Constructor creating the object with a double value.
StackElement & operator-=(StackElement &rhs)
Subtract a scalar type from the object.
StackElement _sinh()
Function taking the sinus hyperbolic value of the object.
StackElement _cbrt()
Function taking the cubic root of the object.
bool isVector() const
Check if the object describes a vector value.
const std::string & proxyVarName() const
StackElement _or(StackElement &other)
std::atomic< bool > m_determinedVariableType
Internal flag showing whether the type of the variable was already determined.
Namespace holding all the expression evaluation code.
StackElement & operator=(StackElement &&rhs)
int asInt() const
Get the internal value of the object as an integer.
double m_doubleVal
The value of the object represented as a double.
StackElement(std::vector< double > &&val)
Constructor creating the object with a vector of doubles value.
StackElement(const StackElement &a)
std::atomic< IProxyLoader::VariableType > m_variableType
Type of the variable provided by the proxy loader.
std::string m_varName
The name/definition of the variable.
StackElement operator-()
Inverse operator.
StackElement _gt(StackElement &other)
@ SE_VECINT
The type is a vector of integers.
std::ostream & operator<<(std::ostream &os, const StackElement &el)
Declare an output operator for StackElement objects.
StackElement operator!()
NOT operator.
std::vector< double > m_vecDoubleVal
The value of the object represented as a vector of doubles.
StackElement operator*(const T &rhs)
StackElement _abs()
Function taking the absolute value of the object.
IProxyLoader * m_proxyLoader
Loader for the described variable.
ElementType m_type
The type of the variable held by the object.
StackElement _lte(StackElement &other)
StackElement _sqrt()
Function taking the square root of the object.
bool asBool() const
Get the internal value of the object as a boolean.
bool isScalar() const
Check if the object describes a scalar value.
StackElement operator/(const T &rhs)
StackElement()
Default constructor.
StackElement _eq(StackElement &other)
StackElement & operator=(int rhs)
Operator assigning an integer value to the object.
StackElement(unsigned int val)
Constructor creating the object with an unsigned integer value.
@ SE_VECDOUBLE
The type is a vector of doubles.
StackElement _cosh()
Function taking the cosine hyperbolic value of the object.
StackElement _gte(StackElement &other)
@ SE_UNK
The type is not known, or not applicable.
StackElement & operator/=(const T &rhs)
StackElement _sin()
Function taking the sinus value of the object.
StackElement _tan()
Function taking the tangent value of the object.
StackElement(const std::string &val, IProxyLoader *proxyLoader)
Constructor creating the object from a text expression.
Class describing a single element in a text expression.
StackElement _asinh()
Function taking the arc sinus hyperbolic value of the object.
StackElement _count()
Function counting elements.
std::atomic< bool > m_moved
int m_intVal
The value of the object represented as an integer.
StackElement(StackElement &&a)
StackElement & operator-=(const std::vector< T > &rhs)
Subtract a vector type from the object.
StackElement operator-(StackElement &rhs)
Operator subtracting a value from the object.
StackElement & operator/=(StackElement &rhs)
Divide the object by a scalar type.
StackElement operator+(StackElement &rhs)
Operator adding a value to the object.
StackElement _comparisonOp(StackElement &other, T_CompHelper comp_helper)
StackElement _tanh()
Function taking the tangent hyperbolic value of the object.
void ensureCompatibleVectors(const std::vector< T > &other) const
void ensureCompatible(const StackElement &other) const
@ SE_INT
The type is an integer.
StackElement & operator+=(StackElement &rhs)
Add a scalar type to the object.
void makeVector(std::size_t n)
Function converting a possibly scalar value into a vector.