ATLAS Offline Software
TileBeamElemContByteStreamCnv.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 TILEBYTESTREAM_TILEBEAMELEM_BYTESTREAMCNV_H
6 #define TILEBYTESTREAM_TILEBEAMELEM_BYTESTREAMCNV_H
7 
8 // Gaudi includes
10 #include "GaudiKernel/ToolHandle.h"
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ContextSpecificPtr.h"
13 
14 
15 // Athena includes
19 
20 
21 #include "eformat/ROBFragment.h"
22 #include "eformat/FullEventFragment.h"
23 
25 
26 class DataObject;
27 class StatusCode;
28 class IAddressCreator;
30 class TileHid2RESrcID;
31 class TileROD_Decoder;
32 
33 #include <stdint.h>
34 #include <vector>
35 
36 
37 // Abstract factory to create the converter
38 template <class TYPE> class CnvFactory;
39 
47  : public AthConstConverter
48 {
49  public:
50  TileBeamElemContByteStreamCnv(ISvcLocator* svcloc);
51 
52  virtual StatusCode initialize() override;
53  virtual StatusCode createObjConst(IOpaqueAddress* pAddr, DataObject*& pObj) const override;
54  virtual StatusCode createRepConst(DataObject* pObj, IOpaqueAddress*& pAddr) const override;
55  virtual StatusCode finalize() override;
56 
58  virtual long repSvcType() const override { return i_repSvcType(); }
59  static long storageType();
60  static const CLID& classID();
61 
62  // FIXME: Eliminate this backdoor access to RAW data.
63  // If clients need raw data, they should get it from the
64  // existing ByteStreamSvc interfaces.
65  inline const eformat::FullEventFragment<const uint32_t*> * eventFragment() const { return m_event.get(); }
66  inline const eformat::ROBFragment<const uint32_t*> * robFragment() const { return m_robFrag.get(); }
67  inline bool validBeamFrag() const { return m_robFrag.isValid(); }
68 
69  private:
72 
74  ToolHandle<TileROD_Decoder> m_decoder;
75 
76  mutable Gaudi::Hive::ContextSpecificPtr<
77  const eformat::FullEventFragment<const uint32_t*> > m_event ATLAS_THREAD_SAFE;
78 
79  mutable Gaudi::Hive::ContextSpecificPtr<
81 
82  std::vector<uint32_t> m_ROBID;
83 
86 
89 };
90 #endif
91 
TileBeamElemContByteStreamCnv::validBeamFrag
bool validBeamFrag() const
Definition: TileBeamElemContByteStreamCnv.h:67
TileROD_Decoder
Decodes the different TileCal ROD subfragment types in bytestream data and fills TileDigitsContainer,...
Definition: TileROD_Decoder.h:119
RecyclableDataObject.h
Helper for recycling objects from event to event.
TileBeamElemContByteStreamCnv::m_hid2re
const TileHid2RESrcID * m_hid2re
Pointer to TileHid2RESrcID.
Definition: TileBeamElemContByteStreamCnv.h:85
TileBeamElemContByteStreamCnv::createRepConst
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
Convert the transient object to the requested representation.
Definition: TileBeamElemContByteStreamCnv.cxx:114
TileBeamElemContByteStreamCnv::robFragment
const eformat::ROBFragment< const uint32_t * > * robFragment() const
Definition: TileBeamElemContByteStreamCnv.h:66
TileBeamElemContByteStreamCnv::m_ROBID
std::vector< uint32_t > m_ROBID
Definition: TileBeamElemContByteStreamCnv.h:82
TileBeamElemContByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition: TileBeamElemContByteStreamCnv.cxx:44
AthConstConverter
Gaudi converter base class with const interfaces.
Definition: AthConstConverter.h:33
TileBeamElemContByteStreamCnv::classID
static const CLID & classID()
Definition: TileBeamElemContByteStreamCnv.cxx:40
Athena::RecyclableDataQueue< TileMutableBeamElemContainer >
TileMutableBeamElemContainer.h
Helper for holding non-const raw data prior to recording in SG.
TileHid2RESrcID
This class provides conversion between fragment ID and RESrcID.
Definition: TileHid2RESrcID.h:28
IROBDataProviderSvc
Interface class for managing ROB for both online and offline.
Definition: IROBDataProviderSvc.h:23
eformat::ROBFragment< const uint32_t * >
TileBeamElemContByteStreamCnv::storageType
static long storageType()
Definition: TileBeamElemContByteStreamCnv.cxx:42
TileBeamElemContByteStreamCnv::finalize
virtual StatusCode finalize() override
Definition: TileBeamElemContByteStreamCnv.cxx:123
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.
TileBeamElemContByteStreamCnv::createObjConst
virtual StatusCode createObjConst(IOpaqueAddress *pAddr, DataObject *&pObj) const override
Create the transient representation of an object.
Definition: TileBeamElemContByteStreamCnv.cxx:64
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
TileBeamElemContByteStreamCnv
This AthConstConverter class provides conversion from ByteStream to TileBeamElemContainer.
Definition: TileBeamElemContByteStreamCnv.h:48
TileBeamElemContByteStreamCnv::repSvcType
virtual long repSvcType() const override
Storage type and class ID.
Definition: TileBeamElemContByteStreamCnv.h:58
TileBeamElemContByteStreamCnv::ATLAS_THREAD_SAFE
Athena::RecyclableDataQueue< TileMutableBeamElemContainer > m_queue ATLAS_THREAD_SAFE
Queue of data objects to recycle.
Definition: TileBeamElemContByteStreamCnv.h:88
TileBeamElemContByteStreamCnv::ATLAS_THREAD_SAFE
Gaudi::Hive::ContextSpecificPtr< const eformat::FullEventFragment< const uint32_t * > > m_event ATLAS_THREAD_SAFE
Definition: TileBeamElemContByteStreamCnv.h:77
TileBeamElemContByteStreamCnv::TileBeamElemContByteStreamCnv
TileBeamElemContByteStreamCnv(ISvcLocator *svcloc)
Definition: TileBeamElemContByteStreamCnv.cxx:31
AthMessaging.h
TileBeamElemContByteStreamCnv::m_robSvc
ServiceHandle< IROBDataProviderSvc > m_robSvc
Pointer to IROBDataProviderSvc.
Definition: TileBeamElemContByteStreamCnv.h:71
checker_macros.h
Define macros for attributes used to control the static checker.
TileBeamElemContByteStreamCnv::ATLAS_THREAD_SAFE
Gaudi::Hive::ContextSpecificPtr< const eformat::ROBFragment< const uint32_t * > > m_robFrag ATLAS_THREAD_SAFE
Definition: TileBeamElemContByteStreamCnv.h:80
TileBeamElemContByteStreamCnv::m_decoder
ToolHandle< TileROD_Decoder > m_decoder
Pointer to TileROD_Decoder.
Definition: TileBeamElemContByteStreamCnv.h:74
TileBeamElemContByteStreamCnv::eventFragment
const eformat::FullEventFragment< const uint32_t * > * eventFragment() const
Definition: TileBeamElemContByteStreamCnv.h:65
ServiceHandle< IROBDataProviderSvc >