diff --git a/App/src/FitSuiteDrawObserver.cpp b/App/src/FitSuiteDrawObserver.cpp index f4ab568585cc38a68579c8de73f416477fb59430..a153fd6926d736c465f8f2f971bb416cfce4270c 100644 --- a/App/src/FitSuiteDrawObserver.cpp +++ b/App/src/FitSuiteDrawObserver.cpp @@ -52,7 +52,6 @@ void FitSuiteDrawObserver::update(IObservable *subject) // preparing data to draw const char *hname[]={ "RealData", "SimulatedData", "RelativeDifference","Chi2Map"}; -// enum EHistogramKeys {REAL, SIMUL, DIFF, CHI2}; std::vector<OutputData<double > *> data2draw; data2draw.push_back( fitObject->getChiSquaredModule()->getRealData()->clone() ); data2draw.push_back( fitObject->getChiSquaredModule()->getSimulationData()->clone() ); //chi module have normalized simulation diff --git a/App/src/TestSpecularMatrix.cpp b/App/src/TestSpecularMatrix.cpp index 8fd040b19f639770f50f29fdbeed8fea72b0f698..28f965b6e32df88a1fab136085d7f963fc2dd1af 100644 --- a/App/src/TestSpecularMatrix.cpp +++ b/App/src/TestSpecularMatrix.cpp @@ -91,7 +91,7 @@ void TestSpecularMatrix::draw_standard_samples() // graphics for R,T coefficients in layers as a function of alpha_i size_t ncoeffs = 2; - enum key_coeffs { kCoeffR, kCoeffT}; + enum EKeyCoeffs { COEFF_R, COEFF_T }; const char *coeffs_title[]={" |R| "," |T| "}; int coeffs_color[] = {kBlue, kRed}; @@ -114,10 +114,10 @@ void TestSpecularMatrix::draw_standard_samples() // Filling graphics for R,T as a function of alpha_i for(size_t i_layer=0; i_layer<nlayers; ++i_layer ) { - gr_coeff[i_layer][kCoeffR]->SetPoint(i_point, + gr_coeff[i_layer][COEFF_R]->SetPoint(i_point, Units::rad2deg(alpha_i), std::abs(coeffs[i_layer].getScalarR()) ); - gr_coeff[i_layer][kCoeffT]->SetPoint(i_point, + gr_coeff[i_layer][COEFF_T]->SetPoint(i_point, Units::rad2deg(alpha_i), std::abs(coeffs[i_layer].getScalarT()) ); } @@ -162,7 +162,7 @@ void TestSpecularMatrix::draw_standard_samples() double xmin(0), ymin(0), xmax(0), ymax(0); for(size_t i_coeff=0; i_coeff<ncoeffs; i_coeff++){ double x1(0), y1(0), x2(0), y2(0); - gr_coeff[i_layer][kCoeffT]->ComputeRange(x1, y1, x2, y2); + gr_coeff[i_layer][COEFF_T]->ComputeRange(x1, y1, x2, y2); if(x1 < xmin ) xmin= x1; if(x2 > xmax ) xmax = x2; if(y1 < ymin ) ymin = y1; @@ -255,7 +255,7 @@ void TestSpecularMatrix::draw_roughness_set() // graphics for R,T coefficients in layers as a function of alpha_i size_t ncoeffs = 2; - enum key_coeffs { kCoeffR, kCoeffT}; + enum EKeyCoeffs { COEFF_R, COEFF_T }; const IAxis *p_rough = mp_coeffs->getAxis("roughness"); size_t nroughness = p_rough->getSize(); @@ -284,10 +284,10 @@ void TestSpecularMatrix::draw_roughness_set() // Filling graphics for R,T as a function of alpha_i for(size_t i_layer=0; i_layer<nlayers; ++i_layer ) { - gr_coeff[i_layer][kCoeffR][i_rough]->SetPoint((int)i_alpha, + gr_coeff[i_layer][COEFF_R][i_rough]->SetPoint((int)i_alpha, Units::rad2deg(alpha_i), std::abs(coeffs[i_layer].getScalarR()) ); - gr_coeff[i_layer][kCoeffT][i_rough]->SetPoint((int)i_alpha, + gr_coeff[i_layer][COEFF_T][i_rough]->SetPoint((int)i_alpha, Units::rad2deg(alpha_i), std::abs(coeffs[i_layer].getScalarT()) ); } @@ -308,7 +308,7 @@ void TestSpecularMatrix::draw_roughness_set() if( nlayers+1 > 4 ) ndiv = int(sqrt(nlayers+1)+1); c1->Divide(ndiv,ndiv); - int i_coeff_sel = kCoeffR; + int i_coeff_sel = COEFF_R; for(size_t i_layer=0; i_layer<nlayers; i_layer++) { c1->cd((int)i_layer+1); gPad->SetLogy(); diff --git a/Core/Algorithms/inc/ISimulation.h b/Core/Algorithms/inc/ISimulation.h index 3da67ef47994ba324185d2547f1149f22e7ccdcb..0a47909ac860c1f518ac0d0400dfa4072ab74d2e 100644 --- a/Core/Algorithms/inc/ISimulation.h +++ b/Core/Algorithms/inc/ISimulation.h @@ -25,8 +25,8 @@ class BA_CORE_API_ ISimulation : public ICloneable { public: - ISimulation() : m_status(Idle) {} - enum SimulationStatus {Idle, Running, Completed, Failed}; + ISimulation() : m_status(IDLE) {} + enum ESimulationStatus { IDLE, RUNNING, COMPLETED, FAILED }; virtual ~ISimulation() {} ISimulation *clone() const @@ -36,16 +36,16 @@ public: } virtual void run() {} - bool isCompleted() const { return m_status == Completed;} + bool isCompleted() const { return m_status == COMPLETED;} std::string getRunMessage() const { return m_run_message; } protected: virtual void runProtected() {} - void setStatus(SimulationStatus status) { m_status = status; } + void setStatus(ESimulationStatus status) { m_status = status; } void setRunMessage(const std::string &message) { m_run_message = message; } - SimulationStatus m_status; + ESimulationStatus m_status; std::string m_run_message; }; diff --git a/Core/Algorithms/src/DecoratedLayerDWBASimulation.cpp b/Core/Algorithms/src/DecoratedLayerDWBASimulation.cpp index 7d428a11bfdebb81a53dcccf3794fb286041f30c..55aa91f2653290d64a55b095b81b34673b764150 100644 --- a/Core/Algorithms/src/DecoratedLayerDWBASimulation.cpp +++ b/Core/Algorithms/src/DecoratedLayerDWBASimulation.cpp @@ -45,14 +45,14 @@ void DecoratedLayerDWBASimulation::init(const Simulation& simulation) void DecoratedLayerDWBASimulation::run() { - setStatus(Running); + setStatus(RUNNING); try { runProtected(); - setStatus(Completed); + setStatus(COMPLETED); } catch(const std::exception &ex) { setRunMessage(std::string(ex.what())); - setStatus(Failed); + setStatus(FAILED); } } diff --git a/Core/Algorithms/src/DiffuseDWBASimulation.cpp b/Core/Algorithms/src/DiffuseDWBASimulation.cpp index 2e076388ae9d76fd184f53f8a0b12fce4960f6df..69917f546b8e23549f1115c2b2b25d18437c5627 100644 --- a/Core/Algorithms/src/DiffuseDWBASimulation.cpp +++ b/Core/Algorithms/src/DiffuseDWBASimulation.cpp @@ -25,14 +25,14 @@ void DiffuseDWBASimulation::run() { - setStatus(Running); + setStatus(RUNNING); try { runProtected(); - setStatus(Completed); + setStatus(COMPLETED); } catch(const std::exception &ex) { setRunMessage(std::string(ex.what())); - setStatus(Failed); + setStatus(FAILED); } } diff --git a/Core/Algorithms/src/MultiLayerDWBASimulation.cpp b/Core/Algorithms/src/MultiLayerDWBASimulation.cpp index 5a13c164bb8944fa6819d94e690022c79144d792..b360e4ecf23ed3682f6ba425dc00b40e73bf66f0 100644 --- a/Core/Algorithms/src/MultiLayerDWBASimulation.cpp +++ b/Core/Algorithms/src/MultiLayerDWBASimulation.cpp @@ -91,14 +91,14 @@ void MultiLayerDWBASimulation::setThreadInfo(const ThreadInfo& thread_info) void MultiLayerDWBASimulation::run() { - setStatus(Running); + setStatus(RUNNING); try { runProtected(); - setStatus(Completed); + setStatus(COMPLETED); } catch(const std::exception &ex) { setRunMessage(std::string(ex.what())); - setStatus(Failed); + setStatus(FAILED); } } diff --git a/Core/Algorithms/src/MultiLayerRoughnessDWBASimulation.cpp b/Core/Algorithms/src/MultiLayerRoughnessDWBASimulation.cpp index dfb136839aef61a1f70e27974036f29084afe422..0f11471d5dd8441ed69339e66fbead3f4538ef17 100644 --- a/Core/Algorithms/src/MultiLayerRoughnessDWBASimulation.cpp +++ b/Core/Algorithms/src/MultiLayerRoughnessDWBASimulation.cpp @@ -37,14 +37,14 @@ MultiLayerRoughnessDWBASimulation::~MultiLayerRoughnessDWBASimulation() void MultiLayerRoughnessDWBASimulation::run() { - setStatus(Running); + setStatus(RUNNING); try { runProtected(); - setStatus(Completed); + setStatus(COMPLETED); } catch(const std::exception &ex) { setRunMessage(std::string(ex.what())); - setStatus(Failed); + setStatus(FAILED); } }