CFEL - ASG Software Suite  2.5.0
CASS
coalescing_base.cpp
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file coalescing_base.cpp file contains base class for all coalescing functors.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #include <stdexcept>
10 
11 #include "coalescing_base.h"
12 
13 #include "coalesce_simple.h"
14 
15 using namespace cass;
16 using namespace pixeldetector;
17 using namespace std;
18 using namespace std::tr1;
19 
21 {
22  shared_pointer ptr;
23  if (type == "simple")
24  ptr = shared_pointer(new SimpleCoalesce());
25 // else if (type == "lma")
26 // ptr = shared_pointer(new LmaReader());
27  else
28  throw invalid_argument("CoalescingBase::instance: Coalescing function type '" +
29  type +"' is unknown.");
30  return ptr;
31 }
STL namespace.
file contains base class for all coalescing functors.
contains class that does the pixel coalescing in a simple way.
std::tr1::shared_ptr< CoalescingBase > shared_pointer
typedef the shared pointer of this
simple coalescing of pixels
static shared_pointer instance(const std::string &type)
create an instance of the requested functor