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
11#include "MantidAlgorithms/DllConfig.h"
15
16namespace Mantid {
17namespace Algorithms {
18
24class MANTID_ALGORITHMS_DLL GetTimeSeriesLogInformation final : public API::Algorithm {
25public:
27
28 const std::string name() const override { return "GetTimeSeriesLogInformation"; }
30 const std::string summary() const override { return "Get information from a TimeSeriesProperty log."; }
31
32 int version() const override { return 1; }
33 const std::vector<std::string> seeAlso() const override { return {"AddSampleLogMultiple"}; }
34 const std::string category() const override { return "Diffraction\\Utility;Events\\EventFiltering"; }
35
36private:
38
39 Types::Core::DateAndTime mRunStartTime;
40 Types::Core::DateAndTime mFilterT0;
41 Types::Core::DateAndTime mFilterTf;
42
43 std::map<std::string, std::size_t> m_intInfoMap;
44 std::map<std::string, double> m_dblInfoMap;
45
47 std::vector<Types::Core::DateAndTime> m_timeVec;
48 std::vector<double> m_valueVec;
49
50 Types::Core::DateAndTime m_starttime;
51 Types::Core::DateAndTime m_endtime;
52
54
55 void init() override;
56
57 void exec() override;
58
59 void examLog(std::string logname, std::string outputdir);
60
62
63 void processTimeRange();
64
66 DataObjects::Workspace2D_sptr calDistributions(std::vector<Types::Core::DateAndTime> timevec, double stepsize);
67
68 void exportLog(API::MatrixWorkspace_sptr ws, std::vector<Types::Core::DateAndTime> abstimevec, double dts);
69
70 void setupEventWorkspace(int numentries, std::vector<Types::Core::DateAndTime> &times, std::vector<double> values);
71
72 void setupWorkspace2D(int numentries, std::vector<Types::Core::DateAndTime> &times, std::vector<double> values);
73
75
76 void exportErrorLog(const API::MatrixWorkspace_sptr &ws, std::vector<Types::Core::DateAndTime> abstimevec,
77 double dts);
78
79 void checkLogValueChanging(std::vector<Types::Core::DateAndTime> timevec, std::vector<double> values, double delta);
80
81 void checkLogBasicInforamtion();
82
84 DataObjects::TableWorkspace_sptr generateStatisticTable();
85
86 Types::Core::DateAndTime getAbsoluteTime(double abstimens);
87
88 Types::Core::DateAndTime calculateRelativeTime(double deltatime);
89};
90
91} // namespace Algorithms
92} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
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.