Skip to content
Snippets Groups Projects
Commit e38ab5af authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'auxdepr.xAODInDetMeasurement-20240423' into 'main'

xAODInDetMeasurement: Use Accessor, etc instead of auxdata().

See merge request atlas/athena!70820
parents f95a632e e4296006
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/ */
#include "xAODInDetMeasurement/Utilities.h" #include "xAODInDetMeasurement/Utilities.h"
...@@ -8,7 +8,7 @@ namespace xAOD::xAODInDetMeasurement::Utilities { ...@@ -8,7 +8,7 @@ namespace xAOD::xAODInDetMeasurement::Utilities {
float computeTotalCharge( const SG::AuxElement& cluster) { float computeTotalCharge( const SG::AuxElement& cluster) {
static const SG::AuxElement::Accessor<std::vector<float> > chargesAcc("chargeList"); static const SG::AuxElement::Accessor<std::vector<float> > chargesAcc("chargeList");
assert( cluster.isAvailable< std::vector<float> >("chargeList") ); assert( chargesAcc.isAvailable( cluster ) );
return xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge( chargesAcc(cluster) ); return xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge( chargesAcc(cluster) );
} }
...@@ -21,7 +21,7 @@ namespace xAOD::xAODInDetMeasurement::Utilities { ...@@ -21,7 +21,7 @@ namespace xAOD::xAODInDetMeasurement::Utilities {
int computeTotalToT( const SG::AuxElement& cluster) { int computeTotalToT( const SG::AuxElement& cluster) {
static const SG::AuxElement::Accessor< std::vector<int> > totsAcc("totList"); static const SG::AuxElement::Accessor< std::vector<int> > totsAcc("totList");
assert( cluster.isAvailable< std::vector<int> >("totList") ); assert( totsAcc.isAvailable( cluster ) );
return xAOD::xAODInDetMeasurement::Utilities::computeTotalToT( totsAcc(cluster) ); return xAOD::xAODInDetMeasurement::Utilities::computeTotalToT( totsAcc(cluster) );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment