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

ParameterNegation.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: ParameterNegation.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
00003 #include "CLHEP/GenericFunctions/ParameterNegation.hh"
00004 #include "CLHEP/GenericFunctions/Parameter.hh"
00005 
00006 namespace Genfun {
00007 PARAMETER_OBJECT_IMP(ParameterNegation)
00008 
00009 ParameterNegation::ParameterNegation(const AbsParameter *arg1):
00010   _arg1(arg1->clone())
00011 {
00012   if (arg1->parameter() && _arg1->parameter()) _arg1->parameter()->connectFrom(arg1->parameter());
00013 }
00014 
00015 ParameterNegation::ParameterNegation(const ParameterNegation & right) :
00016 _arg1(right._arg1->clone())
00017 {}
00018 
00019 
00020 ParameterNegation::~ParameterNegation()
00021 {
00022   delete _arg1;
00023 }
00024 
00025 
00026 double ParameterNegation::getValue() const {
00027   return - _arg1->getValue();
00028 }
00029 
00030 } // namespace Genfun

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