Belle II Software  release-05-01-25
TRGGDLDBFTDLBits.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Benjamin Schwenker *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <TObject.h>
13 
14 namespace Belle2 {
26  class TRGGDLDBFTDLBits: public TObject {
27  public:
28 
32  TRGGDLDBFTDLBits(const TRGGDLDBFTDLBits& b): TObject(b)
33  {
34  m_noutbit = b.m_noutbit;
35  for (int i = 0; i < 320; i++) {
36  strcpy(m_outbitname[i], b.m_outbitname[i]);
37  }
38  }
41  {
42  m_noutbit = b.m_noutbit;
43  for (int i = 0; i < 320; i++) {
44  strcpy(m_outbitname[i], b.m_outbitname[i]);
45  }
46  return *this;
47  }
49  void setoutbitname(int i, const char* c)
50  {
51  strcpy(m_outbitname[i], c);
52  }
54  void setnoutbit(int i)
55  {
56  m_noutbit = i;
57  }
59  const char* getoutbitname(int i) const
60  {
61  return m_outbitname[i];
62  }
64  int getnoutbit() const
65  {
66  return m_noutbit;
67  }
69  int getoutbitnum(const char* c) const
70  {
71  for (int i = 0; i < 320; i++) {
72  if (strcmp(c, m_outbitname[i]) == 0)return i;
73  }
74  return -1;
75  }
76 
77  private:
78 
80  int m_noutbit;
81 
83  char m_outbitname[320][100];
84 
86  };
87 
89 } // end of namespace Belle2
Belle2::TRGGDLDBFTDLBits::setoutbitname
void setoutbitname(int i, const char *c)
set name of i-th output trigger bit
Definition: TRGGDLDBFTDLBits.h:57
Belle2::TRGGDLDBFTDLBits::ClassDef
ClassDef(TRGGDLDBFTDLBits, 1)
ClassDef, must be the last term before the closing {}.
Belle2::TRGGDLDBFTDLBits::operator=
TRGGDLDBFTDLBits & operator=(const TRGGDLDBFTDLBits &b)
assignment operator
Definition: TRGGDLDBFTDLBits.h:48
Belle2::TRGGDLDBFTDLBits
The payload class for FTDL output bit.
Definition: TRGGDLDBFTDLBits.h:34
Belle2::TRGGDLDBFTDLBits::setnoutbit
void setnoutbit(int i)
set the number of output trigger bits
Definition: TRGGDLDBFTDLBits.h:62
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGGDLDBFTDLBits::getoutbitname
const char * getoutbitname(int i) const
get name of i-th output trigger bit
Definition: TRGGDLDBFTDLBits.h:67
Belle2::TRGGDLDBFTDLBits::getoutbitnum
int getoutbitnum(const char *c) const
get name of i-th input trigger bit
Definition: TRGGDLDBFTDLBits.h:77
Belle2::TRGGDLDBFTDLBits::TRGGDLDBFTDLBits
TRGGDLDBFTDLBits()
Default constructor.
Definition: TRGGDLDBFTDLBits.h:38
Belle2::TRGGDLDBFTDLBits::m_outbitname
char m_outbitname[320][100]
Name of bit.
Definition: TRGGDLDBFTDLBits.h:91
Belle2::TRGGDLDBFTDLBits::m_noutbit
int m_noutbit
Number of bit.
Definition: TRGGDLDBFTDLBits.h:88
Belle2::TRGGDLDBFTDLBits::getnoutbit
int getnoutbit() const
get the number of output trigger bits
Definition: TRGGDLDBFTDLBits.h:72