All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ChData.h
Go to the documentation of this file.
1 /**
2  * \file ChData.h
3  *
4  * \ingroup IOVData
5  *
6  * \brief Class def header for a class ChData
7  *
8  * @author kterao
9  */
10 
11 /** \addtogroup IOVData
12 
13  @{*/
14 #ifndef IOVDATA_CHDATA_H
15 #define IOVDATA_CHDATA_H
16 
17 #include <functional>
18 
19 namespace lariov {
20  /**
21  \class ChData
22  */
23  class ChData {
24 
25  public:
26 
27  /// Constructor
28  ChData(unsigned int ch) : fChannel(ch) {}
29 
30  /// Default destructor
31  virtual ~ChData(){}
32 
33  unsigned int Channel() const { return fChannel; }
34  void SetChannel(unsigned int ch) { fChannel = ch; }
35 
36  inline bool operator<(unsigned int rhs) const
37  { return fChannel < rhs;}
38 
39  inline bool operator<(const ChData& ch) const
40  { return fChannel < ch.Channel(); }
41 
42  protected:
43 
44  unsigned int fChannel;
45 
46  };
47 }
48 
49 namespace std {
50  template <>
51  class less<lariov::ChData*>
52  {
53  public:
54  bool operator()( const lariov::ChData* lhs, const lariov::ChData* rhs )
55  { return (*lhs) < (*rhs); }
56  };
57 }
58 
59 
60 #endif
61 /** @} */ // end of doxygen group
62 
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
unsigned int fChannel
Definition: ChData.h:44
bool operator()(const lariov::ChData *lhs, const lariov::ChData *rhs)
Definition: ChData.h:54
unsigned int Channel() const
Definition: ChData.h:33
bool operator<(const ChData &ch) const
Definition: ChData.h:39
ChData(unsigned int ch)
Constructor.
Definition: ChData.h:28
void SetChannel(unsigned int ch)
Definition: ChData.h:34
virtual ~ChData()
Default destructor.
Definition: ChData.h:31
bool operator<(unsigned int rhs) const
Definition: ChData.h:36