ATLAS Offline Software
Loading...
Searching...
No Matches
CP::AxisHandlerProvider Class Reference

#include <HistHandler.h>

Collaboration diagram for CP::AxisHandlerProvider:

Static Public Member Functions

static std::unique_ptr< AxisHandlerGetAxisHandler (columnar::ColumnarTool<> *parent, const TAxis *axis)

Detailed Description

Definition at line 190 of file HistHandler.h.

Member Function Documentation

◆ GetAxisHandler()

std::unique_ptr< AxisHandler > CP::AxisHandlerProvider::GetAxisHandler ( columnar::ColumnarTool<> * parent,
const TAxis * axis )
static

Definition at line 20 of file HistHandler.cxx.

20 {
21 if (axisptr != nullptr) {
22 std::string axis = axisptr->GetTitle();
23 axis = EraseWhiteSpaces(axis);
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.
Definition Error.h:16

The documentation for this class was generated from the following files: