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;
40 
50 public:
52 
56  LArRawDataContByteStreamTool( const std::string& type, const std::string& name,
57  const IInterface* parent ) ;
58 
62 
65  static const InterfaceID& interfaceID( ) ;
66 
67  virtual StatusCode initialize() override;
68  virtual StatusCode finalize() override;
69 
85  template <class COLLECTION, typename ...ARGS >
87  COLLECTION* digit_cont,
89  ARGS&&... args) const;
90 
98  FEA_t& fea) const;
99 
107  FEA_t& fea) const;
108 
116  FEA_t& fea) const;
117 
118 private:
119  using RobIndex_t = std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> >;
120 
122  StatusCode prepareRobIndex (const RawEvent* event, RobIndex_t& robIndex) const;
123 
125  std::unique_ptr<LArRodBlockStructure> makeRodBlockStructure() const;
126 
127  //StatusCode prepareWriting();
133  template <class COLLECTION >
134  bool checkGainConsistency(const COLLECTION* coll) const;
135 
136  const Hid2RESrcID& getHid2RESrcID (const LArFebRodMapping& rodMapping) const;
137 
139  PublicToolHandle<LArRodDecoder> m_decoder
140  { this, "LArRodDecoder", "LArRodDecoder", "LArRodDecoder" };
141 
146  unsigned m_DSPRunMode;
147 
152  unsigned short m_RodBlockVersion;
153 
158  double m_nfebsigma;
159  // want to process digits together with RawChannel
161  // Name of Digit container to retrieve
162  std::string m_DigitContName;
163 
164  const LArOnlineID* m_onlineHelper = nullptr;
165 
167  { this, "CaloNoiseKey", "totalNoise", "" };
168 
170  { this, "OnOffIdMappingKey", "LArOnOffIdMap", "LArOnOffIdMap" };
171 
173  { this, "FebRodMappingKey", "LArFebRodMap", "LArFebRodMap" };
174 
176  { this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
177 };
178 
179 
181 
182 #endif
LArFebRodMapping
Definition: LArFebRodMapping.h:17
LArFebRodMapping.h
LArRawDataContByteStreamTool::m_includeDigits
bool m_includeDigits
Definition: LArRawDataContByteStreamTool.h:160
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:140
LArRawDataContByteStreamTool::m_DSPRunMode
unsigned m_DSPRunMode
Indicates which version of DSP code should be used for writing.
Definition: LArRawDataContByteStreamTool.h:146
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
IByteStreamEventAccess
interface for accessing raw data .
Definition: IByteStreamEventAccess.h:17
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:164
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:156
LArOnOffIdMapping.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
LArRawDataContByteStreamTool::m_febRodMappingKey
SG::ReadCondHandleKey< LArFebRodMapping > m_febRodMappingKey
Definition: LArRawDataContByteStreamTool.h:173
RawEvent.h
LArRawDataContByteStreamTool::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArRawDataContByteStreamTool.h:176
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:157
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:167
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:49
LArFebHeaderContainer.h
LArRawDataContByteStreamTool::m_nfebsigma
double m_nfebsigma
Definition: LArRawDataContByteStreamTool.h:158
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
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:170
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:138
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:152
RodRobIdMap.h
ROD->ROB mapping part of Hid2RESrcID.
AthAlgTool
Definition: AthAlgTool.h:26
LArRawDataContByteStreamTool::m_DigitContName
std::string m_DigitContName
Definition: LArRawDataContByteStreamTool.h:162
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:119
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