Skip to content
Snippets Groups Projects
Commit a2a96d51 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Update World volume interface

parent cc781265
No related branches found
No related tags found
1 merge request!202Fix write and read of GeoFullPhysVol as root volume
// Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
/*
* HelloGeoReadNodeAction.cpp
......@@ -30,7 +30,7 @@
#define SYSTEM_OF_UNITS GeoModelKernelUnits // so we will get, e.g., 'GeoModelKernelUnits::cm'
GeoPhysVol* createTheWorld(GeoPhysVol* world)
GeoVPhysVol* createTheWorld(GeoVPhysVol* world)
{
if (world == nullptr)
{
......@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
/* build the GeoModel geometry */
GeoPhysVol* dbPhys = geoReader.buildGeoModel(); // builds the whole GeoModel tree in memory
GeoVPhysVol* dbPhys = geoReader.buildGeoModel(); // builds the whole GeoModel tree in memory
std::cout << "ReadGeoModel::buildGeoModel() done." << std::endl;
std::cout << "Reading records from the imported geometry DB file..." << std::endl;
......@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
// create the world volume container and
// get the 'world' volume, i.e. the root volume of the GeoModel tree
std::cout << "Getting the 'world' GeoPhysVol, i.e. the root volume of the GeoModel tree" << std::endl;
GeoPhysVol* world = createTheWorld(dbPhys);
GeoVPhysVol* world = createTheWorld(dbPhys);
std::cout << "Getting the GeoLogVol used by the 'world' volume" << std::endl;
const GeoLogVol* logVol = world->getLogVol();
std::cout << "'world' GeoLogVol name: " << logVol->getName() << std::endl;
......
// Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
/*
* This example writes a sample geometry, reads it back in, then writes it again.
......@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
GeoModelIO::ReadGeoModel geoReader = GeoModelIO::ReadGeoModel(db2);
std::cout << "OK! ReadGeoModel is set." << std::endl;
/* build the GeoModel geometry */
GeoPhysVol* dbPhys = geoReader.buildGeoModel(); // builds the whole GeoModel tree in memory
GeoVPhysVol* dbPhys = geoReader.buildGeoModel(); // builds the whole GeoModel tree in memory
std::cout << "ReadGeoModel::buildGeoModel() done." << std::endl;
......
......@@ -44,7 +44,6 @@ class KitchenSinkPlugin : public GeoVGeometryPlugin {
public:
<<<<<<< HEAD
// Constructor:
KitchenSinkPlugin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment