Skip to content

Commit

Permalink
Refs #8020. Merge remote-tracking branch 'origin/master' into 8020
Browse files Browse the repository at this point in the history
Conflicts:
	Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
  • Loading branch information
arturbekasov committed Feb 18, 2014
2 parents 39b4753 + d2d91f0 commit 65660d3
Show file tree
Hide file tree
Showing 386 changed files with 65,458 additions and 9,398 deletions.
2 changes: 0 additions & 2 deletions Code/Mantid/Build/CMake/CppCheck_Suppressions.txt
Expand Up @@ -3,8 +3,6 @@
//exceptNew:src/file1.cpp

// suppress in all files - BE CAREFULL not to leave trailing spaces after the rule id. or empty lines
// This finds false positives where private member variable names reused by inheriting classes
duplInheritedMember
// For a library this is not a problem per se
unusedFunction
// cppcheck has problems handling the number of pre-processor definitions used in the DLL_EXPORTs
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Build/CMake/FindCppcheck.cmake
Expand Up @@ -61,7 +61,8 @@ if(CPPCHECK_EXECUTABLE)
endif()

mark_as_advanced(CPPCHECK_EXECUTABLE)
set ( CPPCHECK_ARGS --enable=all --inline-suppr CACHE STRING "Arguments for running cppcheck" --suppressions ${CMAKE_CURRENT_SOURCE_DIR}/Build/CMake/CppCheck_Suppressions.txt )
set ( CPPCHECK_ARGS --enable=all --inline-suppr
--suppressions ${CMAKE_CURRENT_SOURCE_DIR}/Build/CMake/CppCheck_Suppressions.txt )
set ( CPPCHECK_NUM_THREADS 0 CACHE STRING "Number of threads to use when running cppcheck" )
set ( CPPCHECK_GENERATE_XML OFF CACHE BOOL "Generate xml output files from cppcheck" )

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/VersionNumber.cmake
@@ -1,7 +1,7 @@
# Set the version number here for MantidVersion and the package filenames

set ( VERSION_MAJOR 3 )
set ( VERSION_MINOR 0 )
set ( VERSION_MINOR 1 )

