#include <HistHandler.h>
Definition at line 190 of file HistHandler.h.
◆ GetAxisHandler()
std::unique_ptr< AxisHandler > CP::AxisHandlerProvider::GetAxisHandler |
( |
const TAxis * |
axis | ) |
|
|
static |
Definition at line 20 of file HistHandler.cxx.
21 if (axisptr !=
nullptr) {
22 std::string
axis = axisptr->GetTitle();
24 size_t Abs1 =
axis.find(
"|");
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>();
30 }
else if (
axis.find(
"phi") != std::string::npos) {
31 return std::make_unique<PhiAxisHandler>();
32 }
else if (
axis.find(
"q") != std::string::npos ||
axis.find(
"charge") != std::string::npos) {
33 return std::make_unique<ChargeAxisHandler>();
34 }
else if (
axis.find(
"eta") != std::string::npos) {
35 if (AbsAxis)
return std::make_unique<AbsEtaAxisHandler>();
36 return std::make_unique<EtaAxisHandler>();
37 }
else if (
axis.find(
"dRJet") != std::string::npos ||
axis.find(
"#DeltaR (jet, #mu)") != std::string::npos) {
38 return std::make_unique<dRJetAxisHandler>();
41 Error(
"AxisHandlerProvider",
"Can not interpret axis title '%s'",
axis.c_str());
43 Error(
"AxisHandlerProvider",
"nullptr pointer passed");
45 return std::make_unique<UndefinedAxisHandler>();
The documentation for this class was generated from the following files: