13 Link::Link(Int_t i) : TObject(), fActiveSize(i), fSize(i) {
14 fLinks =
new Int_t[i];
18 Link::Link(
const Link& link) : TObject(link), fActiveSize(link.fActiveSize), fSize(link.fSize) {
19 fLinks =
new Int_t[fSize];
20 for (
int i = 0; i < fSize; i++)
21 fLinks[i] = link.fLinks[i];
26 if (fSize < link.fActiveSize) {
29 fLinks =
new Int_t[fSize];
31 fActiveSize = link.fActiveSize;
32 for (
int i = 0; i < fActiveSize; i++) {
33 fLinks[i] = link.fLinks[i];
39 Link::~Link() {
delete[] fLinks; }
41 void Link::SetLinkAndExpand(Int_t index, Int_t val) {
43 Int_t old_size = fActiveSize;
45 fLinks =
new Int_t[index + 1];
47 fActiveSize = index + 1;
48 for (
int i = 0; i < old_size; i++)
53 if (fActiveSize < index) fActiveSize = index;
59 if (fActiveSize < fSize) {
60 fLinks[fActiveSize++] = i;
62 SetLinkAndExpand(fActiveSize, i);
66 void Link::Clear(Option_t* ) {
71 void Link::ExpandFast(Int_t size) {
75 Int_t old_size = fActiveSize;
77 fLinks =
new Int_t[size];
80 for (
int i = 0; i < old_size; i++)
86 void Link::ClearLinks() {
87 for (
int i = 0; i < fActiveSize; i++)
Link operator=(const Link &link)
void SetNextLink(Int_t i)