ATLAS Offline Software
Static Public Member Functions | List of all members
CP::AxisHandlerProvider Class Reference

#include <HistHandler.h>

Collaboration diagram for CP::AxisHandlerProvider:

Static Public Member Functions

static std::unique_ptr< AxisHandlerGetAxisHandler (const TAxis *axis)
 

Detailed Description

Definition at line 190 of file HistHandler.h.

Member Function Documentation

◆ GetAxisHandler()

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

Definition at line 20 of file HistHandler.cxx.

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>();
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>();
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>();
46  }

The documentation for this class was generated from the following files:
yodamerge_tmp.axis
list axis
Definition: yodamerge_tmp.py:241
CP::EraseWhiteSpaces
std::string EraseWhiteSpaces(std::string str)
Removes beginning and trailing white spaces from a string.
Definition: PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx:31
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16