Jpp  15.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JAcoustics/JCounter.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JCOUNTER__
2 #define __JACOUSTICS__JCOUNTER__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 
8 /**
9  * \file
10  *
11  * Acoustic counter.
12  * \author mdejong
13  */
14 namespace JACOUSTICS {}
15 namespace JPP { using namespace JACOUSTICS; }
16 
17 namespace JACOUSTICS {
18 
19  /**
20  * Acoustic counter.
21  */
22  struct JCounter {
23  /**
24  * Default constructor.
25  */
27  counter(0)
28  {}
29 
30 
31  /**
32  * Constructor.
33  *
34  * \param counter counter
35  */
36  JCounter(const int counter) :
37  counter(counter)
38  {}
39 
40 
41  /**
42  * Get counter.
43  *
44  * \return counter
45  */
46  int getCounter() const
47  {
48  return counter;
49  }
50 
51  ClassDefNV(JCounter, 1);
52 
53  protected:
54  int counter;
55  };
56 
57 
58  /**
59  * Less-than operator for two counters.
60  *
61  * \param first first counter
62  * \param second second counter
63  * \return true if first counter less than second; else false
64  */
65  static inline bool operator<(const JCounter& first, const JCounter& second)
66  {
67  return first.getCounter() < second.getCounter();
68  }
69 
70 
71  /**
72  * Equals operator for two counters.
73  *
74  * \param first first counter
75  * \param second second counter
76  * \return true if first counter equal to second; else false
77  */
78  static inline bool operator==(const JCounter& first, const JCounter& second)
79  {
80  return first.getCounter() == second.getCounter();
81  }
82 }
83 
84 #endif
Acoustic counter.
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1603
int getCounter() const
Get counter.
JCounter()
Default constructor.
ClassDefNV(JCounter, 1)
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
bool operator==(Packet const &p, ID const &id)
JCounter(const int counter)
Constructor.