Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:23:17

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2023 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Detector/Blueprint.hpp"
0012 
0013 #include <ostream>
0014 #include <string>
0015 
0016 namespace Acts::Experimental::detail::BlueprintDrawer {
0017 
0018 /// @brief Nested options struct for the drawer
0019 struct Options {
0020   struct Node {
0021     /// ROOT node definitions
0022     std::string shape = "circle";
0023     std::string color = "darkorange";
0024 
0025     /// Font properties
0026     std::string face = "sans-serif";
0027     int labelText = 12;
0028     int infoText = 10;
0029 
0030     /// Info properties
0031     int precision = 1;
0032   };
0033 
0034   /// @brief The name of the graph
0035   std::string graphName = "blueprint";
0036 
0037   // Main node types to come
0038   Node root = Node{};
0039   Node branch = Node{"diamond", "white"};
0040   Node leaf = Node{"box", "darkolivegreen1"};
0041   Node gap = Node{"box", "darkolivegreen3"};
0042 
0043   // Sub node types to come
0044   Node shape = Node{"cylinder", "lightgrey"};
0045   Node virtualShape = Node{"cylinder", "white"};
0046   Node internals = Node{"doubleoctagon", "cadetblue1"};
0047   Node geoID = Node{"box", "azure"};
0048   Node roots = Node{"box", "darkkhaki"};
0049 };
0050 
0051 /// @brief  Turn into a dot output by writing into a stream
0052 ///
0053 /// @tparam the stream type to be used
0054 ///
0055 /// @param ss the stream into which the dot output should be written
0056 /// @param node the node to be drawn
0057 /// @param options the options for the drawer
0058 void dotStream(std::ostream& ss, const Blueprint::Node& node,
0059                const Options& options = Options{});
0060 
0061 }  // namespace Acts::Experimental::detail::BlueprintDrawer