# UNCOMMENT the next 'set' line to 'force' the patch version number to
# a value (instead of using the count coming out of 'git describe')
Expand Down
@@ -1,9 +1,9 @@
Package: mantid-developer
Version: 1.0
Version: 1.1
Section: main
Priority: optional
Architecture: all
Depends: cmake-qt-gui (>= 2.8.5), build-essential, subversion, libhdf4-dev, libhdf5-serial-dev, libmxml-dev, libgsl0-dev, libopencascade-modeling-dev, libopencascade-foundation-dev, libssl-dev, openssl, libpoco-dev, libpococrypto9-dbg, libpocodata9-dbg, libpocofoundation9-dbg, libpocomysql9-dbg, libpoconet9-dbg, libpoconetssl9-dbg, libpocoodbc9-dbg, libpocosqlite9-dbg, libpocoutil9-dbg, libpocoxml9-dbg, libpocozip9-dbg, python-dev, python-dbg, python-numpy, libmuparser-dev, libnexus0-dev, libqt4-assistant, libqt4-dbus, libqt4-designer, libqt4-dev, libqt4-help, libqt4-network, libqt4-opengl, libqt4-opengl-dev, libqt4-qt3support, libqt4-script, libqt4-scripttools, libqt4-sql, libqt4-sql-mysql, libqt4-svg, libqt4-test, libqt4-webkit, libqt4-xml, libqt4-xmlpatterns, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dbg, python-qt4-dev, qt4-designer, qt4-qmake, python-sip-dbg, python-sip-dev, libqscintilla2-dev, qt4-dev-tools, libboost-signals-dev, libboost-date-time-dev, libboost-regex-dev, libboost-python-dev, git, libgoogle-perftools-dev,texlive-latex-recommended,texlive-latex-extra,texlive-fonts-recommended,dvipng
Depends: cmake-qt-gui (>= 2.8.5), build-essential, subversion, libhdf4-dev, libhdf5-serial-dev, libmxml-dev, ipython (>= 1.1), libgsl0-dev, libopencascade-modeling-dev, libopencascade-foundation-dev, libssl-dev, openssl, libpoco-dev, libpococrypto9-dbg, libpocodata9-dbg, libpocofoundation9-dbg, libpocomysql9-dbg, libpoconet9-dbg, libpoconetssl9-dbg, libpocoodbc9-dbg, libpocosqlite9-dbg, libpocoutil9-dbg, libpocoxml9-dbg, libpocozip9-dbg, python-dev, python-dbg, python-numpy, python-scipy, libmuparser-dev, libnexus0-dev, libqt4-assistant, libqt4-dbus, libqt4-designer, libqt4-dev, libqt4-help, libqt4-network, libqt4-opengl, libqt4-opengl-dev, libqt4-qt3support, libqt4-script, libqt4-scripttools, libqt4-sql, libqt4-sql-mysql, libqt4-svg, libqt4-test, libqt4-webkit, libqt4-xml, libqt4-xmlpatterns, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dbg, python-qt4-dev, qt4-designer, qt4-qmake, python-sip-dbg, python-sip-dev, libqscintilla2-dev, qt4-dev-tools, libboost-signals-dev, libboost-date-time-dev, libboost-regex-dev, libboost-python-dev, git, libgoogle-perftools-dev,texlive-latex-recommended,texlive-latex-extra,texlive-fonts-recommended,dvipng
Installed-Size: 0
Maintainer: Mantid Project
Description: Installs all packages required for a Mantid developer
Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.1
Release: 2%{?dist}
Release: 4%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -18,6 +18,7 @@ Requires: gcc-c++
Requires: gsl-devel
Requires: hdf-devel
Requires: hdf5-devel
Requires: python-ipython >= 1.1
Requires: muParser-devel
Requires: mxml-devel
Requires: nexus >= 4.2
Expand All @@ -33,6 +34,7 @@ Requires: qwt-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -63,6 +65,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Tue May 07 2013 Stuart Campbell <campbellsi@ornl.gov>
- Added dvipng and latex for qt-assistant stuff
- Added software collection dependencies
Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.2
Release: 2%{?dist}
Release: 4%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -27,12 +27,14 @@ Requires: OpenCASCADE-devel
Requires: poco-devel
Requires: PyQt4-devel
Requires: python-devel
Requires: python-ipython
Requires: qscintilla-devel
Requires: qt-devel >= 4.6
Requires: qwt5-qt4-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -62,6 +64,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Tue Aug 20 2013 Peter Peterson <petersonpf@ornl.gov>
- Removed things not necessary for fedora 19.

Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.3
Release: 3%{?dist}
Release: 5%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -27,13 +27,15 @@ Requires: OCE-devel
Requires: poco-devel
Requires: PyQt4-devel
Requires: python-devel
Requires: python-ipython
Requires: python-sphinx
Requires: qscintilla-devel
Requires: qt-devel >= 4.6
Requires: qwt5-qt4-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -63,6 +65,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Fri Dec 20 2013 Stuart Campbell <campbellsi@ornl.gov>
- Added python-sphinx

Expand Down
58 changes: 35 additions & 23 deletions Code/Mantid/Framework/API/inc/MantidAPI/Algorithm.h
Expand Up @@ -9,25 +9,30 @@
#include "MantidKernel/PropertyManagerOwner.h"

// -- These headers will (most-likely) be used by every inheriting algorithm
#include "MantidAPI/AlgorithmFactory.h" //for the factory macro
#include "MantidAPI/Progress.h"
#include "MantidAPI/AlgorithmFactory.h"
#include "MantidAPI/WorkspaceProperty.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidAPI/WorkspaceOpOverloads.h"
#include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/EmptyValues.h"

#include <boost/shared_ptr.hpp>
#include <Poco/ActiveMethod.h>
#include <Poco/NotificationCenter.h>
#include <Poco/Notification.h>
#include <Poco/NObserver.h>
#include <Poco/Void.h>
//----------------------------------------------------------------------
// Forward Declaration
//----------------------------------------------------------------------
namespace boost
{
template <class T> class weak_ptr;
}

#include <string>
#include <vector>
#include <map>
#include <cmath>
namespace Poco
{
template <class R, class A, class O, class S> class ActiveMethod;
template <class O> class ActiveStarter;
class NotificationCenter;
template <class C, class N> class NObserver;
class Void;
}

