BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
HepHistID.cxx
Go to the documentation of this file.
1
#include "MdcRecoUtil/HepHistID.h"
2
using
std::string;
3
4
HepHistID::HepHistID
(
int
theNumber )
5
: _numSet( true ), _stringSet( false ), _idNumber( theNumber ), _idString() {}
6
7
HepHistID::HepHistID
(
const
char
* theString )
8
: _numSet( false ), _stringSet( true ), _idNumber( 0 ), _idString( theString ) {}
9
10
HepHistID::HepHistID
(
int
theNumber,
string
theString )
11
: _numSet( true ), _stringSet( true ), _idNumber( theNumber ), _idString( theString ) {}
12
13
HepHistID::HepHistID
(
const
HepHistID
& other )
14
: _numSet( other._numSet )
15
, _stringSet( other._stringSet )
16
, _idNumber( other._idNumber )
17
, _idString( other._idString ) {}
18
19
// prefix increment number ID
20
HepHistID
&
HepHistID::operator++
() {
21
if
( _numSet ) { ++_idNumber; };
22
// return this
23
return
*
this
;
24
}
25
26
// postfix increment number ID
27
const
HepHistID
HepHistID::operator++
(
int
) {
28
// initialize result
29
HepHistID
result( *
this
);
30
// increment this
31
++( *this );
32
// return result
33
return
result;
34
}
35
36
// prefix decrement number ID
37
HepHistID
&
HepHistID::operator--
() {
38
if
( _numSet ) { --_idNumber; };
39
// return this
40
return
*
this
;
41
}
42
43
// postfix decrement number ID
44
const
HepHistID
HepHistID::operator--
(
int
) {
45
// initialize result
46
HepHistID
result( *
this
);
47
// increment this
48
--( *this );
49
// return result
50
return
result;
51
}
HepHistID::operator++
HepHistID & operator++()
Definition
HepHistID.cxx:20
HepHistID::HepHistID
HepHistID(int theNumber)
Definition
HepHistID.cxx:4
HepHistID::operator--
HepHistID & operator--()
Definition
HepHistID.cxx:37
8.0.0
BOSS_Source
Reconstruction
MdcPatRec
MdcRecoUtil
src
HepHistID.cxx
Generated by
1.16.1