ATLAS Offline Software
Loading...
Searching...
No Matches
TrackingVolumeDisplayer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrackingVolumeDisplayer.h, (c) ATLAS Detector software
8
9#ifndef TRKDETDESCRTOOLS_TRACKINGVOLUMEDISPLAYER_H
10#define TRKDETDESCRTOOLS_TRACKINGVOLUMEDISPLAYER_H
11
12// Trk
14// STL
15#include <string>
16#include <fstream>
17
19namespace Trk {
20
21 class TrackingVolume;
22 class Layer;
23 class Surface;
25
33
35 virtual public RecursiveGeometryProcessor {
36
37 public:
38
41
43 StatusCode initialize();
44
46 StatusCode finalize();
47
48 private:
49
51 StatusCode processNode(const TrackingVolume& tvol, size_t level=0) const;
52
54 StatusCode processNode(const Layer& lay, size_t level=0) const;
55
57 StatusCode processNode(const Surface&, size_t level=0) const;
58
59 static void openFile(std::ofstream& output, const std::string& filename) ;
60 static void closeFile(std::ofstream& output) ;
61
63 static int colorCodeFromMaterial(const Trk::MaterialProperties* prop, std::ofstream& output) ;
64
65 mutable int m_volumeCounter = 0;
66
67 mutable std::ofstream m_fileVolumeOutput;
68 Gaudi::Property<std::string> m_fileVolumeOutputName
69 {this, "TrackingVolumeOutputFile", "TrackingGeometryVolumeDisplay.C",
70 "file name for visualization action"};
71 Gaudi::Property<bool> m_fileVolumeOutputMode
72 {this, "TrackingVolumeOutput", true, "steer writing"};
73
74 mutable std::ofstream m_fileLayerOutput;
75 Gaudi::Property<std::string> m_fileLayerOutputName
76 {this, "LayerOutputFile", "TrackingGeometryLayerDisplay.C",
77 "file name for visualization action"};
78 Gaudi::Property<bool> m_fileLayerOutputMode
79 {this, "LayerOutput", true, "steer writing"};
80
81 mutable std::ofstream m_fileSurfaceOutput;
82 Gaudi::Property<std::string> m_fileSurfaceOutputName
83 {this, "SurfaceOutputFile", "TrackingGeometrySurfaceDisplay.C",
84 "file name for visualization action"};
85 Gaudi::Property<bool> m_fileSurfaceOutputMode
86 {this, "SurfaceOutput", true, "steer writing"};
87 Gaudi::Property<bool> m_fileSurfaceOutputSplit
88 {this, "SurfaceOutputSplit", false, "use one file for each layer"};
89
90 static int s_displaySurfaces;
91
92 };
93
94}
95
96#endif
97
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
Material with information about thickness of material.
RecursiveGeometryProcessor(const std::string &, const std::string &, const IInterface *)
Constructor.
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
The TrackingVolumeDisplayer writes a root .C file which can be executed and used the OpenGL root view...
StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Current implementation: write root visualization to file stream.
std::ofstream m_fileVolumeOutput
file output for visualization action
static int s_displaySurfaces
static surface counter
RecursiveGeometryProcessor(const std::string &, const std::string &, const IInterface *)
Constructor.
static void openFile(std::ofstream &output, const std::string &filename)
File handling: open + write header.
std::ofstream m_fileSurfaceOutput
file output for visualization action
Gaudi::Property< bool > m_fileVolumeOutputMode
StatusCode finalize()
AlgTool finalize method.
std::ofstream m_fileLayerOutput
file output for visualization action
Gaudi::Property< std::string > m_fileVolumeOutputName
Gaudi::Property< bool > m_fileSurfaceOutputMode
static int colorCodeFromMaterial(const Trk::MaterialProperties *prop, std::ofstream &output)
calculate the color code from the Material
Gaudi::Property< bool > m_fileLayerOutputMode
Gaudi::Property< bool > m_fileSurfaceOutputSplit
Gaudi::Property< std::string > m_fileLayerOutputName
Gaudi::Property< std::string > m_fileSurfaceOutputName
static void closeFile(std::ofstream &output)
File handling: write footer + close.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Ensure that the ATLAS eigen extensions are properly loaded.
void initialize()