BmnRoot
Loading...
Searching...
No Matches
BmnLink.h
Go to the documentation of this file.
1
10#ifndef BMNLINK_H_
11#define BMNLINK_H_
12
13#include "TObject.h"
14#include <string>
15
16using std::string;
17
18class BmnLink : public TObject
19{
20public:
24 BmnLink();
25
29 BmnLink(Float_t weight, Int_t index, Int_t entry = -1, Int_t file = -1);
30
34 virtual ~BmnLink();
35
36 /* Modifiers */
37 Int_t GetFile() const { return fFile; }
38 Int_t GetEntry() const { return fEntry; }
39 Int_t GetIndex() const { return fIndex; }
40 Float_t GetWeight() const { return fWeight; }
41
42 /* Accessors */
43 void SetFile(Int_t file) { fFile = file; }
44 void SetEntry(Int_t entry) { fEntry = entry; }
45 void SetIndex(Int_t index) { fIndex = index; }
46 void SetWeight(Float_t weight) { fWeight = weight; }
47
48 void AddWeight(Float_t weight) { fWeight += weight; }
49
54 virtual string ToString() const;
55
56 friend Bool_t operator==(const BmnLink& lhs, const BmnLink& rhs) {
57 return (lhs.GetFile() == rhs.GetFile() && lhs.GetEntry() == rhs.GetEntry() && lhs.GetIndex() == rhs.GetIndex());
58 }
59
60private:
61 Int_t fFile; // File ID
62 Int_t fEntry; // Entry number
63 Int_t fIndex; // Index in array
64 Float_t fWeight; // Weight
65
66 ClassDef(BmnLink, 1)
67};
68
69#endif /* BMNLINK_H_ */