BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmStsDigiMatch.cxx
Go to the documentation of this file.
1
//* $Id: */
2
3
// -------------------------------------------------------------------------
4
// ----- CbmStsDigiMatch source file -----
5
// ----- Created 31/08/06 by V. Friese -----
6
// -------------------------------------------------------------------------
7
8
#include "
CbmStsDigiMatch.h
"
9
10
#include <iostream>
11
12
using
std::cout;
13
using
std::endl;
14
15
// ----- Default onstructor --------------------------------------------
16
CbmStsDigiMatch::CbmStsDigiMatch
()
17
{
18
fRefIndex
[0] =
fRefIndex
[1] =
fRefIndex
[2] = -1;
19
};
20
21
// -------------------------------------------------------------------------
22
23
// ----- Standard constructor ------------------------------------------
24
CbmStsDigiMatch::CbmStsDigiMatch
(
Int_t
iPoint)
25
{
26
if
(iPoint < 0 && iPoint != -666) {
27
cout <<
"-W- CbmStsDigiMatch: Illegal StsPoint index "
<< iPoint << endl;
28
fRefIndex
[0] = -1;
29
}
else
30
fRefIndex
[0] = iPoint;
31
fRefIndex
[1] =
fRefIndex
[2] = -1;
32
};
33
// -------------------------------------------------------------------------
34
35
// ----- Destructor ----------------------------------------------------
36
CbmStsDigiMatch::~CbmStsDigiMatch
() {};
37
// -------------------------------------------------------------------------
38
39
// ----- Public method AddPoint ----------------------------------------
40
Int_t
CbmStsDigiMatch::AddPoint
(
Int_t
iPoint)
41
{
42
if
(iPoint < 0) {
43
cout <<
"-W- CbmStsDigiMatch::AddPoint: Illegal StsPoint index "
<< iPoint << endl;
44
return
0;
45
}
46
for
(
Int_t
i
= 0;
i
< 3;
i
++) {
47
if
(
fRefIndex
[
i
] == -1) {
48
fRefIndex
[
i
] = iPoint;
49
return
i
+ 1;
50
}
51
}
52
return
4;
53
}
54
// -------------------------------------------------------------------------
55
56
// ----- Public method GetRefIndex -------------------------------------
57
Int_t
CbmStsDigiMatch::GetRefIndex
(
Int_t
i
)
const
58
{
59
if
(
i < 0 || i >
2) {
60
cout <<
"-W- CbmStsDigiMatch::GetRefIndex: Illegal index number "
<<
i
<< endl;
61
return
-1;
62
}
63
return
fRefIndex
[
i
];
64
}
65
// -------------------------------------------------------------------------
CbmStsDigiMatch.h
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
CbmStsDigiMatch::~CbmStsDigiMatch
virtual ~CbmStsDigiMatch()
Destructor.
Definition
CbmStsDigiMatch.cxx:36
CbmStsDigiMatch::GetRefIndex
Int_t GetRefIndex(Int_t i=0) const
Accessor to StsPoint indizes.
Definition
CbmStsDigiMatch.cxx:57
CbmStsDigiMatch::CbmStsDigiMatch
CbmStsDigiMatch()
Default constructor.
Definition
CbmStsDigiMatch.cxx:16
CbmStsDigiMatch::AddPoint
Int_t AddPoint(Int_t iPoint)
Add a StsPoint index.
Definition
CbmStsDigiMatch.cxx:40
CbmStsDigiMatch::fRefIndex
Int_t fRefIndex[3]
Definition
CbmStsDigiMatch.h:47
detectors
sts
CbmStsDigiMatch.cxx
Generated on
for BmnRoot by
1.17.0