1#include "GaudiKernel/MsgStream.h"
2#include "GaudiKernel/DataObject.h"
3#include "GaudiKernel/ObjectVector.h"
5#include "TClonesArray.h"
26 MsgStream log(
msgSvc(),
"LumiDigiCnv");
27 log << MSG::DEBUG <<
"LumiDigiCnv::TObjectToDataObject" << endreq;
28 StatusCode sc = StatusCode::SUCCESS;
31 refpObject = lumiDigiTdsCol;
33 if ( !m_lumiDigiCol )
return sc;
34 TIter lumiDigiIter(m_lumiDigiCol);
36 while ((lumiDigiRoot = (
TLumiDigi*)lumiDigiIter.Next())) {
44 lumiDigiTdsCol->push_back(lumiDigiTds);
54 MsgStream log(
msgSvc(),
"LumiDigiCnv");
55 log << MSG::DEBUG <<
"LumiDigiCnv::DataObjectToTObject" << endreq;
56 StatusCode sc = StatusCode::SUCCESS;
59 if ( !lumiDigiColTds ) {
60 log << MSG::ERROR <<
"Could not downcast to LumiDigiCol" << endreq;
61 return StatusCode::FAILURE;
67 log << MSG::ERROR <<
"Could not get DigiEvent in TDS" << endreq;
68 return StatusCode::FAILURE;
72 log << MSG::ERROR <<
"LumiDigiCnv: Could not downcast to TDS DigiEvent" << endreq;
81 if ( !m_lumiDigiCol )
return sc;
83 LumiDigiCol::const_iterator lumiDigiTds;
85 for (lumiDigiTds = lumiDigiColTds->begin(); lumiDigiTds != lumiDigiColTds->end(); ++lumiDigiTds) {
88 lumiDigiRoot->
initialize((*lumiDigiTds)->getIntId(),
89 (*lumiDigiTds)->getTimeChannel(), (*lumiDigiTds)->getChargeChannel());
90 lumiDigiRoot->
setOverflow( (*lumiDigiTds)->getOverflow() );
ObjectVector< LumiDigi > LumiDigiCol
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
LumiDigiCnv(ISvcLocator *svc)
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
void setOverflow(const unsigned int overflow)
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.
void clearLumiDigiCol()
clear the whole array
void addLumiDigi(TLumiDigi *digi)
Add a LumiDigi into the MUC Data collection.
const TObjArray * getLumiDigiCol() const
retrieve the whole TObjArray of LumiDigi Data
UInt_t getOverflow() const
void setOverflow(const UInt_t overflow)
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 LumiDigi * > m_rootLumiDigiMap
_EXTERN_ std::string Event