19 m_pCaloHitList(pCaloHitList),
20 m_caloHitListName(caloHitListName)
22 for (
const CaloHit *
const pCaloHit : *pCaloHitList)
24 if (!
m_caloHitUsageMap.insert(CaloHitUsageMap::value_type(pCaloHit, initialHitAvailability)).second)
35 for (
const CaloHit *
const pCaloHit : pCaloHitReplacement->m_newCaloHits)
38 delete pCaloHitReplacement;
58 for (
const CaloHit *
const pCaloHit : *pCaloHitList)
77 return STATUS_CODE_NOT_FOUND;
79 usageMapIter->second = isAvailable;
81 return STATUS_CODE_SUCCESS;
87 for (
const CaloHit *
const pCaloHit : *pCaloHitList)
92 return STATUS_CODE_NOT_FOUND;
94 usageMapIter->second = isAvailable;
97 return STATUS_CODE_SUCCESS;
114 for (
const CaloHitUsageMap::value_type &mapEntry : caloHitUsageMap) caloHitVector.push_back(mapEntry.first);
117 for (
const CaloHit *
const pCaloHit : caloHitVector)
122 return STATUS_CODE_FAILURE;
124 usageMapIter->second = caloHitUsageMap.at(pCaloHit);
127 return STATUS_CODE_SUCCESS;
137 return STATUS_CODE_ALREADY_PRESENT;
141 if (!
m_caloHitUsageMap.insert(CaloHitUsageMap::value_type(pCaloHit,
true)).second)
142 return STATUS_CODE_ALREADY_PRESENT;
146 return STATUS_CODE_FAILURE;
153 return STATUS_CODE_FAILURE;
160 return STATUS_CODE_FAILURE;
167 return STATUS_CODE_SUCCESS;
175 delete pCaloHitReplacement;
187 m_pCurrentCaloHitMetadata(nullptr),
188 m_caloHitList(*pCaloHitList)
199 delete mapEntry.second;
205 const std::string &reclusterListName,
const bool initialHitAvailability)
212 return STATUS_CODE_ALREADY_PRESENT;
215 return STATUS_CODE_SUCCESS;
225 return STATUS_CODE_FAILURE;
227 pCaloHitMetaData = iter->second;
230 return STATUS_CODE_SUCCESS;
Header file defining relevant internal typedefs, sort and string conversion functions.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Enable ordering of pointers based on properties of target objects.
StatusCodeException class.
std::vector< const CaloHit * > CaloHitVector
std::unordered_map< const CaloHit *, bool > CaloHitUsageMap
std::vector< CaloHitReplacement * > CaloHitReplacementList
CaloHitList m_oldCaloHits
The list of old calo hits, to be replaced.
CaloHitList m_newCaloHits
The list new calo hits, to act as replacements.
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.
CaloHitReplacement class.