BOSS
7.1.3
BESIII Offline Software System
Loading...
Searching...
No Matches
RawFileWriter.cxx
Go to the documentation of this file.
1
#include "
RawFile/RawFileWriter.h
"
2
3
RawFileWriter::RawFileWriter
(
const
std::string& fname)
4
{
5
m_wfs =
raw_ofstream::instance
(fname);
6
}
7
8
RawFileWriter::~RawFileWriter
()
9
{
10
raw_ofstream::release
();
11
}
12
13
int
RawFileWriter::writeEvent
(
const
uint32_t* pevt)
14
{
15
const
char
* pbuf =
reinterpret_cast<
const
char
*
>
(pevt);
16
int
sizeBytes = pevt[1] * 4;
//unit of size is word
17
18
raw_ofstream::lock
();
19
int
nfile = m_wfs->write_event(pbuf, sizeBytes);
20
raw_ofstream::unlock
();
21
22
return
nfile;
23
}
RawFileWriter.h
RawFileWriter::writeEvent
int writeEvent(const uint32_t *pevt)
Definition
RawFileWriter.cxx:13
RawFileWriter::RawFileWriter
RawFileWriter(const std::string &fname)
Definition
RawFileWriter.cxx:3
RawFileWriter::~RawFileWriter
virtual ~RawFileWriter()
Definition
RawFileWriter.cxx:8
raw_ofstream::release
static void release()
Definition
raw_ofstream.cxx:29
raw_ofstream::instance
static raw_ofstream * instance(const std::string &fname)
Definition
raw_ofstream.cxx:14
raw_ofstream::lock
static void lock()
Definition
raw_ofstream.h:18
raw_ofstream::unlock
static void unlock()
Definition
raw_ofstream.h:22
7.1.3
Event
RawFile
RawFile-00-01-00
src
RawFileWriter.cxx
Generated by
1.13.2