CFEL - ASG Software Suite  2.5.0
CASS
signal_extractor.h
Go to the documentation of this file.
1 //Copyright (C) 2010 Lutz Foucar
2 
3 /**
4  * @file signal_extractor.h file file contains base class for all classes that
5  * extract signals from the recorded data
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef _SIGNAL_EXTRACTOR_H_
11 #define _SIGNAL_EXTRACTOR_H_
12 
13 #include <tr1/memory>
14 
15 #include "signal_producer.h"
17 
18 namespace cass
19 {
20 class CASSEvent;
21 class CASSSettings;
22 
23 namespace ACQIRIS
24 {
25 /** Base class for classes that extract Signals from recorded data
26  *
27  * All classes that want to extract signals from the data, should inherit
28  * from this class. This classes operator will be called by the signal
29  * producers, that want to have theier singals extracted from the data.
30  *
31  * @author Lutz Foucar
32  */
34 {
35 public:
36  /** virtual destructor */
37  virtual ~SignalExtractor(){}
38 
39  /** retrieve signals from data
40  *
41  * extract signals form the CASSEvent. Needs to be implemented by the
42  * classes that inerhit from this.
43  *
44  * @return reference of the input result container
45  * @param[in] sig this is the container for the results
46  */
48 
49  /** associate the event with this analyzer
50  *
51  * retrieve all necessary information from the event to be able to later
52  * extract the signals from the data. Needs to be implemented by the class
53  * that implements the extractor method.
54  *
55  * @param evt the event the signals are extracted from
56  */
57  virtual void associate(const CASSEvent& evt)=0;
58 
59  /** load the settings of the extractor
60  *
61  * load the settings form the .ini file. Needs to be implementd by the
62  * class that implements the signal extractor.
63  *
64  * @param s the CASSSettings object to retrieve the information from.
65  */
66  virtual void loadSettings(CASSSettings &s)=0;
67 
68  /** creates an instance of the requested extractor type
69  *
70  * this static member will create an instance of the requested type, which
71  * is a class that inherits from this. If the requested type is unknown,
72  * an invalid_argument exception will be thrown.
73  *
74  * @return shared_ptr to the instance of the requested type
75  * @param type The type of signal extractor that the user requests
76  */
77  static std::tr1::shared_ptr<SignalExtractor> instance(SignalExtractorType type);
78 };
79 }//end namespace acqiris
80 }//end namespace cass
81 
82 
83 #endif
Event to store all LCLS Data.
Definition: cass_event.h:32
file contains the classes that describe how to analyze the waveform and stores the result...
std::vector< signal_t > signals_t
virtual void associate(const CASSEvent &evt)=0
associate the event with this analyzer
Settings for CASS.
Definition: cass_settings.h:30
virtual SignalProducer::signals_t & operator()(SignalProducer::signals_t &sig)=0
retrieve signals from data
virtual void loadSettings(CASSSettings &s)=0
load the settings of the extractor
Base class for classes that extract Signals from recorded data.
static std::tr1::shared_ptr< SignalExtractor > instance(SignalExtractorType type)
creates an instance of the requested extractor type
contains the global definitions for acqiris analysis
virtual ~SignalExtractor()
virtual destructor
SignalExtractorType
the waveformanalyzers that are available