ATLAS Offline Software
IGeometryManagerTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRKALIGNINTERFACES_IGEOMETRYMANAGERTOOL_H
6 #define TRKALIGNINTERFACES_IGEOMETRYMANAGERTOOL_H
7 
8 #include "GaudiKernel/IAlgTool.h"
9 
12 
23 #include <fstream>
24 
25 class TFile;
26 
27 static const InterfaceID
28 IID_TRKALIGNINTERFACES_IGeometryManagerTool("IGeometryManagerTool",1,0);
29 
30 namespace Trk {
31 
32  class AlignModule;
33  class AlignPar;
34 
35 class IGeometryManagerTool : virtual public IAlgTool {
36 
37  public:
38  virtual ~IGeometryManagerTool() {}
39 
40  static const InterfaceID& interfaceID();
41 
42  virtual StatusCode initialize() = 0;
43  virtual StatusCode finalize() = 0;
44 
46  virtual int ReadGeometry(int solvelevel) = 0;
47 
48  virtual void PrintModPositions() = 0;
49  virtual void StoreModPositions(std::string filename) = 0;
50 
52  virtual void setNtuple(TFile*) {}
53 
55  virtual void setLogStream(std::ostream * os) { m_logStream = os; }
56 
58  virtual void buildGeometry() {};
59 
63 
65  virtual int getNextIDHash() { return m_hashCounter++; };
66 
68  virtual void setFirstIDHash(unsigned int idhash) { m_hashCounter=idhash; };
69 
72 
74  virtual void setHashMaps(std::vector<Trk::AlignModuleList *> * maps) { m_idHashToAlignModuleMapsPtr=maps; }
75 
77  virtual bool checkAlignLevel() { return true; }
78 
80  virtual int alignLevel() { return m_alignLevel; }
81 
83  virtual void setAlignLevel(int level) { m_alignLevel = level; }
84 
86  virtual int alignLevelBarrel() { return m_alignLevelBarrel; }
87 
90 
92  virtual bool checkAlignLevelBarrel() { return true; }
93 
95  virtual int alignLevelEndcaps() { return m_alignLevelEndcaps; }
96 
99 
101  virtual bool checkAlignLevelEndcaps() { return true; }
102 
103  protected:
104 
107 
109  std::vector<Trk::AlignModuleList *> * m_idHashToAlignModuleMapsPtr = nullptr;
110 
111  int m_hashCounter = 0;
112 
113  std::ostream * m_logStream = nullptr;
114 
115  int m_alignLevel = 0;
118 
119 }; // end class definition
120 
121 inline const InterfaceID& IGeometryManagerTool::interfaceID() {
122  return IID_TRKALIGNINTERFACES_IGeometryManagerTool;
123 }
124 
125 } // end namespace
126 
127 #endif // TRKALIGNINTERFACES_IGEOMETRYMANAGERTOOL_H
Trk::IGeometryManagerTool::m_alignLevelBarrel
int m_alignLevelBarrel
alignment level
Definition: IGeometryManagerTool.h:116
Trk::IGeometryManagerTool::checkAlignLevelEndcaps
virtual bool checkAlignLevelEndcaps()
check whether the alignment level is allowed
Definition: IGeometryManagerTool.h:101
Trk::AlignModuleList
std::vector< AlignModule * > AlignModuleList
Definition: AlignModuleList.h:37
Trk::IGeometryManagerTool::m_hashCounter
int m_hashCounter
variable for setting the idHash of the AlignModules
Definition: IGeometryManagerTool.h:111
Trk::IGeometryManagerTool::finalize
virtual StatusCode finalize()=0
Trk::IGeometryManagerTool::alignLevel
virtual int alignLevel()
get alignment level
Definition: IGeometryManagerTool.h:80
Trk::AlignModule
Definition: AlignModule.h:45
Trk::IGeometryManagerTool::m_alignLevelEndcaps
int m_alignLevelEndcaps
alignment level
Definition: IGeometryManagerTool.h:117
Trk::IGeometryManagerTool::setNtuple
virtual void setNtuple(TFile *)
Sets output ntuple file, to be implemented if needed for detector-specific implementation.
Definition: IGeometryManagerTool.h:52
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Trk::IGeometryManagerTool::alignLevelBarrel
virtual int alignLevelBarrel()
get alignment level
Definition: IGeometryManagerTool.h:86
Trk::IGeometryManagerTool::m_alignLevel
int m_alignLevel
alignment level
Definition: IGeometryManagerTool.h:115
Trk::IGeometryManagerTool::StoreModPositions
virtual void StoreModPositions(std::string filename)=0
Trk::IGeometryManagerTool::setFirstIDHash
virtual void setFirstIDHash(unsigned int idhash)
set first free IDHash usable for new AlignModule
Definition: IGeometryManagerTool.h:68
AlignModule
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
Trk::IGeometryManagerTool::initialize
virtual StatusCode initialize()=0
Trk::IGeometryManagerTool::m_alignModuleListPtr
Trk::AlignModuleList * m_alignModuleListPtr
pointer to module list to which the modules are added
Definition: IGeometryManagerTool.h:106
Trk::IGeometryManagerTool::checkAlignLevelBarrel
virtual bool checkAlignLevelBarrel()
check whether the alignment level is allowed
Definition: IGeometryManagerTool.h:92
Trk::IGeometryManagerTool::setHashMaps
virtual void setHashMaps(std::vector< Trk::AlignModuleList * > *maps)
set pointer to vector of hashMaps to which the elements should be added to
Definition: IGeometryManagerTool.h:74
Trk::IGeometryManagerTool
Definition: IGeometryManagerTool.h:35
Trk::IGeometryManagerTool::setModuleList
virtual void setModuleList(Trk::AlignModuleList *list)
set pointer to module list to which the modules should be added to
Definition: IGeometryManagerTool.h:71
Trk::IGeometryManagerTool::getNextIDHash
virtual int getNextIDHash()
get next free IDHash usable for new AlignModule
Definition: IGeometryManagerTool.h:65
Trk::IGeometryManagerTool::ReadGeometry
virtual int ReadGeometry(int solvelevel)=0
build collection of AlignModules for a particular detector type, return number of alignment parameter...
Trk::IGeometryManagerTool::setLogStream
virtual void setLogStream(std::ostream *os)
sets the output stream for the logfile
Definition: IGeometryManagerTool.h:55
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::IGeometryManagerTool::buildGeometry
virtual void buildGeometry()
create align modules and add them to the list
Definition: IGeometryManagerTool.h:58
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AlignModuleList.h
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
Trk::IGeometryManagerTool::~IGeometryManagerTool
virtual ~IGeometryManagerTool()
Definition: IGeometryManagerTool.h:38
Trk::IGeometryManagerTool::alignLevelEndcaps
virtual int alignLevelEndcaps()
get alignment level
Definition: IGeometryManagerTool.h:95
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
AlignPar
AlignPar contains all the information related to an alignment parameter of a particular align module ...
Trk::IGeometryManagerTool::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IGeometryManagerTool.h:113
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Trk::IGeometryManagerTool::setAlignLevelEndcaps
virtual void setAlignLevelEndcaps(int level)
set alignment level
Definition: IGeometryManagerTool.h:98
Trk::IGeometryManagerTool::PrintModPositions
virtual void PrintModPositions()=0
Trk::IGeometryManagerTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IGeometryManagerTool.h:121
Trk::IGeometryManagerTool::m_idHashToAlignModuleMapsPtr
std::vector< Trk::AlignModuleList * > * m_idHashToAlignModuleMapsPtr
pointer to vector of hashMaps to which the elements are added
Definition: IGeometryManagerTool.h:109
Trk::IGeometryManagerTool::setAlignLevelBarrel
virtual void setAlignLevelBarrel(int level)
set alignment level
Definition: IGeometryManagerTool.h:89
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
Trk::IGeometryManagerTool::setAlignLevel
virtual void setAlignLevel(int level)
set alignment level
Definition: IGeometryManagerTool.h:83
Trk::IGeometryManagerTool::addModuleParameters
virtual void addModuleParameters(Trk::AlignModule *, DataVector< DataVector< Trk::AlignPar > > *, DataVector< DataVector< Trk::AlignPar > > *)
set alignment parameters for a given module and add them to the list the arguments are AlignModule,...
Definition: IGeometryManagerTool.h:62
Trk::IGeometryManagerTool::checkAlignLevel
virtual bool checkAlignLevel()
check whether the alignment level is allowed
Definition: IGeometryManagerTool.h:77