BOSS
7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/PthrReaderBufPool.h
Go to the documentation of this file.
1
#ifndef PTHR_READER_BUF_POOL_H
2
#define PTHR_READER_BUF_POOL_H
3
4
#include "DistBossUtil/AutoEnlargeBuffer.h"
5
#include "IRawFile/RawFileExceptions.h"
6
#include "IRawFile/IRawReader.h"
7
#include <semaphore.h>
8
#include <pthread.h>
9
#include <vector>
10
#include <string>
11
12
template
<
typename
Reader,
int
PoolSize = 8>
13
class
PthrReaderBufPool
:
public
IRawReader
14
{
15
public :
16
17
PthrReaderBufPool
(
typename
Reader::ReaderArgType&
arg
);
18
virtual
~PthrReaderBufPool
();
19
20
inline
const
uint32_t*
nextEvent
();
21
inline
const
uint32_t*
currentEvent
()
const
;
22
inline
uint32_t
runNo
();
23
inline
std::string
currentFile
();
24
inline
uint32_t
stat
();
25
26
27
private
:
28
29
static
void
* thread_filling(
void
*
arg
);
30
31
PthrReaderBufPool
();
//stop default
32
33
34
private
:
35
36
int
m_inLoop;
37
int
m_outLoop;
38
AutoEnlargeBuffer
* m_buf[PoolSize];
39
40
Reader* m_reader;
41
42
pthread_t m_tid;
43
sem_t m_semIn;
44
sem_t m_semOut;
45
pthread_mutex_t m_lock;
46
47
sem_t m_semSyn;
48
49
// copy of possible exceptions
50
RawFileException
* m_RawFileException;
51
};
52
53
#include "DistBossUtil/template/PthrReaderBufPool.cc"
54
55
#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
IRawReader
Definition:
Event/IRawFile/IRawFile-00-00-05/IRawFile/IRawReader.h:8
PthrReaderBufPool
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/PthrReaderBufPool.h:14
PthrReaderBufPool::currentFile
std::string currentFile()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:106
PthrReaderBufPool::~PthrReaderBufPool
virtual ~PthrReaderBufPool()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:48
PthrReaderBufPool::nextEvent
const uint32_t * nextEvent()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:63
PthrReaderBufPool::currentEvent
const uint32_t * currentEvent() const
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:92
PthrReaderBufPool::runNo
uint32_t runNo()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:100
PthrReaderBufPool::stat
uint32_t stat()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/template/PthrReaderBufPool.cc:112
RawFileException
Definition:
Event/IRawFile/IRawFile-00-00-05/IRawFile/RawFileExceptions.h:7
source
DistBoss
DistBossUtil
DistBossUtil-00-00-04
DistBossUtil
PthrReaderBufPool.h
Generated by
1.9.6