Belle II Software light-2406-ragdoll
TRGGDLDBInputBits.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <TObject.h>
11
12namespace Belle2 {
25 class TRGGDLDBInputBits: public TObject {
26 public:
27
32 {
33 m_ninbit = b.m_ninbit;
34 for (int i = 0; i < 320; i++) {
35 strcpy(m_inbitname[i], b.m_inbitname[i]);
36 }
37 }
40 {
41 m_ninbit = b.m_ninbit;
42 for (int i = 0; i < 320; i++) {
43 strcpy(m_inbitname[i], b.m_inbitname[i]);
44 }
45 return *this;
46 }
48 void setinbitname(int i, const char* c)
49 {
50 strcpy(m_inbitname[i], c);
51 }
53 void setninbit(int i)
54 {
55 m_ninbit = i;
56 }
58 const char* getinbitname(int i) const
59 {
60 return m_inbitname[i];
61 }
63 int getninbit() const
64 {
65 return m_ninbit;
66 }
68 int getinbitnum(const char* c) const
69 {
70 for (int i = 0; i < 320; i++) {
71 if (strcmp(c, m_inbitname[i]) == 0)return i;
72 }
73 return -1;
74 }
75
76 private:
77
80
82 char m_inbitname[320][100];
83
85 };
86
88} // end of namespace Belle2
The payload class for GDL input bit.
TRGGDLDBInputBits(const TRGGDLDBInputBits &b)
copy constructor
const char * getinbitname(int i) const
get name of i-th input trigger bit
TRGGDLDBInputBits & operator=(const TRGGDLDBInputBits &b)
assignment operator
char m_inbitname[320][100]
Number of bins per sensor along u side.
void setninbit(int i)
set the number of input trigger bits
int m_ninbit
Number of bit.
int getninbit() const
get the number of input trigger bits
ClassDef(TRGGDLDBInputBits, 1)
ClassDef, must be the last term before the closing {}.
TRGGDLDBInputBits()
Default constructor.
void setinbitname(int i, const char *c)
set name of i-th input trigger bit
int getinbitnum(const char *c) const
get name of i-th input trigger bit
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24