src/Basics/SinglePar.cc
/* This writes the parameter into an ASCII output file stream in GAMMA
   Parameter Set format. This allows for the parameter to be re-read into
   a program from the ASCII file using simple commands.              
     
	   Input	    par : A single parameter (this)
	  		  ostr  : An output filestream
	                 namelen: Length of parameter name column (default 10)
	   Return	     TF	: TRUE if parameter sucessfully written
	   Note		   	: The parameter is written in GAMMA
	  			  parameter format
	   Note			: Any new parameter types added to
          			  to GAMMA must be put into the switch       */
This writes the parameter into an ASCII output file stream in GAMMA
Parameter Set format. This allows for the parameter to be re-read into
a program from the ASCII file using simple commands.


This writes the parameter into an ASCII output file stream in GAMMA Parameter Set format . This allows for the parameter to be re - read into a program from the ASCII file using simple commands .
bool SinglePar::write(std::ofstream& ostr, int namelen) const
  {
  bool TF = true;				
  ostr << ParName;				
  int len = namelen - ParName.length();		
  if(len <= 0) len=1;				
  ostr << string(len, ' ');			
  ostr << " (" << ParType << ") : ";		
  string val1, val2;				
  switch(ParType)
    {
    case 0:					
    case 1:					
    case 2:					
    case 3:					
    default:					
      ostr << ParData;
      ostr << "\t- " << ParState << "\n";
      break;
    case 4:					
      val1 = ParData;
      val2 = cutInt(val1);
      ostr << val2;
      ostr << "\t- " << ParState << "\n";
      cutBlksXBlks(val1, ",");
      val2 = cutParBlks(val1);
      ostr << "\t\t" << val2 << "\n";
      cutBlksXBlks(val1, ",");
      ostr << "\t\t" << val1 << "\n";
      break;
    }
  return TF;
  }
bool SinglePar :: write ( std :: ofstream & ostr , int namelen ) const { bool TF = true ; ostr << ParName ; int len = namelen - ParName . length ( ) ; if ( len <= 0 ) len = 1 ; ostr << string ( len , ' ' ) ; ostr << " " << ParType << " " ; string val1 , val2 ; switch ( ParType ) { case 0 : case 1 : case 2 : case 3 : default : ostr << ParData ; ostr << " \t " << ParState << " \n " ; break ; case 4 : val1 = ParData ; val2 = cutInt ( val1 ) ; ostr << val2 ; ostr << " \t " << ParState << " \n " ; cutBlksXBlks ( val1 , " " ) ; val2 = cutParBlks ( val1 ) ; ostr << " \t \t " << val2 << " \n " ; cutBlksXBlks ( val1 , " " ) ; ostr << " \t \t " << val1 << " \n " ; break ; } return TF ; }
This writes the parameter into an ASCII output file stream in GAMMA
Parameter Set format.
This writes the parameter into an ASCII output file stream in GAMMA Parameter Set format .
// Assume write will work // Write the name  // Name output length // Insure positve # // Add spaces so columnated // Write the type in () & : // Temp string variables // Integer parameter // Double parameter // string parameter // Coordinate parameter // Default parameter // Tensor parameter