Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
G3toG4.hh File Reference
#include "G3toG4Defs.hh"
#include "globals.hh"
#include "G3G4Interface.hh"

Go to the source code of this file.

Macros

#define PTgsvolu   "ssiiR"
 
#define PTgspos   "sisrrris"
 
#define PTgsposp   "sisrrrisiR"
 
#define PTgsatt   "ssi"
 
#define PTgsrotm   "irrrrrr"
 
#define PTgsdvn   "ssii"
 
#define PTgsdvt   "ssriii"
 
#define PTgsdvx   "ssiirrii"
 
#define PTgsdvn2   "ssiiri"
 
#define PTgsdvt2   "ssririi"
 
#define PTgsmate   "isrrrriR"
 
#define PTgsmixt   "isriQ"
 
#define PTgstmed   "isiiirrrrrriR"
 
#define PTgstpar   "isr"
 
#define PTgspart   "isirrriR"
 
#define PTgsdk   "iiRI"
 
#define PTgsdet   "ssiSIiii"
 
#define PTgsdetv   "ssiii"
 
#define PTgsdeta   "sssii"
 
#define PTgsdeth   "ssiSIRR"
 
#define PTgsdetd   "ssiSI"
 
#define PTgsdetu   "ssiR"
 

Functions

void G3fillParams (G4String *tokens, const char *ptypes)
 

Variables

G3G4DLL_API char gSeparator
 
G3G4DLL_API G4int Ipar [1000]
 
G3G4DLL_API G4double Rpar [1000]
 
G3G4DLL_API G4String Spar [1000]
 

Macro Definition Documentation

#define PTgsatt   "ssi"

Definition at line 55 of file G3toG4.hh.

Referenced by PG4gsatt().

#define PTgsdet   "ssiSIiii"

Definition at line 69 of file G3toG4.hh.

Referenced by PG4gsdet().

#define PTgsdeta   "sssii"

Definition at line 71 of file G3toG4.hh.

Referenced by PG4gsdeta().

#define PTgsdetd   "ssiSI"

Definition at line 73 of file G3toG4.hh.

Referenced by PG4gsdetd().

#define PTgsdeth   "ssiSIRR"

Definition at line 72 of file G3toG4.hh.

Referenced by PG4gsdeth().

#define PTgsdetu   "ssiR"

Definition at line 74 of file G3toG4.hh.

Referenced by PG4gsdetu().

#define PTgsdetv   "ssiii"

Definition at line 70 of file G3toG4.hh.

Referenced by PG4gsdetv().

#define PTgsdk   "iiRI"

Definition at line 68 of file G3toG4.hh.

Referenced by PG4gsdk().

#define PTgsdvn   "ssii"

Definition at line 57 of file G3toG4.hh.

Referenced by PG4gsdvn().

#define PTgsdvn2   "ssiiri"

Definition at line 60 of file G3toG4.hh.

Referenced by PG4gsdvn2().

#define PTgsdvt   "ssriii"

Definition at line 58 of file G3toG4.hh.

Referenced by PG4gsdvt().

#define PTgsdvt2   "ssririi"

Definition at line 61 of file G3toG4.hh.

Referenced by PG4gsdvt2().

#define PTgsdvx   "ssiirrii"

Definition at line 59 of file G3toG4.hh.

Referenced by PG4gsdvx().

#define PTgsmate   "isrrrriR"

Definition at line 62 of file G3toG4.hh.

Referenced by PG4gsmate().

#define PTgsmixt   "isriQ"

Definition at line 64 of file G3toG4.hh.

Referenced by PG4gsmixt().

#define PTgspart   "isirrriR"

Definition at line 67 of file G3toG4.hh.

Referenced by PG4gspart().

#define PTgspos   "sisrrris"

Definition at line 53 of file G3toG4.hh.

Referenced by PG4gspos().

#define PTgsposp   "sisrrrisiR"

Definition at line 54 of file G3toG4.hh.

Referenced by PG4gsposp().

#define PTgsrotm   "irrrrrr"

Definition at line 56 of file G3toG4.hh.

Referenced by PG4gsrotm().

#define PTgstmed   "isiiirrrrrriR"

Definition at line 65 of file G3toG4.hh.

Referenced by PG4gstmed().

#define PTgstpar   "isr"

Definition at line 66 of file G3toG4.hh.

Referenced by PG4gstpar().

#define PTgsvolu   "ssiiR"

Definition at line 52 of file G3toG4.hh.

Referenced by PG4gsvolu().

Function Documentation

void G3fillParams ( G4String tokens,
const char *  ptypes 
)

Definition at line 219 of file clparse.cc.

References G4endl, Ipar, narray, ofile, and Rpar.

Referenced by PG4gsatt(), PG4gsdet(), PG4gsdeta(), PG4gsdetd(), PG4gsdeth(), PG4gsdetu(), PG4gsdetv(), PG4gsdk(), PG4gsdvn(), PG4gsdvn2(), PG4gsdvt(), PG4gsdvt2(), PG4gsdvx(), PG4gsmate(), PG4gsmixt(), PG4gspart(), PG4gspos(), PG4gsposp(), PG4gsrotm(), PG4gstmed(), PG4gstpar(), and PG4gsvolu().

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 }
G4int Ipar[1000]
Definition: clparse.cc:66
G4int narray
Definition: clparse.cc:64
G4String Spar[1000]
Definition: clparse.cc:68
int G4int
Definition: G4Types.hh:78
std::ofstream ofile
Definition: clparse.cc:45
#define G4endl
Definition: G4ios.hh:61
G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char const XML_Char * data

Variable Documentation

G3G4DLL_API char gSeparator
G3G4DLL_API G4int Ipar[1000]
G3G4DLL_API G4double Rpar[1000]
G3G4DLL_API G4String Spar[1000]