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,
"CmxCpHitsByteStreamAuxCnv"),
56 m_name(
"CmxCpHitsByteStreamAuxCnv"),
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 cmxCpHitsContainer.setStore(
aux);
97 StatusCode
sc =
m_readTool->convert(nm, &cmxCpHitsVector);
104 for (
auto ch : cmxCpHitsVector) {
107 std::vector<uint32_t> hitsVec0(ch->hitsVec0().begin(), ch->hitsVec0().end());
108 std::vector<uint32_t> hitsVec1(ch->hitsVec1().begin(), ch->hitsVec1().end());
109 std::vector<uint32_t> errorVec0(ch->errorVec0().begin(), ch->errorVec0().end());
110 std::vector<uint32_t> errorVec1(ch->errorVec1().begin(), ch->errorVec1().end());
112 item->initialize(ch->crate(), ch->cmx(), ch->source(),
113 hitsVec0, hitsVec1, errorVec0, errorVec1, ch->peak());
121 return StatusCode::SUCCESS;
127 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.
CmxCpHitsByteStreamAuxCnv(ISvcLocator *svcloc)
virtual StatusCode initialize()
std::string m_name
Converter name.
static long storageType()
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Create ByteStream from TriggerTowers.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
Create TriggerTowers from ByteStream.
ToolHandle< CpByteStreamV2Tool > m_readTool
Do the main job - retrieve xAOD TriggerTowers from robs.
static const CLID & classID()
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
CMXCPHitsAuxContainer_v1 CMXCPHitsAuxContainer
Define the latest version of the CMMCPHits class.
CMXCPHitsContainer_v1 CMXCPHitsContainer
Define the latest version of the CMXCPHits class.
CMXCPHits_v1 CMXCPHits
Define the latest version of the CMMCPHits class.