53#ifndef G4ElectronOccupancy_h
54#define G4ElectronOccupancy_h 1
73 inline void *
operator new(size_t);
74 inline void operator delete(
void *aElectronOccupancy);
98 G4int theTotalOccupancy;
99 G4int* theOccupancies;
103#if defined G4PARTICLES_ALLOC_EXPORT
113inline void * G4ElectronOccupancy::operator
new(size_t)
115 void * aElectronOccupancy;
117 return aElectronOccupancy;
120inline void G4ElectronOccupancy::operator
delete(
void * aElectronOccupancy)
128 return theSizeOfOrbit;
134 return theTotalOccupancy;
141 if ((orbit >=0)&&(orbit<theSizeOfOrbit)){
142 value = theOccupancies[orbit];
151 if ((orbit >=0)&&(orbit<theSizeOfOrbit)){
152 theOccupancies[orbit] += number;
153 theTotalOccupancy += number;
163 if ((orbit >=0)&&(orbit<theSizeOfOrbit) ){
164 if ( theOccupancies[orbit] < number ) number = theOccupancies[orbit];
165 theOccupancies[orbit] -= number;
166 theTotalOccupancy -= number;
G4DLLIMPORT G4Allocator< G4ElectronOccupancy > aElectronOccupancyAllocator
G4int GetTotalOccupancy() const
G4int AddElectron(G4int orbit, G4int number=1)
G4int RemoveElectron(G4int orbit, G4int number=1)
G4int GetOccupancy(G4int orbit) const
G4int operator==(const G4ElectronOccupancy &right) const
G4int GetSizeOfOrbit() const
virtual ~G4ElectronOccupancy()
G4int operator!=(const G4ElectronOccupancy &right) const
G4ElectronOccupancy & operator=(const G4ElectronOccupancy &right)