37 #ifndef EGS_TRANSFORMED_SOURCE_
38 #define EGS_TRANSFORMED_SOURCE_
48 #ifdef BUILD_TRANSFORMED_SOURCE_DLL
49 #define EGS_TRANSFORMED_SOURCE_EXPORT __declspec(dllexport)
51 #define EGS_TRANSFORMED_SOURCE_EXPORT __declspec(dllimport)
53 #define EGS_TRANSFORMED_SOURCE_LOCAL
57 #ifdef HAVE_VISIBILITY
58 #define EGS_TRANSFORMED_SOURCE_EXPORT __attribute__ ((visibility ("default")))
59 #define EGS_TRANSFORMED_SOURCE_LOCAL __attribute__ ((visibility ("hidden")))
61 #define EGS_TRANSFORMED_SOURCE_EXPORT
62 #define EGS_TRANSFORMED_SOURCE_LOCAL
157 int &q,
int &latch, EGS_Float &E, EGS_Float &wt,
159 EGS_I64 c = source->getNextParticle(rndm,q,latch,E,wt,x,u);
167 return source->getEmax();
170 return source->getFluence();
173 return source->storeState(data);
176 return source->setState(data);
179 return source->addState(data_in);
182 source->resetCounter();
185 bool isValid()
const {
186 return (source != 0);
190 source->setSimulationChunk(nstart, nrun);
virtual void setSimulationChunk(EGS_I64 nstart, EGS_I64 nrun)
Set the next simulation chunk to start at nstart and to consist of nrun particles.
EGS_BaseSource class header file.
EGS_Vector methods for the manipulation of 3D vectors in cartesian co-ordinates.
A class representing 3D vectors.
virtual bool addState(istream &data_in)
Add data from the stream data_in to the source state.
static void deleteObject(EGS_Object *o)
Delete an object.
virtual void resetCounter()
Reset the source state.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
Base random number generator class. All random number generators should be derived from this class...
EGS_RandomGenerator class header file.
virtual bool setState(istream &data_in)
Set the source state based on data from the stream data_in.
EGS_BaseShape and shape classes header file.
virtual EGS_Float getFluence() const =0
Return the fluence this source has emitted so far.
virtual EGS_I64 getNextParticle(EGS_RandomGenerator *rndm, int &q, int &latch, EGS_Float &E, EGS_Float &wt, EGS_Vector &x, EGS_Vector &u)=0
Sample the next source particle from the source probability distribution.
virtual EGS_Float getEmax() const =0
Return the maximum energy of this source.
Base source class. All particle sources must be derived from this class.