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
3
RawFileWriter::RawFileWriter
(
const
std::string& fname,
int
run ) {
4
m_wfs =
raw_ofstream::instance
( fname, run );
5
}
6
7
RawFileWriter::~RawFileWriter
() {
raw_ofstream::release
(); }
8
9
int
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
13
raw_ofstream::lock
();
14
int
nfile = m_wfs->write_event( pbuf, sizeBytes );
15
raw_ofstream::unlock
();
16
17
return
nfile;
18
}
RawFileWriter::RawFileWriter
RawFileWriter(const std::string &fname, int run=0)
Definition
RawFileWriter.cxx:3
RawFileWriter::writeEvent
int writeEvent(const uint32_t *pevt)
Definition
RawFileWriter.cxx:9
RawFileWriter::~RawFileWriter
virtual ~RawFileWriter()
Definition
RawFileWriter.cxx:7
raw_ofstream::release
static void release()
Definition
raw_ofstream.cxx:25
raw_ofstream::instance
static raw_ofstream * instance(const std::string &fname, int run=0)
Definition
raw_ofstream.cxx:13
raw_ofstream::lock
static void lock()
Definition
Event/RawFile/include/RawFile/raw_ofstream.h:16
raw_ofstream::unlock
static void unlock()
Definition
Event/RawFile/include/RawFile/raw_ofstream.h:20
8.0.0
BOSS_Source
Event
RawFile
src
RawFileWriter.cxx
Generated by
1.16.1