ATLAS Offline Software
ObjTrackingGeometryWriter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // This file was largely imported from the Acts testing framework
6 
7 #pragma once
8 
9 
10 #include "ObjSurfaceWriter.h"//surfaceWriters d'tor should be accessible
11 #include "Acts/Utilities/Logger.hpp" //logger d'tor should be accessible
12 
13 #include <memory>
14 #include <string>
15 #include <vector>
16 
17 namespace Acts {
18 class TrackingVolume;
19 class TrackingGeometry;
20 class GeometryContext;
21 
27 public:
28  // @class Config
29  //
30  // The nested config class
31  class Config
32  {
33  public:
35  std::shared_ptr<const Acts::Logger> logger;
37  std::string name = "";
39  std::vector<std::shared_ptr<ObjSurfaceWriter>> surfaceWriters;
40  std::string filePrefix = "";
41  std::string sensitiveGroupPrefix = "";
42  std::string layerPrefix = "";
43 
44  Config(const std::string& lname = "ObjTrackingGeometryWriter",
46  : logger(Acts::getDefaultLogger(lname, lvl))
47  , name(lname)
48  , surfaceWriters()
49  {
50  }
51  };
52 
56 
59  const std::string &
60  name() const;
61 
65  void
66  write(const Acts::GeometryContext& gctx, const Acts::TrackingGeometry& tGeometry);
67 
68 private:
70 
73  void
74  write(const Acts::GeometryContext& gctx, const Acts::TrackingVolume& tVolume);
75 
77  const Acts::Logger&
78  logger() const
79  {
80  return *m_cfg.logger;
81  }
82 };
83 
84 }
Acts::ObjTrackingGeometryWriter::Config::Config
Config(const std::string &lname="ObjTrackingGeometryWriter", Acts::Logging::Level lvl=Acts::Logging::INFO)
Definition: ObjTrackingGeometryWriter.h:44
Acts::ObjTrackingGeometryWriter::Config
Definition: ObjTrackingGeometryWriter.h:32
Acts::ObjTrackingGeometryWriter::Config::logger
std::shared_ptr< const Acts::Logger > logger
the default logger
Definition: ObjTrackingGeometryWriter.h:35
Acts::ObjTrackingGeometryWriter::Config::layerPrefix
std::string layerPrefix
Definition: ObjTrackingGeometryWriter.h:42
Acts::ObjTrackingGeometryWriter::Config::name
std::string name
the name of the writer
Definition: ObjTrackingGeometryWriter.h:37
Acts::ObjTrackingGeometryWriter::m_cfg
Config m_cfg
the config class
Definition: ObjTrackingGeometryWriter.h:69
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
Acts
Definition: ChamberAssembleTool.h:18
Acts::ObjTrackingGeometryWriter::logger
const Acts::Logger & logger() const
Private access to the logging instance.
Definition: ObjTrackingGeometryWriter.h:78
Config
Definition: dumpNPs.cxx:47
Acts::ObjTrackingGeometryWriter::Config::sensitiveGroupPrefix
std::string sensitiveGroupPrefix
Definition: ObjTrackingGeometryWriter.h:41
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:16
Acts::ObjTrackingGeometryWriter::Config::filePrefix
std::string filePrefix
Definition: ObjTrackingGeometryWriter.h:40
Acts::ObjTrackingGeometryWriter::write
void write(const Acts::GeometryContext &gctx, const Acts::TrackingGeometry &tGeometry)
The write interface.
Definition: ObjTrackingGeometryWriter.cxx:29
Acts::ObjTrackingGeometryWriter::name
const std::string & name() const
Framework name() method.
Definition: ObjTrackingGeometryWriter.cxx:23
Acts::ObjTrackingGeometryWriter::ObjTrackingGeometryWriter
ObjTrackingGeometryWriter(const Config &cfg)
Constructor.
Definition: ObjTrackingGeometryWriter.cxx:16
Acts::ObjTrackingGeometryWriter
Definition: ObjTrackingGeometryWriter.h:26
ObjSurfaceWriter.h
Acts::ObjTrackingGeometryWriter::Config::surfaceWriters
std::vector< std::shared_ptr< ObjSurfaceWriter > > surfaceWriters
surfaceWriters
Definition: ObjTrackingGeometryWriter.h:39