BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnLink.h
Go to the documentation of this file.
1
/**
2
* \file BmnLink.h
3
* \author Andrey Lebedev <andrey.lebedev@gsi.de> - original author for CBM experiment
4
* \author Sergey Merts <sergey.merts@gmail.com> - modifications for BMN experiment
5
* \date 2013-2014
6
*
7
* Base data class for storing MC information link.
8
**/
9
10
#ifndef BMNLINK_H_
11
#define BMNLINK_H_
12
13
#include "
TObject.h
"
14
15
#include <string>
16
17
using
std::string;
18
19
class
BmnLink
:
public
TObject
20
{
21
public
:
22
/**
23
* \brief Constructor.
24
*/
25
BmnLink
();
26
27
/**
28
* \brief Standard constructor.
29
*/
30
BmnLink
(
Float_t
weight,
Int_t
index,
Int_t
entry = -1,
Int_t
file = -1);
31
32
/**
33
* \brief Destructor.
34
*/
35
virtual
~BmnLink
();
36
37
/* Modifiers */
38
Int_t
GetFile
()
const
{
return
fFile
; }
39
Int_t
GetEntry
()
const
{
return
fEntry
; }
40
Int_t
GetIndex
()
const
{
return
fIndex
; }
41
Float_t
GetWeight
()
const
{
return
fWeight
; }
42
43
/* Accessors */
44
void
SetFile
(
Int_t
file) {
fFile
= file; }
45
void
SetEntry
(
Int_t
entry) {
fEntry
= entry; }
46
void
SetIndex
(
Int_t
index) {
fIndex
= index; }
47
void
SetWeight
(
Float_t
weight) {
fWeight
= weight; }
48
49
void
AddWeight
(
Float_t
weight) {
fWeight
+= weight; }
50
51
/**
52
* \brief Return string representation of the object.
53
* \return String representation of the object.
54
**/
55
virtual
string
ToString
()
const
;
56
57
friend
Bool_t
operator==
(
const
BmnLink
& lhs,
const
BmnLink
& rhs)
58
{
59
return
(lhs.
GetFile
() == rhs.GetFile() && lhs.
GetEntry
() == rhs.GetEntry() && lhs.
GetIndex
() == rhs.GetIndex());
60
}
61
62
private
:
63
Int_t
fFile
;
// File ID
64
Int_t
fEntry
;
// Entry number
65
Int_t
fIndex
;
// Index in array
66
Float_t
fWeight
;
// Weight
67
68
ClassDef
(
BmnLink
, 1)
69
};
70
71
#endif
/* BMNLINK_H_ */
Bool_t
bool Bool_t
Int_t
int Int_t
Float_t
float Float_t
ClassDef
#define ClassDef(name, id)
TObject.h
BmnLink
Definition
BmnLink.h:20
BmnLink::~BmnLink
virtual ~BmnLink()
Destructor.
BmnLink::BmnLink
BmnLink()
Constructor.
BmnLink::GetEntry
Int_t GetEntry() const
Definition
BmnLink.h:39
BmnLink::fFile
Int_t fFile
Definition
BmnLink.h:63
BmnLink::fEntry
Int_t fEntry
Definition
BmnLink.h:64
BmnLink::fWeight
Float_t fWeight
Definition
BmnLink.h:66
BmnLink::AddWeight
void AddWeight(Float_t weight)
Definition
BmnLink.h:49
BmnLink::SetEntry
void SetEntry(Int_t entry)
Definition
BmnLink.h:45
BmnLink::GetIndex
Int_t GetIndex() const
Definition
BmnLink.h:40
BmnLink::SetIndex
void SetIndex(Int_t index)
Definition
BmnLink.h:46
BmnLink::GetWeight
Float_t GetWeight() const
Definition
BmnLink.h:41
BmnLink::operator==
friend Bool_t operator==(const BmnLink &lhs, const BmnLink &rhs)
Definition
BmnLink.h:57
BmnLink::SetFile
void SetFile(Int_t file)
Definition
BmnLink.h:44
BmnLink::BmnLink
BmnLink(Float_t weight, Int_t index, Int_t entry=-1, Int_t file=-1)
Standard constructor.
BmnLink::fIndex
Int_t fIndex
Definition
BmnLink.h:65
BmnLink::SetWeight
void SetWeight(Float_t weight)
Definition
BmnLink.h:47
BmnLink::GetFile
Int_t GetFile() const
Definition
BmnLink.h:38
BmnLink::ToString
virtual string ToString() const
Return string representation of the object.
TObject
install
include
BmnLink.h
Generated on
for BmnRoot by
1.17.0