Mantid
Loading...
Searching...
No Matches
GetTimeSeriesLogInformation.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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 "MantidAlgorithms/DllConfig.h"
16
17namespace Mantid {
18namespace Algorithms {
19
25class MANTID_ALGORITHMS_DLL GetTimeSeriesLogInformation final : public API::Algorithm, public API::DeprecatedAlgorithm {
26public:
28
29 const std::string name() const override { return "GetTimeSeriesLogInformation"; }
31 const std::string summary() const override { return "Get information from a TimeSeriesProperty log."; }
32
33 int version() const override { return 1; }
34 const std::vector<std::string> seeAlso() const override { return {"AddSampleLogMultiple"}; }
35 const std::string category() const override { return "Diffraction\\Utility;Events\\EventFiltering"; }
36
37private:
39
40 Types::Core::DateAndTime mRunStartTime;
41 Types::Core::DateAndTime mFilterT0;
42 Types::Core::DateAndTime mFilterTf;
43
44 std::map<std::string, std::size_t> m_intInfoMap;
45 std::map<std::string, double> m_dblInfoMap;
46
48 std::vector<Types::Core::DateAndTime> m_timeVec;
49 std::vector<double> m_valueVec;
50
51 Types::Core::DateAndTime m_starttime;
52 Types::Core::DateAndTime m_endtime;
53
55
56 void init() override;
57
58 void exec() override;
59
60 void examLog(std::string logname, std::string outputdir);
61
63
64 void processTimeRange();
65
67 DataObjects::Workspace2D_sptr calDistributions(std::vector<Types::Core::DateAndTime> timevec, double stepsize);
68
69 void exportLog(API::MatrixWorkspace_sptr ws, std::vector<Types::Core::DateAndTime> abstimevec, double dts);
70
71 void setupEventWorkspace(int numentries, std::vector<Types::Core::DateAndTime> &times, std::vector<double> values);
72
73 void setupWorkspace2D(int numentries, std::vector<Types::Core::DateAndTime> &times, std::vector<double> values);
74
76
77 void exportErrorLog(const API::MatrixWorkspace_sptr &ws, const std::vector<Types::Core::DateAndTime> &abstimevec,
78 double dts);
79
80 void checkLogValueChanging(const std::vector<Types::Core::DateAndTime> &timevec, const std::vector<double> &values,
81 double delta);
82
83 void checkLogBasicInforamtion();
84
86 DataObjects::TableWorkspace_sptr generateStatisticTable();
87
88 Types::Core::DateAndTime getAbsoluteTime(double abstimens);
89
90 Types::Core::DateAndTime calculateRelativeTime(double deltatime);
91};
92
93} // namespace Algorithms
94} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Class for marking algorithms as deprecated.
GetTimeSeriesLogInformation : Read a TimeSeries log and return some information required by users.
const std::string summary() const override
Summary of algorithms purpose.
std::vector< Types::Core::DateAndTime > m_timeVec
void setupEventWorkspace(int numentries, std::vector< Types::Core::DateAndTime > &times, std::vector< double > values)
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
void examLog(std::string logname, std::string outputdir)
void setupWorkspace2D(int numentries, std::vector< Types::Core::DateAndTime > &times, std::vector< double > values)
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
const std::string category() const override
function to return a category of the algorithm.
void exportLog(API::MatrixWorkspace_sptr ws, std::vector< Types::Core::DateAndTime > abstimevec, double dts)
A specialised Property class for holding a series of time-value pairs.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
Helper class which provides the Collimation Length for SANS instruments.