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"
57 AthMessaging(svcloc != 0 ? msgSvc() : 0,
"CpmTowerByteStreamAuxCnv"),
58 m_name(
"CpmTowerByteStreamAuxCnv"),
59 m_cpmReadTool(
"LVL1BS::CpByteStreamV2Tool/CpByteStreamV2Tool")
77 CHECK(Converter::initialize());
80 return StatusCode::SUCCESS;
89 CHECK(pBS_Addr !=
nullptr);
91 const std::string nm = *(pBS_Addr->par());
96 cpmCollection.setStore(
aux);
100 if (
sc.isFailure()) {
106 for (
auto ct : cpmTowerVector) {
109 std::vector<uint8_t> emEnergyVec(ct->emEnergyVec().begin(), ct->emEnergyVec().end());
110 std::vector<uint8_t> hadEnergyVec(ct->hadEnergyVec().begin(), ct->hadEnergyVec().end());
111 std::vector<uint32_t> emErrorVec(ct->emErrorVec().begin(), ct->emErrorVec().end());
112 std::vector<uint32_t> hadErrorVec(ct->hadErrorVec().begin(), ct->hadErrorVec().end());
114 item->initialize(ct->eta(), ct->phi(),
119 uint8_t(ct->peak()));
127 return StatusCode::SUCCESS;
133 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.
ToolHandle< CpByteStreamV2Tool > m_cpmReadTool
Do the main job - retrieve xAOD TriggerTowers from robs.
CpmTowerByteStreamAuxCnv(ISvcLocator *svcloc)
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Create ByteStream from TriggerTowers.
static long storageType()
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
Create TriggerTowers from ByteStream.
virtual StatusCode initialize()
static const CLID & classID()
std::string m_name
Converter name.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
CPMTowerContainer_v2 CPMTowerContainer
Define the latest version of the CPMHits container.
CPMTowerAuxContainer_v2 CPMTowerAuxContainer
Define the latest version of the CPMHits auxiliary container.
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.