CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
FixedConstant.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FixedConstant.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3#include "CLHEP/GenericFunctions/FixedConstant.hh"
4#include <assert.h>
5
6namespace Genfun {
7FUNCTION_OBJECT_IMP(FixedConstant)
8
10_value(value)
11{
12}
13
15AbsFunction(right), _value(right._value) {
16}
17
19{
20}
21
22double FixedConstant::operator ()(double) const
23{
24 return _value;
25}
26
27// don't generate warnings about unused parameter inside assert
28#if defined __GNUC__
29 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wunused-parameter"
32 #endif
33#endif
34#ifdef __clang__
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wunused-parameter"
37#endif
38Derivative FixedConstant::partial(unsigned int index) const {
39 assert(index==0);
40 FixedConstant fPrime(0.0);
41 return Derivative(&fPrime);
42}
43#if defined __GNUC__
44 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
45 #pragma GCC diagnostic pop
46 #endif
47#endif
48#ifdef __clang__
49 #pragma clang diagnostic pop
50#endif
51
52} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual double operator()(double argument) const override
FixedConstant(double value)
Definition: FixedConstant.cc:9
Derivative partial(unsigned int) const override
Definition: Abs.hh:14
FunctionNoop Derivative
Definition: AbsFunction.hh:42