CFEL - ASG Software Suite  2.5.0
CASS
detector_analyzer_backend.h
Go to the documentation of this file.
1 // Copyright (C) 2010 Lutz Foucar
2 
3 /**
4  * @file detector_analyzer_backend.h file contains base class for all detector
5  * analyzers.
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef _DETECTOR_ANALYZER_BACKEND_H_
11 #define _DETECTOR_ANALYZER_BACKEND_H_
12 
13 #include <tr1/memory>
14 
15 #include "delayline_detector.h"
16 
17 namespace cass
18 {
19 class CASSEvent;
20 class CASSSettings;
21 
22 namespace ACQIRIS
23 {
24 //forward declarations//
25 class DetectorBackend;
26 
27 /** Base class for all detector analyzers.
28  *
29  * @todo rename this class, since its just the base class for all (sorters?).
30  *
31  * @author Lutz Foucar
32  */
34 {
35 public:
36  /** typedef this as a shared pointer */
37  typedef std::tr1::shared_ptr<DetectorAnalyzerBackend> shared_pointer;
38 
39  /** virtual destructor */
41 
42  /** retrieve detector hits from signals
43  *
44  * check the combination of signals to whether they belong together, since
45  * the orign from the same detectorhit. Needs to be implemented by the
46  * detectorhit finder (sorters?)
47  *
48  * @return reference to the container containing the found hits
49  * @param[out] hits the container where the found hits will go
50  */
52 
53  /** load the settings of the analyzer
54  *
55  * load the settings from the .ini file. Needs to be implemented by the
56  * detector that inherits from this.
57  *
58  * @param s reference to the CASSSettings object
59  * @param d the detector object that we the analyzer belongs to
60  */
61  virtual void loadSettings(CASSSettings& /*s*/, DelaylineDetector& /*d*/)=0;
62 
63  /** create an instance of the right analyzer type
64  *
65  * this static member will create a instance of the requested type. If the
66  * requested type is unknown an invalid_argument exception will be thrown.
67  *
68  * @return pointer to the instance of the requested type
69  * @param type the requested analyzer type
70  */
71  static shared_pointer instance(const DetectorAnalyzerType& type);
72 };
73 }//end namepace acqiris
74 }//end namespace cass
75 
76 #endif
static shared_pointer instance(const DetectorAnalyzerType &type)
create an instance of the right analyzer type
Settings for CASS.
Definition: cass_settings.h:30
std::vector< detectorHit_t > detectorHits_t
define container for all detector hits
Average out the iShit status to get the avererage hits
virtual detectorHits_t & operator()(detectorHits_t &hits)=0
retrieve detector hits from signals
DetectorAnalyzerType
the available detector analyzers
file contains the classes that describe a delayline detector.
std::tr1::shared_ptr< DetectorAnalyzerBackend > shared_pointer
typedef this as a shared pointer
virtual ~DetectorAnalyzerBackend()
virtual destructor
virtual void loadSettings(CASSSettings &, DelaylineDetector &)=0
load the settings of the analyzer
Base class for all detector analyzers.