Jpp  19.1.0-rc.1
the software that should make you happy
JDAQDataTypes.hh
Go to the documentation of this file.
1 #ifndef __JDAQDATATYPES__
2 #define __JDAQDATATYPES__
3 
5 
6 /**
7  * \author mdejong
8  */
9 
10 namespace KM3NETDAQ {
11 
12  /**
13  * Auxiliary class for a DAQ type holder.\n
14  * This class can be used to transfer a template class to a method argument.
15  */
16  template<class T>
17  struct JDAQType {
18  typedef T data_type;
19  };
20 
21 
22  /**
23  * Template definition for method returning data type.\n
24  * The template argument refers to the data type for future I/O operations.
25  */
26  template<class T>
27  inline int getDataType()
28  {
29  return getDataType(JDAQType<T>());
30  }
31 
32 
33  /**
34  * Argument definition for method returning data type.\n
35  * The method argument refers to the data type for future I/O operations.\n
36  * This method should be overloaded for each corresponding class.
37  *
38  * \param type data type
39  */
40  template<class T>
41  inline int getDataType(const JDAQType<T>& type);
42 
43 
44  class JDAQSuperFrame;
45  class JDAQSummaryFrame;
46  class JDAQTimeslice;
47  struct JDAQTimesliceL0;
48  struct JDAQTimesliceL1;
49  struct JDAQTimesliceL2;
50  struct JDAQTimesliceSN;
51  class JDAQSummaryslice;
52  class JDAQEvent;
53 
54 
55  inline int getDataType(const JDAQType<JDAQSuperFrame>&) { return DAQSUPERFRAME; }
57  inline int getDataType(const JDAQType<JDAQTimeslice>&) { return DAQTIMESLICE; }
58  inline int getDataType(const JDAQType<JDAQTimesliceL0>&) { return DAQTIMESLICEL0; }
59  inline int getDataType(const JDAQType<JDAQTimesliceL1>&) { return DAQTIMESLICEL1; }
60  inline int getDataType(const JDAQType<JDAQTimesliceL2>&) { return DAQTIMESLICEL2; }
61  inline int getDataType(const JDAQType<JDAQTimesliceSN>&) { return DAQTIMESLICESN; }
63  inline int getDataType(const JDAQType<JDAQEvent>&) { return DAQEVENT; }
64 }
65 
66 #endif
Data storage class for rate measurements of all PMTs in one module.
Data frame of one optical module.
static const int DAQTIMESLICEL1
L1 timeslice.
Definition: daqdatatypes.hh:16
static const int DAQTIMESLICEL0
L0 timeslice.
Definition: daqdatatypes.hh:15
static const int DAQSUPERFRAME
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
Definition: daqdatatypes.hh:12
static const int DAQTIMESLICE
Erroneous timeslice.
Definition: daqdatatypes.hh:14
static const int DAQTIMESLICESN
Supernova timeslice.
Definition: daqdatatypes.hh:18
static const int DAQEVENT
DAQ event.
Definition: daqdatatypes.hh:20
static const int DAQSUMMARYFRAME
Summary frame.
Definition: daqdatatypes.hh:13
static const int DAQSUMMARYSLICE
Summaryslice.
Definition: daqdatatypes.hh:19
static const int DAQTIMESLICEL2
L2 timeslice.
Definition: daqdatatypes.hh:17
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
int getDataType()
Template definition for method returning data type.
Timeslice data structure for L0 data.
Timeslice data structure for L1 data.
Timeslice data structure for L2 data.
Timeslice data structure for SN data.
Auxiliary class for a DAQ type holder.