ATLAS Offline Software
LArRawDataContByteStreamTool.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
14 #ifndef LARBYTESTREAM_LARRAWDATACONTBYTESTREAMTOOL_H
15 #define LARBYTESTREAM_LARRAWDATACONTBYTESTREAMTOOL_H
16 
17 #include <stdint.h>
24 #include "ByteStreamData/RawEvent.h"
26 
32 
34 // Map of ROBs need this
35 #include "eformat/index.h"
36 
38 class LArDigitContainer;
39 
49 public:
51 
55  LArRawDataContByteStreamTool( const std::string& type, const std::string& name,
56  const IInterface* parent ) ;
57 
61 
64  static const InterfaceID& interfaceID( ) ;
65 
66  virtual StatusCode initialize() override;
67  virtual StatusCode finalize() override;
68 
84  template <class COLLECTION, typename ...ARGS >
86  COLLECTION* digit_cont,
88  ARGS&&... args) const;
89 
97  FEA_t& fea) const;
98 
106  FEA_t& fea) const;
107 
115  FEA_t& fea) const;
116 
117 private:
118  using RobIndex_t = std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> >;
119 
121  StatusCode prepareRobIndex (const RawEvent* event, RobIndex_t& robIndex) const;
122 
124  std::unique_ptr<LArRodBlockStructure> makeRodBlockStructure() const;
125 
126  //StatusCode prepareWriting();
132  template <class COLLECTION >
133  bool checkGainConsistency(const COLLECTION* coll) const;
134 
135  const Hid2RESrcID& getHid2RESrcID (const LArFebRodMapping& rodMapping) const;
136 
138  PublicToolHandle<LArRodDecoder> m_decoder
139  { this, "LArRodDecoder", "LArRodDecoder", "LArRodDecoder" };
140 
145  unsigned m_DSPRunMode;
146 
151  unsigned short m_RodBlockVersion;
152 
157  double m_nfebsigma;
158  // want to process digits together with RawChannel
160  // Name of Digit container to retrieve
161  std::string m_DigitContName;
162 
163  const LArOnlineID* m_onlineHelper = nullptr;
164 
166  { this, "CaloNoiseKey", "totalNoise", "" };
167 
169  { this, "OnOffIdMappingKey", "LArOnOffIdMap", "LArOnOffIdMap" };
170 
172  { this, "FebRodMappingKey", "LArFebRodMap", "LArFebRodMap" };
173 
175  { this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
176 };
177 
178 
180 
181 #endif
LArFebRodMapping
Definition: LArFebRodMapping.h:17
LArFebRodMapping.h
LArRawDataContByteStreamTool::m_includeDigits
bool m_includeDigits
Definition: LArRawDataContByteStreamTool.h:159
LArRawDataContByteStreamTool.icc
LArRawDataContByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: LArRawDataContByteStreamTool.cxx:60
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
LArRodDecoder.h
LArRawDataContByteStreamTool::m_decoder
PublicToolHandle< LArRodDecoder > m_decoder
Definition: LArRawDataContByteStreamTool.h:139
LArRawDataContByteStreamTool::m_DSPRunMode
unsigned m_DSPRunMode
Indicates which version of DSP code should be used for writing.
Definition: LArRawDataContByteStreamTool.h:145
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
LArRawDataContByteStreamTool::~LArRawDataContByteStreamTool
virtual ~LArRawDataContByteStreamTool()
Destructor.
Definition: LArRawDataContByteStreamTool.cxx:55
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArRawDataContByteStreamTool::getHid2RESrcID
const Hid2RESrcID & getHid2RESrcID(const LArFebRodMapping &rodMapping) const
Definition: LArRawDataContByteStreamTool.cxx:468
LArRawDataContByteStreamTool::checkGainConsistency
bool checkGainConsistency(const COLLECTION *coll) const
Check that all elements in a container have the same gain.
LArRawDataContByteStreamTool::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArRawDataContByteStreamTool.h:163
LArCalibDigitContainer
Container class for LArCalibDigit.
Definition: LArCalibDigitContainer.h:19
LArRawDataContByteStreamTool::m_initializeForWriting
bool m_initializeForWriting
JobOption to intitialize services needed only for writing.
Definition: LArRawDataContByteStreamTool.h:155
LArOnOffIdMapping.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
LArRawDataContByteStreamTool::m_febRodMappingKey
SG::ReadCondHandleKey< LArFebRodMapping > m_febRodMappingKey
Definition: LArRawDataContByteStreamTool.h:172
RawEvent.h
LArRawDataContByteStreamTool::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArRawDataContByteStreamTool.h:175
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRawDataContByteStreamTool::m_subDetId
uint16_t m_subDetId
Definition: LArRawDataContByteStreamTool.h:156
AthAlgTool.h
CachedUniquePtr.h
Cached unique_ptr with atomic update.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArRawDataContByteStreamTool::prepareRobIndex
StatusCode prepareRobIndex(const RawEvent *event, RobIndex_t &robIndex) const
Prepare ROB index before conversion.
Definition: LArRawDataContByteStreamTool.cxx:393
LArRawDataContByteStreamTool::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: LArRawDataContByteStreamTool.cxx:37
FullEventAssembler.h
LArRawDataContByteStreamTool::m_caloNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
Definition: LArRawDataContByteStreamTool.h:166
Hid2RESrcID
Definition: Hid2RESrcID.h:38
ReadCondHandleKey.h
LArRawDataContByteStreamTool::makeRodBlockStructure
std::unique_ptr< LArRodBlockStructure > makeRodBlockStructure() const
Construct a RodBlockStructure instance of the proper concrete type.
Definition: LArRawDataContByteStreamTool.cxx:425
LArRawDataContByteStreamTool::finalize
virtual StatusCode finalize() override
Definition: LArRawDataContByteStreamTool.cxx:92
LArRawDataContByteStreamTool
An AlgTool class to help converting LAr raw data objects to/from ByteStream.
Definition: LArRawDataContByteStreamTool.h:48
LArFebHeaderContainer.h
LArRawDataContByteStreamTool::m_nfebsigma
double m_nfebsigma
Definition: LArRawDataContByteStreamTool.h:157
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArRawDataContByteStreamTool::WriteLArDigits
StatusCode WriteLArDigits(const LArDigitContainer *digit_cont, FEA_t &fea) const
Fill channels from LArDigitContainer to a FullEvent.
Definition: LArRawDataContByteStreamTool.cxx:100
LArRawDataContByteStreamTool::m_onOffIdMappingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_onOffIdMappingKey
Definition: LArRawDataContByteStreamTool.h:169
CaloNoise.h
LArOnlineID
Definition: LArOnlineID.h:20
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArRawDataContByteStreamTool::WriteLArCalibDigits
StatusCode WriteLArCalibDigits(const LArCalibDigitContainer *digit_cont, FEA_t &fea) const
Fill channels from LArCalibDigitContainer to a FullEvent.
Definition: LArRawDataContByteStreamTool.cxx:200
SG::ReadCondHandleKey< CaloNoise >
LArRawDataContByteStreamTool::m_hid2re
CxxUtils::CachedUniquePtr< Hid2RESrcID > m_hid2re
Contains the mapping from channel to ROD (writing only)
Definition: LArRawDataContByteStreamTool.h:137
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
re
const boost::regex re(r_e)
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArRawDataContByteStreamTool::m_RodBlockVersion
unsigned short m_RodBlockVersion
Minor ROD block version This is equivalent to the lower 16 bits of the version word in the ROD block ...
Definition: LArRawDataContByteStreamTool.h:151
RodRobIdMap.h
ROD->ROB mapping part of Hid2RESrcID.
AthAlgTool
Definition: AthAlgTool.h:26
LArRawDataContByteStreamTool::m_DigitContName
std::string m_DigitContName
Definition: LArRawDataContByteStreamTool.h:161
LArRawDataContByteStreamTool::convert
StatusCode convert(const RawEvent *re, COLLECTION *digit_cont, CaloGain::CaloGain gain, ARGS &&... args) const
Templated conversion class form Raw Event to a container.
CaloGain.h
Hid2RESrcID.h
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
LArRawDataContByteStreamTool::LArRawDataContByteStreamTool
LArRawDataContByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor Standard AlgTool constructor.
Definition: LArRawDataContByteStreamTool.cxx:43
LArRawDataContByteStreamTool::RobIndex_t
std::map< eformat::SubDetectorGroup, std::vector< const uint32_t * > > RobIndex_t
Definition: LArRawDataContByteStreamTool.h:118
LArRawChannelContainer
Container for LArRawChannel (IDC using LArRawChannelCollection)
Definition: LArRawChannelContainer.h:26
LArRawDataContByteStreamTool::WriteLArRawChannels
StatusCode WriteLArRawChannels(const LArRawChannelContainer *CannelCont, FEA_t &fea) const
Fill channels from LArRawChannelContainer to a FullEvent.
Definition: LArRawDataContByteStreamTool.cxx:284