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/SeedContainer2.hpp"
0012 
0013 #include "Acts/EventData/SeedProxy2.hpp"
0014 
0015 #include <limits>
0016 
0017 namespace Acts {
0018 
0019 inline MutableSeedProxy2 SeedContainer2::createSeed() noexcept {
0020   ++m_size;
0021 
0022   m_spacePointOffsets.push_back(m_spacePoints.size());
0023   m_spacePointCounts.push_back(static_cast<std::uint8_t>(0));
0024   m_qualities.push_back(-std::numeric_limits<float>::infinity());
0025   m_vertexZs.push_back(0.f);
0026 
0027   return MutableProxy(*this, size() - 1);
0028 }
0029 
0030 inline MutableSeedProxy2 SeedContainer2::at(Index index) {
0031   if (index >= size()) {
0032     throw std::out_of_range("Index out of range in SeedContainer2");
0033   }
0034   return MutableProxy(*this, index);
0035 }
0036 
0037 inline ConstSeedProxy2 SeedContainer2::at(Index index) const {
0038   if (index >= size()) {
0039     throw std::out_of_range("Index out of range in SeedContainer2");
0040   }
0041   return ConstProxy(*this, index);
0042 }
0043 
0044 inline MutableSeedProxy2 SeedContainer2::operator[](Index index) noexcept {
0045   return MutableProxy(*this, index);
0046 }
0047 
0048 inline ConstSeedProxy2 SeedContainer2::operator[](Index index) const noexcept {
0049   return ConstProxy(*this, index);
0050 }
0051 
0052 }  // namespace Acts