Skip to content
Snippets Groups Projects
Commit f43c9687 authored by pospelov's avatar pospelov
Browse files

code cleanup, standard headers in include files

parent be9c374a
No related branches found
No related tags found
No related merge requests found
Showing
with 231 additions and 43 deletions
#ifndef APP_H
#define APP_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file App.h
//! @brief Common include for files involved into ROOT dictionary generation
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#include "DrawHelper.h"
......
#ifdef __CINT__
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file AppLinkDef.h
//! @brief Steering file for ROOT dictionary generation
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#pragma link off all globals;
#pragma link off all classes;
......
#ifndef DRAWHELPER_H
#define DRAWHELPER_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file DrawHelper.h
//! @brief Helper class definition for sophisticated data drawing
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#include "TObject.h"
......
/*
* TestDWBAFormFactor.h
*
* Created on: May 2, 2012
* Author: herck
*/
#ifndef TESTDWBAFORMFACTOR_H_
#define TESTDWBAFORMFACTOR_H_
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file TestDWBAFormFactor.h
//! @brief Definition of TestDWBAFormFactor class for formfactor validation
//! @author herk
//! @date 02.05.2012
#include "IAlgorithm.h"
#include "OutputData.h"
......
......@@ -11,7 +11,7 @@
// ********************************************************************
//! @file TestDiffuseScattering.h
//! @brief Test of diffusse (incoherent) scattering from rough multilayer in DWBA.
//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de>
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#include "IAlgorithm.h"
......
#ifndef TESTFORMFACTOR_H
#define TESTFORMFACTOR_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file TestFormFactor.h
//! @brief Definition of TestFormFactor class for formfactor validation
//! @author herk
//! @date 02.05.2012
#include "IAlgorithm.h"
#include "OutputData.h"
#include "FormFactorCylinder.h"
class TestFormFactor : public IAlgorithm
{
public:
......
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file TestFresnelCoeff.h
//! @brief Definition of TestFresnelCoeff class for tests of Fresnel coeffs
//! @author Scientific Computing Group at FRM II
//! @date 02.05.2012
#ifndef TESTFRESNELCOEFF_H
#define TESTFRESNELCOEFF_H
......
#ifndef TESTROUGHNESS_H
#define TESTROUGHNESS_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file TestRoughness.h
//! @brief Tests of roughness
//! @author Scientific Computing Group at FRM II
//! @date 02.05.2012
#include <vector>
#include "IAlgorithm.h"
#include "LayerRoughness.h"
......
......@@ -177,12 +177,8 @@ void DrawHelper::SaveReport()
// canvas->Print(sfilename.c_str()); // simple method if file page and all canvases have same aspect ratio
// user canvas will be redrawn in TPad with preserving initial apsect ratio
std::cout << c1->GetName() << c1->GetX1() << c1->GetY1() << c1->GetX2() << c1->GetY2() << std::endl;
std::cout << c1->GetName() << " " << c1->GetWindowWidth() << " " << c1->GetWindowHeight() << std::endl;
// first we need appropriate TPad in our master canvas
// preserving aspect ratio of user's canvas
// first we need appropriate TPad in our master canvas which has same aspect ratio as user canvas
double xlow(0), ylow(0), xup(1), yup(1);
if( c1->GetWindowWidth() >= c1->GetWindowHeight() ) {
double npx_user_new = npx_master;
......@@ -201,15 +197,14 @@ void DrawHelper::SaveReport()
}
TPad *pad = new TPad("tmppad", "tmppad", xlow, ylow, xup, yup);
// draw pad in master canvas, draw user canvas in the pad and save whole thing in file
cmaster->cd();
pad->Draw();
pad->cd();
c1->DrawClonePad();
cmaster->Print(sfilename.c_str());
}
stmpname = sfilename + "]";
cmaster->Print(stmpname.c_str()); // close file
}
......
#include <iostream>
#include <string>
#include "TestFresnelCoeff.h"
#include "TestDiffuseScattering.h"
#include "TestFormFactor.h"
......@@ -7,8 +5,11 @@
#include "TestRoughness.h"
#include "DrawHelper.h"
#include <iostream>
#include <string>
#include "TApplication.h"
bool exists(int argc, char **argv, const std::string &stext);
int main(int argc, char **argv)
......@@ -42,11 +43,13 @@ int main(int argc, char **argv)
test.execute();
}
// user algorithm to test DWBA formfactors
if( exists(argc, argv, "dwba") ) {
TestDWBAFormFactor test;
test.execute();
}
// utility which saves user plots in multi-page pdf file
if( exists(argc, argv, "report") ) {
DrawHelper::SaveReport();
}
......
#ifndef CALCULATOROPTICAL_H
#define CALCULATOROPTICAL_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file CalculatorOptical.h
//! @brief Defenition of base class for optical calculations
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
class CalculatorOptical
{
......
/*
* DWBAFormFactor.h
*
* Created on: Apr 26, 2012
* Author: herck
*/
#ifndef DWBAFORMFACTOR_H_
#define DWBAFORMFACTOR_H_
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file DWBAFormFactor.h
//! @brief Definition of DWBAFormFactor
//! @author herck
//! @date 01.05.2012
#include "IFormFactor.h"
#include "IDoubleToComplexFunction.h"
class DWBAFormFactor: public IFormFactor
{
public:
......
#ifndef DISPERSEDPARTICLEDECORATOR_H
#define DISPERSEDPARTICLEDECORATOR_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file DispersedParticleDecorator.h
//! @brief Defenition of DispersedParticleDecorator
//! @author Scientific Computing Group at FRM II
//! @date 01.05.2012
#include "ISample.h"
class DispersedParticleDecorator : public ISample
{
public:
......
/*
* DoubleToComplexInterpolatingFunction.h
*
* Created on: Apr 27, 2012
* Author: herck
*/
#ifndef DOUBLETOCOMPLEXINTERPOLATINGFUNCTION_H_
#define DOUBLETOCOMPLEXINTERPOLATINGFUNCTION_H_
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file DoubleToComplexInterpolatingFunction.h
//! @brief Definition of something really cool ane necessary
//! @author herck
//! @date 01.05.2012
#include "IDoubleToComplexFunction.h"
#include <map>
class DoubleToComplexInterpolatingFunction : public IDoubleToComplexFunction
{
public:
......
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file Exceptions.h
//! @brief Definition of Exceptions
//! @author Scientific Computing Group at FRM II
//! @date 01.05.2012
#include <stdexcept>
#include <string>
class NotImplementedException : public std::logic_error
{
public:
......
#ifndef FORMFACTORCYLINDER_H
#define FORMFACTORCYLINDER_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file FormFactorCylinder.h
//! @brief Definition of FormFactorCylinder
//! @author Scientific Computing Group at FRM II
//! @date 01.05.2012
#include "IFormFactor.h"
#include "IStochasticParameter.h"
class FormFactorCylinder : public IBornFormFactor
{
public:
......
......@@ -11,7 +11,7 @@
// ********************************************************************
//! @file HomogeneousMaterial.h
//! @brief Definition of HomogeneousMaterial class
//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de>
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#include "IMaterial.h"
......
#ifndef IALGORITHM_H
#define IALGORITHM_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file IAlgorithm.h
//! @brief Definition of IAlgorithm
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
class IAlgorithm
{
......
/*
* IDoubleToComplexFunction.h
*
* Created on: Apr 27, 2012
* Author: herck
*/
#ifndef IDOUBLETOCOMPLEXFUNCTION_H_
#define IDOUBLETOCOMPLEXFUNCTION_H_
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file IDoubleToComplexFunction.h
//! @brief Definition of HomogeneousMaterial class
//! @author herck
//! @date 27.04.2012
#include "Types.h"
class IDoubleToComplexFunction {
class IDoubleToComplexFunction
{
public:
virtual ~IDoubleToComplexFunction() {}
virtual complex_t evaluate(double value)=0;
};
class DoubleToComplexFunctionWrapper : public IDoubleToComplexFunction
{
public:
......
#ifndef IFORMFACTOR_H
#define IFORMFACTOR_H
// ********************************************************************
// * The BornAgain project *
// * Simulation of neutron and x-ray scattering at grazing incidence *
// * *
// * LICENSE AND DISCLAIMER *
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris *
// * eget quam orci. Quisque porta varius dui, quis posuere nibh *
// * mollis quis. Mauris commodo rhoncus porttitor. *
// ********************************************************************
//! @file IFormFactor.h
//! @brief Definition of IFormFactor
//! @author Scientific Computing Group at FRM II
//! @date 01.04.2012
#include "Types.h"
class IFormFactor
{
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment