StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
JanEventWriter.cxx
1 //
2 // Pibero Djawotho <pibero@iucf.indiana.edu>
3 // Indiana University
4 // Feb 19, 2006
5 //
6 
7 // Local
8 #include "JanEvent.h"
9 #include "JanEventWriter.h"
10 
11 JanEventWriter::JanEventWriter(const string& filename)
12  : out(*new ofstream(filename.c_str()))
13 {
14  if (!out) cerr << "Can't open " << filename << endl;
15 }
16 
17 JanEventWriter::~JanEventWriter()
18 {
19  delete& out;
20 }
21 
22 ostream& JanEventWriter::operator()(const JanEvent& event)
23 {
24  return out << event;
25 }