CFEL - ASG Software Suite  2.5.0
CASS
frame_processor_base.cpp
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file frame_processor_base.cpp contains base class for all frame processors
5  *
6  * @author Lutz Foucar
7  */
8 
9 #include <stdexcept>
10 
11 #include "frame_processor_base.h"
12 
13 #include "hll_frame_processor.h"
14 
15 
16 using namespace cass;
17 using namespace pixeldetector;
18 using namespace std;
19 using namespace std::tr1;
20 
21 namespace cass
22 {
23 namespace pixeldetector
24 {
25 /** Class with no processing
26  *
27  * this functor will just return the frame and leave it unprocessed
28  *
29  * @author Lutz Foucar
30  */
32 {
33 public:
34  /** just returns the frame */
35  Frame& operator ()(Frame& frame) {return frame;}
36 
37  /** no settings to be loaded */
39 };
40 }
41 }
42 
44 {
45  shared_pointer ptr;
46  if (type == "none")
47  ptr = shared_pointer(new NoProcess());
48  else if (type == "hll")
49  ptr = shared_pointer(new HLLProcessor());
50  else
51  throw invalid_argument("FrameProcessorBase::instance: Frame processor type '"+
52  type + "' is unknown.");
53  return ptr;
54 }
Class with no processing.
contains hll correctionlike frame processor.
contains base class for all frame processors.
Settings for CASS.
Definition: cass_settings.h:30
STL namespace.
base class for all frame processors
std::tr1::shared_ptr< FrameProcessorBase > shared_pointer
typedef the shared pointer of this
HLL like frame processing.
A Frame of an advance Pixel Detector.
void loadSettings(CASSSettings &)
no settings to be loaded
static shared_pointer instance(const std::string &type)
create an instance of the requested functor