namespace Mantid
{
Expand Down Expand Up @@ -209,10 +214,10 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
Poco::ActiveResult<bool> executeAsync();

/// Add an observer for a notification
void addObserver(const Poco::AbstractObserver& observer)const;
void addObserver(const Poco::AbstractObserver& observer) const;

/// Remove an observer
void removeObserver(const Poco::AbstractObserver& observer)const;
void removeObserver(const Poco::AbstractObserver& observer) const;

/// Raises the cancel flag.
virtual void cancel();
Expand Down Expand Up @@ -289,19 +294,19 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
void setInitialized();
void setExecuted(bool state);

/// Sends notifications to observers. Observers can subscribe to notificationCenter
/// using Poco::NotificationCenter::addObserver(...);
mutable Poco::NotificationCenter m_notificationCenter;

/** @name Progress Reporting functions */
friend class Progress;
void progress(double p, const std::string& msg = "", double estimatedTime = 0.0, int progressPrecision = 0);
void interruption_point();

/// Return a reference to the algorithm's notification dispatcher
Poco::NotificationCenter & notificationCenter() const;

///Observation slot for child algorithm progress notification messages, these are scaled and then signalled for this algorithm.
void handleChildProgressNotification(const Poco::AutoPtr<ProgressNotification>& pNf);
///Child algorithm progress observer
Poco::NObserver<Algorithm, ProgressNotification> m_progressObserver;
/// Return a reference to the algorithm's object that is reporting progress
const Poco::AbstractObserver & progressObserver() const;

///checks that the value was not set by users, uses the value in empty double/int.
template <typename NumT>
static bool isEmpty(const NumT toCheck);
Expand Down Expand Up @@ -347,12 +352,19 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag

void logAlgorithmInfo() const;


/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, Algorithm> m_executeAsync;
bool executeAsyncImpl(const Poco::Void & i);

// --------------------- Private Members -----------------------------------

/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, Algorithm, Poco::ActiveStarter<Algorithm>> *m_executeAsync;

/// Sends notifications to observers. Observers can subscribe to notificationCenter
/// using Poco::NotificationCenter::addObserver(...);
mutable Poco::NotificationCenter *m_notificationCenter;
///Child algorithm progress observer
mutable Poco::NObserver<Algorithm, ProgressNotification> *m_progressObserver;

bool m_isInitialized; ///< Algorithm has been initialized flag
bool m_isExecuted; ///< Algorithm is executed flag
bool m_isChildAlgorithm; ///< Algorithm is a child algorithm
Expand All @@ -367,7 +379,7 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
std::string m_OptionalMessage; ///< An optional message string to be displayed in the GUI.
std::string m_WikiSummary; ///< A summary line for the wiki page.
std::string m_WikiDescription; ///< Description in the wiki page.
std::vector<IAlgorithm_wptr> m_ChildAlgorithms; ///< A list of weak pointers to any child algorithms created
std::vector<boost::weak_ptr<IAlgorithm>> m_ChildAlgorithms; ///< A list of weak pointers to any child algorithms created


/// Vector of all the workspaces that have been read-locked
Expand Down
11 changes: 9 additions & 2 deletions Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmProxy.h
Expand Up @@ -8,14 +8,20 @@
#include "MantidAPI/IAlgorithm.h"
#include "MantidKernel/PropertyManagerOwner.h"
#include <boost/shared_ptr.hpp>
#include <Poco/ActiveMethod.h>


#ifdef _MSC_VER
#pragma warning( disable: 4250 ) // Disable warning regarding inheritance via dominance, we have no way around it with the design
#endif


//----------------------------------------------------------------------
// Forward Declaration
//----------------------------------------------------------------------
namespace Poco
{
template <class R, class A, class O, class S> class ActiveMethod;
template <class O> class ActiveStarter;
class Void;
}

Expand Down Expand Up @@ -156,7 +162,8 @@ namespace Mantid
void dropWorkspaceReferences();

/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, AlgorithmProxy> _executeAsync;
Poco::ActiveMethod<bool, Poco::Void, AlgorithmProxy,
Poco::ActiveStarter<AlgorithmProxy>> *m_executeAsync;
/// Execute asynchronous implementation
bool executeAsyncImpl(const Poco::Void & dummy);

Expand Down
16 changes: 1 addition & 15 deletions Code/Mantid/Framework/API/inc/MantidAPI/Column.h
Expand Up @@ -135,21 +135,7 @@ class MANTID_API_DLL Column
}

