Message: Re: What do Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: What do  

Forum: Geometry
Re: Question What do "f" and "fp" in fpWorldPhysical(0) and fscoringVolume(0) stand for and who do these two commands do? (Aqsa)
Date: 24 Apr, 2018
From: John Allison <John Allison>

Our guidelines recommend this convention:

  - Class names (sometimes called types) start with "G4.".
  - Member functions (sometimes called methods) start with an upper case letter, e.g., GetName.
  - Data members start with 'f' (for field) or 'fp' if they are a pointer. This helps to know which data are
    members and which are just "local" variables. Also helps to know which are objects and which are
    pointers to objects. This should help you read our code. But note that usually data members are
   "private" and the user may only access them through "access functions" such as GetName.
  - Local variable names start with lower case letter.

This is just good coding practice.

So fpWorldPhysical(0) simply initialises the pointer fpWorldPhysical to 0. (Presumably later it will be assigned to something useful.) You need to learn some C++.

 Add Message Add Message
to: "Re: What do "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]