]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4SDServices.h
Added EDEFINE with the flags from Geant4
[u/mrichter/AliRoot.git] / TGeant4 / TG4SDServices.h
CommitLineData
8d3676ae 1// $Id$
2// Category: digits+hits
3//
4// Sensitive detectors services
5// The class provides service methods for accessing to Geant4 geometry,
6// namely using AliMC volumes identifiers
7// (implemented via TG4VSensitiveDetector instances).
8
9#ifndef TG4_SD_SERVICES_H
10#define TG4_SD_SERVICES_H
11
12#include <globals.hh>
13
14#include <Rtypes.h>
15
9f5eaf0b 16class TG4VSensitiveDetector;
17
8d3676ae 18class G4LogicalVolume;
9f5eaf0b 19class G4VSensitiveDetector;
8d3676ae 20
21class TG4SDServices
22{
23 public:
24 TG4SDServices();
9f5eaf0b 25 // --> protected
26 // TG4SDServices(const TG4SDServices& right);
8d3676ae 27 virtual ~TG4SDServices();
28
29 // static methods
30 static TG4SDServices* Instance();
31
9f5eaf0b 32 // methods
33 void PrintStatistics(G4bool open, G4bool close) const;
34
8d3676ae 35 // get methods
9f5eaf0b 36 // volume IDs conversions
8d3676ae 37 G4int GetVolumeID(const G4String& volumeName) const;
38 G4int GetVolumeID(G4LogicalVolume* volume) const;
9f5eaf0b 39 G4String GetVolumeName(G4int volumeId) const;
8d3676ae 40 G4LogicalVolume* GetLogicalVolume(G4int volumeId) const;
9f5eaf0b 41 G4int GetMediumId(G4int volumeId) const;
42 // SDs
8d3676ae 43 Int_t NofSensitiveDetectors() const;
9f5eaf0b 44 TG4VSensitiveDetector* GetSensitiveDetector(G4VSensitiveDetector* sd) const;
8d3676ae 45
46 protected:
9f5eaf0b 47 TG4SDServices(const TG4SDServices& right);
48
49 // operators
50 TG4SDServices& operator=(const TG4SDServices& right);
51
8d3676ae 52 // static data members
53 static TG4SDServices* fgInstance; //this instance
54};
55
56// inline methods
57inline TG4SDServices* TG4SDServices::Instance()
58{ return fgInstance; }
59
60#endif //TG4_SD_SERVICES_H
61