Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
clparse.cc File Reference
#include "globals.hh"
#include <fstream>
#include "G4Tokenizer.hh"
#include "G3toG4.hh"
#include "G3EleTable.hh"
#include "G3VolTable.hh"
#include "G3MatTable.hh"
#include "G3MedTable.hh"
#include "G3RotTable.hh"
#include "G3PartTable.hh"
#include "G3DetTable.hh"
#include "G3SensVolVector.hh"
#include <stdlib.h>
Include dependency graph for clparse.cc:

Go to the source code of this file.

Functions

char gSeparator ('_')
 
G4int G3CLTokens (G4String *line, G4String *tokens)
 
void G3CLEval (G4String *tokens, char *select)
 
void PG4gsvolu (G4String *tokens)
 
void PG4gspos (G4String *tokens)
 
void PG4gsposp (G4String *tokens)
 
void PG4gsatt (G4String *tokens)
 
void PG4gsrotm (G4String *tokens)
 
void PG4gsdvn (G4String *tokens)
 
void PG4gsdvt (G4String *tokens)
 
void PG4gsdvx (G4String *tokens)
 
void PG4gsdvn2 (G4String *tokens)
 
void PG4gsdvt2 (G4String *tokens)
 
void PG4gsmate (G4String *tokens)
 
void PG4gsmixt (G4String *tokens)
 
void PG4gstmed (G4String *tokens)
 
void PG4gstpar (G4String *tokens)
 
void PG4gspart (G4String *tokens)
 
void PG4gsdk (G4String *tokens)
 
void PG4gsdet (G4String *tokens)
 
void PG4gsdetv (G4String *tokens)
 
void PG4gsdeta (G4String *tokens)
 
void PG4gsdeth (G4String *tokens)
 
void PG4gsdetd (G4String *tokens)
 
void PG4gsdetu (G4String *tokens)
 
void PG4ggclos ()
 
void G3CLRead (G4String &fname, char *select=0)
 
G4int G3CLTokens (G4String *line, G4String tokens[])
 
void G3CLEval (G4String tokens[], char *select)
 
void G3fillParams (G4String *tokens, const char *ptypes)
 

Variables

std::ofstream ofile
 
G3VolTable G3Vol
 
G3MatTable G3Mat
 
G3MedTable G3Med
 
G3RotTable G3Rot
 
G3PartTable G3Part
 
G3DetTable G3Det
 
G3EleTable G3Ele
 
G3SensVolVector G3SensVol
 
G4int narray
 
G4int Ipar [1000]
 
G4double Rpar [1000]
 
G4String Spar [1000]
 

Function Documentation

void G3CLEval ( G4String tokens,
char *  select 
)

Here is the caller graph for this function:

void G3CLEval ( G4String  tokens[],
char *  select 
)

Definition at line 171 of file clparse.cc.

