20 {
21 if (axisptr != nullptr) {
22 std::string
axis = axisptr->GetTitle();
24 size_t Abs1 =
axis.find(
"|");
25 size_t Abs2(0);
26 if (Abs1 != std::string::npos) Abs2 =
axis.find(
"|", Abs1 + 1);
27 bool AbsAxis = (Abs2 != std::string::npos) && (Abs2 != 0);
28 if (
axis.find(
"pt") != std::string::npos ||
axis.find(
"pT") != std::string::npos ||
axis.find(
"p_{T}") != std::string::npos) {
29 return std::make_unique<PtAxisHandler>(parent);
30 }
else if (
axis.find(
"phi") != std::string::npos) {
31 return std::make_unique<PhiAxisHandler>(parent);
32 }
else if (
axis.find(
"q") != std::string::npos ||
axis.find(
"charge") != std::string::npos) {
33 return std::make_unique<ChargeAxisHandler>(parent);
34 }
else if (
axis.find(
"eta") != std::string::npos) {
35 if (AbsAxis) return std::make_unique<AbsEtaAxisHandler>(parent);
36 return std::make_unique<EtaAxisHandler>(parent);
37 }
else if (
axis.find(
"dRJet") != std::string::npos ||
axis.find(
"#DeltaR (jet, #mu)") != std::string::npos) {
38 return std::make_unique<dRJetAxisHandler>(parent);
39 }
40
41 Error(
"AxisHandlerProvider",
"Can not interpret axis title '%s'",
axis.c_str());
42 } else {
43 Error(
"AxisHandlerProvider",
"nullptr pointer passed");
44 }
45 return std::make_unique<UndefinedAxisHandler>(parent);
46 }
std::string EraseWhiteSpaces(std::string str)
Removes beginning and trailing white spaces from a string.
Error
The different types of error that can be flagged in the L1TopoRDO.