BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExtInterface.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkExtInterface.cxx,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6//
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner
12//
13//------------------------------------------------------------------------
14
15//#include "BaBar/BaBar.h"
17#include "TrkBase/TrkRep.h"
18#include "ProxyDict/IfdIntKey.h"
19//#include "ErrLogger/ErrLog.h"
20
21//------------------------------------------------------------------------
22TrkExtInterface::TrkExtInterface() : _myRep(0), _nonconst(false){
23//------------------------------------------------------------------------
24}
25
26//------------------------------------------------------------------------
28//------------------------------------------------------------------------
29}
30
31
32//------------------------------------------------------------------------
33bool
35//------------------------------------------------------------------------
36 bool retval(false);
37 if (myKey() == newRep->myKey()) {
38 setRep(newRep);
39 retval = true;
40 }
41 return retval;
42}
43
44//------------------------------------------------------------------------
45bool
47//------------------------------------------------------------------------
48 bool retval(false);
49 if (myKey() == newRep->myKey()) {
50 setRep(newRep);
51 retval = true;
52 }
53 return retval;
54}
55
56void
58 _myRep = (TrkRep*) newRep;
59 _nonconst = false;
60}
61
62void
64 _myRep = newRep;
65 _nonconst = true;
66}
67
68//------------------------------------------------------------------------
69TrkRep*
71//------------------------------------------------------------------------
72 if(_myRep != 0 && _nonconst)
73 return _myRep;
74 else if (0 == _myRep) {
75 std::cout<<"ErrMsg(error) "<< "Cannot use interface without attached rep."
76 << std::endl;
77 return 0;
78 } else
79 std::cout<<"ErrMsg(error) "<< "Cannot return non-const rep after const attachment"
80 << std::endl;
81 return 0;
82}
83
84//------------------------------------------------------------------------
85const TrkRep*
87//------------------------------------------------------------------------
88 if (0 == _myRep) {
89 std::cout<<"ErrMsg(error) "<< "Cannot use interface without attached rep."
90 << std::endl;
91 return 0;
92 }
93 return _myRep;
94}
95
const TrkRep * myConstRep() const
virtual ~TrkExtInterface()
virtual bool attach(TrkRep *)
void setRep(const TrkRep *)
virtual const IfdKey & myKey() const =0
Definition: TrkRep.h:43
virtual const IfdKey & myKey() const
Definition: TrkRep.cxx:314