CLHEP 2.0.4.7 Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Mod.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: 
00003 //----------------------Mod-----------------------------------------------//
00004 //                                                                        //
00005 //  Class Mod   (Modulo)                                                  //
00006 //  Joe Boudreau, Petar Maksimovic, Nov. 2002                             //
00007 //                                                                        //
00008 //  Mod(x) returns x%y                                                    //
00009 //------------------------------------------------------------------------//
00010 #ifndef Mod_h
00011 #define Mod_h 1
00012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00013 namespace Genfun {
00014 
00019   class Mod : public AbsFunction  {
00020 
00021     FUNCTION_OBJECT_DEF(Mod)
00022   
00023       public:
00024 
00025     // Constructor
00026     Mod(double y);
00027   
00028     // Copy constructor
00029     Mod(const Mod &right);
00030   
00031     // Destructor
00032     virtual ~Mod();
00033   
00034     // Retrieve function value
00035 
00036     virtual double operator ()(double argument) const; 
00037     virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00038   
00039   private:
00040 
00041     // It is illegal to assign a fixed constant
00042     const Mod & operator=(const Mod &right);
00043 
00044     double _y; // mod (as a double)
00045 
00046   };
00047 } // namespace Genfun
00048 #endif

Generated on Thu Jul 1 22:02:30 2010 for CLHEP by  doxygen 1.4.7