CFEL - ASG Software Suite  2.5.0
CASS
frame_processor_base.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file frame_processor_base.h contains base class for all frame processors.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _FRAMEPROCESSORBASE_H_
10 #define _FRAMEPROCESSORBASE_H_
11 
12 #include <tr1/memory>
13 #include <vector>
14 
15 namespace cass
16 {
17 class CASSSettings;
18 
19 namespace pixeldetector
20 {
21 //forward declaration//
22 struct Frame;
23 
24 /** base class for all frame processors
25  *
26  * a frame processor will process the pixels of a frame. For a list of possible
27  * processors see description of pixeldetector::AdvancedDetector.
28  *
29  * @author Lutz Foucar
30  */
32 {
33 public:
34  /** typedef the shared pointer of this */
35  typedef std::tr1::shared_ptr<FrameProcessorBase> shared_pointer;
36 
37  /** virtual destructor */
38  virtual ~FrameProcessorBase() {}
39 
40  /** create an instance of the requested functor
41  *
42  * @return a shared pointer to the requested type
43  * @param type the reqested type
44  */
45  static shared_pointer instance(const std::string &type);
46 
47  /** process the frame
48  *
49  * take the input frame, process it and then return a reference to it
50  *
51  * @return reference to the processed frame
52  * @param frame the frame that should be processed
53  */
54  virtual Frame& operator() (Frame &frame)=0;
55 
56  /** load the settings of this processor
57  *
58  * @param s the CASSSettings object to read the information from
59  */
60  virtual void loadSettings(CASSSettings &s)=0;
61 };
62 
63 } //end namespace pixeldetector
64 } //end namespace cass
65 #endif
Settings for CASS.
Definition: cass_settings.h:30
virtual void loadSettings(CASSSettings &s)=0
load the settings of this processor
base class for all frame processors
std::tr1::shared_ptr< FrameProcessorBase > shared_pointer
typedef the shared pointer of this
virtual Frame & operator()(Frame &frame)=0
process the frame
virtual ~FrameProcessorBase()
virtual destructor
A Frame of an advance Pixel Detector.
static shared_pointer instance(const std::string &type)
create an instance of the requested functor