Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
LogicProcessor.hpp
Go to the documentation of this file.
1 
5 #ifndef __LOGICPROCESSOR_HPP_
6 #define __LOGICPROCESSOR_HPP_
7 
8 #include <vector>
9 
10 #include "EventProcessor.hpp"
11 
14 public:
20  LogicProcessor(int offset, int range);
21 
23  virtual void DeclarePlots(void);
24 
28  virtual bool Process(RawEvent &event);
29 
32  virtual bool LogicStatus(size_t loc) const { return logicStatus.at(loc); };
33 
36  unsigned long StopCount(size_t loc) const { return stopCount.at(loc);};
37 
40  unsigned long StartCount(size_t loc) const { return startCount.at(loc); };
41 
45  double TimeOff(size_t loc, double t) const {
46  return (!LogicStatus(loc) ? (t-lastStopTime.at(loc)) : 0.);
47  }
48 
52  double TimeOn(size_t loc, double t) const {
53  return (LogicStatus(loc) ? (t-lastStartTime.at(loc)) : 0.);
54  }
55 
56 protected:
57  std::vector<double> lastStartTime;
58  std::vector<double> lastStopTime;
59  std::vector<bool> logicStatus;
60 
61  std::vector<unsigned long> stopCount;
62  std::vector<unsigned long> startCount;
63 
64 private:
67  void BasicProcessing(RawEvent &event);
68 
71  void TriggerProcessing(RawEvent &event);
72 
73  int plotSize;
74 };
75 
76 #endif // __LOGICPROCESSOR_HPP_
double TimeOff(size_t loc, double t) const
Definition: LogicProcessor.hpp:45
void BasicProcessing(RawEvent &event)
virtual bool Process(RawEvent &event)
std::vector< bool > logicStatus
current level of the logic signal
Definition: LogicProcessor.hpp:59
double TimeOn(size_t loc, double t) const
Definition: LogicProcessor.hpp:52
Generic event processor.
std::vector< double > lastStopTime
time of last trailing edge
Definition: LogicProcessor.hpp:58
std::vector< double > lastStartTime
time of last leading edge
Definition: LogicProcessor.hpp:57
unsigned long StopCount(size_t loc) const
Definition: LogicProcessor.hpp:36
void TriggerProcessing(RawEvent &event)
std::vector< unsigned long > startCount
number of starts received
Definition: LogicProcessor.hpp:62
std::vector< unsigned long > stopCount
number of stops received
Definition: LogicProcessor.hpp:61
unsigned long StartCount(size_t loc) const
Definition: LogicProcessor.hpp:40
int plotSize
Size of the plots to make.
Definition: LogicProcessor.hpp:73
Class to handle logic signals.
Definition: LogicProcessor.hpp:13
virtual bool LogicStatus(size_t loc) const
Definition: LogicProcessor.hpp:32
virtual void DeclarePlots(void)
Class to handle event processing.
Definition: EventProcessor.hpp:25
The all important raw event.
Definition: RawEvent.hpp:46