Geant4  10.01.p01
XAluminumElectrodeHit.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: XAluminumElectrodeHit.hh 84197 2014-10-10 14:33:03Z gcosmo $
30 //
31 // 20141008 Allocators must be thread-local, and must be pointers
32 
33 #ifndef XAluminumElectrodeHit_h
34 #define XAluminumElectrodeHit_h 1
35 
36 #include "G4VHit.hh"
37 #include "G4THitsCollection.hh"
38 #include "G4Allocator.hh"
39 #include "G4ThreeVector.hh"
40 
41 class G4AttDef;
42 class G4AttValue;
43 
45 {
46  public:
47 
49  virtual ~XAluminumElectrodeHit();
52  int operator==(const XAluminumElectrodeHit &right) const;
53 
54  inline void *operator new(size_t);
55  inline void operator delete(void *aHit);
56 
57  virtual void Draw();
58  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
59  virtual std::vector<G4AttValue>* CreateAttValues() const;
60  virtual void Print();
61 
62  private:
67 
68  public:
69  inline void SetTime(G4double t) { fTime = t; }
70  inline G4double GetTime() const { return fTime; }
71  inline void SetEDep(G4double e) { fEdep = e; }
72  inline G4double GetEDep() const { return fEdep; }
73  inline void SetLocalPos(G4ThreeVector xyz) { fLocalPos = xyz; }
74  inline G4ThreeVector GetLocalPos() const { return fLocalPos; }
75  inline void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
76  inline G4ThreeVector GetWorldPos() const { return fWorldPos; }
77 };
78 
80 
82 
83 inline void* XAluminumElectrodeHit::operator new(size_t)
84 {
85  if (!XAluminumElectrodeHitAllocator) // Singleton
87 
88  return (void*)XAluminumElectrodeHitAllocator->MallocSingle();
89 }
90 
91 inline void XAluminumElectrodeHit::operator delete(void* aHit)
92 {
94 }
95 
96 #endif
97 
98 
const XAluminumElectrodeHit & operator=(const XAluminumElectrodeHit &right)
void SetWorldPos(G4ThreeVector xyz)
CLHEP::Hep3Vector G4ThreeVector
void SetLocalPos(G4ThreeVector xyz)
Definition: G4VHit.hh:48
#define G4ThreadLocal
Definition: tls.hh:89
G4ThreeVector GetLocalPos() const
G4ThreadLocal G4Allocator< XAluminumElectrodeHit > * XAluminumElectrodeHitAllocator
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4THitsCollection< XAluminumElectrodeHit > XAluminumElectrodeHitsCollection
virtual std::vector< G4AttValue > * CreateAttValues() const
int operator==(const XAluminumElectrodeHit &right) const
double G4double
Definition: G4Types.hh:76
G4ThreeVector GetWorldPos() const