Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:15

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 #include "Acts/Definitions/Direction.hpp"
0010 
0011 #include <cstdlib>
0012 
0013 std::string Acts::Direction::toString() const {
0014   switch (m_value) {
0015     case Value::Positive:
0016       return "forward";
0017     case Value::Negative:
0018       return "backward";
0019     default:
0020       assert(false && "Invalid direction (shouldn't happen)");
0021       std::abort();
0022   }
0023 }
0024 
0025 std::ostream& Acts::operator<<(std::ostream& os, Direction dir) {
0026   os << dir.toString();
0027   return os;
0028 }