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,
"CmxJetHitsByteStreamAuxCnv"),
56 m_name(
"CmxJetHitsByteStreamAuxCnv"),
57 m_readTool(
"LVL1BS::JepByteStreamV2Tool/JepByteStreamV2Tool")
75 CHECK(Converter::initialize());
78 return StatusCode::SUCCESS;
87 CHECK(pBS_Addr !=
nullptr);
89 const std::string nm = *(pBS_Addr->par());
94 jetCollection.setStore(
aux);
97 StatusCode
sc =
m_readTool->convert(nm, &cmxJetHitsVector);
104 for (
auto jet : cmxJetHitsVector) {
106 jetCollection.push_back(item);
108 std::vector<uint32_t> hitsVec0(
jet->hitsVec0().begin(),
jet->hitsVec0().end());
109 std::vector<uint32_t> hitsVec1(
jet->hitsVec1().begin(),
jet->hitsVec1().end());
110 std::vector<uint32_t> errorVec0(
jet->errorVec0().begin(),
jet->errorVec0().end());
111 std::vector<uint32_t> errorVec1(
jet->errorVec1().begin(),
jet->errorVec1().end());
113 item->initialize(
jet->crate(),
jet->source(),
114 hitsVec0, hitsVec1, errorVec0, errorVec1,
jet->peak());
122 return StatusCode::SUCCESS;
128 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()
CmxJetHitsByteStreamAuxCnv(ISvcLocator *svcloc)
std::string m_name
Converter name.
static const CLID & classID()
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Create ByteStream from TriggerTowers.
ToolHandle< JepByteStreamV2Tool > m_readTool
Do the main job - retrieve objects.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
Create TriggerTowers from ByteStream.
virtual StatusCode initialize()
static long storageType()
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
CMXJetHitsContainer_v1 CMXJetHitsContainer
Define the latest version of the CMXJetHits class.
CMXJetHits_v1 CMXJetHits
Define the latest version of the CMXJetHits class.
CMXJetHitsAuxContainer_v1 CMXJetHitsAuxContainer
Define the latest version of the CMXJetHits class.