CFEL - ASG Software Suite  2.5.0
CASS
coalescing_base.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file coalescing_base.h file contains base class for all coalescing functors.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _COALESCINGBASE_H_
10 #define _COALESCINGBASE_H_
11 
12 #include <tr1/memory>
13 #include <vector>
14 
15 #include "pixel_finder_base.h"
16 #include "advanced_pixeldetector.h"
17 
18 namespace cass
19 {
20 class CASSSettings;
21 
22 namespace pixeldetector
23 {
24 //forward declaration//
25 struct Frame;
26 
27 /** base class for all coalescing functors
28  *
29  * coalscing function should coalesce pixels found in an analysis to form hits
30  * on a pixel detector.
31  *
32  * @author Lutz Foucar
33  */
35 {
36 public:
37  /** typedef the shared pointer of this */
38  typedef std::tr1::shared_ptr<CoalescingBase> shared_pointer;
39 
40  /** define the list of coalesced pixels */
41  typedef std::vector<Hit> hits_t;
42 
43  typedef std::vector<Pixel> pixels_t;
44 
45  /** virtual destructor */
46  virtual ~CoalescingBase() {}
47 
48  /** create an instance of the requested functor
49  *
50  * @return a shared pointer to the requested type
51  * @param type the reqested type
52  */
53  static shared_pointer instance(const std::string &type);
54 
55  /** coalesce the pixels
56  *
57  * take the input pixel list and coalesce it to hits on the detector.
58  *
59  * @return reference to the coalesced pixel list
60  * @param frame the frame containing the pixels of interest
61  * @param pixels the list of pixels that should be coalesced
62  * @param hits The list where the pixels that were coalesced to hits go in
63  */
64  virtual hits_t& operator() (const Frame &frame, pixels_t &pixels, hits_t &hits)=0;
65 
66  /** load the settings of this
67  *
68  * @param s the CASSSettings object to read the information from
69  */
70  virtual void loadSettings(CASSSettings &s)=0;
71 };
72 
73 } //end namespace pixeldetector
74 } //end namespace cass
75 #endif
std::vector< Hit > hits_t
define the list of coalesced pixels
Settings for CASS.
Definition: cass_settings.h:30
Average out the iShit status to get the avererage hits
virtual hits_t & operator()(const Frame &frame, pixels_t &pixels, hits_t &hits)=0
coalesce the pixels
std::tr1::shared_ptr< CoalescingBase > shared_pointer
typedef the shared pointer of this
base class for all coalescing functors
contains base class for all pixel finders.
virtual void loadSettings(CASSSettings &s)=0
load the settings of this
A Frame of an advance Pixel Detector.
virtual ~CoalescingBase()
virtual destructor
static shared_pointer instance(const std::string &type)
create an instance of the requested functor
advanced pixeldetectors