@@ -76,13 +76,15 @@ void TGeoVGConverter::ConvertGeometry()
7676 top->SetShape (vgshape);
7777 }
7878
79- // Uncomment to print info about selected/excluded shapes
80- // if ( ! fSelectedShapeTypes.empty()) {
81- // printf("# %zu selected shape type for conversion \n", fSelectedShapeTypes.size());
82- // }
83- // if ( ! fExcludedShapeTypes.empty()) {
84- // printf("# %zu shape types excluded from conversion \n", fExcludedShapeTypes.size());
85- // }
79+ // Print info about selected/excluded shapes
80+ if (gGeoManager ->GetVerboseLevel () > 1 ) {
81+ if ( ! fSelectedShapeTypes .empty ()) {
82+ Info (" ConvertGeometry" ," # %zu selected shape type for conversion \n " , fSelectedShapeTypes .size ());
83+ }
84+ if ( ! fExcludedShapeTypes .empty ()) {
85+ Info (" ConvertGeometry" ," # %zu shape types excluded from conversion \n " , fExcludedShapeTypes .size ());
86+ }
87+ }
8688
8789 // Now iterate the active geometry tree
8890 TGeoIterator next (fGeom ->GetTopVolume ());
@@ -96,29 +98,38 @@ void TGeoVGConverter::ConvertGeometry()
9698 // If fSelectedShapeTypes is not empty, convert only selected shapes
9799 if ((! fSelectedShapeTypes .empty ()) &&
98100 (! isInSelection (vol->GetShape (), fSelectedShapeTypes ))) {
99- printf (" # Shape type %s is not selected for conversion\n " , vol->GetShape ()->IsA ()->GetName ());
101+ if (gGeoManager ->GetVerboseLevel () > 1 ) {
102+ Info (" ConvertGeometry" ," # Shape type %s is not selected for conversion\n " ,
103+ vol->GetShape ()->IsA ()->GetName ());
104+ }
100105 continue ;
101106 }
102107
103108 // Skip shapes excluded from conversion
104109 if (isInSelection (vol->GetShape (), fExcludedShapeTypes )) {
105- printf (" # Shape type %s is excluded from conversion\n " , vol->GetShape ()->IsA ()->GetName ());
110+ if (gGeoManager ->GetVerboseLevel () > 1 ) {
111+ Info (" ConvertGeometry" ," # Shape type %s is excluded from conversion\n " ,
112+ vol->GetShape ()->IsA ()->GetName ());
113+ }
106114 continue ;
107115 }
108116
109- // printf( "Converting %s\n", vol->GetName());
117+ // Info("ConvertGeometry", "Converting %s\n", vol->GetName());
110118 vgshape = TGeoVGShape::Create (vol->GetShape ());
111119 if (vgshape) {
112120 nconverted++;
113121 vol->SetShape (vgshape);
114122 }
115123 }
116- printf (" # Converted %d shapes to VecGeom ones\n " , nconverted);
124+ if (gGeoManager ->GetVerboseLevel () > 0 ) {
125+ Info (" ConvertGeometry" ," # Converted %d shapes to VecGeom ones\n " , nconverted);
126+ }
117127}
118128
119129// //////////////////////////////////////////////////////////////////////////////
120130// / Select shape(s) for conversion.
121- // / Conversion is performed only on selected shapes (if set)
131+ // / Conversion is performed only on selected shapes. If unset, all solid types
132+ // / will be converted.
122133
123134void TGeoVGConverter::SelectShapeType (TGeoShape::EShapeType shapeType)
124135{
@@ -127,6 +138,7 @@ void TGeoVGConverter::SelectShapeType(TGeoShape::EShapeType shapeType)
127138
128139// //////////////////////////////////////////////////////////////////////////////
129140// / Exclude shape(s) from conversion.
141+ // / Excluded types have precedence in case a type is also selected.
130142
131143void TGeoVGConverter::ExcludeShapeType (TGeoShape::EShapeType shapeType)
132144{
0 commit comments