4#include "GaudiKernel/DataObject.h"
5#include "GaudiKernel/MsgStream.h"
6#include "GaudiKernel/ObjectVector.h"
8#include "TClonesArray.h"
10#include "EventModel/EventModel.h"
11#include "HltEvent/HltEvent.h"
12#include "HltEvent/HltRaw.h"
13#include "RootCnvSvc/Hlt/HltCnv.h"
14#include "RootCnvSvc/Hlt/HltRawCnv.h"
15#include "RootCnvSvc/RootAddress.h"
16#include "RootEventData/THltEvent.h"
17#include "RootEventData/THltRaw.h"
26 MsgStream log(
msgSvc(),
"HltRawCnv" );
37 MsgStream log(
msgSvc(),
"HltRawCnv" );
38 log << MSG::DEBUG <<
"HltRawCnv::TObjectToDataObject" << endmsg;
39 StatusCode sc = StatusCode::SUCCESS;
43 refpObject = hltRawTdsCol;
51 if ( !m_hltRawCol )
return sc;
52 TIter hltRawIter( m_hltRawCol );
54 while ( ( hltRawRoot = (
THltRaw*)hltRawIter.Next() ) )
56 unsigned int id = hltRawRoot->
getIntId();
61 m_common.m_rootHltRawMap[hltRawRoot] = hltRawTds;
66 hltRawTdsCol->push_back( hltRawTds );
71 return StatusCode::SUCCESS;
76 MsgStream log(
msgSvc(),
"HltRawCnv" );
77 log << MSG::DEBUG <<
"HltRawCnv::DataObjectToTObject" << endmsg;
78 StatusCode sc = StatusCode::SUCCESS;
83 log << MSG::ERROR <<
"Could not downcast to HltRawCol" << endmsg;
84 return StatusCode::FAILURE;
91 log << MSG::ERROR <<
"Could not get HltEvent in TDS " << endmsg;
92 return StatusCode::FAILURE;
96 { log << MSG::ERROR <<
"HltRawCnv:Could not downcast to TDS HltEvent" << endmsg; }
100 m_cnvSvc->getHltCnv()->createRep( evt, addr );
107 if ( !m_hltRawCol )
return sc;
110 HltRawCol::const_iterator hltRawTds;
112 for ( hltRawTds = hltRawColTds->begin(); hltRawTds != hltRawColTds->end(); hltRawTds++ )
114 UInt_t
time = ( *hltRawTds )->getTimeChannel();
115 UInt_t charge = ( *hltRawTds )->getChargeChannel();
116 UInt_t
id = ( *hltRawTds )->getIntId();
125 return StatusCode::SUCCESS;
ObjectVector< HltRaw > HltRawCol
HltRawCnv(ISvcLocator *svc)
static const CLID & classID()
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.
IDataProviderSvc * m_eds
pointer to eventdataservice
std::vector< void * > m_adresses
each converter knows the corresponding adresses
std::string m_rootBranchname
root branchname (may be concatenated of severals)
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)
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
_EXTERN_ std::string Event