3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/AlgFactory.h"
5#include "GaudiKernel/Bootstrap.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/SmartDataPtr.h"
8#include "GaudiKernel/IDataProviderSvc.h"
9#include "GaudiKernel/PropertyMgr.h"
32 Algorithm(name, pSvcLocator)
39 declareProperty(
"MdcDigi",m_mdcdigi=1);
40 declareProperty(
"TofDigi",m_tofdigi=1);
41 declareProperty(
"EmcDigi",m_emcdigi=1);
42 declareProperty(
"MucDigi",m_mucdigi=1);
43 declareProperty(
"InputFiles",m_inputFiles);
58 MsgStream log(
msgSvc(), name());
59 log << MSG::INFO <<
"in initialize()" << endreq;
63 m_mdcCnv->
init(0, 999999);
65 ISvcLocator* svcLocator = Gaudi::svcLocator();
66 StatusCode sc=svcLocator->service(
"EventDataSvc", m_evtSvc);
68 std::cout<<
"Could not accesss EventDataSvc!"<<std::endl;
70 return StatusCode::SUCCESS;
76 MsgStream log(
msgSvc(), name());
77 log << MSG::INFO <<
"in execute()" << endreq;
80 StatusCode sc = m_evtSvc->registerObject(
"/Event/Digi",aDigiEvent);
81 if(sc!=StatusCode::SUCCESS) {
82 std::cout<<
"Could not register DigiEvent" <<std::endl;
93 m_mdcCnv->
convert(mdcBuf, mdcDigiCol);
101 StatusCode scMdc = m_evtSvc->registerObject(
"/Event/Digi/MdcDigiCol", mdcDigiCol);
102 if( scMdc!=StatusCode::SUCCESS ) {
103 std::cout<<
"Could not register MDC digi collection" <<std::endl;
115 m_tofCnv->
convert(tofBuf, etfBuf, tofDigiCol);
132 StatusCode scTof = m_evtSvc->registerObject(
"/Event/Digi/TofDigiCol", tofDigiCol);
133 if( scTof!=StatusCode::SUCCESS ) {
134 std::cout<<
"Could not register TOF digi collection" <<std::endl;
143 m_emcCnv->
convert(emcBuf, emcDigiCol);
145 StatusCode scEmc = m_evtSvc->registerObject(
"/Event/Digi/EmcDigiCol", emcDigiCol);
146 if( scEmc!=StatusCode::SUCCESS ) {
147 std::cout<<
"Could not register EMC digi collection" <<std::endl;
156 m_mucCnv->
convert(mucBuf, mucDigiCol);
158 StatusCode scMuc = m_evtSvc->registerObject(
"/Event/Digi/MucDigiCol", mucDigiCol);
159 if( scMuc!=StatusCode::SUCCESS ) {
160 std::cout<<
"Could not register MUC digi collection" <<std::endl;
164 m_raw_event->
reset();
166 return StatusCode::SUCCESS;
172 const uint32_t* fragment;
181 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
187 for (
int robi = 0; robi < nrobs; robi++) {
190 uint32_t* dataptr = NULL;
193 source_id_number <<= 8;
194 source_id_number >>= 24;
195 switch(source_id_number) {
213 return StatusCode::SUCCESS;
218 MsgStream log(
msgSvc(), name());
219 log << MSG::INFO <<
"in finalize()" << endreq;
225 return StatusCode::SUCCESS;
ObjectVector< EmcDigi > EmcDigiCol
ObjectVector< MdcDigi > MdcDigiCol
ObjectVector< MucDigi > MucDigiCol
ObjectVector< TofDigi > TofDigiCol
static EmcConverter * instance(int runMode=2)
StatusCode convert(const BufferHolder &src, EmcDigiCol *des)
static MdcConverter * instance(int runMode=2)
void init(int runFrom, int runTo)
StatusCode convert(const BufferHolder &src, MdcDigiCol *des)
static MucConverter * instance()
StatusCode convert(const BufferHolder &src, MucDigiCol *des)
void addReTofDigi(uint32_t *digi, uint32_t size)
const BufferHolder & getEtfBuf() const
void addReMdcDigi(uint32_t *digi, uint32_t size)
const BufferHolder & getEmcBuf() const
void addReMucDigi(uint32_t *digi, uint32_t size)
const BufferHolder & getMdcBuf() const
const BufferHolder & getMucBuf() const
const BufferHolder & getTofBuf() const
void addReEtfDigi(uint32_t *digi, uint32_t size)
void addReEmcDigi(uint32_t *digi, uint32_t size)
virtual ~RawEventReader()
RawEventReader(const std::string &name, ISvcLocator *pSvcLocator)
virtual void print() const
const uint32_t * nextEvent()
StatusCode convert(const BufferHolder &src, TofDigiCol *des, LumiDigiCol *des2=0)
static TofConverter * instance()
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")