BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkBase/TrkBase/TrkId.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkId.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Holds an ID number and a pointer to an Id manager that knows how
7// provide the next number in the sequence; designed to provided tracks
8// with unique ids. It does _not_ own the Id manager.
9//
10// Environment:
11// Software developed for the BaBar Detector at the SLAC B-Factory.
12//
13// Authors: Steve Schaffner
14//------------------------------------------------------------------------
15#ifndef TRKID_HH
16#define TRKID_HH
17
18class TrkIdManager;
19
20// Class interface //
21class TrkId {
22
23public:
24 TrkId(long idNo, TrkIdManager* idMan); // creates with input id number
25 TrkId(TrkIdManager* idMan); // gets id number from idMan
26 TrkId(const TrkId &); // copies existing value
27 TrkId& operator= (const TrkId&); // copies existing value
28 bool operator<(const TrkId &) const;
29 ~TrkId();
30
31 void setNewValue(const TrkId&); // gets next Id number and copies manager
32 operator long() const {return _value;} // automatic conversion to long
33 TrkIdManager* idManager() const;
34 void setIdManager(TrkIdManager* idMan); // hack for making trks from db
35
36private:
37
38 int _value;
39 TrkIdManager* _idman;
40};
41
42#endif
43
44
void setIdManager(TrkIdManager *idMan)
Definition: TrkId.cxx:93
TrkIdManager * idManager() const
Definition: TrkId.cxx:86
void setNewValue(const TrkId &)
Definition: TrkId.cxx:77
bool operator<(const TrkId &) const
Definition: TrkId.cxx:57
TrkId & operator=(const TrkId &)
Definition: TrkId.cxx:48
~TrkId()
Definition: TrkId.cxx:34