Hello All ,
I have been trying to write the out put on to a file and it keeps
giving me errors
the code i am using is :
// Example of writing to an output file from a JAS event anlyzer
import hep.analysis.*;
import java.io.*;
final public class IOExample extends EventAnalyzer
{
private PrintWriter out_file;
// Define print stream object
public IOExample()
{
// Enter constructor code here.
}
public void beforeFirstEvent()
{
// Define output file
try
{
out_file = new PrintWriter
(new BufferedWriter
(new
FileWriter("/amd/phys150/home/kmaha/lcd/")));
}
catch (IOException error) {out.println("File not opened");}
}
public void afterLastEvent()
{
out_file.close();
}
public void processEvent(final EventData d)
{
// Test write to file
out_file.println("Write some output");
}
}
the error message is :
jas.job.AnalysisException:security.file.write:/amd/phys150/kmaha/lcd/
Is there a mistake in the path name ?
Could anyone please shed some light to this problem , that would
be very helpful .
thankyou ,
Maha
|