9#include "RawDataCnv/RawDataInputSvc.h"
10#include "RawFile/RawFileReader.h"
12#include "NetDataReader/NetDataReader.h"
13#include "DistBossUtil/GetPropertyValue.h"
15#include "RawDataCnv/EventManagement/RawEvent.h"
16#include "IRawFile/RawFileExceptions.h"
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 =
true);
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) {
244 if ( m_reader->
stat()&4 ) {
245 std::cerr << std::endl <<
"reading ifstream error !!!" << std::endl;
252 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.what() << std::endl;
255 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.what() << std::endl;
257 catch (std::exception& ex) {
258 std::cerr << std::endl <<
"Uncaught std exception: " << ex.what() << std::endl;
261 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
282 return (m_re = m_onlinere);
PthrReaderBufPool< DimRpcReader, 4 > NetDataReader
virtual const uint32_t * nextEvent()=0
virtual uint32_t stat()=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 addReEtfDigi(uint32_t *digi, uint32_t size)
void addReEmcDigi(uint32_t *digi, uint32_t size)
void addReHltRaw(uint32_t *digi, uint32_t size)
virtual void print() const