CFEL - ASG Software Suite  2.5.0
CASS
tdc_extractor.h
Go to the documentation of this file.
1 //Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file tdc_extractor.h file contains class that extracts the right hits from
5  * the tdc data
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef _TDC_EXTRACTOR_H_
11 #define _TDC_EXTRACTOR_H_
12 
13 #include <iostream>
14 
15 #include "signal_extractor.h"
16 
17 namespace cass
18 {
19 class CASSSettings;
20 
21 namespace ACQIRISTDC
22 {
23 class Channel;
24 
25 /** Finds Signals in a waveform.
26  *
27  * Analyzes a waveform and find signals using a constant fraction algorithm.
28  * It then does all the further analysis of the identified Signal.
29  *
30  * This class will work on waveforms with a depth of 8 Bits.
31  *
32  * User settable parameters via CASS.ini:\n
33  * One can set these parameters for each SignalProducer of the Detectortype.
34  * Therefore the settings will be for the the following signal producers:
35  * - For MCP in Delayline and TofDetectors its :
36  * - AcqirisDetectors/%detectorname%/MCP
37  * - For Layer Wireends in Delaylinedetectors its:
38  * - AcqirisDetectors/%detectorname%/%Layername%/%Wireendname%
39  *
40  * @cassttng .../TDCExtraction/{TDCInstrument}\n
41  * Acqiris Instrument that this channel is in:
42  * - 0: TDC in SXR-Hutch
43  * @cassttng .../TDCExtraction/{ChannelNumber} \n
44  * Channel within the instrument (starts counting from 0). Default
45  * is 0.
46  * @cassttng .../TDCExtraction/Timeranges/(0,1,...)/{LowerLimit|UpperLimit}\n
47  * set of timeranges. One can set more than one range of interest.
48  * Default is no timerange, which will result in no signal will be
49  * found.
50  *
51  * @author Lutz Foucar
52  */
54 {
55 public:
56  /** extract signals form the CASSEvent
57  *
58  * Calls cfd to extract the Signal from _chan. For details how see cfd.
59  *
60  * @return reference of the input result container
61  * @param[in] sig this is the container for the results
62  */
64 
65  /** associate the event with this extractor
66  *
67  * Extracts a pointer the channel for which we are there for from the
68  * event.
69  *
70  * @param evt The event from which we get the pointer to the channel.
71  */
72  void associate(const CASSEvent& evt);
73 
74  /** load the settings of the extractor
75  *
76  * retrieve the timerange gates that the signals of the detector came in
77  *
78  * @param s the CASSSettings object to retrieve the information from
79  */
81 
82 private:
83  /** the ranges in which the real signals are in */
84  std::vector<std::pair<double,double> > _timeranges;
85 
86  /** the instrument id */
87  uint32_t _instrument;
88 
89  /** the channel number */
91 
92  /** pointer to the channel we are extracting the signals from */
93  const Channel *_chan;
94 };
95 }
96 }
97 #endif
98 
Event to store all LCLS Data.
Definition: cass_event.h:32
std::vector< signal_t > signals_t
void associate(const CASSEvent &evt)
associate the event with this extractor
Settings for CASS.
Definition: cass_settings.h:30
ACQIRIS::SignalProducer::signals_t & operator()(ACQIRIS::SignalProducer::signals_t &sig)
extract signals form the CASSEvent
uint32_t _instrument
the instrument id
Definition: tdc_extractor.h:87
Base class for classes that extract Signals from recorded data.
A Channel of an Acqiris TDC Instrument.
size_t _channelNumber
the channel number
Definition: tdc_extractor.h:90
file file contains base class for all classes that extract signals from the recorded data ...
std::vector< std::pair< double, double > > _timeranges
the ranges in which the real signals are in
Definition: tdc_extractor.h:84
void loadSettings(CASSSettings &)
load the settings of the extractor
Finds Signals in a waveform.
Definition: tdc_extractor.h:53
const Channel * _chan
pointer to the channel we are extracting the signals from
Definition: tdc_extractor.h:93