Skip to content
Snippets Groups Projects
Commit e3e9250f authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny: Committed by Melissa Yexley
Browse files

Clean code, update copyright, remove old code

parent d3e1e881
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////////////////
// //
// Header file for class DumpGeo //
// Header file for class DumpGeo //
// //
// update: Riccardo-Maria BIANCHI <rbianchi@cern.ch> //
// 23 May 2014 //
// Initial version: //
// - 2017, Sep -- Riccardo Maria BIANCHI //
// <riccardo.maria.bianchi@cern.ch> //
// //
// Main updates: //
// - 2024, Feb -- Riccardo Maria BIANCHI //
// <riccardo.maria.bianchi@cern.ch> //
// //
// This is the Athena algorithm to dump the geometry //
// //
......@@ -42,13 +47,10 @@ class ATLAS_NOT_THREAD_SAFE DumpGeo: public AthAlgorithm,
IToolSvc* m_toolSvc;
GeoExporter* m_geoExporter;
// bool m_noGui;//For testing job-options in RTT
// Properties
// Properties
// -- Athena-related
Gaudi::Property<std::string> m_atlasRelease{this, "AtlasRelease", "", "The current, in use Atlas release"};
};
#endif
......@@ -48,7 +48,7 @@ def configureGeometry(flags, cfg):
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
cfg.merge(MuonGeoModelCfg(flags))
# Trigger the build of the InDetServMat geometry
# Trigger the build of the InDetServMat geometry
# if any ID subsystems have been enabled
if flags.Detector.GeometryID:
from InDetServMatGeoModel.InDetServMatGeoModelConfig import (
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
......@@ -9,8 +9,13 @@
// //
// Author: Riccardo Maria BIANCHI <riccardo.maria.bianchi@cern.ch> //
// //
// Initial version: Sep 2017 //
// //
// Initial version: Sep 2017
//
// Main updates:
// - 2024, Feb -- Riccardo Maria BIANCHI <riccardo.maria.bianchi@cern.ch>
// Migrated to CA, added new CLI options,
// added new filter over DetectorManagers
//
///////////////////////////////////////////////////////////////////////
#include "GeoExporter/GeoExporter.h"
......@@ -46,8 +51,7 @@
// Units
#include "GeoModelKernel/Units.h"
#define UNITS \
GeoModelKernelUnits // so we will get, e.g., 'GeoModelKernelUnits::cm'
#define UNITS GeoModelKernelUnits // so we can use, e.g., 'UNITS::cm'
//TODO: replace this with GeoModelHelpers/defineWorld.h
//_____________________________________________________________________________________
......@@ -89,7 +93,6 @@ GeoPhysVol* createTheWorld()
class GeoExporter::Imp {
public:
Imp() {};
//We hold the arguments here until init is called:
StoreGateSvc* sg = nullptr;
StoreGateSvc* detstore = nullptr;
......@@ -119,7 +122,6 @@ GeoExporter::~GeoExporter()
bool GeoExporter::argumentsAreValid() const
{
//Athena pointers:
if (!m_d->sg) {
VP1Msg::message("ERROR: Null pointer to event store.");
return false;
......@@ -189,10 +191,7 @@ void GeoExporter::init()
// -- get GeoModel Detector Managers filter // FIXME: check and update this!!
QString user_filterDetManagers = environment.value("DUMPGEOFILTERDETMANAGERS");
VP1Msg::message("User's settings - GeoModel DetectorManagers filter: " + user_filterDetManagers);
// // -- get Overwrite flag
// auto getOWFlag = [&environment]() -> bool { bool okConv; int flag = environment.value("DUMPGEOFORCEOVERWRITE").toInt(&okConv, 10); return (okConv && 1==flag) ? true : false; }; // convert the "0"/"1" env var string to bool with a lambda
// bool user_overwrite = getOWFlag();
// VP1Msg::message("User's settings - Overwrite filter: " + QString::number(user_overwrite) );
// Get list of TreeTops from the TREETOPFILTER
QStringList user_treetopslist;
......@@ -227,9 +226,6 @@ if ( !(user_detmanagerslist.empty()) ) {
if ( nTreetops > 0 && user_detmanagerslist.contains(QString::fromStdString(detManName)) ) {
// // Add a dummy PhysVol to contain the TreeTops of the DetectorManager
// volTop->add(createTheWorld());
for(unsigned int i=0; i < nTreetops; ++i) {
PVConstLink treetop(manager->getTreeTop(i));
......@@ -248,7 +244,7 @@ if ( !(user_detmanagerslist.empty()) ) {
// Add to the main volume a GeoNameTag with the name of the DetectorManager
volTop->add(new GeoNameTag(detManName));
// add to the main PhysVol
// add Transform and Volume to the main PhysVol
volTop->add(volXf);
volTop->add(const_cast<GeoVPhysVol*>(vol));
......@@ -277,13 +273,6 @@ if ( !(user_detmanagerslist.empty()) ) {
}
// }
// GeoVolumeCursor av2(volTop);
// while (!av2.atEnd()) {
// std::cout << "\t\t- child name: " << av2.getName() << "\n";
// av2.next(); // increment volume cursor.
// }
std::cout << "Creating the SQLite DB file..." << std::endl;
QString fileName = "geometry";
if ( !(user_detdescrtag.isEmpty()) ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment