ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1BS::CpmRoiByteStreamTool Class Reference

Tool to perform ROB fragments to CPM RoI and CPM RoI to raw data conversions. More...

#include <CpmRoiByteStreamTool.h>

Inheritance diagram for LVL1BS::CpmRoiByteStreamTool:
Collaboration diagram for LVL1BS::CpmRoiByteStreamTool:

Public Member Functions

 CpmRoiByteStreamTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~CpmRoiByteStreamTool ()
virtual StatusCode initialize () override
StatusCode convert (const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CPMRoI > *roiCollection) const
 Convert ROB fragments to CPM RoIs.
StatusCode convert (const DataVector< LVL1::CPMRoI > *roiCollection) const
 Convert CPM RoI to bytestream.
const std::vector< uint32_t > & sourceIDs (const std::string &sgKey) const
 Return reference to vector with all possible Source Identifiers.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool InterfaceID.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef DataVector< LVL1::CPMRoICpmRoiCollection
typedef std::map< uint32_t, const LVL1::CPMRoI * > CpmRoiMap
typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::vector< uint32_t > makeSourceIDs (bool roiDaq) const
void setupCpmRoiMap (const CpmRoiCollection *roiCollection, CpmRoiMap &roiMap) const
 Set up CPM RoI map.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< IByteStreamCnvSvcm_byteStreamCnvSvc { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" }
ToolHandle< LVL1BS::L1CaloErrorByteStreamToolm_errorTool
 Error collection tool.
int m_crateOffsetHw
 Property: Hardware crate number offset.
int m_crateOffsetSw
 Property: Software crate number offset.
int m_version
 Property: Sub_block header version.
int m_dataFormat
 Property: Data compression format.
const int m_crates
 Number of crates.
const int m_modules
 Number of CPM modules per crate.
int m_slinks
 Property: Number of slinks per crate when writing out bytestream.
std::vector< uint32_t > m_sourceIDsProp
 Property: ROB source IDs.
std::vector< uint32_t > m_sourceIDsRoIBProp
 Property: ROB source IDs for RoIB.
const eformat::SubDetector m_subDetector
 Sub-detector type.
const L1CaloSrcIdMap m_srcIdMap
 Source ID converter.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Tool to perform ROB fragments to CPM RoI and CPM RoI to raw data conversions.

Based on ROD document version 1_09h.

Author
Peter Faulkner

Definition at line 47 of file CpmRoiByteStreamTool.h.

Member Typedef Documentation

◆ CpmRoiCollection

◆ CpmRoiMap

typedef std::map<uint32_t, const LVL1::CPMRoI*> LVL1BS::CpmRoiByteStreamTool::CpmRoiMap
private

Definition at line 74 of file CpmRoiByteStreamTool.h.

◆ ROBIterator

typedef IROBDataProviderSvc::VROBFRAG::const_iterator LVL1BS::CpmRoiByteStreamTool::ROBIterator
private

Definition at line 75 of file CpmRoiByteStreamTool.h.

◆ ROBPointer

◆ RODPointer

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CpmRoiByteStreamTool()

LVL1BS::CpmRoiByteStreamTool::CpmRoiByteStreamTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 38 of file CpmRoiByteStreamTool.cxx.

41 : AthAlgTool(type, name, parent),
42 m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
43 m_crates(4), m_modules(14),
44 m_subDetector (eformat::TDAQ_CALO_CLUSTER_PROC_ROI)
45{
46 declareInterface<CpmRoiByteStreamTool>(this);
47
48 declareProperty("CrateOffsetHw", m_crateOffsetHw = 8,
49 "Offset of CP crate numbers in bytestream");
50 declareProperty("CrateOffsetSw", m_crateOffsetSw = 0,
51 "Offset of CP crate numbers in RDOs");
52
53 // Properties for reading bytestream only
54 declareProperty("ROBSourceIDs", m_sourceIDsProp,
55 "ROB fragment source identifiers");
56 declareProperty("ROBSourceIDsRoIB", m_sourceIDsRoIBProp,
57 "ROB fragment source identifiers for RoIBs");
58
59 // Properties for writing bytestream only
60 declareProperty("DataVersion", m_version = 1,
61 "Format version number in sub-block header");
62 declareProperty("DataFormat", m_dataFormat = 1,
63 "Format identifier (0-1) in sub-block header");
64 declareProperty("SlinksPerCrate", m_slinks = 1,
65 "The number of S-Links per crate");
66
67}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
std::vector< uint32_t > m_sourceIDsRoIBProp
Property: ROB source IDs for RoIB.
const eformat::SubDetector m_subDetector
Sub-detector type.
int m_crateOffsetSw
Property: Software crate number offset.
int m_dataFormat
Property: Data compression format.
const int m_modules
Number of CPM modules per crate.
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
const int m_crates
Number of crates.
int m_version
Property: Sub_block header version.
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Error collection tool.
int m_crateOffsetHw
Property: Hardware crate number offset.

◆ ~CpmRoiByteStreamTool()

LVL1BS::CpmRoiByteStreamTool::~CpmRoiByteStreamTool ( )
virtual

Definition at line 71 of file CpmRoiByteStreamTool.cxx.

72{
73}

Member Function Documentation

◆ convert() [1/2]

StatusCode LVL1BS::CpmRoiByteStreamTool::convert ( const DataVector< LVL1::CPMRoI > * roiCollection) const

Convert CPM RoI to bytestream.

Definition at line 260 of file CpmRoiByteStreamTool.cxx.

262{
263 const bool debug = msgLvl(MSG::DEBUG);
264 if (debug) msg(MSG::DEBUG);
265
266 // Get the event assembler
267
268 FullEventAssembler<L1CaloSrcIdMap>* fea = nullptr;
269 ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
270 "CpmRoiByteStream") );
271 const uint16_t minorVersion = m_srcIdMap.minorVersion();
272 fea->setRodMinorVersion(minorVersion);
273
274 // Pointer to ROD data vector
275
277
278 // Sub-block for neutral format
279 CpmRoiSubBlock subBlock;
280
281 // Set up the container map
282
283 // CPM RoI map
284 CpmRoiMap roiMap;
285 setupCpmRoiMap(roiCollection, roiMap);
286 CpmRoiMap::const_iterator mapIter = roiMap.begin();
287 CpmRoiMap::const_iterator mapIterEnd = roiMap.end();
288
289 // Loop over data
290
291 const bool neutralFormat = m_dataFormat == L1CaloSubBlock::NEUTRAL;
292 const int modulesPerSlink = m_modules / m_slinks;
293 for (int crate=0; crate < m_crates; ++crate) {
294 const int hwCrate = crate + m_crateOffsetHw;
295
296 // CPM modules are numbered 1 to m_modules
297 for (int module=1; module <= m_modules; ++module) {
298 const int mod = module - 1;
299
300 // Pack required number of modules per slink
301
302 if (mod%modulesPerSlink == 0) {
303 const int daqOrRoi = 1;
304 const int slink = (m_slinks == 2) ? 2*(mod/modulesPerSlink)
305 : mod/modulesPerSlink;
306 if (debug) {
307 msg() << "Treating crate " << hwCrate
308 << " slink " << slink << endmsg
309 << "Data Version/Format: " << m_version
310 << " " << m_dataFormat << endmsg;
311 }
312 const uint32_t rodIdCpm = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
314 theROD = fea->getRodData(rodIdCpm);
315 if (neutralFormat) {
316 const L1CaloUserHeader userHeader;
317 theROD->push_back(userHeader.header());
318 }
319 }
320 if (debug) msg() << "Module " << module << endmsg;
321
322 // Create a sub-block (Neutral format only)
323
324 if (neutralFormat) {
325 subBlock.clear();
326 subBlock.setRoiHeader(m_version, hwCrate, module);
327 }
328
329 // Find CPM RoIs for this module
330
331 for (; mapIter != mapIterEnd; ++mapIter) {
332 const LVL1::CPMRoI* const roi = mapIter->second;
333 if (roi->crate() < crate) continue;
334 if (roi->crate() > crate) break;
335 if (roi->cpm() < module) continue;
336 if (roi->cpm() > module) break;
337 if (roi->hits() || roi->error()) {
338 if (neutralFormat) subBlock.fillRoi(*roi);
339 else theROD->push_back(roi->roiWord());
340 }
341 }
342
343 // Pack and write the sub-block
344
345 if (neutralFormat) {
346 if ( !subBlock.pack()) {
347 msg(MSG::ERROR) << "CPMRoI sub-block packing failed" << endmsg;
348 return StatusCode::FAILURE;
349 }
350 if (debug) {
351 msg() << "CPMRoI sub-block data words: "
352 << subBlock.dataWords() << endmsg;
353 }
354 subBlock.write(theROD);
355 }
356 }
357 }
358
359 return StatusCode::SUCCESS;
360}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
const bool debug
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
void setRodMinorVersion(uint16_t m)
change the ROD minor version
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
RODDATA * getRodData(uint32_t id)
get a block of ROD data
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
ServiceHandle< IByteStreamCnvSvc > m_byteStreamCnvSvc
std::map< uint32_t, const LVL1::CPMRoI * > CpmRoiMap
void setupCpmRoiMap(const CpmRoiCollection *roiCollection, CpmRoiMap &roiMap) const
Set up CPM RoI map.
uint32_t roiWord() const
Return packed RoI word.
int crate() const
Return crate number (0-1)
int hits() const
Return hit thresholds map.
int cpm() const
Return CPM number (1-14)
int error() const
Return error flags (bit 0 Saturation, bit 1 Parity)
setWord1 uint16_t
setEventNumber uint32_t

