Rivet API documentation

Rivet 4.1.3
SingleValueProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_SINGLEVALUEPROJECTION_HH
3#define RIVET_SINGLEVALUEPROJECTION_HH
4
5#include "Rivet/Projection.hh"
6
7namespace Rivet {
8
9
18 public:
19
22 : _value(-1.0), _isSet(false) {
23 setName("SingleValueProjection");
24 }
25
27 using Projection::operator=;
28
29
31 bool isValueSet() const {
32 return _isSet;
33 }
34
36 double value() const {
37 return _value;
38 }
39
41 double operator()() const {
42 return value();
43 }
44
45
46 protected:
47
49 void setValue(double v) {
50 _value = v;
51 _isSet = true;
52 }
53
55 void clear() {
56 _value = -1.0;
57 _isSet = false;
58 }
59
60
61 protected:
62
63 double _value;
64
66 bool _isSet;
67 };
68
69
70}
71
72#endif
Projection()
The default constructor.
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:146
double operator()() const
Return the single value.
Definition SingleValueProjection.hh:41
bool isValueSet() const
Returns true if the value has been set.
Definition SingleValueProjection.hh:31
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:49
double value() const
Return the single value.
Definition SingleValueProjection.hh:36
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
void clear()
Unset the value.
Definition SingleValueProjection.hh:55
Definition LHCbCommon.hh:9