6 Flags::bitToString(uint32_t bit) {
7 static const std::string UNDEFINED_UNDEFINED =
"Undefined/Undefined";
12 else return UNDEFINED_UNDEFINED;
18 for (uint32_t
i = 1;
i != 0;
i <<= 1) {
20 if (first) { first =
false; }
else { ret +=
" + "; }
29 size_t idx = str.find_first_of(
"/");
30 if (idx != std::string::npos) {
32 if (set ==
"Core")
return Core::get( str.substr(idx+1));
33 if (set ==
"Overlap")
return Overlap::get( str.substr(idx+1));
43 for (std::vector<std::string>::const_iterator it = strs.begin(), ed = strs.end(); it != ed; ++it) {
52 STR_Duplicate =
"Core/Duplicate",
53 STR_Preselection =
"Core/Preselection",
54 STR_Vertexing =
"Core/Vertexing",
55 STR_Overflow =
"Core/Overflow",
56 STR_Undefined =
"Core/Undefined";
59 case All:
return STR_All;
64 default:
return STR_Undefined;
70 size_t idx = instr.find_first_of(
"/");
71 const std::string &str = (idx == std::string::npos) ? instr : instr.substr(idx+1);
72 if (str ==
"All")
return All;
73 else if (str ==
"Duplicate" )
return Duplicate;
74 else if (str ==
"Preselection" )
return Preselection;
75 else if (str ==
"Vertexing" )
return Vertexing;
76 else if (str ==
"Overlfow" )
return Overflow;
83 for (std::vector<std::string>::const_iterator it = strs.begin(), ed = strs.end(); it != ed; ++it) {
92 STR_Bit0 =
"Selection/Bit0",
93 STR_Bit1 =
"Selection/Bit1",
94 STR_Bit2 =
"Selection/Bit2",
95 STR_Bit3 =
"Selection/Bit3",
96 STR_Bit4 =
"Selection/Bit4",
97 STR_Bit5 =
"Selection/Bit5",
98 STR_Bit6 =
"Selection/Bit6",
99 STR_Bit7 =
"Selection/Bit7",
100 STR_Bit8 =
"Selection/Bit8",
101 STR_Bit9 =
"Selection/Bit9",
102 STR_Bit10 =
"Selection/Bit10",
103 STR_Bit11 =
"Selection/Bit11",
104 STR_Undefined =
"Selection/Undefined";
106 case All:
return STR_All;
107 case Bit0:
return STR_Bit0;
108 case Bit1:
return STR_Bit1;
109 case Bit2:
return STR_Bit2;
110 case Bit3:
return STR_Bit3;
111 case Bit4:
return STR_Bit4;
112 case Bit5:
return STR_Bit5;
113 case Bit6:
return STR_Bit6;
114 case Bit7:
return STR_Bit7;
115 case Bit8:
return STR_Bit8;
116 case Bit9:
return STR_Bit9;
117 case Bit10:
return STR_Bit10;
118 case Bit11:
return STR_Bit11;
120 return STR_Undefined;
126 if (bit == -1)
return All;
127 if (bit <= 11)
return Bits((1 << bit) << 8);
133 size_t idx = instr.find_first_of(
"/");
134 const std::string &str = (idx == std::string::npos) ? instr : instr.substr(idx+1);
135 if (str ==
"All" )
return All;
136 else if (str ==
"Bit0" )
return Bit0;
137 else if (str ==
"Bit1" )
return Bit1;
138 else if (str ==
"Bit2" )
return Bit2;
139 else if (str ==
"Bit3" )
return Bit3;
140 else if (str ==
"Bit4" )
return Bit4;
141 else if (str ==
"Bit5" )
return Bit5;
142 else if (str ==
"Bit6" )
return Bit6;
143 else if (str ==
"Bit7" )
return Bit7;
144 else if (str ==
"Bit8" )
return Bit8;
145 else if (str ==
"Bit9" )
return Bit9;
146 else if (str ==
"Bit10" )
return Bit10;
147 else if (str ==
"Bit11" )
return Bit11;
154 for (std::vector<std::string>::const_iterator it = strs.begin(), ed = strs.end(); it != ed; ++it) {
163 STR_Jets =
"Overlap/Jets",
164 STR_Electrons =
"Overlap/Electrons",
165 STR_Muons =
"Overlap/Muons",
166 STR_Taus =
"Overlap/Taus",
167 STR_Photons =
"Overlap/Photons",
168 STR_User =
"Overlap/User",
169 STR_User1 =
"Overlap/User1",
170 STR_User2 =
"Overlap/User2",
171 STR_User3 =
"Overlap/User3",
172 STR_Undefined =
"Overlap/Undefined";
174 case All:
return STR_All;
175 case Jets:
return STR_Jets;
176 case Electrons:
return STR_Electrons;
177 case Muons:
return STR_Muons;
178 case Taus:
return STR_Taus;
179 case Photons:
return STR_Photons;
180 case User:
return STR_User;
181 case User1:
return STR_User1;
182 case User2:
return STR_User2;
183 case User3:
return STR_User3;
185 return STR_Undefined;
191 size_t idx = instr.find_first_of(
"/");
192 const std::string &str = (idx == std::string::npos) ? instr : instr.substr(idx+1);
193 if (str ==
"All" )
return All;
194 else if (str ==
"Jets" )
return Jets;
195 else if (str ==
"Electrons")
return Electrons;
196 else if (str ==
"Muons" )
return Muons;
197 else if (str ==
"Taus" )
return Taus;
198 else if (str ==
"Photons" )
return Photons;
199 else if (str ==
"User" )
return User;
200 else if (str ==
"User1" )
return User1;
201 else if (str ==
"User2" )
return User2;
202 else if (str ==
"User3" )
return User3;
209 for (std::vector<std::string>::const_iterator it = strs.begin(), ed = strs.end(); it != ed; ++it) {
217 static const std::string STR_All =
"Isolation/All",
218 STR_Tracker =
"Isolation/Tracker",
219 STR_ECal =
"Isolation/ECal",
220 STR_HCal =
"Isolation/HCal",
221 STR_Calo =
"Isolation/Calo",
222 STR_User =
"Isolation/User",
223 STR_User1 =
"Isolation/User1",
224 STR_User2 =
"Isolation/User2",
225 STR_User3 =
"Isolation/User3",
226 STR_User4 =
"Isolation/User4",
227 STR_User5 =
"Isolation/User5",
228 STR_Undefined=
"Isolation/Undefined";
230 case All:
return STR_All;
231 case Tracker:
return STR_Tracker;
232 case ECal:
return STR_ECal;
233 case HCal:
return STR_HCal;
234 case Calo:
return STR_Calo;
235 case User:
return STR_User;
236 case User1:
return STR_User1;
237 case User2:
return STR_User2;
238 case User3:
return STR_User3;
239 case User4:
return STR_User4;
240 case User5:
return STR_User5;
242 return STR_Undefined;
248 size_t idx = instr.find_first_of(
"/");
249 const std::string &str = (idx == std::string::npos) ? instr : instr.substr(idx+1);
250 if (str ==
"All" )
return All;
251 else if (str ==
"Tracker" )
return Tracker;
252 else if (str ==
"ECal" )
return ECal;
253 else if (str ==
"HCal" )
return HCal;
254 else if (str ==
"Calo" )
return Calo;
255 else if (str ==
"User" )
return User1;
256 else if (str ==
"User1" )
return User1;
257 else if (str ==
"User2" )
return User2;
258 else if (str ==
"User3" )
return User3;
259 else if (str ==
"User4" )
return User4;
260 else if (str ==
"User5" )
return User5;
267 for (std::vector<std::string>::const_iterator it = strs.begin(), ed = strs.end(); it != ed; ++it) {
static Bits get(int8_t bit)
tuple ret
prodAgent to be discontinued
static const std::string & bitToString(uint32_t bit)
static const std::string & bitToString(Bits bit)
static const std::string & bitToString(Bits bit)
static Bits get(const std::string &str)
static std::string maskToString(uint32_t bit)
Flags used in PAT, and static translator from flags to strings.
static const std::string & bitToString(Bits bit)
static uint32_t get(const std::string &str)
static Bits get(const std::string &str)
static Bits get(const std::string &str)
static const std::string & bitToString(Bits bit)