◆ convert() [2/2]

StatusCode LVL1BS::CpmRoiByteStreamTool::convert ( const IROBDataProviderSvc::VROBFRAG & robFrags,
DataVector< LVL1::CPMRoI > * roiCollection ) const

Convert ROB fragments to CPM RoIs.

Definition at line 90 of file CpmRoiByteStreamTool.cxx.

93{
94 const bool debug = msgLvl(MSG::DEBUG);
95 if (debug) msg(MSG::DEBUG);
96
97 // Sub-block for neutral format
98 CpmRoiSubBlock subBlock;
99
100 // Loop over ROB fragments
101
102 int robCount = 0;
103 std::set<uint32_t> dupCheck;
104 std::set<uint32_t> dupRoiCheck;
105 ROBIterator rob = robFrags.begin();
106 ROBIterator robEnd = robFrags.end();
107 for (; rob != robEnd; ++rob) {
108
109 if (debug) {
110 ++robCount;
111 msg() << "Treating ROB fragment " << robCount << endmsg;
112 }
113
114 // Skip fragments with ROB status errors
115
116 uint32_t robid = (*rob)->source_id();
117 if ((*rob)->nstatus() > 0) {
118 ROBPointer robData;
119 (*rob)->status(robData);
120 if (*robData != 0) {
121 m_errorTool->robError(robid, *robData);
122 if (debug) msg() << "ROB status error - skipping fragment" << endmsg;
123 continue;
124 }
125 }
126
127 // Skip duplicate fragments
128
129 if (!dupCheck.insert(robid).second) {
131 if (debug) msg() << "Skipping duplicate ROB fragment" << endmsg;
132 continue;
133 }
134
135 // Unpack ROD data (slinks)
136
137 RODPointer payloadBeg;
139 RODPointer payloadEnd;
140 (*rob)->rod_data(payloadBeg);
141 payloadEnd = payloadBeg + (*rob)->rod_ndata();
142 payload = payloadBeg;
143 if (payload == payloadEnd) {
144 if (debug) msg() << "ROB fragment empty" << endmsg;
145 continue;
146 }
147
148 // Check identifier
149 const uint32_t sourceID = (*rob)->rod_source_id();
150 if (m_srcIdMap.getRobID(sourceID) != robid ||
151 m_srcIdMap.subDet(sourceID) != m_subDetector ||
152 m_srcIdMap.daqOrRoi(sourceID) != 1 ||
153 (m_srcIdMap.slink(sourceID) != 0 && m_srcIdMap.slink(sourceID) != 2) ||
154 m_srcIdMap.crate(sourceID) < m_crateOffsetHw ||
155 m_srcIdMap.crate(sourceID) >= m_crateOffsetHw + m_crates) {
157 if (debug) {
158 msg() << "Wrong source identifier in data: "
159 << MSG::hex << sourceID << MSG::dec << endmsg;
160 }
161 continue;
162 }
163 const int rodCrate = m_srcIdMap.crate(sourceID);
164 if (debug) {
165 msg() << "Treating crate " << rodCrate
166 << " slink " << m_srcIdMap.slink(sourceID) << endmsg;
167 }
168
169 // First word may be User Header
170 if (L1CaloUserHeader::isValid(*payload)) {
171 L1CaloUserHeader userHeader(*payload);
172 const int minorVersion = (*rob)->rod_version() & 0xffff;
173 userHeader.setVersion(minorVersion);
174 const int headerWords = userHeader.words();
175 if (headerWords != 1 ) {
177 if (debug) msg() << "Unexpected number of user header words: "
178 << headerWords << endmsg;
179 continue;
180 }
181 for (int i = 0; i < headerWords; ++i) ++payload;
182 }
183
184 // Loop over sub-blocks if there are any
185
186 unsigned int rodErr = L1CaloSubBlock::ERROR_NONE;
187 while (payload != payloadEnd) {
188
190 subBlock.clear();
191 payload = subBlock.read(payload, payloadEnd);
192 if (debug) {
193 msg() << "CPM RoI sub-block: Crate " << subBlock.crate()
194 << " Module " << subBlock.module() << endmsg;
195 }
196 // Unpack sub-block
197 if (subBlock.dataWords() && !subBlock.unpack()) {
198 if (debug) {
199 std::string errMsg(subBlock.unpackErrorMsg());
200 msg() << "CPM RoI sub-block unpacking failed: " << errMsg << endmsg;
201 }
202 rodErr = subBlock.unpackErrorCode();
203 break;
204 }
205 const int numChips = 8;
206 const int numLocs = 2;
207 for (int chip = 0; chip < numChips; ++chip) {
208 for (int loc = 0; loc < numLocs; ++loc) {
209 const LVL1::CPMRoI roi = subBlock.roi(chip, loc);
210 if (roi.hits() || roi.error()) {
211 roiCollection->push_back(new LVL1::CPMRoI(roi));
212 }
213 }
214 }
215 } else {
216 // Just RoI word
217 LVL1::CPMRoI roi;
218 if (roi.setRoiWord(*payload)) {
219 if (roi.crate() != rodCrate - m_crateOffsetHw) {
220 if (debug) msg() << "Inconsistent RoI crate number: "
221 << roi.crate() << endmsg;
223 break;
224 }
225 if (roi.cpm() == 0 || roi.cpm() > m_modules) {
226 if (debug) msg() << "Invalid CPM number: "
227 << roi.cpm() << endmsg;
229 break;
230 }
231 const uint32_t location = (*payload) & 0xfffc0000;
232 if (dupRoiCheck.insert(location).second) {
233 if (roi.hits() || roi.error()) {
234 roiCollection->push_back(new LVL1::CPMRoI(*payload));
235 }
236 } else {
237 if (debug) msg() << "Duplicate RoI word "
238 << MSG::hex << *payload << MSG::dec << endmsg;
240 break;
241 }
242 } else {
243 if (debug) msg() << "Invalid RoI word "
244 << MSG::hex << *payload << MSG::dec << endmsg;
246 break;
247 }
248 ++payload;
249 }
250 }
251 if (rodErr != L1CaloSubBlock::ERROR_NONE)
252 m_errorTool->rodError(robid, rodErr);
253 }
254
255 return StatusCode::SUCCESS;
256}
value_type push_back(value_type pElem)
Add an element to the end of the collection.
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
static SubBlockWordType wordType(uint32_t word)
Word identification.
static bool isValid(uint32_t word)
Test for valid header word.
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition CPMRoI.cxx:57

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode LVL1BS::CpmRoiByteStreamTool::initialize ( )
overridevirtual

