CFEL - ASG Software Suite  2.5.0
CASS
signal_extractor.cpp
Go to the documentation of this file.
1 //Copyright (C) 2010 Lutz Foucar
2 
3 /**
4  * @file signal_extractor.cpp file contains base class for all classes that
5  * extract signals from the recorded data
6  *
7  * @author Lutz Foucar
8  */
9 
10 #include <stdexcept>
11 #include <sstream>
12 
13 #include "signal_extractor.h"
14 #include "cfd.h"
15 #include "com.h"
16 #include "tdc_extractor.h"
17 
18 using namespace cass::ACQIRIS;
19 using namespace std;
20 using namespace std::tr1;
21 std::tr1::shared_ptr<SignalExtractor> cass::ACQIRIS::SignalExtractor::instance(SignalExtractorType type)
22 {
23  std::tr1::shared_ptr<SignalExtractor> sigextr;
24  switch(type)
25  {
26  case com8:
27  sigextr = std::tr1::shared_ptr<SignalExtractor>(new CoM8Bit());
28  break;
29  case com16:
30  sigextr = std::tr1::shared_ptr<SignalExtractor>(new CoM16Bit());
31  break;
32  case cfd8:
33  sigextr = std::tr1::shared_ptr<SignalExtractor>(new CFD8Bit());
34  break;
35  case cfd16:
36  sigextr = std::tr1::shared_ptr<SignalExtractor>(new CFD16Bit());
37  break;
38  case tdcextractor:
39  sigextr = std::tr1::shared_ptr<SignalExtractor>(new ACQIRISTDC::TDCExtractor());
40  break;
41  default:
42  throw invalid_argument("SignalExtractor::instance: SignalExtractor type '" +
43  toString(type) + "'not available");
44  break;
45  }
46  return sigextr;
47 }
file contains class that extracts the right hits from the tdc data
Finds signals in a 16 bit waveform.
Definition: com.h:138
STL namespace.
file contains declaration of class that does a center of mass analysis of a waveform ...
Finds Signals in a waveform.
Definition: com.h:87
Finds Signals in a waveform.
Definition: cfd.h:94
static std::tr1::shared_ptr< SignalExtractor > instance(SignalExtractorType type)
creates an instance of the requested extractor type
std::string toString(const Type &t)
convert any type to a string
Definition: cass.h:63
file file contains base class for all classes that extract signals from the recorded data ...
Finds signals in a 16 bit waveform.
Definition: cfd.h:146
SignalExtractorType
the waveformanalyzers that are available
Finds Signals in a waveform.
Definition: tdc_extractor.h:53
file contains declaration of class that does a constant fraction descrimination like analysis of a wa...