Jpp  15.0.1-rc.1-highQE
the software that should make you happy
 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 
9 
10 
11 /**
12  * \author mdejong
13  */
14 
15 namespace JDETECTOR {}
16 namespace JPP { using namespace JDETECTOR; }
17 
18 namespace JDETECTOR {
19 
20 
22 
23 
24  /**
25  * Type definition of PMT base output.
26  */
28 
29 
30  /**
31  * Wrapper for CLB input.
32  */
33  struct JCLBInput :
34  public std::vector<JPMTOutput>
35  {
36  /**
37  * Reset CLB buffers.
38  *
39  * \param size number of buffers
40  */
41  inline void reset(size_t size)
42  {
43  this->resize(size);
44 
45  for (iterator i = this->begin(); i != this->end(); ++i) {
46  i->clear();
47  }
48  }
49  };
50 
51 
52  /**
53  * Interface for CLB simulation.
54  *
55  * This interface defines the conversion of simulated data to the standard %KM3NeT data format.\n
56  * The input consists of a 2D-array of JPMTPulse's organised per PMT channel and
57  * the output of a KM3NETDAQ::JDAQSuperFrame data structure in which data from different PMTs are mixed.
58  */
60  {
61  protected:
62  /**
63  * Default constructor.
64  */
66  {}
67 
68 
69  public:
70  /**
71  * Virtual destructor.
72  */
73  virtual ~JCLBSimulator()
74  {}
75 
76 
77  /**
78  * Process data.
79  *
80  * \param id module identifier
81  * \param input PMT data
82  * \param output CLB data
83  */
84  virtual void processData(const JModuleIdentifier& id, const JCLBInput& input, JDAQSuperFrame& output) const = 0;
85  };
86 }
87 
88 #endif
virtual ~JCLBSimulator()
Virtual destructor.
JPMTData< JPMTPulse > JPMTOutput
Type definition of PMT base output.
JCLBSimulator()
Default constructor.
Auxiliary class for object identification.
Definition: JObjectID.hh:22
Template data structure for PMT I/O.
void reset(size_t size)
Reset CLB buffers.
Wrapper for CLB input.
Interface for CLB simulation.
Data frame of one optical module.
virtual void processData(const JModuleIdentifier &id, const JCLBInput &input, JDAQSuperFrame &output) const =0
Process data.