BOSS
7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/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
private
#define private
Definition:
Event/RootEventData/RootEventData-00-03-80/RootEventData/RootEventData_rootcint.cxx:11
arg
double arg(const EvtComplex &c)
Definition:
EvtComplex.hh:227
AutoEnlargeBuffer
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/AutoEnlargeBuffer.h:8
IRawWriter
Definition:
Event/IRawFile/IRawFile-00-00-05/IRawFile/IRawWriter.h:6
PthrWriterBufPool
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/PthrWriterBufPool.h:12
PthrWriterBufPool::writeEvent
int writeEvent(void *pevt, int size)
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrWriterBufPool.cc:62
PthrWriterBufPool::stat
int stat()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrWriterBufPool.cc:78
PthrWriterBufPool::~PthrWriterBufPool
virtual ~PthrWriterBufPool()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrWriterBufPool.cc:45
source
DistBoss
DistBossUtil
DistBossUtil-00-00-04
DistBossUtil
PthrWriterBufPool.h
Generated by
1.9.6