ATLAS Offline Software
ZdcByteStreamCnv.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZDCBYTESTREAMCNV_H
6 #define ZDCBYTESTREAMCNV_H
7 /*
8  * ZdcByteStreamCnv.h
9  *
10  * Created on: May 7, 2009
11  * Author: leite
12  *
13  * This class is based on the code provided in the LAr ByteStream Converter
14  * /offline/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/ZdcRawChannelContByteStreamCnv.h
15  *
16  * It will:
17  * take an event fragment
18  * verify if it's a ZDC fragment (really)
19  * extract the ROD header
20  * put the PPM data into a collection
21  *
22  */
23 
24 #include <stdint.h>
25 #include <map>
26 
28 #include "GaudiKernel/ClassID.h"
29 #include "GaudiKernel/MsgStream.h"
30 #include "GaudiKernel/ServiceHandle.h"
31 #include "GaudiKernel/ToolHandle.h"
32 
33 class DataObject;
35 class IOpaqueAddress;
37 class ISvcLocator;
38 class StatusCode;
39 class ZdcByteStreamTool;
41 class StoreGateSvc;
42 
43 // Abstract factory to create the converter
44 template <typename > class CnvFactory;
45 
51 {
52 public:
53  ZdcByteStreamCnv(ISvcLocator* svcloc);
54 
55  virtual ~ZdcByteStreamCnv();
56 
57  virtual StatusCode initialize() override;
58  virtual StatusCode createObjConst(IOpaqueAddress* pAddr, DataObject*& pObj) const override;
59  //virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override;
60 
62  virtual long repSvcType() const override { return i_repSvcType(); }
63 
64  static long storageType();
65  static const CLID& classID();
66 
67 private:
69  std::string m_name;
70 
72  //ToolHandle<ZdcByteStreamTool> m_tool; // old style
73  ToolHandle<ZdcByteStreamReadV1V2Tool> m_tool; // new style
74 
77 
80 
82 };
83 
84 #endif /* ZDCBYTESTREAMCNV_H */
ZdcByteStreamCnv::m_name
std::string m_name
Converter name.
Definition: ZdcByteStreamCnv.h:69
ZdcByteStreamCnv::m_tool
ToolHandle< ZdcByteStreamReadV1V2Tool > m_tool
Tool that does the actual work.
Definition: ZdcByteStreamCnv.h:73
ZdcByteStreamCnv::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service for READING bytestream.
Definition: ZdcByteStreamCnv.h:76
ZdcByteStreamCnv::ZdcByteStreamCnv
ZdcByteStreamCnv(ISvcLocator *svcloc)
ZdcByteStreamCnv.cxx.
Definition: ZdcByteStreamCnv.cxx:55
ZdcByteStreamReadV1V2Tool
Tool to perform ROB fragments to trigger towers and trigger towers to raw data conversions.
Definition: ZdcByteStreamReadV1V2Tool.h:67
ZdcByteStreamCnv::storageType
static long storageType()
Definition: ZdcByteStreamCnv.cxx:85
IByteStreamEventAccess
interface for accessing raw data .
Definition: IByteStreamEventAccess.h:17
AthConstConverter
Gaudi converter base class with const interfaces.
Definition: AthConstConverter.h:33
ZdcByteStreamCnv::createObjConst
virtual StatusCode createObjConst(IOpaqueAddress *pAddr, DataObject *&pObj) const override
Create the transient representation of an object.
Definition: ZdcByteStreamCnv.cxx:121
IROBDataProviderSvc
Interface class for managing ROB for both online and offline.
Definition: IROBDataProviderSvc.h:25
ZdcByteStreamTool
Tool to perform ROB fragments to ZdcDigits and from ZdcDigits to raw data conversions.
Definition: ZdcByteStreamTool.h:54
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
ZdcByteStreamCnv::m_evtStore
ServiceHandle< StoreGateSvc > m_evtStore
Definition: ZdcByteStreamCnv.h:81
ZdcByteStreamCnv::repSvcType
virtual long repSvcType() const override
Storage type and class ID.
Definition: ZdcByteStreamCnv.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthConstConverter.h
Gaudi converter base class with const interfaces.
CnvFactory
Abstract factory to create the converter.
Definition: ToyConverter.h:16
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ZdcByteStreamCnv::classID
static const CLID & classID()
Definition: ZdcByteStreamCnv.cxx:76
ZdcByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition: ZdcByteStreamCnv.cxx:93
ZdcByteStreamCnv::m_ByteStreamEventAccess
ServiceHandle< IByteStreamEventAccess > m_ByteStreamEventAccess
Service for WRITING bytestream.
Definition: ZdcByteStreamCnv.h:79
ZdcByteStreamCnv
The converter class has the methods to create the collection objects from a file (RDO to ByteStream) ...
Definition: ZdcByteStreamCnv.h:51
ZdcByteStreamCnv::~ZdcByteStreamCnv
virtual ~ZdcByteStreamCnv()
Definition: ZdcByteStreamCnv.cxx:69
ServiceHandle< IROBDataProviderSvc >