Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/8924_Intrument_file_repo' into develop Conflicts: Code/Mantid/Framework/Kernel/inc/MantidKernel/ChecksumHelper.h Code/Mantid/Framework/Kernel/src/ChecksumHelper.cpp Code/Mantid/Framework/Kernel/test/ChecksumHelperTest.h
- Loading branch information
Showing
14 changed files
with
1,190 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#ifndef MANTID_DATAHANDLING_DOWNLOADINSTRUMENT_H_ | ||
#define MANTID_DATAHANDLING_DOWNLOADINSTRUMENT_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidKernel/ProxyInfo.h" | ||
|
||
#include <map> | ||
|
||
namespace Mantid | ||
{ | ||
|
||
namespace DataHandling | ||
{ | ||
typedef std::map<std::string,std::string> String2StringMap; | ||
|
||
/** DownloadInstrument : Downloads one or more instrument files to the local instrument cache from the instrument repository | ||
Copyright © 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport DownloadInstrument : public API::Algorithm | ||
{ | ||
public: | ||
DownloadInstrument(); | ||
virtual ~DownloadInstrument(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
virtual const std::string category() const; | ||
virtual const std::string summary() const; | ||
|
||
private: | ||
void init(); | ||
void exec(); | ||
virtual int doDownloadFile(const std::string& urlFile, const std::string& localFilePath = "", const String2StringMap& headers = String2StringMap()); | ||
void updateJsonFile(const std::string& directoryPath, const std::string& filePath); | ||
const std::string MangleFileName(const std::string& filename) const; | ||
const std::string getDownloadableRepoUrl(const std::string& filename) const; | ||
|
||
String2StringMap processRepository(); | ||
|
||
bool m_isProxySet; | ||
Mantid::Kernel::ProxyInfo m_proxyInfo; | ||
|
||
}; | ||
|
||
|
||
} // namespace DataHandling | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_DATAHANDLING_DOWNLOADINSTRUMENT_H_ */ |
Oops, something went wrong.