/// Set plot type where
/// None = 0 (means it has specifically been set to 'no plot type')
/// NotSet = -1000 (this is the default and means plot style has not been set)
/// X = 1, Y = 2, Z = 3, xErr = 4, yErr = 5, Label = 6
/// @param t plot type as defined above
void setPlotType(int t)
{
if ( t == -1000 || t == 0 || t == 1 || t == 2 || t == 3 || t == 4 ||
t == 5 || t == 6 )
m_plotType = t;
else
{
g_log.error() << "Cannot set plot of column to " << t
<< " . Ignore this attempt." << std::endl;
}
}
void setPlotType(int t);

/**
* Fills a std vector with values from the column if the types are compatible.
Expand Down
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/ExperimentInfo.h
Expand Up @@ -120,6 +120,8 @@ namespace API
void saveExperimentInfoNexus(::NeXus::File * file) const;
/// Loads an experiment description from the open NeXus file
void loadExperimentInfoNexus(::NeXus::File * file, std::string & parameterStr);
/// Load the instrument from an open NeXus file.
void loadInstrumentInfoNexus(::NeXus::File * file, std::string & parameterStr);
/// Load the sample and log info from an open NeXus file.
void loadSampleAndLogInfoNexus(::NeXus::File * file);
/// Populate the parameter map given a string
Expand Down
5 changes: 1 addition & 4 deletions Code/Mantid/Framework/API/inc/MantidAPI/IAlgorithm.h
Expand Up @@ -6,13 +6,11 @@
//----------------------------------------------------------------------
#include "MantidAPI/DllConfig.h"
#include "MantidKernel/IPropertyManager.h"
#include <Poco/ActiveResult.h>
#include <boost/weak_ptr.hpp>
#include <string>

namespace Poco
{
class AbstractObserver;
template<class T> class ActiveResult;
}

namespace Mantid
Expand Down Expand Up @@ -176,7 +174,6 @@ class MANTID_API_DLL IAlgorithm : virtual public Kernel::IPropertyManager

typedef boost::shared_ptr<IAlgorithm> IAlgorithm_sptr;
typedef boost::shared_ptr<const IAlgorithm> IAlgorithm_const_sptr;
typedef boost::weak_ptr<IAlgorithm> IAlgorithm_wptr;

} // namespace API
} // namespace Mantid
Expand Down
14 changes: 7 additions & 7 deletions Code/Mantid/Framework/API/inc/MantidAPI/ICatalog.h
Expand Up @@ -50,25 +50,25 @@ class DLLExport ICatalog
/// logout from catalog
virtual void logout()=0;
///Search investigations
virtual void search(const ICat::CatalogSearchParam&,ITableWorkspace_sptr&, const int &offset,const int &limit)=0;
virtual void search(const ICat::CatalogSearchParam&,ITableWorkspace_sptr&, const int &,const int &)=0;
/// Obtain the number of results returned by the search method.
virtual int64_t getNumberOfSearchResults(const ICat::CatalogSearchParam&)=0;
/// search logged in users data
virtual void myData(ITableWorkspace_sptr &)=0;
/// get datasets.
virtual void getDataSets(const long long& ,ITableWorkspace_sptr&)=0;
virtual void getDataSets(const std::string& ,ITableWorkspace_sptr&)=0;
/// get datafiles
virtual void getDataFiles(const long long&,ITableWorkspace_sptr &)=0;
virtual void getDataFiles(const std::string&,ITableWorkspace_sptr &)=0;
/// instrument list
virtual void listInstruments(std::vector<std::string>& )=0;
virtual void listInstruments(std::vector<std::string>&)=0;
/// get investigationtype lists
virtual void listInvestigationTypes(std::vector<std::string>&)=0;
/// get file locations
virtual void getFileLocation(const long long&,std::string& )=0;
virtual void getFileLocation(const long long&,std::string&)=0;
/// get URLs of the files
virtual void getDownloadURL(const long long& fileid,std::string&)=0;
virtual void getDownloadURL(const long long&,std::string&)=0;
/// get URL of where to PUT (publish) files.
virtual const std::string getUploadURL(const std::string &, const std::string &)=0;
virtual const std::string getUploadURL(const std::string&,const std::string&,const std::string&)=0;
/// keep alive
virtual void keepAlive()=0;
///keep alive in minutes
Expand Down

0 comments on commit 65660d3

Please sign in to comment.