18#include "GaudiKernel/MsgStream.h"
19#include "GaudiKernel/Bootstrap.h"
20#include "GaudiKernel/PropertyMgr.h"
21#include "GaudiKernel/IJobOptionsSvc.h"
33 IJobOptionsSvc* jobSvc;
34 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
36 PropertyMgr m_propMgr;
38 m_propMgr.declareProperty(
"RunMode", m_mode = 2);
39 m_propMgr.declareProperty(
"KeepRandomTrigEvt", m_keepRdm =
false);
40 m_propMgr.declareProperty(
"InputFiles", m_inputFiles);
42 jobSvc->setMyProperties(
"RawDataInputSvc", &m_propMgr);
68 if ( m_inputFiles.empty() )
return StatusCode::SUCCESS;
71 else if ( m_mode == 3 ) {
72 DistBoss::GetPropertyValue<std::string>(
"DistBoss",
"ServerName", m_evtServer);
81 return StatusCode::FAILURE;
86 m_sds =
new const uint32_t*[64];
87 m_robs =
new const uint32_t*[256];
91 return StatusCode::SUCCESS;
106 if ( m_sds )
delete m_sds;
107 if ( m_robs )
delete m_robs;
109 return StatusCode::SUCCESS;
122 const uint32_t* ef = 0;
126 std::cerr <<
"Found invalid event (traceback):" << std::endl;
144 if ( ! m_keepRdm && ((*ef)>>31) != 0 ) {
157 uint32_t hv_status = 0;
160 for (
int sdi = 0; sdi < nsds; ++sdi ) {
164 const uint32_t* specific_header;
166 uint32_t source_id_number = sd.
source_id();
167 source_id_number <<= 8;
168 source_id_number >>= 24;
169 switch( source_id_number ) {
171 hv_status |= ((8 | ((*specific_header)&0x7)) << 8);
174 hv_status |= ((8 | ((*specific_header)&0x7)) << 4);
177 hv_status |= (8 | ((*specific_header)&0x7));
190 for (
int robi = 0; robi < nrobs; robi++) {
194 uint32_t* dataptr = NULL;
200 source_id_number <<= 8;
201 source_id_number >>= 24;
204 switch(source_id_number) {
248 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.what() << std::endl;
251 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.what() << std::endl;
253 catch (std::exception& ex) {
254 std::cerr << std::endl <<
"Uncaught std exception: " << ex.what() << std::endl;
257 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
278 return (m_re = m_onlinere);
PthrReaderBufPool< DimRpcReader, 4 > NetDataReader
virtual const uint32_t * nextEvent()=0
void addReTofDigi(uint32_t *digi, uint32_t size)
void setFlag1(uint32_t flag1)
void setRunNo(uint32_t run_no)
void addReMdcDigi(uint32_t *digi, uint32_t size)
void addReTrigGTD(uint32_t *digi, uint32_t size)
void addReMucDigi(uint32_t *digi, uint32_t size)
void addReZddDigi(uint32_t *digi, uint32_t size)
void addMcParticle(uint32_t *buf, uint32_t size)
void setTime(uint32_t time)
void setEventNo(uint32_t event_no)
void addReEmcDigi(uint32_t *digi, uint32_t size)
void addReHltRaw(uint32_t *digi, uint32_t size)
virtual void print() const