![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <GeometryJsonDumper.h>
|
| GeometryJsonDumper (const std::string &, const std::string &, const IInterface *) |
| Constructor. More...
|
|
virtual | ~GeometryJsonDumper () |
| Destructor. More...
|
|
StatusCode | initialize () |
| AlgTool initialize method. More...
|
|
StatusCode | finalize () |
| AlgTool finalize method. More...
|
|
virtual StatusCode | process (TrackingGeometry &tgeo) const |
| Processor Action to work on TrackingGeometry& tgeo. More...
|
|
virtual StatusCode | process (TrackingVolume &tvol, size_t level=0) const |
| Processor Action to work on TrackingVolumes - the level is for the hierachy tree. More...
|
|
virtual StatusCode | process (Layer &lay, size_t level=0) const |
| Processor Action to work on Layers. More...
|
|
virtual StatusCode | process (Surface &surf, size_t level=0) const |
| Processor Action to work on Surfaces. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (IGeometryProcessor, 1, 0) |
| Creates the InterfaceID and interfaceID() method. More...
|
|
The GeometryJsonDumper writes geometrical information of the tracking geomtetry into an Ascii file for comparison
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 36 of file GeometryJsonDumper.h.
◆ StoreGateSvc_t
◆ GeometryJsonDumper()
Trk::GeometryJsonDumper::GeometryJsonDumper |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~GeometryJsonDumper()
Trk::GeometryJsonDumper::~GeometryJsonDumper |
( |
| ) |
|
|
virtualdefault |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
Creates the InterfaceID and interfaceID() method.
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode Trk::GeometryJsonDumper::finalize |
( |
| ) |
|
◆ initialize()
StatusCode Trk::GeometryJsonDumper::initialize |
( |
| ) |
|
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ process() [1/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::Layer & |
lay, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
Processor Action to work on Layers.
Implements Trk::IGeometryProcessor.
Definition at line 128 of file RecursiveGeometryProcessor.cxx.
130 std::stringstream displayBuffer;
131 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
136 ATH_MSG_FATAL(
"Failed to call processNode(const Layer&). Aborting.");
137 return StatusCode::FAILURE;
143 ATH_MSG_VERBOSE(displayBuffer.str() <<
" ---> has " << layerSurfaces.size() <<
" surfaces on the layer.");
145 auto laySurfIter = layerSurfaces.begin();
146 auto laySurfIterEnd = layerSurfaces.end();
148 for ( ; laySurfIter != laySurfIterEnd; ++laySurfIter) {
150 ATH_MSG_WARNING(
"Zero-pointer found in SurfaceArray - indicates problem !");
151 if ((*laySurfIter) &&
process(**laySurfIter,
level).isFailure()){
152 ATH_MSG_FATAL(
"Failed to call process(const Surface&) on confined layer surfaces. Aborting.");
153 return StatusCode::FAILURE;
158 return StatusCode::SUCCESS;
◆ process() [2/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::Surface & |
surf, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
◆ process() [3/4]
◆ process() [4/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::TrackingVolume & |
tvol, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
Processor Action to work on TrackingVolumes - the level is for the hierachy tree.
Implements Trk::IGeometryProcessor.
Definition at line 61 of file RecursiveGeometryProcessor.cxx.
63 std::stringstream displayBuffer;
64 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
70 ATH_MSG_FATAL(
"Failed to call processNode(const TrackingVolume&). Aborting.");
71 return StatusCode::FAILURE;
80 for (
const auto & layIter :
layers){
82 ATH_MSG_WARNING(
"Zero-pointer found in LayerArray - indicates problem !");
84 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on confined layers. Aborting.");
85 return StatusCode::FAILURE;
92 for (
auto & bSurface : bSurfaces){
93 if (bSurface->surfaceRepresentation().associatedLayer()){
97 *bSurface->surfaceRepresentation().associatedLayer()),
level)
99 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on boundary "
101 return StatusCode::FAILURE;
110 if (confinedVolumes) {
112 for (
const auto & volumesIter : volumes){
114 ATH_MSG_WARNING(
"Zero-pointer found in VolumeArray - indicates problem !");
115 if (volumesIter &&
process(*volumesIter, ++
level).isFailure() ){
116 ATH_MSG_FATAL(
"Failed to call process(const TrackingVolume&) on confined volumes. Aborting.");
117 return StatusCode::FAILURE;
123 return StatusCode::SUCCESS;
◆ processNode() [1/3]
StatusCode Trk::GeometryJsonDumper::processNode |
( |
const Layer & |
lay, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
Current implementation: write root visualization to file stream.
Reimplemented from Trk::RecursiveGeometryProcessor.
Definition at line 68 of file GeometryJsonDumper.cxx.
71 ATH_MSG_VERBOSE(
"Dumping information for Layer with index " << lay.layerIndex().value());
73 if (lay.surfaceArray()){
74 size_t nSurfaces = lay.surfaceArray()->arrayObjects().size();
77 const Trk::Surface* referenceSurface = lay.subSurfaceReference();
79 if (referenceSurface){
86 m_outputFile <<
"{\"Name\" : \"Layer " << lay.layerIndex().value() <<
"\", ";
92 for (
const auto &
sf : lay.surfaceArray()->arrayObjects()){
94 double cx =
sf->center().x();
95 double cy =
sf->center().y();
96 double cz =
sf->center().z();
98 auto ea =
sf->transform().rotation().eulerAngles(0, 1, 2);
111 return StatusCode::SUCCESS;
◆ processNode() [2/3]
StatusCode Trk::GeometryJsonDumper::processNode |
( |
const Surface & |
, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
◆ processNode() [3/3]
StatusCode Trk::GeometryJsonDumper::processNode |
( |
const TrackingVolume & |
tvol, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_firstLayerWritten
bool Trk::GeometryJsonDumper::m_firstLayerWritten |
|
mutableprivate |
◆ m_outputFile
std::ofstream Trk::GeometryJsonDumper::m_outputFile |
|
mutableprivate |
◆ m_outputFileName
std::string Trk::GeometryJsonDumper::m_outputFileName |
|
private |
◆ m_outputPrecision
int Trk::GeometryJsonDumper::m_outputPrecision |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Dedicated action for the different processors.
StatusCode initialize()
AlgTool initialize method.
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual StatusCode process(TrackingGeometry &tgeo) const
Processor Action to work on TrackingGeometry& tgeo.
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
const LayerArray * confinedLayers() const
Return the subLayer array.
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
StatusCode finalize()
AlgTool finalize method.
const TrackingVolume * highestTrackingVolume() const
return the world
double halflengthX() const
for consistant naming
std::ofstream m_outputFile
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
double halflengthY() const
for consitant naming
std::string m_outputFileName
where the tree is written to
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
#define ATH_MSG_WARNING(x)
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
std::span< T > BinnedArraySpan
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const LayerIndex & layerIndex() const
get the layerIndex