38 #ifndef EGS_TRANSFORMED_SOURCE_
39 #define EGS_TRANSFORMED_SOURCE_
49 #ifdef BUILD_TRANSFORMED_SOURCE_DLL
50 #define EGS_TRANSFORMED_SOURCE_EXPORT __declspec(dllexport)
52 #define EGS_TRANSFORMED_SOURCE_EXPORT __declspec(dllimport)
54 #define EGS_TRANSFORMED_SOURCE_LOCAL
58 #ifdef HAVE_VISIBILITY
59 #define EGS_TRANSFORMED_SOURCE_EXPORT __attribute__ ((visibility ("default")))
60 #define EGS_TRANSFORMED_SOURCE_LOCAL __attribute__ ((visibility ("hidden")))
62 #define EGS_TRANSFORMED_SOURCE_EXPORT
63 #define EGS_TRANSFORMED_SOURCE_LOCAL
158 int &q,
int &latch, EGS_Float &E, EGS_Float &wt,
160 EGS_I64 c = source->getNextParticle(rndm,q,latch,E,wt,x,u);
168 return source->getEmax();
171 return source->getFluence();
174 return source->storeState(data);
177 return source->setState(data);
180 return source->addState(data_in);
183 source->resetCounter();
186 bool isValid()
const {
187 return (source != 0);
191 source->setSimulationChunk(nstart, nrun, npar, nchunk);
195 source->printSampledEmissions();
199 return source->getRadionuclideEnsdf();
Base source class. All particle sources must be derived from this class.
virtual bool addState(istream &data_in)
Add data from the stream data_in to the source state.
virtual void printSampledEmissions()
Print statistics on what was sampled from the source.
virtual EGS_Float getEmax() const =0
Return the maximum energy of this source.
virtual EGS_Float getFluence() const =0
Return the fluence this source has emitted so far.
virtual void resetCounter()
Reset the source state.
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 bool setState(istream &data_in)
Set the source state based on data from the stream data_in.
virtual void setSimulationChunk(EGS_I64 nstart, EGS_I64 nrun, int npar, int nchunk)
Set the next simulation chunk to start at nstart and to consist of nrun particles.
virtual vector< EGS_Ensdf * > getRadionuclideEnsdf()
Get the radionuclide ENSDF object from the source.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
static void deleteObject(EGS_Object *o)
Delete an object.
Base random number generator class. All random number generators should be derived from this class.
A class representing 3D vectors.
EGS_BaseSource class header file.
EGS_RandomGenerator class header file.
EGS_BaseShape and shape classes header file.
EGS_Vector methods for the manipulation of 3D vectors in cartesian co-ordinates.