Belle II Software
release-05-01-25
TRGGDLDBInputBits.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
{
27
class
TRGGDLDBInputBits:
public
TObject {
28
public
:
29
31
TRGGDLDBInputBits
():
m_ninbit
{0},
m_inbitname
{} {}
33
TRGGDLDBInputBits
(
const
TRGGDLDBInputBits
& b): TObject(b)
34
{
35
m_ninbit
= b.m_ninbit;
36
for
(
int
i = 0; i < 320; i++) {
37
strcpy(
m_inbitname
[i], b.m_inbitname[i]);
38
}
39
}
41
TRGGDLDBInputBits
&
operator=
(
const
TRGGDLDBInputBits
& b)
42
{
43
m_ninbit
= b.m_ninbit;
44
for
(
int
i = 0; i < 320; i++) {
45
strcpy(
m_inbitname
[i], b.m_inbitname[i]);
46
}
47
return
*
this
;
48
}
50
void
setinbitname
(
int
i,
const
char
* c)
51
{
52
strcpy(
m_inbitname
[i], c);
53
}
55
void
setninbit
(
int
i)
56
{
57
m_ninbit
= i;
58
}
60
const
char
*
getinbitname
(
int
i)
const
61
{
62
return
m_inbitname
[i];
63
}
65
int
getninbit
()
const
66
{
67
return
m_ninbit
;
68
}
70
int
getinbitnum
(
const
char
* c)
const
71
{
72
for
(
int
i = 0; i < 320; i++) {
73
if
(strcmp(c,
m_inbitname
[i]) == 0)
return
i;
74
}
75
return
-1;
76
}
77
78
private
:
79
81
int
m_ninbit
;
82
84
char
m_inbitname
[320][100];
85
86
ClassDef
(
TRGGDLDBInputBits
, 1);
87
};
88
90
}
// end of namespace Belle2
Belle2::TRGGDLDBInputBits::ClassDef
ClassDef(TRGGDLDBInputBits, 1)
ClassDef, must be the last term before the closing {}.
Belle2::TRGGDLDBInputBits::TRGGDLDBInputBits
TRGGDLDBInputBits()
Default constructor.
Definition:
TRGGDLDBInputBits.h:39
Belle2::TRGGDLDBInputBits::m_ninbit
int m_ninbit
Number of bit.
Definition:
TRGGDLDBInputBits.h:89
Belle2::TRGGDLDBInputBits::m_inbitname
char m_inbitname[320][100]
Number of bins per sensor along u side.
Definition:
TRGGDLDBInputBits.h:92
Belle2::TRGGDLDBInputBits
The payload class for GDL input bit.
Definition:
TRGGDLDBInputBits.h:35
Belle2::TRGGDLDBInputBits::getinbitnum
int getinbitnum(const char *c) const
get name of i-th input trigger bit
Definition:
TRGGDLDBInputBits.h:78
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::TRGGDLDBInputBits::setinbitname
void setinbitname(int i, const char *c)
set name of i-th input trigger bit
Definition:
TRGGDLDBInputBits.h:58
Belle2::TRGGDLDBInputBits::setninbit
void setninbit(int i)
set the number of input trigger bits
Definition:
TRGGDLDBInputBits.h:63
Belle2::TRGGDLDBInputBits::getninbit
int getninbit() const
get the number of input trigger bits
Definition:
TRGGDLDBInputBits.h:73
Belle2::TRGGDLDBInputBits::operator=
TRGGDLDBInputBits & operator=(const TRGGDLDBInputBits &b)
assignment operator
Definition:
TRGGDLDBInputBits.h:49
Belle2::TRGGDLDBInputBits::getinbitname
const char * getinbitname(int i) const
get name of i-th input trigger bit
Definition:
TRGGDLDBInputBits.h:68
mdst
dbobjects
include
TRGGDLDBInputBits.h
Generated on Fri Nov 5 2021 03:55:35 for Belle II Software by
1.8.17