ATLAS Offline Software
Loading...
Searching...
No Matches
InputMakerBase::MatchingCache Struct Reference

Used to cache each incoming Decision object's ElementLink which is being used to identify the Decision object for the purposes of de-duplication merging. More...

#include <InputMakerBase.h>

Collaboration diagram for InputMakerBase::MatchingCache:

Public Member Functions

void setMatchingHash (const TrigCompositeUtils::Decision *inputDecision, const uint64_t matchingHash)
void linkOutputToInput (const TrigCompositeUtils::Decision *outputDecision, const TrigCompositeUtils::Decision *inputDecision)
uint64_t getMatchingHash (const TrigCompositeUtils::Decision *outputDecision) const

Public Attributes

std::map< const TrigCompositeUtils::Decision *, const TrigCompositeUtils::Decision * > m_outputDecToInputDec
std::map< const TrigCompositeUtils::Decision *, uint64_t > m_inputDecToMatchingHash

Detailed Description

Used to cache each incoming Decision object's ElementLink which is being used to identify the Decision object for the purposes of de-duplication merging.

Definition at line 35 of file InputMakerBase.h.

Member Function Documentation

◆ getMatchingHash()

uint64_t InputMakerBase::MatchingCache::getMatchingHash ( const TrigCompositeUtils::Decision * outputDecision) const

Definition at line 237 of file InputMakerBase.cxx.

237 {
238 if (!outputDecision) {
239 throw std::runtime_error("InputMakerBase::MatchingCache::getMatchingHash: Called with nullptr.");
240 }
241
242 auto it_inDec = m_outputDecToInputDec.find(outputDecision);
243 if (it_inDec == m_outputDecToInputDec.end()) {
244 throw std::runtime_error("InputMakerBase::MatchingCache::getMatchingHash: No matching input Decision* for the supplied output Decision*");
245 }
246 const Decision* inputDecision = it_inDec->second;
247
248 auto it_hash = m_inputDecToMatchingHash.find(inputDecision);
249 if (it_hash == m_inputDecToMatchingHash.end()) {
250 throw std::runtime_error("InputMakerBase::MatchingCache::getMatchingHash: No matching hash for this input Decision*");
251 }
252 const uint64_t hash = it_hash->second;
253
254 return hash;
255}
std::map< const TrigCompositeUtils::Decision *, const TrigCompositeUtils::Decision * > m_outputDecToInputDec
std::map< const TrigCompositeUtils::Decision *, uint64_t > m_inputDecToMatchingHash

◆ linkOutputToInput()

void InputMakerBase::MatchingCache::linkOutputToInput ( const TrigCompositeUtils::Decision * outputDecision,
const TrigCompositeUtils::Decision * inputDecision )

Definition at line 232 of file InputMakerBase.cxx.

232 {
233 m_outputDecToInputDec[outputDecision] = inputDecision;
234}

◆ setMatchingHash()

void InputMakerBase::MatchingCache::setMatchingHash ( const TrigCompositeUtils::Decision * inputDecision,
const uint64_t matchingHash )

Definition at line 227 of file InputMakerBase.cxx.

227 {
228 m_inputDecToMatchingHash[inputDecision] = matchingHash;
229}

Member Data Documentation

◆ m_inputDecToMatchingHash

std::map<const TrigCompositeUtils::Decision*, uint64_t> InputMakerBase::MatchingCache::m_inputDecToMatchingHash

Definition at line 40 of file InputMakerBase.h.

◆ m_outputDecToInputDec

std::map<const TrigCompositeUtils::Decision*, const TrigCompositeUtils::Decision*> InputMakerBase::MatchingCache::m_outputDecToInputDec

Definition at line 39 of file InputMakerBase.h.


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