28 class isInTimeRange : std::unary_function<SignalProducer::signal_t,bool>
38 return (sig[
time] >_range.first && sig[
time] <= _range.second);
51 (static_cast<SignalExtractorType>(s.
value(
"SignalExtractionMethod",
com16).toInt()));
53 _signalextractor->loadSettings(s);
54 _range = make_pair(s.
value(
"GoodRangeLow",0).toDouble(),
55 s.
value(
"GoodRangeHigh",0).toDouble());
60 bool newEventAssociated (_newEventAssociated);
61 _newEventAssociated =
false;
62 return (newEventAssociated)? (*_signalextractor)(_signals):_signals;
67 _newEventAssociated =
true;
68 _goodHitExtracted =
false;
71 _signalextractor->associate(evt);
76 if(!_goodHitExtracted)
78 _goodHitExtracted =
true;
80 signals_t::iterator sigIt(find_if(sigs.begin(),sigs.end(),
isInTimeRange(range)));
81 _goodHit = (sigIt != sigs.end())? (*sigIt)[
time] : 0;
88 if(!_goodHitExtracted)
90 _goodHitExtracted =
true;
92 signals_t::iterator sigIt(find_if(sigs.begin(),sigs.end(),
isInTimeRange(_range)));
93 _goodHit = (sigIt != sigs.end())? (*sigIt)[
time] : 0;
Event to store all LCLS Data.
file contains the classes that describe how to analyze the waveform and stores the result...
std::vector< signal_t > signals_t
double firstGood()
returns the time of the first peak in the time range
std::vector< double > signal_t
void loadSettings(CASSSettings &s)
loads the settings.
void associate(const CASSEvent &evt)
assciate the event with this signalproducer
value(const QString &key, const QVariant &defaultValue=QVariant()
isInTimeRange(const std::pair< double, double > &range)
constructor intializing the range
bool operator()(const SignalProducer::signal_t &sig) const
file contains specialized class that do the settings for cass
signals_t & output()
return the signals
SignalExtractorType
the waveformanalyzers that are available
functor returning true if signal is in requested range
std::pair< double, double > _range
the range