Problem 1662 - CLHEP::RandGaussT from Randomize.hh "does not name a type"
Summary: CLHEP::RandGaussT from Randomize.hh "does not name a type"
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: global (show other problems)
Version: 10.0
Hardware: All All
: P5 minor
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2014-08-12 12:14 CEST by eduard.friske
Modified: 2014-08-20 11:02 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description eduard.friske 2014-08-12 12:14:20 CEST
When trying to create a pointer of type RandGaussT, gcc complains that "‘RandGaussT’ in namespace ‘CLHEP’ does not name a type".

Trying the same with RandGaussQ works without problems.
Both classes are defined in Randomize.hh and belong to the CLHEP namespace.

Therefore I do not understand why one class is found while the other isn't.

If this problem has already been reported I apologize, I didn't find a problem matching this.

GEANT4 version is 10.0-patch2.
Comment 1 Gabriele Cosmo 2014-08-20 10:41:16 CEST
You need to use/link with the external CLHEP library for using the RandGaussT class (i.e. configure your Geant4 installation to use system CLHEP library installed in your system).
RandGaussT is not distributed in the internal CLHEP module shipped with Geant4, as not internally used by Geant4.
Comment 2 eduard.friske 2014-08-20 10:48:28 CEST
I resorted to using RandGaussQ to work around the problem. Still good to know. Thanks.

Is there a particular reason why RandGaussT is not shipped with the internal CLHEP library?
Comment 3 Gabriele Cosmo 2014-08-20 11:02:34 CEST
The internal CLHEP module only ships classes which are relevant and/or in use within the Geant4 distribution.