/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RawFile/RawFile-00-00-10/src/RawFileWriter.cxx

Go to the documentation of this file.
00001 #include "RawFile/RawFileWriter.h"
00002 
00003 RawFileWriter::RawFileWriter(const std::string& fname)
00004 {
00005    m_wfs = raw_ofstream::instance(fname);
00006 }
00007 
00008 RawFileWriter::~RawFileWriter()
00009 {
00010    raw_ofstream::release();
00011 }
00012 
00013 int RawFileWriter::writeEvent(const uint32_t* pevt)
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 }

Generated on Tue Nov 29 22:58:36 2016 for BOSS_7.0.2 by  doxygen 1.4.7