FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairDetector.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef FAIRDETECTOR_H
9 #define FAIRDETECTOR_H
10 
11 #include "FairModule.h" // for FairModule
12 
13 #include <Rtypes.h> // for Int_t, Bool_t, etc
14 
15 class FairLogger;
16 class FairVolume;
17 class TClonesArray;
18 
25 class FairDetector : public FairModule
26 {
27  public:
34  FairDetector(const char* Name, Bool_t Active, Int_t DetId = 0);
38  FairDetector();
42  virtual ~FairDetector();
46  virtual void Initialize();
50  virtual Bool_t ProcessHits(FairVolume* v = 0) = 0;
54  virtual void EndOfEvent() {}
58  virtual void Register() = 0;
59 
63  virtual TClonesArray* GetCollection(Int_t iColl) const = 0;
67  virtual void Reset() = 0;
68 
69  virtual void CopyClones(TClonesArray*, TClonesArray*, Int_t) {}
73  virtual void FinishPrimary() {}
77  virtual void FinishRun() {}
81  virtual void BeginPrimary() {}
85  virtual void PostTrack() {}
89  virtual void PreTrack() {}
93  virtual void BeginEvent() {}
97  virtual void FinishEvent() {}
98 
99  void SaveGeoParams();
100  Int_t GetDetId() { return fDetId; }
101 
102  protected:
104  FairDetector(const FairDetector&);
107 
108  void DefineSensitiveVolumes();
109 
110  Int_t fDetId; // Detector Id has to be set from ctr.
112 
114 };
115 #endif // FAIRDETECTOR_H
FairDetector & operator=(const FairDetector &)
virtual void Register()=0
ClassDef(FairDetector, 1)
/// FairLogger
virtual void PostTrack()
Definition: FairDetector.h:85
virtual void PreTrack()
Definition: FairDetector.h:89
virtual void FinishEvent()
Definition: FairDetector.h:97
virtual void Initialize()
virtual void Reset()=0
void DefineSensitiveVolumes()
virtual void EndOfEvent()
Definition: FairDetector.h:54
virtual void CopyClones(TClonesArray *, TClonesArray *, Int_t)
Definition: FairDetector.h:69
void SaveGeoParams()
virtual void FinishRun()
Definition: FairDetector.h:77
virtual void FinishPrimary()
Definition: FairDetector.h:73
FairLogger * fLogger
Definition: FairDetector.h:111
virtual TClonesArray * GetCollection(Int_t iColl) const =0
Int_t GetDetId()
Definition: FairDetector.h:100
virtual Bool_t ProcessHits(FairVolume *v=0)=0
virtual ~FairDetector()
virtual void BeginPrimary()
Definition: FairDetector.h:81
virtual void BeginEvent()
Definition: FairDetector.h:93