Skip to content

Commit

Permalink
Merge pull request #271 from vvolkl/tgeo_verbosity
Browse files Browse the repository at this point in the history
Better INFO printouts
  • Loading branch information
zaborowska authored Jan 11, 2018
2 parents 55d83eb + 3a11b4e commit 7520fe6
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Detector/DetComponents/src/GeoConstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void GeoConstruction::ConstructSDandField() {
G4VPhysicalVolume* GeoConstruction::Construct() {
DD4hep::Simulation::Geant4Mapping& g4map = DD4hep::Simulation::Geant4Mapping::instance();
DD4hep::Geometry::DetElement world = m_lcdd.world();
DD4hep::Simulation::Geant4Converter conv(m_lcdd, DD4hep::INFO);
DD4hep::Simulation::Geant4Converter conv(m_lcdd, DD4hep::DEBUG);
DD4hep::Simulation::Geant4GeometryInfo* geo_info = conv.create(world).detach();
g4map.attach(geo_info);
// All volumes are deleted in ~G4PhysicalVolumeStore()
Expand Down
5 changes: 5 additions & 0 deletions Detector/DetComponents/src/GeoSvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "GeoSvc.h"
#include "GaudiKernel/Service.h"
#include "GeoConstruction.h"
#include "TGeoManager.h"

#include "DD4hep/Printout.h"

Expand All @@ -24,6 +25,10 @@ GeoSvc::~GeoSvc() { m_dd4hepgeo->destroyInstance(); }
StatusCode GeoSvc::initialize() {
StatusCode sc = Service::initialize();
if (!sc.isSuccess()) return sc;
// Turn off TGeo printouts if appropriate for the msg level
if (msgLevel() >= MSG::INFO) {
TGeoManager::SetVerboseLevel(0);
}
uint printoutLevel = msgLevel();
DD4hep::setPrintLevel(DD4hep::PrintLevel(printoutLevel));
m_incidentSvc->addListener(this, "GeometryFailure");
Expand Down
2 changes: 1 addition & 1 deletion Examples/options/dumpGeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from Gaudi.Configuration import *

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc", detectors=['file:../Detector/DetSensitive/tests/compact/Box_simpleTrackerSD.xml'], OutputLevel = DEBUG)
geoservice = GeoSvc("GeoSvc", detectors=['file:../Detector/DetSensitive/tests/compact/Box_simpleTrackerSD.xml'], OutputLevel = INFO)

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc",
Expand Down
3 changes: 2 additions & 1 deletion Examples/options/geant_fastsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
## parse the given xml file
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhBaseline1/compact/FCChh_TrackerAir.xml',
'file:Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml'])
'file:Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml'],
OutputLevel=INFO )

# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
Expand Down
3 changes: 2 additions & 1 deletion Examples/options/geant_fastsim_tklayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
# Parses the given xml file
from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhBaseline1/compact/FCChh_TrackerAir.xml'])
'file:Detector/DetFCChhBaseline1/compact/FCChh_TrackerAir.xml'],
OutputLevel=INFO)

# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
Expand Down
3 changes: 2 additions & 1 deletion Examples/options/geant_fullsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
# Parses the given xml file
from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml'])
'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml'],
OutputLevel=INFO)

# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
Expand Down
2 changes: 1 addition & 1 deletion Examples/options/geant_fullsim_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml'],
OutputLevel = DEBUG)
OutputLevel = INFO)

from Configurables import HepMCToEDMConverter
## Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles
Expand Down
2 changes: 1 addition & 1 deletion Examples/options/geant_pgun_fullsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'file:Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml',
'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml',
'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml'],
OutputLevel = DEBUG)
OutputLevel = INFO)

from Configurables import SimG4Svc
## Geant4 service
Expand Down
2 changes: 1 addition & 1 deletion Examples/options/interactive_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml'
],
OutputLevel = DEBUG)
OutputLevel = INFO)

# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from Configurables import GeoSvc, SimG4SingleParticleGeneratorTool
geoservice = GeoSvc("GeoSvc", detectors=['file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml',
'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml'],
OutputLevel = DEBUG)
OutputLevel = INFO)


# Geant4 service
Expand Down

0 comments on commit 7520fe6

Please sign in to comment.