#include <RawFileWriter.h>
Public Member Functions | |
RawFileWriter (const std::string &fname) | |
virtual | ~RawFileWriter () |
int | writeEvent (const uint32_t *pevt) |
Private Member Functions | |
RawFileWriter () | |
Private Attributes | |
raw_ofstream * | m_wfs |
Definition at line 6 of file RawFileWriter.h.
RawFileWriter::RawFileWriter | ( | const std::string & | fname | ) |
Definition at line 3 of file RawFileWriter.cxx.
References raw_ofstream::instance(), and m_wfs.
00004 { 00005 m_wfs = raw_ofstream::instance(fname); 00006 }
RawFileWriter::~RawFileWriter | ( | ) | [virtual] |
Definition at line 8 of file RawFileWriter.cxx.
References raw_ofstream::release().
00009 { 00010 raw_ofstream::release(); 00011 }
RawFileWriter::RawFileWriter | ( | ) | [private] |
int RawFileWriter::writeEvent | ( | const uint32_t * | pevt | ) |
Definition at line 13 of file RawFileWriter.cxx.
References raw_ofstream::lock(), m_wfs, raw_ofstream::unlock(), and raw_ofstream::write_event().
Referenced by main(), and RawDataOutputSvc::putEvent().
00014 { 00015 const char* pbuf = reinterpret_cast<const char*>(pevt); 00016 int sizeBytes = pevt[1] * 4; //unit of size is word 00017 00018 raw_ofstream::lock(); 00019 int nfile = m_wfs->write_event(pbuf, sizeBytes); 00020 raw_ofstream::unlock(); 00021 00022 return nfile; 00023 }
raw_ofstream* RawFileWriter::m_wfs [private] |