24#include "GaudiKernel/DataObject.h"
25#include "GaudiKernel/IOpaqueAddress.h"
26#include "GaudiKernel/IRegistry.h"
27#include "GaudiKernel/ISvcLocator.h"
28#include "GaudiKernel/StatusCode.h"
55 AthMessaging(svcloc != 0 ? msgSvc() : 0,
"CmxCpTobByteStreamAuxCnv"),
56 m_name(
"CmxCpTobByteStreamAuxCnv"),
57 m_readTool(
"LVL1BS::CpByteStreamV2Tool/CpByteStreamV2Tool")
75 CHECK(Converter::initialize());
78 return StatusCode::SUCCESS;
87 CHECK(pBS_Addr !=
nullptr);
89 const std::string nm = *(pBS_Addr->par());
94 cpmCollection.setStore(
aux);
97 StatusCode
sc =
m_readTool->convert(nm, &cmxCpTobVector);
104 for (
auto ct : cmxCpTobVector) {
107 std::vector<uint8_t> energyVec(ct->energyVec().begin(), ct->energyVec().end());
108 std::vector<uint8_t> isolationVec(ct->isolationVec().begin(), ct->isolationVec().end());
109 std::vector<uint32_t> errorVec(ct->errorVec().begin(), ct->errorVec().end());
110 std::vector<uint16_t> presenceMapVec(ct->presenceMapVec().begin(), ct->presenceMapVec().end());
112 item->initialize(ct->crate(), ct->cmx(),
113 ct->cpm(), ct->chip(), ct->location(),
126 return StatusCode::SUCCESS;
132 return StatusCode::FAILURE;
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
uint32_t CLID
The Class ID type.
Defines the ROB data entity. The ROB data is an abstract entity that is used to decouple the raw even...
convert to and from a SG storable
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
static constexpr long storageType()
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual StatusCode initialize()
CmxCpTobByteStreamAuxCnv(ISvcLocator *svcloc)
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
Create TriggerTowers from ByteStream.
static long storageType()
ToolHandle< CpByteStreamV2Tool > m_readTool
Do the main job - retrieve xAOD TriggerTowers from robs.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Create ByteStream from TriggerTowers.
static const CLID & classID()
std::string m_name
Converter name.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
CMXCPTobContainer_v1 CMXCPTobContainer
Define the latest version of the CMXCPTob class.
CMXCPTobAuxContainer_v1 CMXCPTobAuxContainer
Define the latest version of the CMXCPTob class.
CMXCPTob_v1 CMXCPTob
Define the latest version of the CMXCPTob class.