Skip to content

Commit

Permalink
Merge branch 'master' into 11188_paalman_pings_flat_plate
Browse files Browse the repository at this point in the history
Refs #11188
  • Loading branch information
DanNixon committed Mar 6, 2015
2 parents 0022145 + c839cfb commit 02ae940
Show file tree
Hide file tree
Showing 1,042 changed files with 42,116 additions and 7,151 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Build/CMake/PylintSetup.cmake
Expand Up @@ -32,10 +32,12 @@ if ( PYLINT_FOUND )
set ( PYLINT_INCLUDES
Framework/PythonInterface/plugins
scripts
Testing/SystemTests/tests/analysis
)
set ( PYLINT_EXCLUDES
scripts/lib1to2
scripts/test
Testing/SystemTests/tests/analysis/reference
)
add_custom_target ( pylintcheck
COMMAND ${PYTHON_EXECUTABLE} ${PYLINT_RUNNER_SCRIPT} --format=${PYLINT_OUTPUT_FORMAT}
Expand Down
7 changes: 2 additions & 5 deletions Code/Mantid/Build/Jenkins/buildscript
Expand Up @@ -10,6 +10,8 @@
# slave.
###############################################################################
SCRIPT_DIR=$(dirname "$0")
# Package by default
BUILDPKG=true

###############################################################################
# Print out the versions of things we are using
Expand Down Expand Up @@ -88,7 +90,6 @@ fi
###############################################################################
if [[ ${JOB_NAME} == *clean* ]]; then
CLEANBUILD=true
BUILDPKG=true
fi

if [[ -e $WORKSPACE/build/CMakeCache.txt ]]; then
Expand All @@ -99,10 +100,6 @@ if [[ -e $WORKSPACE/build/CMakeCache.txt ]]; then
fi
fi

if [[ ${JOB_NAME} == *pull_requests* ]]; then
BUILDPKG=true
fi

###############################################################################
# Packaging options
###############################################################################
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Build/Jenkins/systemtests
Expand Up @@ -17,11 +17,11 @@ echo "SHA1=${sha1}"
###############################################################################
# Set up the location for the local object store outside of the build and
# source tree, which can be shared by multiple builds.
# It defaults to the parent directory of the workspace but can be overridden
# by setting the MANTID_DATA_STORE environment variable.
# It defaults to a MantidExternalData directory within the HOME directory.
# It can be overridden by setting the MANTID_DATA_STORE environment variable.
###############################################################################
if [ -z "$MANTID_DATA_STORE" ]; then
export MANTID_DATA_STORE=$(dirname $WORKSPACE)
export MANTID_DATA_STORE=$HOME/MantidExternalData
fi

###############################################################################
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Build/Jenkins/systemtests.bat
@@ -1,4 +1,4 @@
setlocal enbaleextensions enabledelayedexpansion
setlocal enableextensions enabledelayedexpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: WINDOWS SCRIPT TO DRIVE THE SYSTEM TESTS OF MANTID
::
Expand Down Expand Up @@ -46,8 +46,8 @@ if not EXIST %WORKSPACE%\build\CMakeCache.txt (
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Build step
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"%CMAKE_BIN_DIR%\cmake" --build . -- StandardTestData
"%CMAKE_BIN_DIR%\cmake" --build . -- SystemTestData
msbuild /nologo /nr:false /p:Configuration=Release StandardTestData.vcxproj
msbuild /nologo /nr:false /p:Configuration=Release SystemTestData.vcxproj

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run the tests
Expand Down
18 changes: 18 additions & 0 deletions Code/Mantid/Build/coverity_model.c
@@ -0,0 +1,18 @@
/* Coverity Scan model
*
* This is a modeling file for Coverity Scan. Modeling helps to avoid false
* positives.
*
* - A model file can't import any header files.
* - Therefore only some built-in primitives like int, char and void are
* available but not wchar_t, NULL etc.
* - Modeling doesn't need full structs and typedefs. Rudimentary structs
* and similar types are sufficient.
* - An uninitialized local pointer is not an error. It signifies that the
* variable could be either NULL or have some data.
*
* Coverity Scan doesn't pick up modifications automatically. The model file
* must be uploaded by an admin in the analysis settings of
* http://scan.coverity.com/projects/2832
*/

12 changes: 9 additions & 3 deletions Code/Mantid/Framework/API/CMakeLists.txt
Expand Up @@ -31,6 +31,7 @@ set ( SRC_FILES
src/ExperimentInfo.cpp
src/Expression.cpp
src/FermiChopperModel.cpp
src/FileBackedExperimentInfo.cpp
src/FileFinder.cpp
src/FileLoaderRegistry.cpp
src/FileProperty.cpp
Expand All @@ -39,6 +40,7 @@ set ( SRC_FILES
src/FunctionDomain1D.cpp
src/FunctionDomainMD.cpp
src/FunctionFactory.cpp
src/FunctionParameterDecorator.cpp
src/FunctionProperty.cpp
src/FunctionValues.cpp
src/GridDomain.cpp
Expand Down Expand Up @@ -93,7 +95,7 @@ set ( SRC_FILES
src/ParamFunction.cpp
src/ParameterReference.cpp
src/ParameterTie.cpp
src/PeakFunctionIntegrator.cpp
src/PeakFunctionIntegrator.cpp
src/PeakTransform.cpp
src/PeakTransformHKL.cpp
src/PeakTransformQLab.cpp
Expand Down Expand Up @@ -171,6 +173,7 @@ set ( INC_FILES
inc/MantidAPI/ExperimentInfo.h
inc/MantidAPI/Expression.h
inc/MantidAPI/FermiChopperModel.h
inc/MantidAPI/FileBackedExperimentInfo.h
inc/MantidAPI/FileFinder.h
inc/MantidAPI/FileLoaderRegistry.h
inc/MantidAPI/FileProperty.h
Expand All @@ -180,6 +183,7 @@ set ( INC_FILES
inc/MantidAPI/FunctionDomain1D.h
inc/MantidAPI/FunctionDomainMD.h
inc/MantidAPI/FunctionFactory.h
inc/MantidAPI/FunctionParameterDecorator.h
inc/MantidAPI/FunctionProperty.h
inc/MantidAPI/FunctionValues.h
inc/MantidAPI/GridDomain.h
Expand Down Expand Up @@ -253,7 +257,7 @@ set ( INC_FILES
inc/MantidAPI/ParamFunction.h
inc/MantidAPI/ParameterReference.h
inc/MantidAPI/ParameterTie.h
inc/MantidAPI/PeakFunctionIntegrator.h
inc/MantidAPI/PeakFunctionIntegrator.h
inc/MantidAPI/PeakTransform.h
inc/MantidAPI/PeakTransformFactory.h
inc/MantidAPI/PeakTransformHKL.h
Expand Down Expand Up @@ -311,12 +315,14 @@ set ( TEST_FILES
ExperimentInfoTest.h
ExpressionTest.h
FermiChopperModelTest.h
FileBackedExperimentInfoTest.h
FileFinderTest.h
FilePropertyTest.h
FrameworkManagerTest.h
FuncMinimizerFactoryTest.h
FunctionAttributeTest.h
FunctionDomainTest.h
FunctionParameterDecoratorTest.h
FunctionFactoryTest.h
FunctionPropertyTest.h
FunctionTest.h
Expand Down Expand Up @@ -350,7 +356,7 @@ set ( TEST_FILES
ParamFunctionAttributeHolderTest.h
ParameterReferenceTest.h
ParameterTieTest.h
PeakFunctionIntegratorTest.h
PeakFunctionIntegratorTest.h
PeakTransformHKLTest.h
PeakTransformQLabTest.h
PeakTransformQSampleTest.h
Expand Down
70 changes: 34 additions & 36 deletions Code/Mantid/Framework/API/inc/MantidAPI/ExperimentInfo.h
Expand Up @@ -34,8 +34,6 @@ class ModeratorModel;
* - Run object (sample logs)
* - Sample object (sample info)
*
* @author Janik Zikovsky
* @date 2011-06-20
*/
class MANTID_API_DLL ExperimentInfo {
public:
Expand All @@ -48,94 +46,94 @@ class MANTID_API_DLL ExperimentInfo {
/// Copy everything from the given experiment object
void copyExperimentInfoFrom(const ExperimentInfo *other);
/// Clone us
ExperimentInfo *cloneExperimentInfo() const;
virtual ExperimentInfo *cloneExperimentInfo() const;

/// Returns a string description of the object
const std::string toString() const;
virtual const std::string toString() const;

/// Instrument accessors
void setInstrument(const Geometry::Instrument_const_sptr &instr);
/// Returns the parameterized instrument
Geometry::Instrument_const_sptr getInstrument() const;
virtual Geometry::Instrument_const_sptr getInstrument() const;

/// Returns the set of parameters modifying the base instrument
/// (const-version)
const Geometry::ParameterMap &instrumentParameters() const;
virtual const Geometry::ParameterMap &instrumentParameters() const;
/// Returns a modifiable set of instrument parameters
Geometry::ParameterMap &instrumentParameters();
virtual Geometry::ParameterMap &instrumentParameters();
/// Const version
const Geometry::ParameterMap &constInstrumentParameters() const;
virtual const Geometry::ParameterMap &constInstrumentParameters() const;
// Add parameters to the instrument parameter map
virtual void populateInstrumentParameters();

/// Replaces current parameter map with copy of given map
void replaceInstrumentParameters(const Geometry::ParameterMap &pmap);
virtual void replaceInstrumentParameters(const Geometry::ParameterMap &pmap);
/// exchange contents of current parameter map with contents of other map)
void swapInstrumentParameters(Geometry::ParameterMap &pmap);
virtual void swapInstrumentParameters(Geometry::ParameterMap &pmap);

/// Cache a lookup of grouped detIDs to member IDs
void cacheDetectorGroupings(const det2group_map &mapping);
virtual void cacheDetectorGroupings(const det2group_map &mapping);
/// Returns the detector IDs that make up the group that this ID is part of
const std::vector<detid_t> &getGroupMembers(const detid_t detID) const;
virtual const std::vector<detid_t> &getGroupMembers(const detid_t detID) const;
/// Get a detector or detector group from an ID
Geometry::IDetector_const_sptr getDetectorByID(const detid_t detID) const;
virtual Geometry::IDetector_const_sptr getDetectorByID(const detid_t detID) const;

/// Set an object describing the source properties and take ownership
void setModeratorModel(ModeratorModel *source);
virtual void setModeratorModel(ModeratorModel *source);
/// Returns a reference to the source properties object
ModeratorModel &moderatorModel() const;
virtual ModeratorModel &moderatorModel() const;

/// Set a chopper description specified by index where 0 is closest to the
/// source
void setChopperModel(ChopperModel *chopper, const size_t index = 0);
virtual void setChopperModel(ChopperModel *chopper, const size_t index = 0);
/// Returns a reference to a chopper description
ChopperModel &chopperModel(const size_t index = 0) const;
virtual ChopperModel &chopperModel(const size_t index = 0) const;

/// Sample accessors
const Sample &sample() const;
virtual const Sample &sample() const;
/// Writable version of the sample object
Sample &mutableSample();
virtual Sample &mutableSample();

/// Run details object access
const Run &run() const;
virtual const Run &run() const;
/// Writable version of the run object
Run &mutableRun();
virtual Run &mutableRun();
/// Access a log for this experiment.
Kernel::Property *getLog(const std::string &log) const;
virtual Kernel::Property *getLog(const std::string &log) const;
/// Access a single value from a log for this experiment.
double getLogAsSingleValue(const std::string &log) const;
virtual double getLogAsSingleValue(const std::string &log) const;

/// Utility method to get the run number
int getRunNumber() const;
virtual int getRunNumber() const;
/// Returns the emode for this run
Kernel::DeltaEMode::Type getEMode() const;
virtual Kernel::DeltaEMode::Type getEMode() const;
/// Easy access to the efixed value for this run & detector ID
double getEFixed(const detid_t detID) const;
virtual double getEFixed(const detid_t detID) const;
/// Easy access to the efixed value for this run & optional detector
double getEFixed(const Geometry::IDetector_const_sptr detector =
virtual double getEFixed(const Geometry::IDetector_const_sptr detector =
Geometry::IDetector_const_sptr()) const;
/// Set the efixed value for a given detector ID
void setEFixed(const detid_t detID, const double value);
virtual void setEFixed(const detid_t detID, const double value);

/// Saves this experiment description to the open NeXus file
void saveExperimentInfoNexus(::NeXus::File *file) const;
virtual void saveExperimentInfoNexus(::NeXus::File *file) const;
/// Loads an experiment description from the open NeXus file
void loadExperimentInfoNexus(::NeXus::File *file, std::string &parameterStr);
virtual void loadExperimentInfoNexus(::NeXus::File *file, std::string &parameterStr);
/// Load the instrument from an open NeXus file.
void loadInstrumentInfoNexus(::NeXus::File *file, std::string &parameterStr);
virtual void loadInstrumentInfoNexus(::NeXus::File *file, std::string &parameterStr);
/// Load the sample and log info from an open NeXus file.
void loadSampleAndLogInfoNexus(::NeXus::File *file);
virtual void loadSampleAndLogInfoNexus(::NeXus::File *file);
/// Populate the parameter map given a string
void readParameterMap(const std::string &parameterStr);
virtual void readParameterMap(const std::string &parameterStr);

/// Returns the start date for this experiment (or current time if no info
/// available)
std::string getWorkspaceStartDate() const;
virtual std::string getWorkspaceStartDate() const;

// run/experiment stat time if available, empty otherwise
std::string getAvailableWorkspaceStartDate() const;
virtual std::string getAvailableWorkspaceStartDate() const;
// run end time if available, empty otherwise
std::string getAvailableWorkspaceEndDate() const;
virtual std::string getAvailableWorkspaceEndDate() const;

/// Utility to retrieve the validity dates for the given IDF
static void getValidFromTo(const std::string &IDFfilename,
Expand Down

0 comments on commit 02ae940

Please sign in to comment.