172 {
173  //
174  // G3CLEval
175  //
176  // Evaluate the token List as a Geant3 call, and execute it as
177  // a Geant4 call.
178 
179  const char* context = tokens[0];
180  const char* routine = tokens[1];
181  const char* wcard = "*";
182 
183  // If context is selected, return unless context matches
184  //
185  if ((select != 0) && (select != wcard))
186  {
187  if ( strcmp(select,context) ) { return; }
188  }
189 
190  // Branch on Geant3 routine name
191  //
192  ofile << "Do routine " << routine << " in context " << context << G4endl;
193 
194  if ( !strcmp(routine,"GSVOLU") ) { PG4gsvolu(&tokens[2]); return;}
195  if ( !strcmp(routine,"GSPOS") ) { PG4gspos (&tokens[2]); return;}
196  if ( !strcmp(routine,"GSPOSP") ) { PG4gsposp(&tokens[2]); return;}
197  if ( !strcmp(routine,"GSATT") ) { PG4gsatt (&tokens[2]); return;}
198  if ( !strcmp(routine,"GSROTM") ) { PG4gsrotm(&tokens[2]); return;}
199  if ( !strcmp(routine,"GSDVN") ) { PG4gsdvn (&tokens[2]); return;}
200  if ( !strcmp(routine,"GSDVT") ) { PG4gsdvt (&tokens[2]); return;}
201  if ( !strcmp(routine,"GSDVX") ) { PG4gsdvx (&tokens[2]); return;}
202  if ( !strcmp(routine,"GSDVN2") ) { PG4gsdvn2(&tokens[2]); return;}
203  if ( !strcmp(routine,"GSDVT2") ) { PG4gsdvt2(&tokens[2]); return;}
204  if ( !strcmp(routine,"GSMATE") ) { PG4gsmate(&tokens[2]); return;}
205  if ( !strcmp(routine,"GSMIXT") ) { PG4gsmixt(&tokens[2]); return;}
206  if ( !strcmp(routine,"GSTMED") ) { PG4gstmed(&tokens[2]); return;}
207  if ( !strcmp(routine,"GSTPAR") ) { PG4gstpar(&tokens[2]); return;}
208  if ( !strcmp(routine,"GSPART") ) { PG4gspart(&tokens[2]); return;}
209  if ( !strcmp(routine,"GSDK") ) { PG4gsdk (&tokens[2]); return;}
210  if ( !strcmp(routine,"GSDET") ) { PG4gsdet (&tokens[2]); return;}
211  if ( !strcmp(routine,"GSDETV") ) { PG4gsdetv(&tokens[2]); return;}
212  if ( !strcmp(routine,"GSDETA") ) { PG4gsdeta(&tokens[2]); return;}
213  if ( !strcmp(routine,"GSDETH") ) { PG4gsdeth(&tokens[2]); return;}
214  if ( !strcmp(routine,"GSDETD") ) { PG4gsdetd(&tokens[2]); return;}
215  if ( !strcmp(routine,"GSDETU") ) { PG4gsdetu(&tokens[2]); return;}
216  if ( !strcmp(routine,"GGCLOS") ) { PG4ggclos(); return;}
217 }
void PG4gsvolu(G4String *tokens)
Definition: G4gsvolu.cc:37
void PG4gspos(G4String *tokens)
Definition: G4gspos.cc:42
void PG4gsdetd(G4String *tokens)
Definition: G4gsdetd.cc:34
void PG4gstmed(G4String *tokens)
Definition: G4gstmed.cc:44
void PG4gsdvt2(G4String *tokens)
Definition: G4gsdvt2.cc:41
void PG4gsposp(G4String *tokens)
Definition: G4gsposp.cc:42
void PG4gsdk(G4String *tokens)
Definition: G4gsdk.cc:33
void PG4gsdetv(G4String *tokens)
Definition: G4gsdetv.cc:36
void PG4gstpar(G4String *tokens)
Definition: G4gstpar.cc:32
void PG4gsdvt(G4String *tokens)
Definition: G4gsdvt.cc:41
void PG4ggclos()
Definition: G4ggclos.cc:32
void PG4gsdeth(G4String *tokens)
Definition: G4gsdeth.cc:34
void PG4gsmixt(G4String *tokens)
Definition: G4gsmixt.cc:43
void PG4gsrotm(G4String *tokens)
Definition: G4gsrotm.cc:35
void PG4gsmate(G4String *tokens)
Definition: G4gsmate.cc:42
const XML_Char * context
Definition: expat.h:434
std::ofstream ofile
Definition: clparse.cc:45
void PG4gsdvx(G4String *tokens)
Definition: G4gsdvx.cc:40
void PG4gspart(G4String *tokens)
Definition: G4gspart.cc:33
#define G4endl
Definition: G4ios.hh:61
void PG4gsatt(G4String *tokens)
Definition: G4gsatt.cc:33
void PG4gsdvn(G4String *tokens)
Definition: G4gsdvn.cc:38
void PG4gsdetu(G4String *tokens)
Definition: G4gsdetu.cc:31
void PG4gsdet(G4String *tokens)
Definition: G4gsdet.cc:32
void PG4gsdvn2(G4String *tokens)
Definition: G4gsdvn2.cc:41
void PG4gsdeta(G4String *tokens)
Definition: G4gsdeta.cc:38

Here is the call graph for this function:

void G3CLRead ( G4String fname,
char *  select = 0 
)

Definition at line 99 of file clparse.cc.

100 {
101  //
102  // G3CLRead
103  // Read the call List file, parse the tokens, and pass the token
104  // List to the Geant4 interpreter
105  //
106  // fname: call List filename
107 
108  G4String line;
109  G4String tokens[1000];
110 
111  const char* ofname = "clparse.out";
112  ofile.open(ofname);
113  ofile << "Output file open\n";
114 
115  G4int count = 0;
116  G4int ntokens = 0;
117  std::ifstream istr(fname);
118 
119  while (line.readLine(istr) && ! istr.eof())
120  {
121  count++;
122  ntokens = G3CLTokens(&line,tokens); // tokenize the line
123  for (G4int i=0; i < ntokens; i++)
124  {
125  ofile << tokens[i] << G4endl;
126  }
127 
128  // interpret the line as a Geant call
129  //
130  G3CLEval(tokens, select);
131  }
132 }
std::istream & readLine(std::istream &, G4bool skipWhite=true)
int G4int
Definition: G4Types.hh:78
G4int G3CLTokens(G4String *line, G4String *tokens)
std::ofstream ofile
Definition: clparse.cc:45
void G3CLEval(G4String *tokens, char *select)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G3CLTokens ( G4String line,
G4String tokens 
)

Here is the caller graph for this function:

G4int G3CLTokens ( G4String line,
G4String  tokens[] 
)

Definition at line 135 of file clparse.cc.

136 {
137  //
138  // G3CLTokens
139  //
140  // Tokenize line, returning tokens in tokens[]. Items in ".."
141  // are extracted as single tokens, despite embedded spaces.
142 
143  G4Tokenizer next(*line);
144 
145  // first tokenize using " to identify strings
146  //
147  G4int itok = 0;
148  G4int ntokens = 0;
149  G4String token1, token2;
150  while (!(token1=next("\"")).isNull())
151  {
152  itok++;
153  if (itok%2 == 0 ) // even: inside a string
154  {
155  tokens[ntokens++] = token1;
156  }
157  else // not in a quoted string: finish tokenization
158  {
159  G4Tokenizer lev2(token1);
160  while (!(token2=lev2()).isNull())
161  {
162  tokens[ntokens] = token2;
163  ntokens++;
164  }
165  }
166  }
167  return ntokens;
168 }
int G4int
Definition: G4Types.hh:78
code FAR * next
Definition: inflate.h:115
void G3fillParams ( G4String tokens,
const char *  ptypes 
)

Definition at line 219 of file clparse.cc.

