ATLAS Offline Software
Loading...
Searching...
No Matches
GeometryWriter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JIVEXML_GEOMETRYWRITER
6#define JIVEXML_GEOMETRYWRITER
7
8#include "CLHEP/Geometry/Point3D.h"
11
13#include <string>
14#include <vector>
15#include <fstream>
16#include <memory>
17
19class Identifier;
22class PixelID;
23class SCT_ID;
24class TRT_ID;
25
26namespace InDetDD {
30}
31
32namespace JiveXML{
33
37 class GeometryWriter : virtual public IGeometryWriter, public AthAlgTool {
38
39 public:
40
46 GeometryWriter(const std::string& t,const std::string& n,const IInterface* p):
47 AthAlgTool(t,n,p){declareInterface<IGeometryWriter>(this);};
48
52 virtual StatusCode writeGeometry() override;
53
54 virtual ~GeometryWriter(){};
55
56 private:
57
62 void writeHeader(std::ofstream &out);
63
68 void writePixelGeometry(std::ofstream &out);
69
74 void writeSCTGeometry(std::ofstream &out);
75
80 void writeTRTGeometry(std::ofstream &out);
81
86 void writeSolenoidGeometry(std::ofstream &out);
87
92 void writeLArGeometry(std::ofstream &out);
93
98 void writeMBTSGeometry(std::ofstream &out);
99
104 void writeTILEGeometry(std::ofstream &out);
105
110 void writeFooter(std::ofstream &out);
111
121 void writeDiscElement(std::ofstream &out, std::string p, std::string c,
122 std::string n, double rIn, double rOut);
123
135 void writeRectangleElement(std::ofstream &out, std::string p, std::string c,
136 std::string n, double xIn, double xOut,
137 double yIn, double yOut);
138
151 void writeRectanglishElement(std::ofstream &out, std::string p, std::string c,
152 std::string n, double xIn, double xOut,
153 double yIn, double yOut);
154
155
158 const PixelID * m_pixelIdHelper{nullptr};
159
162 const SCT_ID * m_sctIdHelper{nullptr};
163
166 const TRT_ID * m_trtIdHelper{nullptr};
167
169 std::unique_ptr<CaloDetDescrManager> m_calo_manager;
170
173
175 static const int m_numCaloTypes = 24;
176
177 std::vector<double> m_larMin;
178 std::vector<double> m_larMax;
179 };
180}
181#endif
Definition of CaloDetDescrManager.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
const LArDetectorManager * m_lar_manager
void writeDiscElement(std::ofstream &out, std::string p, std::string c, std::string n, double rIn, double rOut)
Writes <ADisc> element to the XML file.
void writeLArGeometry(std::ofstream &out)
Writes the geometry of the LAr calorimeters.
const PixelID * m_pixelIdHelper
void writeTILEGeometry(std::ofstream &out)
Writes the geometry of the TILE calorimeters.
void writeMBTSGeometry(std::ofstream &out)
Writes the geometry of the Minimum Bias Trigger Scintillators.
void writePixelGeometry(std::ofstream &out)
Writes the geometry of the pixel detector.
const TRT_ID * m_trtIdHelper
const SCT_ID * m_sctIdHelper
void writeRectangleElement(std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
Writes <ARectangle> element to the XML file.
void writeRectanglishElement(std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
Writes <AGeneralPath> element to the XML file.
void writeFooter(std::ofstream &out)
Writes the footer of the XML file.
std::vector< double > m_larMin
virtual StatusCode writeGeometry() override
Writes the inner detector and calorimeter geometry to an XML file.
const TileDetDescrManager * m_tile_manager
static const int m_numCaloTypes
The number of calorimeter sampling types.
void writeTRTGeometry(std::ofstream &out)
Writes the geometry of the TRT detector.
const InDetDD::SCT_DetectorManager * m_silicon_manager
Silicon detector manager and ID helper.
GeometryWriter(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
void writeSolenoidGeometry(std::ofstream &out)
Writes the (hardcoded) geometry of the solenoid.
std::vector< double > m_larMax
const InDetDD::PixelDetectorManager * m_pixel_manager
Pixel detector manager and ID helper.
void writeSCTGeometry(std::ofstream &out)
Writes the geometry of the silicon detector.
std::unique_ptr< CaloDetDescrManager > m_calo_manager
Calorimeter detector manager.
const InDetDD::TRT_DetectorManager * m_trt_manager
TRT detector manager and ID helper.
void writeHeader(std::ofstream &out)
Writes the header of the XML file.
Stored in storegate.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Message Stream Member.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.