BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
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
12using std::cout;
13using std::endl;
14
15// ----- Default onstructor --------------------------------------------
20
21// -------------------------------------------------------------------------
22
23// ----- Standard constructor ------------------------------------------
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 ----------------------------------------------------
37// -------------------------------------------------------------------------
38
39// ----- Public method AddPoint ----------------------------------------
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 -------------------------------------
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// -------------------------------------------------------------------------
int i
Definition P4_F32vec4.h:22
int Int_t
virtual ~CbmStsDigiMatch()
Destructor.
Int_t GetRefIndex(Int_t i=0) const
Accessor to StsPoint indizes.
CbmStsDigiMatch()
Default constructor.
Int_t AddPoint(Int_t iPoint)
Add a StsPoint index.