Definition at line 78 of file CpmRoiByteStreamTool.cxx.

79{
80 ATH_MSG_INFO ("Initializing " << name());
81
82 ATH_CHECK( m_errorTool.retrieve() );
83 ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
84
85 return StatusCode::SUCCESS;
86}
#define ATH_MSG_INFO(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1BS::CpmRoiByteStreamTool::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 31 of file CpmRoiByteStreamTool.cxx.

32{
34}
static const InterfaceID IID_ICpmRoiByteStreamTool("CpmRoiByteStreamTool", 1, 1)

◆ makeSourceIDs()

std::vector< uint32_t > LVL1BS::CpmRoiByteStreamTool::makeSourceIDs ( bool roiDaq) const
private

Definition at line 364 of file CpmRoiByteStreamTool.cxx.

365{
366 std::vector<uint32_t> sourceIDs;
367
368 if (roiDaq) {
370 }
371 else {
373 }
374
375 if (sourceIDs.empty()) {
376 const int maxCrates = m_crates + m_crateOffsetHw;
377 const int maxSlinks = m_srcIdMap.maxSlinks();
378 for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate)
379 {
380 for (int slink = 0; slink < maxSlinks; ++slink)
381 {
382 const int daqOrRoi = 1;
383 const uint32_t rodId = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
385 const uint32_t robId = m_srcIdMap.getRobID(rodId);
386 if (roiDaq)
387 {
388 if (slink < 2) sourceIDs.push_back(robId);
389 }
390 else if (slink >= 2) sourceIDs.push_back(robId);
391 }
392 }
393
394 }
395 return sourceIDs;
396}
const std::vector< uint32_t > & sourceIDs(const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setupCpmRoiMap()

void LVL1BS::CpmRoiByteStreamTool::setupCpmRoiMap ( const CpmRoiCollection * roiCollection,
CpmRoiMap & roiMap ) const
private

Set up CPM RoI map.

Definition at line 418 of file CpmRoiByteStreamTool.cxx.

421{
422 roiMap.clear();
423 if (roiCollection) {
424 CpmRoiCollection::const_iterator pos = roiCollection->begin();
425 CpmRoiCollection::const_iterator pose = roiCollection->end();
426 for (; pos != pose; ++pos) {
427 const LVL1::CPMRoI* const roi = *pos;
428 const uint32_t key = roi->roiWord();
429 roiMap.insert(std::make_pair(key, roi));
430 }
431 }
432}
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838

◆ sourceIDs()

const std::vector< uint32_t > & LVL1BS::CpmRoiByteStreamTool::sourceIDs ( const std::string & sgKey) const

Return reference to vector with all possible Source Identifiers.

Definition at line 398 of file CpmRoiByteStreamTool.cxx.

400{
401 const std::string flag("RoIB");
402 const std::string::size_type pos = sgKey.find(flag);
403 const bool roiDaq =
404 (pos == std::string::npos || pos != sgKey.length() - flag.length());
405
406 if (roiDaq) {
407 static const std::vector<uint32_t> sourceIDs = makeSourceIDs(roiDaq);
408 return sourceIDs;
409 }
410 else {
411 static const std::vector<uint32_t> sourceIDsRoIB = makeSourceIDs(roiDaq);
412 return sourceIDsRoIB;
413 }
414}
std::vector< uint32_t > makeSourceIDs(bool roiDaq) const
bool flag
Definition master.py:29

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_byteStreamCnvSvc

ServiceHandle<IByteStreamCnvSvc> LVL1BS::CpmRoiByteStreamTool::m_byteStreamCnvSvc { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" }
private

Definition at line 70 of file CpmRoiByteStreamTool.h.

71{ this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" };

◆ m_crateOffsetHw

int LVL1BS::CpmRoiByteStreamTool::m_crateOffsetHw
private

Property: Hardware crate number offset.

Definition at line 89 of file CpmRoiByteStreamTool.h.

◆ m_crateOffsetSw

int LVL1BS::CpmRoiByteStreamTool::m_crateOffsetSw
private

Property: Software crate number offset.

Definition at line 91 of file CpmRoiByteStreamTool.h.

◆ m_crates

const int LVL1BS::CpmRoiByteStreamTool::m_crates
private

Number of crates.

Definition at line 97 of file CpmRoiByteStreamTool.h.

◆ m_dataFormat

int LVL1BS::CpmRoiByteStreamTool::m_dataFormat
private

Property: Data compression format.

Definition at line 95 of file CpmRoiByteStreamTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_errorTool

ToolHandle<LVL1BS::L1CaloErrorByteStreamTool> LVL1BS::CpmRoiByteStreamTool::m_errorTool
private

Error collection tool.

Definition at line 86 of file CpmRoiByteStreamTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_modules

const int LVL1BS::CpmRoiByteStreamTool::m_modules
private

Number of CPM modules per crate.

Definition at line 99 of file CpmRoiByteStreamTool.h.

◆ m_slinks

int LVL1BS::CpmRoiByteStreamTool::m_slinks
private

Property: Number of slinks per crate when writing out bytestream.

Definition at line 101 of file CpmRoiByteStreamTool.h.

◆ m_sourceIDsProp

std::vector<uint32_t> LVL1BS::CpmRoiByteStreamTool::m_sourceIDsProp
private

Property: ROB source IDs.

Definition at line 103 of file CpmRoiByteStreamTool.h.

◆ m_sourceIDsRoIBProp

std::vector<uint32_t> LVL1BS::CpmRoiByteStreamTool::m_sourceIDsRoIBProp
private

Property: ROB source IDs for RoIB.

Definition at line 105 of file CpmRoiByteStreamTool.h.

◆ m_srcIdMap

const L1CaloSrcIdMap LVL1BS::CpmRoiByteStreamTool::m_srcIdMap
private

Source ID converter.

Definition at line 109 of file CpmRoiByteStreamTool.h.

◆ m_subDetector

const eformat::SubDetector LVL1BS::CpmRoiByteStreamTool::m_subDetector
private

Sub-detector type.

Definition at line 107 of file CpmRoiByteStreamTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_version

int LVL1BS::CpmRoiByteStreamTool::m_version
private

Property: Sub_block header version.

Definition at line 93 of file CpmRoiByteStreamTool.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: