ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
ToolHandleHistoHelper::HistoRetriever Struct Reference

#include <ToolHandleHistoHelper.h>

Collaboration diagram for ToolHandleHistoHelper::HistoRetriever:

Public Member Functions

std::string afterlastdot (const std::string &s)
 
 HistoRetriever (ToolHandleArray< HistoDefinitionTool > &h)
 
HistoDefinitionToolretrieveTool (const std::string &n)
 
template<typename T >
T * build (const std::string &n)
 

Public Attributes

ToolHandleArray< HistoDefinitionTool > & histos
 

Detailed Description

Definition at line 26 of file ToolHandleHistoHelper.h.

Constructor & Destructor Documentation

◆ HistoRetriever()

ToolHandleHistoHelper::HistoRetriever::HistoRetriever ( ToolHandleArray< HistoDefinitionTool > &  h)
inline

Definition at line 33 of file ToolHandleHistoHelper.h.

33 : histos(h) {}

Member Function Documentation

◆ afterlastdot()

std::string ToolHandleHistoHelper::HistoRetriever::afterlastdot ( const std::string &  s)
inline

Definition at line 28 of file ToolHandleHistoHelper.h.

28  {
29  size_t i = s.find_last_of(".");
30  return s.substr( i+1, s.size() );
31  }

◆ build()

template<typename T >
T* ToolHandleHistoHelper::HistoRetriever::build ( const std::string &  n)
inline

Definition at line 44 of file ToolHandleHistoHelper.h.

44  {
45  std::string name = "hdef_"; name+=n;
47  if (!tool ) return NULL;
48  return tool->build<T>();
49  }

◆ retrieveTool()

HistoDefinitionTool* ToolHandleHistoHelper::HistoRetriever::retrieveTool ( const std::string &  n)
inline

Definition at line 35 of file ToolHandleHistoHelper.h.

35  {
36  for( auto toolH : histos){
37  //std::cout << " xxxx compare "<< afterlastdot( toolH->name() ) << " to "<< n <<std::endl;
38  if( afterlastdot(toolH->name()) == n ) return toolH.operator->();
39  }
40  return NULL;
41  }

Member Data Documentation

◆ histos

ToolHandleArray<HistoDefinitionTool>& ToolHandleHistoHelper::HistoRetriever::histos

Definition at line 52 of file ToolHandleHistoHelper.h.


The documentation for this struct was generated from the following file:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ToolHandleHistoHelper::HistoRetriever::histos
ToolHandleArray< HistoDefinitionTool > & histos
Definition: ToolHandleHistoHelper.h:52
ToolHandleHistoHelper::HistoRetriever::retrieveTool
HistoDefinitionTool * retrieveTool(const std::string &n)
Definition: ToolHandleHistoHelper.h:35
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
h
ToolHandleHistoHelper::HistoRetriever::afterlastdot
std::string afterlastdot(const std::string &s)
Definition: ToolHandleHistoHelper.h:28
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
HistoDefinitionTool
Definition: HistoDefinitionTool.h:31