Commit a71be94a authored by Lynn Garren's avatar Lynn Garren

change implementation of static methods dealing with static data

parent 4b2582a5
2015-06-12 Lynn Garren <garren@fnal.gov>
* Random/Random/RandGauss.h, Random/src/RandGauss.cc:
implement static methods dealing with static data
in RandGauss.cc instead of in RandGauss.h
* protect against warnings in Utility/memory.h and Utility/type_traits.h
==============================
27.06.11 Release CLHEP-2.2.0.7
==============================
2015-06-10 Lynn Garren <garren@fnal.gov>
* do not add -Wno-deprecated-declarations when building for c++NN
* protect against warnings in Utility/memory.h
* do not use -Wno-deprecated-declarations when building for c++NN
* __attribute__((unused)) is not recognized by Visual C++
* Make sure asserts are enabled for tests by removing -DNDEBUG
from the compiler flags when building the tests. This solves
......
......@@ -110,9 +110,9 @@ public:
// code before shoot/fire will force generation of a new couple of
// values.
static bool getFlag() {return set_st;}
static bool getFlag();
static void setFlag( bool val ) {set_st = val;}
static void setFlag( bool val );
bool getF() const {return set;}
......@@ -144,9 +144,9 @@ public:
protected:
static double getVal() {return nextGauss_st;}
static double getVal();
static void setVal( double nextVal ) {nextGauss_st = nextVal;}
static void setVal( double nextVal );
double normal();
......
......@@ -58,6 +58,15 @@ double RandGauss::operator()( double mean, double stdDev ) {
return fire( mean, stdDev );
}
// implement static methods dealing with static data here
bool RandGauss::getFlag() {return set_st;}
void RandGauss::setFlag( bool val ) {set_st = val;}
double RandGauss::getVal() {return nextGauss_st;}
void RandGauss::setVal( double nextVal ) {nextGauss_st = nextVal;}
double RandGauss::shoot()
{
// Gaussian random numbers are generated two at the time, so every other
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment