|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   29   return StatusCode::SUCCESS;
 
   38   auto outputContainer = std::make_unique<xAOD::TruthVertexContainer>();
 
   39   auto outputAuxContainer = std::make_unique<xAOD::AuxContainerBase>();
 
   40   outputContainer->setStore(outputAuxContainer.get());
 
   47   bool warningPrinted = 
false;
 
   51     outputContainer->push_back(output);
 
   56       const int id = idAcc(*output);
 
   57       const int barcode = barcodeAcc(*output);
 
   62     } 
else if (warningPrinted == 
false) {
 
   65           "One or both of xAOD::TruthVertex barcode and id are not available. " 
   66           "This algorithm should not be run with these inputs.");
 
   67       warningPrinted = 
true;
 
   77                                               << 
"\" is not available on " 
   81         return StatusCode::FAILURE;
 
   83       auto& 
links = linkAcc(*output);
 
   85       for (
auto& link : 
links) {
 
   86         link.resetWithKeyAndIndex(
 
   99                                               << 
"\" is not available on " 
  103         return StatusCode::FAILURE;
 
  105       auto& 
links = linkAcc(*output);
 
  107       for (
auto& link : 
links) {
 
  108         link.resetWithKeyAndIndex(
 
  118           .record(std::move(outputContainer), std::move(outputAuxContainer)));
 
  123   return StatusCode::SUCCESS;
 
  
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Gaudi::Property< std::vector< std::string > > m_vertexLinks
Names of the truth vertex links to fix.
virtual StatusCode initialize() override
Function initialising the algorithm.
Helper class to provide type-safe access to aux data.
std::string removePrefix(std::string_view str, std::string_view prefix)
Remove a prefix from a string, if it exists.
Gaudi::Property< std::string > m_linkPrefixToRemove
Prefix to remove from the link names.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
int new_vertex_status_from_old(const int oldStatus, const int barcode)
Get vertex status in the new scheme from the barcode and status in the old scheme.
SG::WriteHandleKey< xAOD::TruthVertexContainer > m_outputContainerKey
The keys for the output xAOD truth containers.
TruthVertex_v1 TruthVertex
Typedef to implementation.
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_inputContainerKey
The keys of the input xAOD truth containers.
Class describing a truth vertex in the MC record.
Gaudi::Property< std::vector< std::string > > m_particleLinks
Names of the truth particle links to fix.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.