Diana Software
QGlobalLabel.hh
Go to the documentation of this file.
1 #ifndef _Q_GLOBALLABEL_HH_
2 #define _Q_GLOBALLABEL_HH_
12 #include "QDiana.hh"
13 #include <string>
14 #include <map>
15 
17 
19 {
20  public:
22  QGlobalLabel();
23 
25  QGlobalLabel(const std::string& str);
26 
28  std::string GetStringLabel() const;
29 
31  bool operator<(const QGlobalLabel& other) const;
32 
34  bool operator==(const QGlobalLabel& other) const;
35 
37  operator std::string () const { return GetStringLabel(); }
39  void GetBareOwnerAndExtraLabel(std::string& bOwner, std::string& el) const;
40 
42  std::string fOwner;
44  std::string fName;
46  int fBeginRun;
48  int fEndRun;
50  int fChannel;
52  int fChannel2;
57 
58  class ExtraKey {
59  public:
60  ExtraKey () {
61  Clear();
62  }
63  void Clear() {
65  fDigits = 6;
66  }
67  bool operator<(const ExtraKey& other) const { return fValue < other.fValue; }
68 
69  int fValue;
70  int fDigits;
71  };
73  std::map<std::string, ExtraKey> fExtraKeys;
74 
75 };
76 
78 
79 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
#define Q_INT_DEFAULT
Definition: QDiana.hh:26
bool operator<(const ExtraKey &other) const
Definition: QGlobalLabel.hh:67
Label for global QObject's.
Definition: QGlobalLabel.hh:19
std::map< std::string, ExtraKey > fExtraKeys
Definition: QGlobalLabel.hh:73
QGlobalLabel()
ctor
Definition: QGlobalLabel.cc:9
void GetBareOwnerAndExtraLabel(std::string &bOwner, std::string &el) const
split extra label and bare module name
bool operator==(const QGlobalLabel &other) const
comparison operator
std::string fName
Object name.
Definition: QGlobalLabel.hh:44
std::string fOwner
Object owner.
Definition: QGlobalLabel.hh:42
std::string GetStringLabel() const
convert label to string
bool operator<(const QGlobalLabel &other) const
less operator
Definition: QGlobalLabel.cc:90
int fBeginRun
begin validity
Definition: QGlobalLabel.hh:46