Skip to content

Commit bb27f0c

Browse files
chore: Cleanup includes in FairModule
1 parent 39ded3a commit bb27f0c

2 files changed

Lines changed: 11 additions & 23 deletions

File tree

fairroot/base/sim/FairModule.cxx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// ----- Created 06/01/04 by M. Al-Turany -----
1111
// -------------------------------------------------------------------------
1212
/* Generated by Together */
13+
1314
#include "FairModule.h"
1415

1516
#include "FairGeoBuilder.h" // for FairGeoBuilder
@@ -30,28 +31,20 @@
3031
#include <TFile.h> // for TFile
3132
#include <TGeoManager.h> // for TGeoManager, gGeoManager
3233
#include <TGeoMaterial.h> // for TGeoMaterial
33-
#include <TGeoMatrix.h> // for TGeoMatrix, TGeoHMatrix
3434
#include <TGeoMedium.h> // for TGeoMedium
35-
#include <TGeoNode.h> // for TGeoNode
36-
#include <TGeoVolume.h> // for TGeoVolume
3735
#include <TGeoVoxelFinder.h> // for TGeoVoxelFinder
3836
#include <TKey.h> // for TKey
39-
#include <TList.h> // for TList, TListIter
4037
#include <TObjArray.h> // for TObjArray
4138
#include <TObject.h> // for TObject
42-
#include <TRefArray.h> // for TRefArray
4339
#include <TSystem.h> // for TSystem, gSystem
44-
#include <TVirtualMC.h>
4540

4641
#ifdef ROOT_HAS_GDML
4742
#include <TGDMLParse.h>
4843
#endif
4944

45+
#include <cstdlib> // for getenv
46+
#include <cstring> // for strcmp, strlen
5047
#include <map>
51-
#include <stdlib.h> // for getenv
52-
#include <string.h> // for strcmp, strlen
53-
54-
class FairGeoMedium;
5548

5649
void FairModule::ConstructGeometry()
5750
{
@@ -213,7 +206,6 @@ void FairModule::SetGeometryFileName(TString fname, TString)
213206
// File not found
214207
LOG(fatal) << fName << ": geometry file " << fname << " not found in standard path ";
215208
fgeoName = "";
216-
return;
217209
}
218210

219211
void FairModule::ProcessNodes(TList* aList)
@@ -268,7 +260,6 @@ void FairModule::ProcessNodes(TList* aList)
268260

269261
void FairModule::AddSensitiveVolume(TGeoVolume* v)
270262
{
271-
272263
LOG(debug2) << "AddSensitiveVolume " << v->GetName();
273264

274265
// Only register volumes which are not already registered
@@ -293,7 +284,6 @@ FairVolume* FairModule::getFairVolume(FairGeoNode* fN)
293284
if ((fv->getGeoNode()) == fN) {
294285
fvol = fv;
295286
return fvol;
296-
break;
297287
}
298288
}
299289
return fvol;

fairroot/base/sim/FairModule.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,19 @@
1616
#include "FairRun.h" // for FairRun
1717
#include "FairRuntimeDb.h" // for FairRuntimeDb
1818

19-
#include <Rtypes.h> // for Bool_t, Int_t, etc
19+
#include <TGeoMatrix.h>
20+
#include <TGeoNode.h>
21+
#include <TGeoVolume.h>
2022
#include <TList.h> // for TList (ptr only), TListIter
2123
#include <TNamed.h> // for TNamed
2224
#include <TObjArray.h> // for TObjArray
25+
#include <TRefArray.h> // for TRefArray
2326
#include <TString.h> // for TString, operator!=
24-
#include <string> // for string
27+
#include <TVirtualMC.h>
28+
#include <string>
2529

2630
class FairVolumeList;
2731
class FairVolume;
28-
class TArrayI;
29-
class TGeoMatrix;
30-
class TGeoNode;
31-
class TGeoVolume;
32-
class TRefArray;
33-
class TVirtualMC;
3432

3533
/**
3634
* Base class for constructing all detecors and passive volumes
@@ -137,11 +135,11 @@ class FairModule : public TNamed
137135
TList* GetListOfGeoPar() { return flGeoPar; }
138136

139137
/**list of volumes in a simulation session*/
140-
static thread_local inline FairVolumeList* vList{0}; //!
138+
static thread_local inline FairVolumeList* vList{nullptr}; //!
141139
/**total number of volumes in a simulaion session*/
142140
static thread_local inline Int_t fNbOfVolumes{0}; //!
143141
/**list of all sensitive volumes in a simulaion session*/
144-
static thread_local inline TRefArray* svList{0}; //!
142+
static thread_local inline TRefArray* svList{nullptr}; //!
145143

146144
TString fMotherVolumeName{""}; //!
147145
FairVolume* getFairVolume(FairGeoNode* fNode);

0 commit comments

Comments
 (0)