ATLAS Offline Software
Loading...
Searching...
No Matches
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>
26
32
34// Map of ROBs need this
35#include "eformat/index.h"
36
39
47
49public:
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 >
85 StatusCode convert(const RawEvent* re,
86 COLLECTION* digit_cont,
88 ARGS&&... args) const;
89
96 StatusCode WriteLArDigits(const LArDigitContainer* digit_cont,
97 FEA_t& fea) const;
98
105 StatusCode WriteLArCalibDigits(const LArCalibDigitContainer* digit_cont,
106 FEA_t& fea) const;
107
114 StatusCode WriteLArRawChannels(const LArRawChannelContainer* CannelCont,
115 FEA_t& fea) const;
116
117private:
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
156 uint16_t m_subDetId;
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
const boost::regex re(r_e)
Cached unique_ptr with atomic update.
Definition of CaloDetDescrManager.
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37
ROD->ROB mapping part of Hid2RESrcID.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Template class for assembling a full atlas raw event from subfragments.
Container class for LArCalibDigit.
Container class for LArDigit.
Container for LArRawChannel (IDC using LArRawChannelCollection)
StatusCode prepareRobIndex(const RawEvent *event, RobIndex_t &robIndex) const
Prepare ROB index before conversion.
CxxUtils::CachedUniquePtr< Hid2RESrcID > m_hid2re
Contains the mapping from channel to ROD (writing only)
std::map< eformat::SubDetectorGroup, std::vector< const uint32_t * > > RobIndex_t
unsigned m_DSPRunMode
Indicates which version of DSP code should be used for writing.
PublicToolHandle< LArRodDecoder > m_decoder
StatusCode convert(const RawEvent *re, COLLECTION *digit_cont, CaloGain::CaloGain gain, ARGS &&... args) const
Templated conversion class form Raw Event to a container.
bool checkGainConsistency(const COLLECTION *coll) const
Check that all elements in a container have the same gain.
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
StatusCode WriteLArRawChannels(const LArRawChannelContainer *CannelCont, FEA_t &fea) const
Fill channels from LArRawChannelContainer to a FullEvent.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_onOffIdMappingKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode initialize() override
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
SG::ReadCondHandleKey< LArFebRodMapping > m_febRodMappingKey
StatusCode WriteLArDigits(const LArDigitContainer *digit_cont, FEA_t &fea) const
Fill channels from LArDigitContainer to a FullEvent.
LArRawDataContByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor Standard AlgTool constructor.
StatusCode WriteLArCalibDigits(const LArCalibDigitContainer *digit_cont, FEA_t &fea) const
Fill channels from LArCalibDigitContainer to a FullEvent.
std::unique_ptr< LArRodBlockStructure > makeRodBlockStructure() const
Construct a RodBlockStructure instance of the proper concrete type.
unsigned short m_RodBlockVersion
Minor ROD block version This is equivalent to the lower 16 bits of the version word in the ROD block ...
FullEventAssembler< RodRobIdMap > FEA_t
const Hid2RESrcID & getHid2RESrcID(const LArFebRodMapping &rodMapping) const
virtual StatusCode finalize() override
bool m_initializeForWriting
JobOption to intitialize services needed only for writing.
CachedUniquePtrT< const T > CachedUniquePtr