Message: geant4 version related macros Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None geant4 version related macros 

Forum: User Requirements
Date: 25 Mar, 2005
From: Jacek M. Holeczek <holeczek@us.edu.pl>

Hi,
would it be possible that you provide users with the geant4 version
information automatically generated by installer?

In one of the include files (G4RunManagerKernel.hh, for example) put:

#define GEANT4_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#define GEANT4_VERSION_CODE GEANT4_VERSION(6,2,1)
#define GEANT4_RELEASE "geant4.6.2.p01"

For geant4.7.0 you would have:
#define GEANT4_VERSION_CODE GEANT4_VERSION(7,0,0)
#define GEANT4_RELEASE "geant4.7.0"

For geant4.7.0.p01 you would have:
#define GEANT4_VERSION_CODE GEANT4_VERSION(7,0,1)
#define GEANT4_RELEASE "geant4.7.0.p01"

and so on ...

These macros can be used by the user in the following way:

#if GEANT4_VERSION_CODE >= GEANT4_VERSION(6,2,2)
  #include <newheader.h> // geant4.6.2.p02 and newer
  // ... c++ code for "new" geant4 ...
#else
  #include <oldheader.h> // geant4.6.2.p01 and prior
  // ... c++ code for "old" geant4 ...
#endif

Thanks in advance,
Best regards,
Jacek.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "geant4 version related macros"

 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 ]