Jpp  16.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  struct JDAQSuperFrame;
45  struct JDAQSummaryFrame;
46  struct JDAQTimeslice;
47  struct JDAQTimesliceL0;
48  struct JDAQTimesliceL1;
49  struct JDAQTimesliceL2;
50  struct JDAQTimesliceSN;
51  struct JDAQSummaryslice;
52  struct 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
Auxiliary class for a DAQ type holder.
*fatal Wrong number of arguments esac check_input_file $INPUT_FILE for TIMESLICE in JDAQTimeslice JDAQTimesliceL0 JDAQTimesliceL1 JDAQTimesliceL2 JDAQTimesliceSN
static const int DAQTIMESLICEL2
L2 timeslice.
Definition: daqdatatypes.hh:17
static const int DAQTIMESLICEL1
L1 timeslice.
Definition: daqdatatypes.hh:16
static const int DAQSUPERFRAME
KM3NeT Data Definitions v2.1.0-12-g9520e6e https://git.km3net.de/common/km3net-dataformat.
Definition: daqdatatypes.hh:12
static const int DAQSUMMARYFRAME
Summary frame.
Definition: daqdatatypes.hh:13
static const int DAQTIMESLICE
Erroneous timeslice.
Definition: daqdatatypes.hh:14
static const int DAQEVENT
DAQ event.
Definition: daqdatatypes.hh:20
do set_variable OUTPUT_DIRECTORY $WORKDIR T
int getDataType()
Template definition for method returning data type.
static const int DAQSUMMARYSLICE
Summaryslice.
Definition: daqdatatypes.hh:19
static const int DAQTIMESLICEL0
L0 timeslice.
Definition: daqdatatypes.hh:15
static const int DAQTIMESLICESN
Supernova timeslice.
Definition: daqdatatypes.hh:18