Mantid
Loading...
Searching...
No Matches
LoadCanSAS1D.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
11#include "MantidDataHandling/DllConfig.h"
14
15#include <Poco/DOM/Element.h>
16#include <Poco/DOM/Node.h>
17
18namespace Poco {
19namespace XML {
20class Element;
21}
22} // namespace Poco
23
24namespace Mantid {
25namespace DataHandling {
39class MANTID_DATAHANDLING_DLL LoadCanSAS1D : public API::IFileLoader<Kernel::FileDescriptor> {
40public:
42 const std::string name() const override { return "LoadCanSAS1D"; }
44 const std::string summary() const override { return "Load a file written in the canSAS 1-D data format"; }
45
47 int version() const override { return 1; }
49 const std::string category() const override { return "DataHandling\\XML;SANS\\DataHandling"; }
50
52 int confidence(Kernel::FileDescriptor &descriptor) const override;
53
54protected:
58 std::string m_groupMembersBase;
61 int m_groupNumber = 0;
62
64 void init() override;
66 void exec() override;
67
69 virtual API::MatrixWorkspace_sptr loadEntry(Poco::XML::Node *const workspaceData, std::string &runName);
71 void check(const Poco::XML::Element *const toCheck, const std::string &name) const;
74 void appendDataToOutput(const API::MatrixWorkspace_sptr &newWork, const std::string &newWorkName,
75 const API::WorkspaceGroup_sptr &container);
77 void runLoadInstrument(const std::string &inst_name, const API::MatrixWorkspace_sptr &localWorkspace);
79 void createLogs(const Poco::XML::Element *const sasEntry, const API::MatrixWorkspace_sptr &wSpace) const;
81 void createSampleInformation(const Poco::XML::Element *const sasEntry,
82 const Mantid::API::MatrixWorkspace_sptr &wSpace) const;
83};
84} // namespace DataHandling
85} // namespace Mantid
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Definition: IFileLoader.h:19
This algorithm loads 1 CanSAS1d xml file into a workspace.
Definition: LoadCanSAS1D.h:39
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadCanSAS1D.h:44
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: LoadCanSAS1D.h:42
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: LoadCanSAS1D.h:49
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: LoadCanSAS1D.h:47
std::string m_groupMembersBase
If a workspace group is created this is set from empty to the root name of the members,...
Definition: LoadCanSAS1D.h:58
Defines a wrapper around an open file.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
Definition: Algorithm.h:30