12#include "MantidAlgorithms/DllConfig.h"
22class TimeAtSampleStrategy;
39 const std::string
name()
const override {
return "FilterEvents"; }
41 const std::string
summary()
const override {
42 return "Filter events from an EventWorkspace to one or multiple "
43 "EventWorkspaces according to a series of splitters.";
47 int version()
const override {
return 1; }
48 const std::vector<std::string>
seeAlso()
const override {
49 return {
"GenerateEventsFilter",
"FilterByTime",
"FilterByLogValue"};
53 const std::string
category()
const override {
return "Events\\EventFiltering"; }
54 std::map<std::string, std::string> validateInputs()
override;
63 void processAlgorithmProperties();
66 void processSplittersWorkspace();
68 void processTableSplittersWorkspace();
71 void processMatrixSplitterWorkspace();
76 void createOutputWorkspacesSplitters();
78 void createOutputWorkspacesTableSplitterCase();
81 void createOutputWorkspacesMatrixCase();
84 void setupDetectorTOFCalibration();
98 void setupCustomizedTOFCorrection();
101 void filterEventsBySplitters(
double progressamount);
104 void filterEventsByVectorSplitters(
double progressamount);
107 void examineAndSortEventWS();
111 void convertSplittersWorkspaceToVectors();
120 std::vector<std::string> getTimeSeriesLogNames();
134 template <
typename TYPE>
136 std::vector<Types::Core::DateAndTime> &split_datetime_vec,
const int max_target_index);
138 void groupOutputWorkspace();
Base class from which all concrete algorithm classes should be derived.
FilterEvents : Filter Events in EventWorkspace to multiple EventsWorkspace by Splitters.
std::vector< std::string > m_wsNames
bool m_isSplittersRelativeTime
DataObjects::SplittersWorkspace_sptr m_splittersWorkspace
std::vector< double > m_detTofOffsets
Kernel::TimeSplitterType m_splitters
std::vector< bool > m_vecSkip
Vector for skip information.
std::map< int, std::string > m_wsGroupIndexTargetMap
std::vector< double > m_detTofFactors
bool m_useArbTableSplitters
Types::Core::DateAndTime m_filterStartTime
bool m_toGroupWS
Flag to group workspace.
bool m_useDBSpectrum
Debug.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::set< int > m_targetWorkspaceIndexSet
std::map< int, DataObjects::EventWorkspace_sptr > m_outputWorkspacesMap
std::map< std::string, int > m_targetIndexMap
TableWorkspace splitters: from target map to vector workspace group-index These 2 maps are compliment...
std::shared_ptr< DataObjects::EventWorkspace > createEventWorkspaceNoLog()
create event workspace
std::map< int, uint32_t > m_yIndexMap
MatrixWorkspace splitters:
std::vector< int > m_vecSplitterGroup
Vector for splitting group.
std::string m_outputWSNameBase
Base of output workspace's name.
EVENTFILTERSKIP m_specSkipType
Spectrum skip type.
API::MatrixWorkspace_const_sptr m_matrixSplitterWS
std::vector< int64_t > m_vecSplitterTime
Vector for splitting time FIXME - shall we convert this to DateAndTime???.
std::map< uint32_t, int > m_wsGroupdYMap
DataObjects::TableWorkspace_sptr m_informationWS
TOFCorrectionType m_tofCorrType
TOF detector/sample correction type.
Types::Core::DateAndTime m_runStartTime
DataObjects::TableWorkspace_sptr m_detCorrectWorkspace
DataObjects::EventWorkspace_sptr m_eventWS
const std::string summary() const override
Summary of algorithms purpose.
bool m_useSplittersWorkspace
Flag to use matrix splitters or table splitters.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
bool m_splitSampleLogs
Flag to split sample logs.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
DataObjects::TableWorkspace_sptr m_splitterTableWorkspace
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
TimeAtSampleStrategy : Strategy (technique dependent) for determining Time At Sample.
A specialised Property class for holding a series of time-value pairs.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< SplittersWorkspace > SplittersWorkspace_sptr
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
std::vector< SplittingInterval > TimeSplitterType
A typedef for splitting events according their pulse time.
Helper class which provides the Collimation Length for SANS instruments.