Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JCLBSimulator.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JCLBSIMULATOR__
2 #define __JDETECTOR__JCLBSIMULATOR__
3 
5 
6 #include "JDAQ/JDAQHit.hh"
7 #include "JDAQ/JDAQFrame.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JDETECTOR {}
15 namespace JPP { using namespace JDETECTOR; }
16 
17 namespace JDETECTOR {
18 
19 
21 
22 
23  /**
24  * Type definition of PMT base output.
25  */
27 
28 
29  /**
30  * Type definition of CLB input.
31  */
33 
34 
35  /**
36  * Reset CLB buffers.
37  *
38  * \param data CLB input data
39  * \param size number of buffers
40  */
41  inline void reset(JCLBInput& data, size_t size)
42  {
43  data.resize(size);
44 
45  for (JCLBInput::iterator i = data.begin(); i != data.end(); ++i) {
46  i->clear();
47  }
48  }
49 
50 
51  /**
52  * Interface for CLB simulation.
53  * The input consists of a 2D array of PMT hits (organised by PMT channel) and
54  * the output is a KM3NETDAQ::JDAQFrame data structure (with data from different PMTs).
55  */
57  {
58  protected:
59  /**
60  * Default constructor.
61  */
63  {}
64 
65 
66  public:
67  /**
68  * Virtual destructor.
69  */
70  virtual ~JCLBSimulator()
71  {}
72 
73 
74  /**
75  * Process data.
76  *
77  * \param input PMT data
78  * \param output CLB data
79  */
80  virtual void processData(const JCLBInput& input,
81  JDAQFrame& output) const = 0;
82  };
83 }
84 
85 #endif
virtual ~JCLBSimulator()
Virtual destructor.
void reset(JCLBInput &data, size_t size)
Reset CLB buffers.
Data frame.
Definition: JDAQFrame.hh:70
JPMTData< JPMTPulse > JPMTOutput
Type definition of PMT base output.
JCLBSimulator()
Default constructor.
std::vector< JPMTOutput > JCLBInput
Type definition of CLB input.
Template data structure for PMT I/O.
Interface for CLB simulation.
virtual void processData(const JCLBInput &input, JDAQFrame &output) const =0
Process data.