51 const std::string
name()
const override {
return "GenerateEventsFilter"; }
53 const std::string
summary()
const override {
54 return "Generate one or a set of event filters according to time or "
55 "specified log's value.";
59 int version()
const override {
return 1; }
60 const std::vector<std::string>
seeAlso()
const override {
61 return {
"FilterEvents",
"FilterByTime",
"FilterByLogValue"};
64 const std::string
category()
const override {
return "Events\\EventFiltering"; }
73 void processInOutWorkspaces();
75 void processInputTime();
76 void setFilterByTimeOnly();
77 void setFilterByLogValue(
const std::string &logname);
79 void processSingleValueFilter(
double minvalue,
double maxvalue,
bool filterincrease,
bool filterdecrease);
81 void processMultipleValueFilters(
double minvalue,
double valueinterval,
double maxvalue,
bool filterincrease,
84 void makeFilterBySingleValue(
double min,
double max,
double TimeTolerance,
bool centre,
bool filterIncrease,
85 bool filterDecrease, Types::Core::DateAndTime startTime,
86 Types::Core::DateAndTime stopTime,
int wsindex);
89 void makeMultipleFiltersByValues(std::map<size_t, int> indexwsindexmap,
const std::vector<double> &logvalueranges,
90 bool centre,
bool filterIncrease,
bool filterDecrease,
91 Types::Core::DateAndTime startTime, Types::Core::DateAndTime stopTime);
94 void makeMultipleFiltersByValuesParallel(
const std::map<size_t, int> &indexwsindexmap,
95 const std::vector<double> &logvalueranges,
bool centre,
bool filterIncrease,
96 bool filterDecrease, Types::Core::DateAndTime startTime,
97 Types::Core::DateAndTime stopTime);
100 void makeMultipleFiltersByValuesPartialLog(
int istart,
int iend, std::vector<Types::Core::DateAndTime> &vecSplitTime,
101 std::vector<int> &vecSplitGroup, std::map<size_t, int> indexwsindexmap,
102 const std::vector<double> &logvalueranges,
103 const Types::Core::time_duration &tol,
bool filterIncrease,
104 bool filterDecrease, Types::Core::DateAndTime startTime,
105 Types::Core::DateAndTime stopTime);
108 void processIntegerValueFilter(
int minvalue,
int maxvalue,
bool filterIncrease,
bool filterDecrease,
109 Types::Core::DateAndTime runend);
112 size_t searchValue(
const std::vector<double> &sorteddata,
double value);
115 void addNewTimeFilterSplitter(Types::Core::DateAndTime starttime, Types::Core::DateAndTime stoptime,
int wsindex,
116 const std::string &info);
119 Types::Core::DateAndTime makeSplitterInVector(std::vector<Types::Core::DateAndTime> &vecSplitTime,
120 std::vector<int> &vecGroupIndex, Types::Core::DateAndTime start,
121 Types::Core::DateAndTime stop,
int group, int64_t tol_ns,
122 Types::Core::DateAndTime lasttime);
125 void generateSplittersInMatrixWorkspace();
128 void generateSplittersInMatrixWorkspaceParallel();
131 void generateSplittersInSplitterWS();
134 bool identifyLogEntry(
const int &
index,
const Types::Core::DateAndTime &currT,
const bool &lastgood,
135 const double &minvalue,
const double &maxvalue,
const Types::Core::DateAndTime &startT,
136 const Types::Core::DateAndTime &stopT,
const bool &filterIncrease,
const bool &filterDecrease);
139 int determineChangingDirection(
int startindex);
142 Types::Core::DateAndTime findRunEnd();
180 bool m_isReverseLogarithmic =
false;