1 #ifndef ALIMUONSEGMENTTREE_H
2 #define ALIMUONSEGMENTTREE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONSegmentTree
11 /// \brief Implementation of a segment tree
13 // author Laurent Aphecetche
19 #ifndef ROOT_TObjArray
20 # include "TObjArray.h"
26 class AliMUONSegmentTree : public TObject
29 AliMUONSegmentTree(const TArrayD& values);
30 virtual ~AliMUONSegmentTree();
32 AliMUONNode* Build(const TArrayD& values, Int_t i, Int_t j);
34 void Print(Option_t* opt="") const;
37 const TObjArray& Stack() const { return fStack; }
40 void ResetStack() { fStack.Clear(); }
42 void Contribution(double b, double e);
44 void InsertInterval(double b, double e);
46 void DeleteInterval(double d, double e);
50 AliMUONSegmentTree(const AliMUONSegmentTree& rhs);
52 AliMUONSegmentTree& operator=(const AliMUONSegmentTree& rhs);
54 AliMUONNode* fRoot; ///< root of the tree
55 TObjArray fStack; ///< array of AliMUONSegment objects
57 ClassDef(AliMUONSegmentTree,1) // Implementation of a segment tree