2#include "GaudiKernel/MsgStream.h"
3#include "GaudiKernel/AlgFactory.h"
4#include "GaudiKernel/ISvcLocator.h"
5#include "GaudiKernel/SmartDataPtr.h"
6#include "GaudiKernel/IDataProviderSvc.h"
7#include "GaudiKernel/PropertyMgr.h"
29 Algorithm(name, pSvcLocator)
32 declareProperty(
"FittingMethod", m_fittingMethod = 2);
33 declareProperty(
"ConfigFile", m_configFile =
"MDCConfig.xml");
39 MsgStream log(
msgSvc(), name());
40 log << MSG::INFO <<
"in initialize()" << endreq;
43 return StatusCode::SUCCESS;
49 MsgStream log(
msgSvc(), name());
50 log << MSG::INFO <<
"in execute()" << endreq;
55 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
57 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
58 return( StatusCode::FAILURE);
60 log << MSG::INFO <<
"MdcDummy: retrieved event: " << eventHeader->eventNumber() <<
" run: " << eventHeader->runNumber() << endreq;
65 SmartDataPtr<DecayMode> decayMode(eventSvc(),
"/Event/MC/DecayMode");
67 log << MSG::FATAL <<
"Could not find DecayMode" << endreq;
68 return( StatusCode::FAILURE);
70 unsigned int size = 10;
72 decayMode->getData(decayId, size);
74 for (
unsigned int index =0; index<10; index++) {
76 <<
" Decay Mode = " << decayId[index]
81 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),
"/Event/Digi/MdcDigiCol");
83 log << MSG::FATAL <<
"Could not find MDC digi" << endreq;
84 return( StatusCode::FAILURE);
87 MdcDigiCol::iterator iter1 = mdcDigiCol->begin();
89 for (;iter1 != mdcDigiCol->end(); iter1++, digiId++) {
90 log << MSG::INFO <<
"MDC digit No: " << digiId << endreq;
93 <<
" time_channel = " << (*iter1)->getTimeChannel()
94 <<
" charge_channel = " << (*iter1)->getChargeChannel()
100 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),
"/Event/Digi/TofDigiCol");
102 log << MSG::FATAL <<
"Could not find TOF digi" << endreq;
103 return( StatusCode::FAILURE);
106 TofDigiCol::iterator iter2 = tofDigiCol->begin();
108 for (;iter2 != tofDigiCol->end(); iter2++, digiId++) {
109 log << MSG::INFO <<
"TOF digit No: " << digiId << endreq;
114 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),
"/Event/Digi/EmcDigiCol");
116 log << MSG::FATAL <<
"Could not find EMC digi" << endreq;
117 return( StatusCode::FAILURE);
120 EmcDigiCol::iterator iter3 = emcDigiCol->begin();
122 for (;iter3 != emcDigiCol->end(); iter3++, digiId++) {
123 log << MSG::INFO <<
"Emc digit No: " << digiId << endreq;
126 <<
" time_channel = " << (*iter3)->getTimeChannel()
127 <<
" charge_channel = " << (*iter3)->getChargeChannel()
132 return StatusCode::SUCCESS;
138 MsgStream log(
msgSvc(), name());
139 log << MSG::INFO <<
"in finalize()" << endreq;
141 return StatusCode::SUCCESS;