Belle II Software development
TRGGDLDBFTDLBits.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 {
24 class TRGGDLDBFTDLBits: public TObject {
25 public:
26
30 TRGGDLDBFTDLBits(const TRGGDLDBFTDLBits& b): TObject(b)
31 {
32 m_noutbit = b.m_noutbit;
33 for (int i = 0; i < 320; i++) {
34 strcpy(m_outbitname[i], b.m_outbitname[i]);
35 }
36 }
39 {
40 m_noutbit = b.m_noutbit;
41 for (int i = 0; i < 320; i++) {
42 strcpy(m_outbitname[i], b.m_outbitname[i]);
43 }
44 return *this;
45 }
47 void setoutbitname(int i, const char* c)
48 {
49 strcpy(m_outbitname[i], c);
50 }
52 void setnoutbit(int i)
53 {
54 m_noutbit = i;
55 }
57 const char* getoutbitname(int i) const
58 {
59 return m_outbitname[i];
60 }
62 int getnoutbit() const
63 {
64 return m_noutbit;
65 }
67 int getoutbitnum(const char* c) const
68 {
69 for (int i = 0; i < 320; i++) {
70 if (strcmp(c, m_outbitname[i]) == 0)return i;
71 }
72 return -1;
73 }
74
75 private:
76
79
81 char m_outbitname[320][100];
82
84 };
85
87} // end of namespace Belle2
The payload class for FTDL output bit.
TRGGDLDBFTDLBits()
Default constructor.
const char * getoutbitname(int i) const
get name of i-th output trigger bit
char m_outbitname[320][100]
Name of bit.
void setoutbitname(int i, const char *c)
set name of i-th output trigger bit
ClassDef(TRGGDLDBFTDLBits, 1)
ClassDef, must be the last term before the closing {}.
int m_noutbit
Number of bit.
TRGGDLDBFTDLBits(const TRGGDLDBFTDLBits &b)
copy constructor
int getoutbitnum(const char *c) const
get name of i-th input trigger bit
TRGGDLDBFTDLBits & operator=(const TRGGDLDBFTDLBits &b)
assignment operator
int getnoutbit() const
get the number of output trigger bits
void setnoutbit(int i)
set the number of output trigger bits
Abstract base class for different kinds of events.