]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Reve/NLTBases.cxx
- Compute parameter covariances including absorber dispersion effects
[u/mrichter/AliRoot.git] / EVE / Reve / NLTBases.cxx
1 // $Header$
2
3 #include "NLTBases.h"
4 #include "Reve/NLTPolygonSet.h"
5
6 using namespace Reve;
7
8 //______________________________________________________________________________
9 // NLTProjectable
10 //
11
12 ClassImp(NLTProjectable)
13
14 //______________________________________________________________________________
15 NLTProjectable::NLTProjectable()
16 {
17   // Default constructor.
18 }
19
20 //______________________________________________________________________________
21 NLTProjectable::~NLTProjectable()
22 {
23   // Destructor.
24   // Force projected replicas to unreference *this.
25
26   while ( ! fProjectedList.empty())
27   {
28     fProjectedList.front()->UnRefProjectable(this);
29   }
30 }
31
32
33 //______________________________________________________________________________
34 // NLTProjected
35 //
36
37 ClassImp(NLTProjected)
38
39 //______________________________________________________________________________
40 NLTProjected::NLTProjected() :
41   fProjector   (0),
42   fProjectable (0),
43   fDepth       (0)
44 {
45   // Default constructor.
46 }
47
48 //______________________________________________________________________________
49 NLTProjected::~NLTProjected()
50 {
51   // Destructor.
52   // If fProjectable is non-null, *this is removed from its list of
53   // projected replicas.
54
55   if (fProjectable) fProjectable->RemoveProjected(this);
56 }
57
58 //______________________________________________________________________________
59 void NLTProjected::SetProjection(NLTProjector* proj, NLTProjectable* model)
60 {
61   fProjector   = proj;
62   if (fProjectable) fProjectable->RemoveProjected(this);
63   fProjectable = model;
64   if (fProjectable) fProjectable->AddProjected(this);
65 }
66
67 //______________________________________________________________________________
68 void NLTProjected::UnRefProjectable(NLTProjectable* assumed_parent)
69 {
70   static const Exc_t eH("NLTProjected::UnRefProjectable ");
71
72   if (fProjectable != assumed_parent) {
73     Warning(eH, "mismatch between assumed and real model. This is a bug.");
74     assumed_parent->RemoveProjected(this);
75     return;
76   }
77
78   if (fProjectable) {
79     fProjectable->RemoveProjected(this);
80     fProjectable = 0;
81   }
82 }