Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDAQSummarysliceHeader.hh
Go to the documentation of this file.
1 #ifndef __JDAQSUMMARYSLICEHEADER__
2 #define __JDAQSUMMARYSLICEHEADER__
3 
4 #include "JIO/JSerialisable.hh"
5 #include "JDAQ/JDAQRoot.hh"
6 #include "JDAQ/JDAQHeader.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace KM3NETDAQ {
14 
15  using JIO::JReader;
16  using JIO::JWriter;
17 
18 
19  /**
20  * JDAQ summaryslice header.
21  */
23  public JDAQHeader
24  {
25  public:
26  /**
27  * Default constructor.
28  */
30  JDAQHeader()
31  {}
32 
33 
34  /**
35  * Constructor.
36  *
37  * \param chronometer DAQ chronometer
38  */
40  JDAQHeader(chronometer)
41  {}
42 
43 
44  /**
45  * Get DAQ summary slice header.
46  *
47  * \return DAQ summary slice header
48  */
50  {
51  return static_cast<const JDAQSummarysliceHeader&>(*this);
52  }
53 
54 
56  };
57 
58 
59  /**
60  * Equal operator for DAQ summary slice headers.
61  *
62  * \param first summary slice header
63  * \param second summary slice header
64  * \result true if first summaryslice header equal to second; else false
65  */
66  inline bool operator==(const JDAQSummarysliceHeader& first,
67  const JDAQSummarysliceHeader& second)
68  {
69  return (first.getDAQHeader() == second.getDAQHeader());
70  }
71 
72 
73  /**
74  * Not-equal operator for DAQ summary slice headers.
75  *
76  * \param first summary slice header
77  * \param second summary slice header
78  * \result true if first summary slice header not equal to second; else false
79  */
80  inline bool operator!=(const JDAQSummarysliceHeader& first,
81  const JDAQSummarysliceHeader& second)
82  {
83  return !(first == second);
84  }
85 }
86 
87 #endif
ClassDef(JDAQSummarysliceHeader, 2)
JDAQSummarysliceHeader(const JDAQChronometer &chronometer)
Constructor.
bool operator==(const JDAQChronometer &first, const JDAQChronometer &second)
Equal operator for DAQ chronometers.
Interface for binary output.
JDAQSummarysliceHeader()
Default constructor.
Interface for binary input.
const JDAQHeader & getDAQHeader() const
Get DAQ header.
Definition: JDAQHeader.hh:51
const JDAQSummarysliceHeader & getDAQSummarysliceHeader() const
Get DAQ summary slice header.
bool operator!=(const JDAQChronometer &first, const JDAQChronometer &second)
Not-equal operator for DAQ chronometers.