1 |
yjlee |
1.1 |
#ifndef HHISTID_H
|
2 |
|
|
#define HHISTID_H
|
3 |
|
|
|
4 |
|
|
/** \class HHistID Ganzhur/HafHistogram/src/HHistID.cc
|
5 |
|
|
*
|
6 |
|
|
* Description:
|
7 |
|
|
* Analysis code of the CMS experiment;
|
8 |
|
|
* Original version is a part of HAF package developed for CMS: UserCode/HAF
|
9 |
|
|
*
|
10 |
|
|
* This class allows ID numbers, ID strings or both to be used
|
11 |
|
|
* to uniquely identify histograms. The actual use of this
|
12 |
|
|
* class depends on the concrete package that implements HepTuple
|
13 |
|
|
*
|
14 |
|
|
* \author Marcel Kunze, Ruhr-University Bochum, Germany
|
15 |
|
|
*
|
16 |
|
|
* \version $Id: HHistID.h,v 1.2 2009/11/19 09:40:31 ganzhur Exp $
|
17 |
|
|
*
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
#include "TString.h"
|
21 |
|
|
|
22 |
|
|
class HHistID {
|
23 |
|
|
public:
|
24 |
|
|
// constructors
|
25 |
|
|
HHistID(int theNumber);
|
26 |
|
|
// constructor with number
|
27 |
|
|
HHistID(const char * theString);
|
28 |
|
|
// constructor with string
|
29 |
|
|
HHistID(int theNumber,const char * theString);
|
30 |
|
|
// constructor with both number and string
|
31 |
|
|
HHistID(const HHistID & other);
|
32 |
|
|
// copy constructor
|
33 |
|
|
|
34 |
|
|
// accessors
|
35 |
|
|
inline Bool_t isIDnumberSet() const { return _numSet; };
|
36 |
|
|
// number used in constructor
|
37 |
|
|
inline Bool_t isIDstringSet() const { return _stringSet; };
|
38 |
|
|
// string used in constructor
|
39 |
|
|
inline int getIDnumber() const { return _idNumber; };
|
40 |
|
|
// the id number
|
41 |
|
|
const char* getIDstring() const { return _idString.Data(); };
|
42 |
|
|
// the id string
|
43 |
|
|
|
44 |
|
|
// operations
|
45 |
|
|
HHistID & operator++(); // prefix ++
|
46 |
|
|
const HHistID operator++(int); // postfix ++
|
47 |
|
|
|
48 |
|
|
HHistID & operator--(); // prefix --
|
49 |
|
|
const HHistID operator--(int); // postfix --
|
50 |
|
|
|
51 |
|
|
private:
|
52 |
|
|
Bool_t _numSet;
|
53 |
|
|
Bool_t _stringSet;
|
54 |
|
|
int _idNumber;
|
55 |
|
|
TString _idString;
|
56 |
|
|
};
|
57 |
|
|
|
58 |
|
|
#endif
|