4#include "GaudiKernel/MsgStream.h"
5#include "GaudiKernel/DataObject.h"
6#include "GaudiKernel/ObjectVector.h"
8#include "TClonesArray.h"
29 MsgStream log(
msgSvc(),
"HltRawCnv");
41 MsgStream log(
msgSvc(),
"HltRawCnv");
42 log << MSG::DEBUG <<
"HltRawCnv::TObjectToDataObject" << endreq;
43 StatusCode sc=StatusCode::SUCCESS;
47 refpObject=hltRawTdsCol;
56 if (!m_hltRawCol)
return sc;
57 TIter hltRawIter(m_hltRawCol);
59 while ((hltRawRoot = (
THltRaw*)hltRawIter.Next())) {
60 unsigned int id = hltRawRoot->
getIntId();
70 hltRawTdsCol->push_back(hltRawTds);
75 return StatusCode::SUCCESS;
80 MsgStream log(
msgSvc(),
"HltRawCnv");
81 log << MSG::DEBUG <<
"HltRawCnv::DataObjectToTObject" << endreq;
82 StatusCode sc=StatusCode::SUCCESS;
86 log << MSG::ERROR <<
"Could not downcast to HltRawCol" << endreq;
87 return StatusCode::FAILURE;
93 log << MSG::ERROR <<
"Could not get HltEvent in TDS " << endreq;
94 return StatusCode::FAILURE;
98 log << MSG::ERROR <<
"HltRawCnv:Could not downcast to TDS HltEvent" << endreq;
101 IOpaqueAddress *addr;
111 if (!m_hltRawCol)
return sc;
113 HltRawCol::const_iterator hltRawTds;
115 for (hltRawTds = hltRawColTds->begin(); hltRawTds != hltRawColTds->end(); hltRawTds++) {
116 UInt_t
time = (*hltRawTds)->getTimeChannel();
117 UInt_t
charge = (*hltRawTds)->getChargeChannel();
118 UInt_t
id = (*hltRawTds)->getIntId();
127 return StatusCode::SUCCESS;
ObjectVector< HltRaw > HltRawCol
static THltEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
HltRawCnv(ISvcLocator *svc)
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
void setChargeChannel(const unsigned int chargeChannel)
void setTimeChannel(const unsigned int timeChannel)
Definition of a Root address, derived from IOpaqueAddress.
Base class for all Root Converters.
std::vector< void * > m_adresses
each converter knows the corresponding adresses
IDataProviderSvc * m_eds
pointer to eventdataservice
std::string m_rootBranchname
root branchname (may be concatenated of severals)
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
const TObjArray * getHltRawCol() const
void addHltRaw(THltRaw *hltRaw)
HltRaw.
void initialize(UInt_t id, UInt_t time=0, UInt_t charge=0)
UInt_t getChargeChannel() const
UInt_t getTimeChannel() const
static std::map< const TObject *, const HltRaw * > m_rootHltRawMap
_EXTERN_ std::string Event