Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-13 09:38:48

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/EventData/SpacePointContainer2.hpp"
0012 
0013 #include "Acts/EventData/SpacePointProxy2.hpp"
0014 
0015 namespace Acts {
0016 
0017 inline MutableSpacePointProxy2 SpacePointContainer2::at(Index index) {
0018   if (index >= size()) {
0019     throw std::out_of_range(
0020         "Index out of range in SpacePointContainer2: " + std::to_string(index) +
0021         " >= " + std::to_string(size()));
0022   }
0023   return MutableProxy(*this, index);
0024 }
0025 
0026 inline ConstSpacePointProxy2 SpacePointContainer2::at(Index index) const {
0027   if (index >= size()) {
0028     throw std::out_of_range(
0029         "Index out of range in SpacePointContainer2: " + std::to_string(index) +
0030         " >= " + std::to_string(size()));
0031   }
0032   return ConstProxy(*this, index);
0033 }
0034 
0035 inline MutableSpacePointProxy2 SpacePointContainer2::operator[](
0036     Index index) noexcept {
0037   return MutableProxy(*this, index);
0038 }
0039 
0040 inline ConstSpacePointProxy2 SpacePointContainer2::operator[](
0041     Index index) const noexcept {
0042   return ConstProxy(*this, index);
0043 }
0044 
0045 }  // namespace Acts