CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: X.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $ 00003 //----------------------X------------ --------------------------------------// 00004 // // 00005 // Class X_ // 00006 // Joe Boudreau, Petar Maksimovic, Nov. 1999 // 00007 // // 00008 // X_ is a function that returns the variable itself. // 00009 //--------------------------------------------------------------------------// 00010 #ifndef X__h 00011 #define X__h 1 00012 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00013 namespace Genfun { 00014 00019 class X_ : public AbsFunction { 00020 00021 FUNCTION_OBJECT_DEF(X_) 00022 00023 public: 00024 00025 // Constructor 00026 X_(); 00027 00028 // Copy constructor 00029 X_(const X_ &right); 00030 00031 // Destructor 00032 virtual ~X_(); 00033 00034 // Retrieve function value 00035 virtual double operator ()(double argument) const; 00036 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00037 00038 private: 00039 00040 // It is illegal to assign a fixed constant 00041 const X_ & operator=(const X_ &right); 00042 00043 }; 00044 } // namespace Genfun 00045 #endif