ATLAS Offline Software
CpmRoiByteStreamTool.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 TRIGT1CALOBYTESTREAM_CPMROIBYTESTREAMTOOL_H
6 #define TRIGT1CALOBYTESTREAM_CPMROIBYTESTREAMTOOL_H
7 
8 #include <stdint.h>
9 
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 #include "L1CaloSrcIdMap.h"
20 #include "eformat/SourceIdentifier.h"
21 #include "GaudiKernel/ToolHandle.h"
22 
23 class IInterface;
24 class InterfaceID;
25 class StatusCode;
26 
27 template <typename> class FullEventAssembler;
28 
29 namespace LVL1 {
30  class CPMRoI;
31 }
32 
33 namespace LVL1BS {
34 
35 class CpmRoiSubBlock;
36 class L1CaloErrorByteStreamTool;
37 class L1CaloSrcIdMap;
38 
48 
49  public:
50  CpmRoiByteStreamTool(const std::string& type, const std::string& name,
51  const IInterface* parent);
52  virtual ~CpmRoiByteStreamTool();
53 
55  static const InterfaceID& interfaceID();
56 
57  virtual StatusCode initialize() override;
58 
61  DataVector<LVL1::CPMRoI>* roiCollection) const;
62 
64  StatusCode convert(const DataVector<LVL1::CPMRoI>* roiCollection) const;
65 
67  const std::vector<uint32_t>& sourceIDs(const std::string& sgKey) const;
68 
69  private:
71  { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" };
72 
74  typedef std::map<uint32_t, const LVL1::CPMRoI*> CpmRoiMap;
75  typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
78 
79  std::vector<uint32_t> makeSourceIDs (bool roiDaq) const;
80 
82  void setupCpmRoiMap(const CpmRoiCollection* roiCollection,
83  CpmRoiMap& roiMap) const;
84 
86  ToolHandle<LVL1BS::L1CaloErrorByteStreamTool> m_errorTool;
87 
93  int m_version;
97  const int m_crates;
99  const int m_modules;
101  int m_slinks;
103  std::vector<uint32_t> m_sourceIDsProp;
105  std::vector<uint32_t> m_sourceIDsRoIBProp;
107  const eformat::SubDetector m_subDetector;
110 };
111 
112 } // end namespace
113 
114 #endif
LVL1BS::CpmRoiByteStreamTool::m_subDetector
const eformat::SubDetector m_subDetector
Sub-detector type.
Definition: CpmRoiByteStreamTool.h:107
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
LVL1BS::CpmRoiByteStreamTool::m_crateOffsetSw
int m_crateOffsetSw
Property: Software crate number offset.
Definition: CpmRoiByteStreamTool.h:91
LVL1BS::CpmRoiByteStreamTool::convert
StatusCode convert(const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CPMRoI > *roiCollection) const
Convert ROB fragments to CPM RoIs.
Definition: CpmRoiByteStreamTool.cxx:90
LVL1BS::L1CaloSrcIdMap
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Definition: L1CaloSrcIdMap.h:24
LVL1BS::CpmRoiByteStreamTool::m_dataFormat
int m_dataFormat
Property: Data compression format.
Definition: CpmRoiByteStreamTool.h:95
LVL1BS::CpmRoiByteStreamTool
Tool to perform ROB fragments to CPM RoI and CPM RoI to raw data conversions.
Definition: CpmRoiByteStreamTool.h:47
LVL1BS::CpmRoiByteStreamTool::m_modules
const int m_modules
Number of CPM modules per crate.
Definition: CpmRoiByteStreamTool.h:99
LVL1BS::CpmRoiByteStreamTool::makeSourceIDs
std::vector< uint32_t > makeSourceIDs(bool roiDaq) const
Definition: CpmRoiByteStreamTool.cxx:364
LVL1BS::CpmRoiByteStreamTool::CpmRoiByteStreamTool
CpmRoiByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CpmRoiByteStreamTool.cxx:38
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1BS::CpmRoiByteStreamTool::m_sourceIDsRoIBProp
std::vector< uint32_t > m_sourceIDsRoIBProp
Property: ROB source IDs for RoIB.
Definition: CpmRoiByteStreamTool.h:105
LVL1BS::CpmRoiByteStreamTool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Error collection tool.
Definition: CpmRoiByteStreamTool.h:86
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
LVL1BS::CpmRoiByteStreamTool::m_slinks
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
Definition: CpmRoiByteStreamTool.h:101
LVL1BS::CpmRoiByteStreamTool::~CpmRoiByteStreamTool
virtual ~CpmRoiByteStreamTool()
Definition: CpmRoiByteStreamTool.cxx:71
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1BS::CpmRoiByteStreamTool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: CpmRoiByteStreamTool.h:76
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1BS::CpmRoiByteStreamTool::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: CpmRoiByteStreamTool.cxx:31
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
LVL1BS::CpmRoiByteStreamTool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: CpmRoiByteStreamTool.h:77
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
LVL1BS::CpmRoiByteStreamTool::m_crateOffsetHw
int m_crateOffsetHw
Property: Hardware crate number offset.
Definition: CpmRoiByteStreamTool.h:89
LVL1BS::CpmRoiByteStreamTool::CpmRoiCollection
DataVector< LVL1::CPMRoI > CpmRoiCollection
Definition: CpmRoiByteStreamTool.h:73
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1BS::CpmRoiByteStreamTool::CpmRoiMap
std::map< uint32_t, const LVL1::CPMRoI * > CpmRoiMap
Definition: CpmRoiByteStreamTool.h:74
LVL1BS::CpmRoiByteStreamTool::m_sourceIDsProp
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
Definition: CpmRoiByteStreamTool.h:103
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::CpmRoiByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: CpmRoiByteStreamTool.cxx:78
LVL1BS::CpmRoiByteStreamTool::m_crates
const int m_crates
Number of crates.
Definition: CpmRoiByteStreamTool.h:97
LVL1BS::CpmRoiByteStreamTool::m_srcIdMap
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
Definition: CpmRoiByteStreamTool.h:109
L1CaloSrcIdMap.h
LVL1BS::CpmRoiByteStreamTool::setupCpmRoiMap
void setupCpmRoiMap(const CpmRoiCollection *roiCollection, CpmRoiMap &roiMap) const
Set up CPM RoI map.
Definition: CpmRoiByteStreamTool.cxx:418
AthAlgTool
Definition: AthAlgTool.h:26
LVL1BS::CpmRoiByteStreamTool::m_byteStreamCnvSvc
ServiceHandle< IByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: CpmRoiByteStreamTool.h:71
IByteStreamCnvSvc.h
LVL1BS::CpmRoiByteStreamTool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: CpmRoiByteStreamTool.h:75
LVL1BS::CpmRoiByteStreamTool::m_version
int m_version
Property: Sub_block header version.
Definition: CpmRoiByteStreamTool.h:93
IROBDataProviderSvc.h
xAOD::CPMRoI
CPMRoI_v1 CPMRoI
Define the latest version of the CPMRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMRoI.h:14
LVL1BS::CpmRoiByteStreamTool::sourceIDs
const std::vector< uint32_t > & sourceIDs(const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.
Definition: CpmRoiByteStreamTool.cxx:398
ServiceHandle< IByteStreamCnvSvc >