#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <cstdlib>
#include "TRandom3.h"
#include "TFile.h"
#include "TPolyLine3D.h"
#include "TPolyMarker3D.h"
#include "TAxis3D.h"
#include "TView.h"
#include "TView3D.h"
#include "TCanvas.h"
#include "TPad.h"
#include "Jeep/JParser.hh"
#include "JMarkov/JPhotonPath.hh"
#include "JMarkov/JPhotonPathReader.hh"
#include "JMarkov/JPhotonPathWriter.hh"
Go to the source code of this file.
◆ main()
Definition at line 37 of file JMarkovPathSelecter.cc.
37 {
38 cout <<
"JMarkovPathSelecter" <<
endl
39 <<
"Written by Martijn Jongen" <<
endl
41 cout <<
"Type '" <<
argv[0] <<
" -h!' to display the command-line options." <<
endl ;
43
46
47
51 double z ;
52 double r ;
53
54 try {
57 zap[
"o"] =
make_field(
ofname,
"output file name (binary file containing a selection of the JPhotonPaths)") ;
61 zap[
"z"] =
make_field(z,
"z coordinate for shadowing") = 0.5*37 ;
63
65 return 1 ;
66 }
67 }
68 catch(const exception &error) {
69
70 cerr << error.what() ;
71 exit(1) ;
72 }
73
74
75 cout <<
"SELECTION CRITERIA:" <<
endl ;
77 cout <<
"Will exclude all paths intersecting a sphere of radius " << r <<
" m"
78 <<
", centered at (" <<
x <<
", " <<
y <<
", " << z <<
")" <<
endl ;
79 }
81
82
84 reader.open(
ifname.c_str()) ;
85 if( !reader.is_open() ) {
86 cerr <<
"FATAL ERROR: unable to open input file '" <<
ifname <<
"'." <<
endl ;
87 exit(1) ;
88 }
89
94 while( reader.hasNext() ) {
95 p = reader.next() ;
98 }
99
101 cerr <<
"FATAL ERROR: could not read any JPhotonPaths from the input file '" <<
ifname <<
"'." <<
endl ;
102 exit(1) ;
103 }
104 cout <<
"Done reading file. Read " <<
nread <<
" paths from it." <<
endl ;
106
108
109
116
119 }
122
124 <<
" photon paths." <<
endl
125 <<
"Output written to '" <<
ofname <<
"'." <<
endl ;
126}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for position in three dimensions.
virtual void open(const char *file_name) override
Open file.
virtual void close()=0
Close device.
virtual bool put(const T &object)=0
Object output.
Template definition of a multi-dimensional oscillation probability interpolation table.
JReader & read(JReader &in) override final
Read from input.