]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSegmentTree.h
Reverting revision 49171;
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentTree.h
CommitLineData
0b936dc0 1#ifndef ALIMUONSEGMENTTREE_H
2#define ALIMUONSEGMENTTREE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup geometry
10/// \class AliMUONSegmentTree
11/// \brief Implementation of a segment tree
12///
13// author Laurent Aphecetche
14
15#ifndef ROOT_TObject
16# include "TObject.h"
17#endif
18
19#ifndef ROOT_TObjArray
20# include "TObjArray.h"
21#endif
22
23class TArrayD;
24class AliMUONNode;
25
26class AliMUONSegmentTree : public TObject
27{
28public:
29 AliMUONSegmentTree(const TArrayD& values);
30 virtual ~AliMUONSegmentTree();
31
32 AliMUONNode* Build(const TArrayD& values, Int_t i, Int_t j);
33
34 void Print(Option_t* opt="") const;
35
36 /// Get the stack
37 const TObjArray& Stack() const { return fStack; }
38
39 /// Reset the stack
40 void ResetStack() { fStack.Clear(); }
41
42 void Contribution(double b, double e);
43
44 void InsertInterval(double b, double e);
45
46 void DeleteInterval(double d, double e);
47
48private:
49 /// not implemented
50 AliMUONSegmentTree(const AliMUONSegmentTree& rhs);
51 /// not implemented
52 AliMUONSegmentTree& operator=(const AliMUONSegmentTree& rhs);
53
cddcc1f3 54 AliMUONNode* fRoot; ///< root of the tree
55 TObjArray fStack; ///< array of AliMUONSegment objects
0b936dc0 56
57 ClassDef(AliMUONSegmentTree,1) // Implementation of a segment tree
58};
59
60#endif