220 {
221  //
222  // G3fillParams
223  //
224  // Interpret tokens to fill call parameters, based on parameter types ptypes
225 
226  // loop over ptypes
227  //
228  G4int i =0, ipt = 0, k = 0;
229  G4int ni =0, nr = 0, nq = 0;
230  while (ptypes[i] != '\0')
231  {
232  switch (ptypes[i])
233  {
234  case 'i':
235  Ipar[ni] = atoi(tokens[ipt].data());
236  narray = Ipar[ni];
237  ni++; ipt++;
238  break;
239  case 'r':
240  Rpar[nr] = atof(tokens[ipt].data());
241  nr++; ipt++;
242  break;
243  case 's':
244  Spar[nq] = tokens[ipt];
245  nq++; ipt++;
246  break;
247  case 'I':
248  for (k=0; k < narray; k++)
249  {
250  Ipar[ni] = atoi(tokens[ipt].data());
251  ni++; ipt++;
252  }
253  break;
254  case 'R':
255  for (k=0; k < narray; k++)
256  {
257  Rpar[nr] = atof(tokens[ipt].data());
258  nr++; ipt++;
259  }
260  break;
261  case 'Q':
262  // special case of reading three successive R arrays
263  // into one (used in gsmixt)
264  //
265  narray = 3 * std::abs(narray);
266  for (k=0; k < narray; k++)
267  {
268  Rpar[nr] = atof(tokens[ipt].data());
269  nr++; ipt++;
270  }
271  break;
272  case 'S':
273  for (k=0; k < narray; k++)
274  {
275  Spar[nq] = tokens[ipt];
276  nq++; ipt++;
277  }
278  break;
279  default:
280  ofile << "unidentified ptype '" << ptypes[i] << G4endl;
281  };
282  i++;
283  }
284 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
G4int narray
Definition: clparse.cc:64
int G4int
Definition: G4Types.hh:78
const XML_Char const XML_Char * data
Definition: expat.h:268
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
std::ofstream ofile
Definition: clparse.cc:45
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

char gSeparator ( '_'  )
void PG4ggclos ( )

Definition at line 32 of file G4ggclos.cc.

32  {
33  G4ggclos();
34 }
void G4ggclos()
Definition: G4ggclos.cc:36

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsatt ( G4String tokens)

Definition at line 33 of file G4gsatt.cc.

34 {
35  // fill the parameter containers
36  G3fillParams(tokens,PTgsatt);
37 
38  // interpret the parameters
39  G4String name = Spar[0];
40  G4String attr = Spar[1];
41  G4int ival = Ipar[0];
42 
43  G4gsatt(name, attr, ival);
44 }
const XML_Char * name
Definition: expat.h:151
void G4gsatt(G4String name, G4String attr, G4int ival)
Definition: G4gsatt.cc:46
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
#define PTgsatt
Definition: G3toG4.hh:55
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdet ( G4String tokens)

Definition at line 32 of file G4gsdet.cc.

33 {
34  // fill the parameter containers
35  G3fillParams(tokens,PTgsdet);
36 
37  // interpret the parameters
38  G4String chset = Spar[0];
39  G4String chdet = Spar[1];
40  G4int nv = Ipar[0];
41  G4String chnmsv[100];
42  for (G4int i=0; i<=nv; i++ ) chnmsv[i] = Spar[2+i].data();
43  G4int *nbits = &Ipar[1];
44  G4int idtyp = Ipar[1+nv];
45  G4int nwhi = Ipar[2+nv];
46  G4int nwdi = Ipar[3+nv];
47 
48  G4gsdet(chset,chdet,nv,chnmsv,nbits,idtyp,nwhi,nwdi);
49 }
void G4gsdet(G4String chset, G4String chdet, G4int nv, G4String *chnmsv, G4int *nbitsv, G4int idtyp, G4int nwhi, G4int nwdi)
Definition: G4gsdet.cc:51
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
const XML_Char const XML_Char * data
Definition: expat.h:268
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdet
Definition: G3toG4.hh:69

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdeta ( G4String tokens)

Definition at line 38 of file G4gsdeta.cc.

39 {
40  // fill the parameter containers
41  G3fillParams(tokens,PTgsdeta);
42 
43  // interpret the parameters
44  G4String chset = Spar[0];
45  G4String chdet = Spar[1];
46  G4String chali = Spar[2];
47  G4int nwhi = Ipar[0];
48  G4int nwdi = Ipar[1];
49 
50  G4gsdeta(chset,chdet,chali,nwhi,nwdi);
51 }
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
void G4gsdeta(G4String chset, G4String chdet, G4String chali, G4int nwhi, G4int nwdi)
Definition: G4gsdeta.cc:53
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdeta
Definition: G3toG4.hh:71

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdetd ( G4String tokens)

Definition at line 34 of file G4gsdetd.cc.

35 {
36  // fill the parameter containers
37  G3fillParams(tokens,PTgsdetd);
38 
39  // interpret the parameters
40  G4String chset = Spar[0];
41  G4String chdet = Spar[1];
42  G4int nd = Ipar[0];
43  G4String chnmsd[100];
44  for (G4int i=0; i<=nd; i++ ) chnmsd[i] = Spar[2+i].data();
45  G4int *nbitsd = &Ipar[1];
46 
47  G4gsdetd(chset,chdet,nd,chnmsd,nbitsd);
48 }
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
const XML_Char const XML_Char * data
Definition: expat.h:268
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdetd
Definition: G3toG4.hh:73
void G4gsdetd(G4String chset, G4String chdet, G4int nd, G4String *chnmsd, G4int *nbitsd)
Definition: G4gsdetd.cc:50

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdeth ( G4String tokens)

Definition at line 34 of file G4gsdeth.cc.

35 {
36  // fill the parameter containers
37  G3fillParams(tokens,PTgsdeth);
38 
39  // interpret the parameters
40  G4String chset = Spar[0];
41  G4String chdet = Spar[1];
42  G4int nh = Ipar[0];
43  G4String chnamh[100];
44  for (G4int i=0; i<=nh; i++ ) chnamh[i] = Spar[2+i].data();
45  G4int *nbitsh = &Ipar[1];
46  G4double *orig = Rpar;
47  G4double *fact = &Rpar[nh];
48 
49  G4gsdeth(chset,chdet,nh,chnamh,nbitsh,orig,fact);
50 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
const XML_Char const XML_Char * data
Definition: expat.h:268
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdeth
Definition: G3toG4.hh:72
void G4gsdeth(G4String chset, G4String chdet, G4int nh, G4String *chnamh, G4int *nbitsh, G4double *orig, G4double *fact)
Definition: G4gsdeth.cc:52
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdetu ( G4String tokens)

Definition at line 31 of file G4gsdetu.cc.

32 {
33  // fill the parameter containers
34  G3fillParams(tokens,PTgsdetu);
35 
36  // interpret the parameters
37  G4String chset = Spar[0].data();
38  G4String chdet = Spar[1].data();
39  G4int nupar = Ipar[0];
40  G4double *upar = Rpar;
41 
42  G4gsdetu(chset,chdet,nupar,upar);
43 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
#define PTgsdetu
Definition: G3toG4.hh:74
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
const char * data() const
double G4double
Definition: G4Types.hh:76
void G4gsdetu(G4String chset, G4String chdet, G4int nupar, G4double *upar)
Definition: G4gsdetu.cc:45

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdetv ( G4String tokens)

Definition at line 36 of file G4gsdetv.cc.

37 {
38  // fill the parameter containers
39  G3fillParams(tokens,PTgsdetv);
40 
41  // interpret the parameters
42  G4String chset = Spar[0];
43  G4String chdet = Spar[1];
44  G4int idtyp = Ipar[0];
45  G4int nwhi = Ipar[1];
46  G4int nwdi = Ipar[2];
47 
48  G4gsdetv(chset,chdet,idtyp,nwhi,nwdi);
49 }
void G4gsdetv(G4String chset, G4String chdet, G4int idtyp, G4int nwhi, G4int nwdi)
Definition: G4gsdetv.cc:51
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
#define PTgsdetv
Definition: G3toG4.hh:70
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdk ( G4String tokens)

Definition at line 33 of file G4gsdk.cc.

34 {
35  // fill the parameter containers
36  G3fillParams(tokens,PTgsdk);
37 
38  // interpret the parameters
39  G4int ipart = Ipar[0];
40  G4int *mode = &Ipar[3];
41  G4double *bratio = Rpar;
42 
43  G4gsdk(ipart,bratio,mode);
44 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
#define PTgsdk
Definition: G3toG4.hh:68
void G4gsdk(G4int ipart, G4double *bratio, G4int *mode)
Definition: G4gsdk.cc:46
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
inflate_mode mode
Definition: inflate.h:82
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdvn ( G4String tokens)

Definition at line 38 of file G4gsdvn.cc.

39 {
40  // fill the parameter containers
41  G3fillParams(tokens,PTgsdvn);
42 
43  // interpret the parameters
44  G4String vname = Spar[0];
45  G4String vmoth = Spar[1];
46  G4int ndiv = Ipar[0];
47  G4int iaxis = Ipar[1];
48 
49  G4gsdvn(vname, vmoth, ndiv, iaxis);
50 }
void G4gsdvn(G4String vname, G4String vmoth, G4int ndiv, G4int iaxis)
Definition: G4gsdvn.cc:103
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdvn
Definition: G3toG4.hh:57

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdvn2 ( G4String tokens)

Definition at line 41 of file G4gsdvn2.cc.

41  {
42  // fill the parameter containers
43  G3fillParams(tokens, PTgsdvn2);
44 
45  // interpret the parameters
46  G4String vname = Spar[0];
47  G4String vmoth = Spar[1];
48  G4int ndiv = Ipar[0];
49  G4int iaxis = Ipar[1];
50  G4int numed = Ipar[2];
51  G4double c0 = Rpar[0];
52 
53  G4gsdvn2(vname, vmoth, ndiv, iaxis, c0, numed);
54 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
void G4gsdvn2(G4String name, G4String moth, G4int ndiv, G4int iaxis, G4double c0, G4int numed)
Definition: G4gsdvn2.cc:56
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdvn2
Definition: G3toG4.hh:60
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdvt ( G4String tokens)

Definition at line 41 of file G4gsdvt.cc.

42 {
43  // fill the parameter containers
44  G3fillParams(tokens,PTgsdvt);
45 
46  // interpret the parameters
47  G4String vname = Spar[0];
48  G4String vmoth = Spar[1];
49  G4int iaxis = Ipar[0];
50  G4int numed = Ipar[1];
51  G4int ndvmx = Ipar[2];
52  G4double Step = Rpar[0];
53 
54  G4gsdvt(vname,vmoth,Step,iaxis,numed,ndvmx);
55 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
void G4gsdvt(G4String name, G4String moth, G4double Step, G4int iaxis, G4int numed, G4int ndvmx)
Definition: G4gsdvt.cc:57
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsdvt
Definition: G3toG4.hh:58
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdvt2 ( G4String tokens)

Definition at line 41 of file G4gsdvt2.cc.

42 {
43  // fill the parameter containers
44  G3fillParams(tokens,PTgsdvt2);
45 
46  // interpret the parameters
47  G4String vname = Spar[0];
48  G4String vmoth = Spar[1];
49  G4int iaxis = Ipar[0];
50  G4int numed = Ipar[1];
51  G4int ndvmx = Ipar[2];
52  G4double Step = Rpar[0];
53  G4double c0 = Rpar[1];
54 
55  G4gsdvt2(vname,vmoth,Step,iaxis,c0,numed,ndvmx);
56 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
#define PTgsdvt2
Definition: G3toG4.hh:61
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
double G4double
Definition: G4Types.hh:76
void G4gsdvt2(G4String name, G4String moth, G4double Step, G4int iaxis, G4double c0, G4int numed, G4int ndvmx)
Definition: G4gsdvt2.cc:58

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsdvx ( G4String tokens)

Definition at line 40 of file G4gsdvx.cc.

41 {
42  // fill the parameter containers
43  G3fillParams(tokens,PTgsdvx);
44 
45  // interpret the parameters
46  G4String name = Spar[0];
47  G4String moth = Spar[1];
48  G4int ndiv = Ipar[0];
49  G4int iaxis = Ipar[1];
50  G4int numed = Ipar[2];
51  G4int ndvmx = Ipar[3];
52  G4double Step = Rpar[0];
53  G4double c0 = Rpar[1];
54 
55  G4gsdvx(name,moth,ndiv,iaxis,Step,c0,numed,ndvmx);
56 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
void G4gsdvx(G4String name, G4String moth, G4int ndiv, G4int iaxis, G4double Step, G4double c0, G4int numed, G4int ndvmx)
Definition: G4gsdvx.cc:58
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
double G4double
Definition: G4Types.hh:76
#define PTgsdvx
Definition: G3toG4.hh:59

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsmate ( G4String tokens)

Definition at line 42 of file G4gsmate.cc.

43 {
44  // fill the parameter containers
45  G3fillParams(tokens,PTgsmate);
46  G4String name = Spar[0];
47  G4int imate = Ipar[0];
48  G4int nwbf = Ipar[1];
49  G4double a = Rpar[0];
50  G4double z = Rpar[1];
51  G4double dens = Rpar[2];
52  G4double radl = Rpar[3];
53  // G4double absl = Rpar[4];
54  G4double *ubuf = &Rpar[5];
55 
56  G4gsmate(imate, name, a, z, dens, radl, nwbf, ubuf);
57 }
#define PTgsmate
Definition: G3toG4.hh:62
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
void G4gsmate(G4int imate, G4String name, G4double a, G4double z, G4double dens, G4double radl, G4int nwbf, G4double *ubuf)
Definition: G4gsmate.cc:105
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsmixt ( G4String tokens)

Definition at line 43 of file G4gsmixt.cc.

44 {
45  // fill the parameter containers
46  G3fillParams(tokens,PTgsmixt);
47 
48  // interpret the parameters
49  G4String name = Spar[0].data();
50  G4int imate = Ipar[0];
51  G4int nlmat = Ipar[1];
52  //G4double dens = Rpar[0]*g/cm3;
53  G4double dens = Rpar[0];
54  G4double *a = Rpar + 1;
55  G4double *z = Rpar + 1+std::abs(nlmat);
56  G4double *wmat = Rpar + 1 + 2*std::abs(nlmat);
57 /*
58  for (int i=0; i<std::abs(nlmat); i++){
59  //Rpar[i]=Rpar[i]*g/mole;
60  Rpar[i]=Rpar[i];
61  };
62 */
63  G4gsmixt(imate,name,a,z,dens,nlmat,wmat);
64 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
void G4gsmixt(G4int imate, G4String name, G4double a[], G4double *z, G4double dens, G4int nlmat, G4double *wmat)
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
const char * data() const
double G4double
Definition: G4Types.hh:76
#define PTgsmixt
Definition: G3toG4.hh:64

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gspart ( G4String tokens)

Definition at line 33 of file G4gspart.cc.

34 {
35  // fill the parameter containers
36  G3fillParams(tokens,PTgspart);
37 
38  // interpret the parameters
39  G4String chnpar = Spar[0];
40  G4int ipart = Ipar[0];
41  G4int itrtyp = Ipar[1];
42  G4int nwb = Ipar[2];
43  G4double amass = Rpar[0];
44  G4double charge = Rpar[1];
45  G4double tlife = Rpar[2];
46  G4double *ubuf = &Rpar[3];
47 
48  G4gspart(ipart,chnpar,itrtyp,amass,charge,tlife,ubuf,nwb);
49 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgspart
Definition: G3toG4.hh:67
void G4gspart(G4int ipart, G4String chnpar, G4int itrtyp, G4double amass, G4double charge, G4double tlife, G4double *ubuf, G4int nwb)
Definition: G4gspart.cc:51
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gspos ( G4String tokens)

Definition at line 42 of file G4gspos.cc.

43 {
44  // fill the parameter containers
45  G3fillParams(tokens,PTgspos);
46 
47  // interpret the parameters
48  G4String name = Spar[0];
49  G4String moth = Spar[1];
50  G4String only = Spar[2];
51  G4int num = Ipar[0];
52  G4int irot = Ipar[1];
53  // all parameters are passed to G4gsxxx methods
54  // in G3 default units
55  //G4double x = Rpar[0]*cm;
56  //G4double y = Rpar[1]*cm;
57  //G4double z = Rpar[2]*cm;
58  G4double x = Rpar[0];
59  G4double y = Rpar[1];
60  G4double z = Rpar[2];
61 
62  G4gspos(name, num, moth, x, y, z, irot, only);
63 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
void G4gspos(G4String name, G4int num, G4String moth, G4double x, G4double y, G4double z, G4int irot, G4String only)
Definition: G4gspos.cc:65
#define PTgspos
Definition: G3toG4.hh:53
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsposp ( G4String tokens)

Definition at line 42 of file G4gsposp.cc.

42  {
43  // fill the parameter containers
44  G3fillParams(tokens,PTgsposp);
45 
46  // interpret the parameters
47  G4String name = Spar[0];
48  G4String moth = Spar[1];
49  G4String only = Spar[2];
50  G4int num = Ipar[0];
51  G4int irot = Ipar[1];
52  G4int npar = Ipar[2];
53  // all parameters are passed to G4gsxxx methods
54  // in G3 default units
55  //G4double x = Rpar[0]*cm;
56  //G4double y = Rpar[1]*cm;
57  //G4double z = Rpar[2]*cm;
58  G4double x = Rpar[0];
59  G4double y = Rpar[1];
60  G4double z = Rpar[2];
61  G4double *pars = &Rpar[3];
62 
63  G4gsposp(name, num, moth, x, y, z, irot, only, pars, npar);
64 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G4gsposp(G4String name, G4int num, G4String moth, G4double x, G4double y, G4double z, G4int irot, G4String only, G4double Rpar[], G4int npar)
Definition: G4gsposp.cc:297
#define PTgsposp
Definition: G3toG4.hh:54
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsrotm ( G4String tokens)

Definition at line 35 of file G4gsrotm.cc.

36 {
37  // fill the parameter containers
38  G3fillParams(tokens,PTgsrotm);
39 
40  // interpret the parameters
41  G4int irot = Ipar[0];
42 
43  // the angles in Geant are in degrees
44  G4double theta1 = Rpar[0];
45  G4double phi1 = Rpar[1];
46  G4double theta2 = Rpar[2];
47  G4double phi2 = Rpar[3];
48  G4double theta3 = Rpar[4];
49  G4double phi3 = Rpar[5];
50 
51  G4gsrotm(irot, theta1,phi1, theta2,phi2, theta3,phi3);
52 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G4gsrotm(G4int irot, G4double theta1, G4double phi1, G4double theta2, G4double phi2, G4double theta3, G4double phi3)
Definition: G4gsrotm.cc:54
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
#define PTgsrotm
Definition: G3toG4.hh:56
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gstmed ( G4String tokens)

Definition at line 44 of file G4gstmed.cc.

45 {
46  // fill the parameter containers
47  G3fillParams(tokens,PTgstmed);
48 
49  // interpret the parameters
50  G4String name = Spar[0];
51  G4int itmed = Ipar[0];
52  G4int nmat = Ipar[1];
53  G4int isvol = Ipar[2];
54  G4int ifield = Ipar[3];
55  G4int nwbuf = Ipar[4];
56  G4double fieldm = Rpar[0];
57  G4double tmaxfd = Rpar[1];
58  G4double stemax = Rpar[2];
59  G4double deemax = Rpar[3];
60  G4double epsil = Rpar[4];
61  G4double stmin = Rpar[5];
62  G4double *ubuf = &Rpar[6];
63 
64  G4gstmed(itmed,name,nmat,isvol,ifield,fieldm,tmaxfd,stemax,
65  deemax,epsil,stmin,ubuf,nwbuf);
66 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
#define PTgstmed
Definition: G3toG4.hh:65
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G4gstmed(G4int itmed, G4String name, G4int nmat, G4int isvol, G4int ifield, G4double fieldm, G4double tmaxfd, G4double stemax, G4double deemax, G4double epsil, G4double stmin, G4double *par, G4int npar)
Definition: G4gstmed.cc:68
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gstpar ( G4String tokens)

Definition at line 32 of file G4gstpar.cc.

33 {
34  // fill the parameter containers
35  G3fillParams(tokens,PTgstpar);
36 
37  // interpret the parameters
38  G4String chpar = Spar[0];
39  G4int itmed = Ipar[0];
40  G4double parval = Rpar[0];
41 
42  G4gstpar(itmed,chpar,parval);
43 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G4gstpar(G4int itmed, G4String chpar, G4double parval)
Definition: G4gstpar.cc:45
#define PTgstpar
Definition: G3toG4.hh:66
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsvolu ( G4String tokens)

Definition at line 37 of file G4gsvolu.cc.

37  {
38  // fill the parameter containers
39  G3fillParams(tokens,PTgsvolu);
40 
41  // interpret the parameters
42  G4String vname = Spar[0];
43  G4String shape = Spar[1];
44  G4int nmed = Ipar[0];
45  G4int npar = Ipar[1];
46  G4double *pars = Rpar;
47 
48  G4gsvolu(vname, shape, nmed, pars, npar);
49 }
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
#define PTgsvolu
Definition: G3toG4.hh:52
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
void G4gsvolu(G4String name, G4String shape, G4int nmed, G4double *par, G4int npar)
Definition: G4gsvolu.cc:73
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

G3DetTable G3Det

Definition at line 59 of file clparse.cc.

G3EleTable G3Ele

Definition at line 60 of file clparse.cc.

G3MatTable G3Mat

Definition at line 55 of file clparse.cc.

G3MedTable G3Med

Definition at line 56 of file clparse.cc.

G3PartTable G3Part

Definition at line 58 of file clparse.cc.

G3RotTable G3Rot

Definition at line 57 of file clparse.cc.

G3SensVolVector G3SensVol

Definition at line 61 of file clparse.cc.

G3VolTable G3Vol

Definition at line 54 of file clparse.cc.

G4int Ipar[1000]

Definition at line 66 of file clparse.cc.

G4int narray

Definition at line 64 of file clparse.cc.

std::ofstream ofile

Definition at line 45 of file clparse.cc.

G4double Rpar[1000]

Definition at line 67 of file clparse.cc.

G4String Spar[1000]

Definition at line 68 of file clparse.cc.