BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkId Class Reference

#include <TrkId.h>

Public Member Functions

 TrkId (long idNo, TrkIdManager *idMan)
 
 TrkId (TrkIdManager *idMan)
 
 TrkId (const TrkId &)
 
TrkIdoperator= (const TrkId &)
 
bool operator< (const TrkId &) const
 
 ~TrkId ()
 
void setNewValue (const TrkId &)
 
 operator long () const
 
TrkIdManageridManager () const
 
void setIdManager (TrkIdManager *idMan)
 

Detailed Description

Definition at line 21 of file TrkId.h.

Constructor & Destructor Documentation

◆ TrkId() [1/3]

TrkId::TrkId ( long  idNo,
TrkIdManager idMan 
)

Definition at line 24 of file TrkId.cxx.

24 : _value(myval), _idman(man) {
25//------------------------------------------------------------------------
26}

◆ TrkId() [2/3]

TrkId::TrkId ( TrkIdManager idMan)

Definition at line 29 of file TrkId.cxx.

29 : _value(man->nextId()), _idman(man) {
30//------------------------------------------------------------------------
31}

◆ TrkId() [3/3]

TrkId::TrkId ( const TrkId rhs)

Definition at line 40 of file TrkId.cxx.

40 {
41//------------------------------------------------------------------------
42 _idman = rhs.idManager();
43 _value = rhs._value;
44}
TrkIdManager * idManager() const
Definition: TrkId.cxx:86

◆ ~TrkId()

TrkId::~TrkId ( )

Definition at line 34 of file TrkId.cxx.

34 {
35//------------------------------------------------------------------------
36}

Member Function Documentation

◆ idManager()

TrkIdManager * TrkId::idManager ( ) const

Definition at line 86 of file TrkId.cxx.

86 {
87//------------------------------------------------------------------------
88 return _idman;
89}

Referenced by operator=(), setNewValue(), and TrkId().

◆ operator long()

TrkId::operator long ( ) const
inline

Definition at line 32 of file TrkId.h.

32{return _value;} // automatic conversion to long

◆ operator<()

bool TrkId::operator< ( const TrkId other) const

Definition at line 56 of file TrkId.cxx.

57 {
58/* if (*idManager() == *(other.idManager()) && _value < other._value) {
59 return true;
60 }
61 else {
62 if (idManager() < other.idManager()) {
63 return true;
64 }
65 else
66 return false;
67 }*/
68 std::cout << " TrkId::operator<(const TrkId& other) const needs to be checked " << std::endl;
69 if(_value < other._value) return true;
70 return false;
71}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ operator=()

TrkId & TrkId::operator= ( const TrkId rhs)

Definition at line 48 of file TrkId.cxx.

48 {
49//------------------------------------------------------------------------
50 _idman = rhs.idManager();
51 _value = rhs._value;
52 return *this;
53}

◆ setIdManager()

void TrkId::setIdManager ( TrkIdManager idMan)

Definition at line 93 of file TrkId.cxx.

93 {
94//------------------------------------------------------------------------
95 _idman = idMan;
96}

Referenced by TrkRecoTrk::setIdManager().

◆ setNewValue()

void TrkId::setNewValue ( const TrkId source)

Definition at line 77 of file TrkId.cxx.

77 {
78//------------------------------------------------------------------------
79 _idman = source.idManager();
80 assert (_idman != 0);
81 _value = idManager()->nextId();
82}
virtual long nextId()=0

Referenced by TrkRecoTrk::operator=().


The documentation for this class was generated from the following files: