32 size_t und = label.find_first_of(
"@");
33 if(und != std::string::npos) {
34 fOwner = label.substr(0,und);
35 size_t lowestUnd = std::string::npos;
36 size_t nameBegin = und+1;
37 und = label.rfind(
"_runs");
38 if(und != std::string::npos) {
39 std::string srun = label.substr(und+5,und+5+6);
41 srun = label.substr(und+5+6+1,und+5+6+1+6);
43 if(und < lowestUnd) lowestUnd = und;
45 und = label.rfind(
"_run");
46 if(und != std::string::npos) {
47 std::string srun = label.substr(und+4,und+4+6);
51 if(und < lowestUnd) lowestUnd = und;
53 und = label.rfind(
"_dss");
54 if(und != std::string::npos) {
55 std::string srun = label.substr(und+4,und+4+4);
57 srun = label.substr(und+4+4+1,und+4+4+1+4);
59 if(und < lowestUnd) lowestUnd = und;
61 und = label.rfind(
"_ds");
62 if(und != std::string::npos) {
63 std::string srun = label.substr(und+3,und+3+4);
67 if(und < lowestUnd) lowestUnd = und;
69 und = label.rfind(
"_chan");
70 if(und != std::string::npos) {
71 std::string sch = label.substr(und+5,und+5+4);
73 if(und < lowestUnd) lowestUnd = und;
75 und = label.rfind(
"_2ndChan");
76 if(und != std::string::npos) {
77 std::string sch2 = label.substr(und+8,und+8+4);
79 if(und < lowestUnd) lowestUnd = und;
81 fName = label.substr(nameBegin,lowestUnd-nameBegin);
108 std::map<std::string,ExtraKey>::const_iterator iter =
fExtraKeys.begin();
110 const std::string& prefix = iter->first;
114 if(key < otherKey)
return true;
115 if(otherKey < key)
return false;
125 if(*
this < other)
return false;
126 if(other < *
this)
return false;
132 std::stringstream strstr;
143 if(isOld) strstr<<
"_";
145 strstr<<std::setfill(
'0')<<std::setw(6)<<
fEndRun;
148 strstr<<
"_runs"<<std::setfill(
'0')<<std::setw(6)<<
fBeginRun;
149 strstr<<
":"<<std::setfill(
'0')<<std::setw(6)<<
fEndRun;
153 strstr<<std::setfill(
'0')<<std::setw(4)<<
fEndDataset;
156 strstr<<
"_dss"<<std::setfill(
'0')<<std::setw(4)<<
fBeginDataset;
157 strstr<<
":"<<std::setfill(
'0')<<std::setw(4)<<
fEndDataset;
160 if(isOld) strstr<<
"_";
161 else strstr<<
"_chan";
162 strstr<<std::setfill(
'0')<<std::setw(chandig)<<
fChannel;
166 strstr<<
"_2ndChan"<<std::setfill(
'0')<<std::setw(chandig)<<
fChannel2;
169 std::map<std::string,ExtraKey>::const_iterator iter =
fExtraKeys.begin();
173 strstr<<
"_"<<iter->first<<std::setfill(
'0')<<std::setw(key.
fDigits)<<key.
fValue;
183 size_t pos =
fOwner.find_last_of(
"_");
184 bOwner =
fOwner.substr(0,pos);
185 if(pos != std::string::npos) {
186 el =
fOwner.substr(pos+1,std::string::npos);
#define Q_BEGIN_NAMESPACE
Label for global QObject's.
std::map< std::string, ExtraKey > fExtraKeys
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.
std::string fOwner
Object owner.
std::string GetStringLabel() const
convert label to string
bool operator<(const QGlobalLabel &other) const
less operator
int fBeginRun
begin validity