Mantid
Loading...
Searching...
No Matches
CatalogPublish.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12#include "MantidICat/DllConfig.h"
13
14namespace Mantid {
15namespace ICat {
32class MANTID_ICAT_DLL CatalogPublish final : public API::Algorithm {
33public:
37 ~CatalogPublish() override = default;
39 const std::string name() const override { return "CatalogPublish"; }
41 const std::string summary() const override {
42 return "Allows the user to publish datafiles or workspaces to the "
43 "information catalog.";
44 }
46 int version() const override { return 1; }
47 const std::vector<std::string> seeAlso() const override { return {"CatalogLogin"}; }
49 const std::string category() const override { return "DataHandling\\Catalog"; }
50
51private:
53 void init() override;
55 void exec() override;
57 void publish(std::istream &fileContents, const std::string &uploadURL);
59 bool checkGroups() override { return false; }
61 bool isDataFile(const std::string &filePath);
63 void saveWorkspaceToNexus(Mantid::API::Workspace_sptr &workspace);
65 void publishWorkspaceHistory(Mantid::API::ICatalogInfoService_sptr &catalogInfoService,
68 const std::string generateWorkspaceHistory(Mantid::API::Workspace_sptr &workspace);
69};
70} // namespace ICat
71} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
CatalogPublish is responsible for publishing user data to the data archive.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
bool checkGroups() override
We want "SaveNexus" to take care of checking groups. Not this algorithm.
~CatalogPublish() override=default
Destructor.
int version() const override
Algorithm's version for identification.
const std::string name() const override
Algorithm's name for identification.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
std::shared_ptr< ICatalogInfoService > ICatalogInfoService_sptr
Helper class which provides the Collimation Length for SANS instruments.