#include <iostream>
#include <fstream>
#include "TRandom3.h"
#include "JMarkov/JPhotonPath.hh"
#include "JMarkov/JPhotonPathReader.hh"
#include "JMarkov/JPhotonPathWriter.hh"
 
Go to the source code of this file.
Definition at line 13 of file JPhotonPathIO.cc.
   14   for( 
int i=0 ; i<(int)pl.size()-1 ; ++i ) 
 
   15     cout << 
"(" << pl[i] << 
")-" ;
 
   16   if( pl.size()>0 ) cout << 
"(" << pl.back() << 
")" ;
 
 
 
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 25 of file JPhotonPathIO.cc.
   27   TRandom* ran = 
new TRandom3(0) ;
 
   28   const int npaths = 5 ;
 
   29   char fname[100] = 
"out.paths" ;
 
   32   cout << 
"Writing some example paths to '" << fname << 
"'." << endl ;
 
   36   for( 
int n=0 ; 
n<npaths ; ++
n ) {
 
   38     int nscat = ran->Integer(6) ; 
 
   41     for( JPhotonPath::iterator it=
path.begin() ; it!=
path.end() ; ++it ) {
 
   42       double x = ran->Integer(50) ;
 
   43       double y = ran->Integer(50) ;
 
   44       double z = ran->Integer(50) ;
 
   58   reader.
open(
"out.paths") ;
 
   62   cout << 
"Reading file" << endl ;
 
   70   cout << 
"Done reading file. Read " << nread << 
" paths from it." << endl ;
 
   72   cout << 
"Done!" << endl ;
 
virtual const pointer_type & next()
Get next element. 
 
virtual bool put(const T &object)
Object output. 
 
virtual void open(const char *file_name)
Open file. 
 
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
 
Data structure for vector in three dimensions. 
 
alias put_queue eval echo n
 
virtual void close()
Close file. 
 
virtual bool hasNext()
Check availability of next element. 
 
void printPolyline(const JPolyline3D &pl)