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

testUnits.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: testUnits.cc,v 1.3 2003/08/13 20:00:13 garren Exp $
00003 // ---------------------------------------------------------------------------
00004 //
00005 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
00006 //
00007 // This is a small program for testing the Units module
00008 //
00009 
00010 #include <assert.h>
00011 #include "CLHEP/Units/defs.h"
00012 #include "CLHEP/Units/PhysicalConstants.h"
00013 #include <iostream>
00014 #include <iomanip>
00015 
00016 int main() {
00017 
00018   // Check that local m does not interfere with global m
00019 
00020   double m=0;
00021   for (int i=0; i<7; i++, m++) { assert(m == double(i)); } 
00022   assert(m != CLHEP::meter);  
00023 
00024   std::cout << "Speed of light is " << std::setw(10) << std::setprecision(8)
00025             << CLHEP::c_light << std::endl;
00026   return 0;
00027 }

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