2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 #include "AthContainers/ConstAccessor.h"
8 const T* xAOD::TauHelpers::getLink(const xAOD::IParticle* particle, const std::string& name, bool debug)
10 if (!particle) return 0;
11 typedef ElementLink< DataVector<T> > Link_t;
13 static const SG::ConstAccessor< Link_t > acc( name );
14 if (!acc.isAvailable( *particle ) )
16 if (debug) std::cerr<< "Link not available" << std::endl;
19 const Link_t link = acc( *particle );
22 if (debug) std::cerr << "Invalid link" << std::endl;