BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
PthrWriterBufPool.h
Go to the documentation of this file.
1
#ifndef PTHR_WRITER_BUF_POOL_H
2
#define PTHR_WRITER_BUF_POOL_H
3
4
#include "
DistBossUtil/AutoEnlargeBuffer.h
"
5
#include "
IRawFile/RawFileExceptions.h
"
6
#include "
IRawFile/IRawWriter.h
"
7
#include <semaphore.h>
8
#include <pthread.h>
9
10
template
<
typename
Writer,
int
PoolSize = 8>
11
class
PthrWriterBufPool
:
virtual
IRawWriter
12
{
13
public :
14
15
PthrWriterBufPool
(
typename
Writer::WriterArgType&
arg
);
16
virtual
~PthrWriterBufPool
();
17
18
int
writeEvent
(
void
* pevt,
int
size);
19
int
stat
();
20
21
22
private
:
23
24
static
void
* thread_writing(
void
*
arg
);
25
26
PthrWriterBufPool
();
//stop default
27
28
29
private
:
30
31
int
m_inLoop;
32
int
m_outLoop;
33
AutoEnlargeBuffer
* m_buf[PoolSize];
34
35
Writer* m_writer;
36
37
pthread_t m_tid;
38
sem_t m_semIn;
39
sem_t m_semOut;
40
41
sem_t m_semFinalize;
42
};
43
44
#include "
DistBossUtil/template/PthrWriterBufPool.cc
"
45
46
#endif
AutoEnlargeBuffer.h
IRawWriter.h
PthrWriterBufPool.cc
RawFileExceptions.h
private
#define private
Definition:
RootEventData_rootcint.cxx:11
arg
double arg(const EvtComplex &c)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtComplex.hh:227
AutoEnlargeBuffer
Definition:
AutoEnlargeBuffer.h:8
IRawWriter
Definition:
IRawWriter.h:6
PthrWriterBufPool
Definition:
PthrWriterBufPool.h:12
PthrWriterBufPool::writeEvent
int writeEvent(void *pevt, int size)
Definition:
PthrWriterBufPool.cc:62
PthrWriterBufPool::stat
int stat()
Definition:
PthrWriterBufPool.cc:78
PthrWriterBufPool::~PthrWriterBufPool
virtual ~PthrWriterBufPool()
Definition:
PthrWriterBufPool.cc:45
source
DistBoss
DistBossUtil
DistBossUtil-00-00-04
DistBossUtil
PthrWriterBufPool.h
Generated by
1.9.6