TS++ library: time series library

◆ make_seife_filter()

ts::filter::Tfilterhandle ts::seife::make_seife_filter ( std::string  s,
const bool &  debug 
)

function to generate filter class

create a seife filter

Definition at line 142 of file seifeclass.cc.

References debug_mode_on(), and TSXX_UnknownFilterAbort.

Referenced by ts::filter::make_any_filter().

144  {
145  std::replace(s.begin(),s.end(),',',' ');
146  typedef ts::filter::Tfilterhandle Tfh;
147  TFXX_debug(debug, "make_seife_filter", "definition: " << s);
148  Tfh fh(new ts::filter::Noop());
149  std::string ID;
150  std::istringstream is(s);
151  is >> ID;
152  TFXX_debug(debug, "make_seife_filter", "ID: " << ID);
153  ts::seife::Tvalue t0, t0s, h, hs;
154  int ni, o;
155  if (ID=="lpb") {
156  is >> t0 >> o;
157  fh=Tfh(new LPB(t0, o));
158  } else if (ID=="hpb") {
159  is >> t0 >> o;
160  fh=Tfh(new HPB(t0, o));
161  } else if (ID=="lp2") {
162  is >> t0 >> h;
163  fh=Tfh(new LP2(t0, h));
164  } else if (ID=="hp2") {
165  is >> t0 >> h;
166  fh=Tfh(new HP2(t0, h));
167  } else if (ID=="bp2") {
168  is >> t0 >> h;
169  fh=Tfh(new BP2(t0, h));
170  } else if (ID=="lp1") {
171  is >> t0;
172  fh=Tfh(new LP1(t0));
173  } else if (ID=="hp1") {
174  is >> t0;
175  fh=Tfh(new HP1(t0));
176  } else if (ID=="le1") {
177  is >> t0s >> t0;
178  fh=Tfh(new LE1(t0s, t0));
179  } else if (ID=="he1") {
180  is >> t0s >> t0;
181  fh=Tfh(new HE1(t0s, t0));
182  } else if (ID=="le2") {
183  is >> t0s >> hs >> t0 >> h;
184  fh=Tfh(new LE2(t0s, hs, t0, h));
185  } else if (ID=="he2") {
186  is >> t0s >> hs >> t0 >> h;
187  TFXX_debug(debug, "make_seife_filter",
188  "he2: "
189  << "t0s=" << t0s
190  << "hs=" << hs
191  << "t0=" << t0
192  << "h=" << h);
193  fh=Tfh(new HE2(t0s, hs, t0, h));
194  } else if (ID=="int") {
195  is >> t0;
196  fh=Tfh(new INT(t0));
197  } else if (ID=="dif") {
198  is >> t0;
199  fh=Tfh(new DIF(t0));
200  } else if (ID=="tid") {
201  is >> ni;
202  fh=Tfh(new TID(ni));
203  } else if (ID=="first") {
204  fh=Tfh(new FIRST());
205  } else if (ID=="DBG") {
206  debug_mode_on();
207  } else {
208  TSXX_UnknownFilterAbort("ts::seife::make_seife_filter", ID);
209  }
210  return(fh);
211  }
tfxx::Handle< BasicFilter > Tfilterhandle
handle to pass filters
Definition: filterbase.h:93
void debug_mode_on()
Definition: seifexx.cc:52
double Tvalue
seife functions use double precision
Definition: seifexx.h:58
#define TSXX_UnknownFilterAbort(M, F)
Definition: filterbase.h:153
no-operation filter
Definition: filterbase.h:115
Here is the call graph for this function:
Here is the caller graph for this function: