#include <DimRpcReader.h>
◆ ReaderArgType [1/2]
◆ ReaderArgType [2/2]
◆ DimRpcReader() [1/2]
Definition at line 11 of file DimRpcReader.cxx.
12{
13 if ( name.empty() ) {
14 throw RawExMessage(
"[NetDataReader] The name of DistBoss EvtServer was not set!");
15 }
16
18
20
22}
static void registerInstance()
Referenced by DimRpcReader().
◆ ~DimRpcReader() [1/2]
DimRpcReader::~DimRpcReader |
( |
| ) |
|
|
virtual |
◆ DimRpcReader() [2/2]
◆ ~DimRpcReader() [2/2]
virtual DimRpcReader::~DimRpcReader |
( |
| ) |
|
|
virtual |
◆ currentEvent() [1/2]
const uint32_t * DimRpcReader::currentEvent |
( |
| ) |
const |
◆ currentEvent() [2/2]
const uint32_t * DimRpcReader::currentEvent |
( |
| ) |
const |
◆ currentFile() [1/2]
std::string DimRpcReader::currentFile |
( |
| ) |
|
Definition at line 97 of file DimRpcReader.cxx.
98{
99 pthread_mutex_lock( &m_rpcLock );
100
102 m_rpc->setData(m_outCode);
103
104 std::string fname((char*)m_rpc->getData());
105
106 pthread_mutex_unlock( &m_rpcLock );
107
108 return fname;
109}
◆ currentFile() [2/2]
std::string DimRpcReader::currentFile |
( |
| ) |
|
◆ nextEvent() [1/2]
const uint32_t * DimRpcReader::nextEvent |
( |
| ) |
|
Definition at line 29 of file DimRpcReader.cxx.
30{
31 static int nn = 0;
32 ++nn;
33
35
36 for ( int i = 1; i < 7; ++i ) {
37 pthread_mutex_lock( &m_rpcLock );
38
39 m_outCode = theCode;
40 m_rpc->setData(m_outCode);
41 int size = m_rpc->getSize();
42 void*
data = m_rpc->getData();
44
45 pthread_mutex_unlock( &m_rpcLock );
46
47 if ( size > 4 ) {
48 return (
const uint32_t*)m_buffer->
data();
49 }
50 else if ( size == 4 ) {
51 m_inCode = *((
const uint32_t*)m_buffer->
data());
53 throw RawExMessage(
"[NetDataReader] Reach the end, no more events left.");
54 }
56 if ( i < 6 ) {
57 int sec = i;
58 std::cout << "[NetDataReader] Event " << nn << " timeout. Sleep " << sec << "s before retry." << std::endl;
59 sleep(sec);
60 std::cout << "[NetDataReader] Event " << nn << " now retry time " << i << " ..." << std::endl;
62 continue;
63 }
64 else {
65 throw RawExMessage(
"[NetDataReader] Failed to retry server. Stop this client!");
66 }
67 }
69 throw RawExMessage(
"[NetDataReader] DistBossServer ERROR !!!");
70 }
71 else {
72 throw RawExMessage(
"[NetDataReader] Unknown server code !!!");
73 }
74 }
75 else {
76 throw RawExMessage(
"[NetDataReader] Invalid data from server !!!");
77 }
78
79 break;
80 }
81
82 return 0;
83}
void copy(void *src, int size)
◆ nextEvent() [2/2]
const uint32_t * DimRpcReader::nextEvent |
( |
| ) |
|
◆ runNo() [1/2]
uint32_t DimRpcReader::runNo |
( |
| ) |
|
◆ runNo() [2/2]
uint32_t DimRpcReader::runNo |
( |
| ) |
|
◆ stat() [1/2]
uint32_t DimRpcReader::stat |
( |
| ) |
|
◆ stat() [2/2]
uint32_t DimRpcReader::stat |
( |
| ) |
|
The documentation for this class was generated from the following files: