BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RawFileWriter.cxx
Go to the documentation of this file.
1#include "RawFile/RawFileWriter.h"
2
3RawFileWriter::RawFileWriter( const std::string& fname, int run ) {
4 m_wfs = raw_ofstream::instance( fname, run );
5}
6
8
9int RawFileWriter::writeEvent( const uint32_t* pevt ) {
10 const char* pbuf = reinterpret_cast<const char*>( pevt );
11 int sizeBytes = pevt[1] * 4; // unit of size is word
12
14 int nfile = m_wfs->write_event( pbuf, sizeBytes );
16
17 return nfile;
18}
RawFileWriter(const std::string &fname, int run=0)
int writeEvent(const uint32_t *pevt)
virtual ~RawFileWriter()
static void release()
static raw_ofstream * instance(const std::string &fname, int run=0)