40 static bool EGS_TRANSFORMED_SOURCE_LOCAL inputSet =
false;
51 int err = input->
getInput(
"source name",sname);
53 egsWarning(
"EGS_TransformedSource: missing/wrong inline source "
54 "definition and missing wrong 'source name' input\n");
68 otype =
"EGS_TransformedSource";
81 static void setInputs() {
84 setBaseSourceInputs(
false,
false);
86 srcBlockInput->getSingleInput(
"library")->setValues({
"egs_transformed_source"});
89 srcBlockInput->addSingleInput(
"source name",
true,
"The name of a previously defined source.");
91 addTransformationBlock(srcBlockInput);
94 EGS_TRANSFORMED_SOURCE_EXPORT
string getExample() {
98 # Example of egs_transformed_source
100 library = egs_transformed_source
102 source name = my_parallel_source
103 #create source called my_parallel_source
104 :start transformation:
105 rotation vector = 0 -1 1
106 :stop transformation:
112 EGS_TRANSFORMED_SOURCE_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
116 return srcBlockInput;
122 createSourceTemplate<EGS_TransformedSource>(input,f,
"transformed source");
Base source class. All particle sources must be derived from this class.
const char * getSourceDescription() const
Get a short description of this source.
static EGS_BaseSource * getSource(const string &Name)
Get a pointer to the source named Name.
string description
A short source description.
static EGS_BaseSource * createSource(EGS_Input *)
Create sources from the information pointed to by input.
int ref()
Increase the reference count to this object.
string otype
The object type.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.