00001 00006 /*----------------------------------------------------------------------------*/ 00007 /* C Tool Box: Designed and implemented by: */ 00008 /* Walter F.J. Mueller Gesellschaft fuer Schwerionenforschung (GSI) */ 00009 /* Planckstrasse 1, D-64291 Darmstadt, Germany */ 00010 /* Email: W.F.J.Mueller@gsi.de */ 00011 /* WWW: http://www-kp3.gsi.de/www/kp3/people/mueller.html */ 00012 /*------------------------------------------+---------------------------------*/ 00013 00014 #include <math.h> 00015 00016 #include "CTB.hxx" 00017 #include "CTBprintf.hxx" 00018 #include "CTBcounter.hxx" 00019 00039 //------------------------------------------+----------------------------------- 00045 ostream& operator<<(ostream& os, const CTBcounter& obj) 00046 { 00047 if (floor(obj.md_count)-obj.md_count == 0.) { // if pure integer 00048 os << CTBprintf(obj.md_count,"f",1,0); 00049 } else { // if fractional 00050 os << obj.md_count; 00051 } 00052 return os; 00053 } 00054 00055 /*------------------------------------------+---------------------------------*/ 00056 00057 #if (defined(CTB__OutLine) || defined(CTBcounter__OutLine)) 00058 #define inline 00059 #include "CTBcounter.icc" 00060 #undef inline 00061 #endif
1.2.9-20010812 written by Dimitri van Heesch,
© 1997-2001