ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::ConfigurableAlg::ConfigurableAlgImpl Class Reference

The implementation class. More...

Collaboration diagram for TCS::ConfigurableAlg::ConfigurableAlgImpl:

Public Member Functions

 ConfigurableAlgImpl (const std::string &name)
 ~ConfigurableAlgImpl ()
void setL1TopoHistSvc (std::shared_ptr< IL1TopoHistSvc > histSvc)
void registerHist (TH1 *h)
void registerHist (TH2 *h)
void fillHist1D (const std::string &histName, double x)
void fillHist2D (const std::string &histName, double x, double y)

Private Attributes

std::string m_name
std::shared_ptr< IL1TopoHistSvcm_histSvc
std::vector< TH1 * > m_localHistStore

Detailed Description

The implementation class.

Definition at line 29 of file ConfigurableAlg.cxx.

Constructor & Destructor Documentation

◆ ConfigurableAlgImpl()

TCS::ConfigurableAlg::ConfigurableAlgImpl::ConfigurableAlgImpl ( const std::string & name)
inline

Definition at line 31 of file ConfigurableAlg.cxx.

31 :
33 {}
const std::string & name() const

◆ ~ConfigurableAlgImpl()

TCS::ConfigurableAlg::ConfigurableAlgImpl::~ConfigurableAlgImpl ( )
inline

Definition at line 35 of file ConfigurableAlg.cxx.

35 {
36 for( auto h : m_localHistStore )
37 delete h;
38 }

Member Function Documentation

◆ fillHist1D()

void TCS::ConfigurableAlg::ConfigurableAlgImpl::fillHist1D ( const std::string & histName,
double x )
inline

Definition at line 68 of file ConfigurableAlg.cxx.

68 {
69 if ( m_histSvc ) {
70 m_histSvc->fillHist1D(histName,x);
71 } else {
72 //Implement here to fill local histograms or something.
73 return;
74 }
75 }
#define x
std::shared_ptr< IL1TopoHistSvc > m_histSvc

◆ fillHist2D()

void TCS::ConfigurableAlg::ConfigurableAlgImpl::fillHist2D ( const std::string & histName,
double x,
double y )
inline

Definition at line 78 of file ConfigurableAlg.cxx.

78 {
79 if ( m_histSvc ) {
80 m_histSvc->fillHist2D(histName,x,y);
81 } else {
82 //Implement here to fill local histograms or something.
83 return;
84 }
85 }
#define y

◆ registerHist() [1/2]

void TCS::ConfigurableAlg::ConfigurableAlgImpl::registerHist ( TH1 * h)
inline

Definition at line 44 of file ConfigurableAlg.cxx.

44 {
45 // histograms in the L1Topo framework are put in a algorithm specific folder
46 std::string newHistName = m_name + "/" + h->GetName();
47 h->SetName(newHistName.c_str());
48
49 if( m_histSvc ) {
50 m_histSvc->registerHist(h);
51 } else {
52 m_localHistStore.push_back(h);
53 }
54 }

◆ registerHist() [2/2]

void TCS::ConfigurableAlg::ConfigurableAlgImpl::registerHist ( TH2 * h)
inline

Definition at line 56 of file ConfigurableAlg.cxx.

56 {
57 // histograms in the L1Topo framework are put in a algorithm specific folder
58 std::string newHistName = m_name + "/" + h->GetName();
59 h->SetName(newHistName.c_str());
60
61 if( m_histSvc ) {
62 m_histSvc->registerHist(h);
63 } else {
64 m_localHistStore.push_back(h);
65 }
66 }

◆ setL1TopoHistSvc()

void TCS::ConfigurableAlg::ConfigurableAlgImpl::setL1TopoHistSvc ( std::shared_ptr< IL1TopoHistSvc > histSvc)
inline

Definition at line 40 of file ConfigurableAlg.cxx.

40 {
41 m_histSvc = std::move(histSvc);
42 }

Member Data Documentation

◆ m_histSvc

std::shared_ptr<IL1TopoHistSvc> TCS::ConfigurableAlg::ConfigurableAlgImpl::m_histSvc
private

Definition at line 93 of file ConfigurableAlg.cxx.

◆ m_localHistStore

std::vector<TH1 *> TCS::ConfigurableAlg::ConfigurableAlgImpl::m_localHistStore
private

Definition at line 96 of file ConfigurableAlg.cxx.

◆ m_name

std::string TCS::ConfigurableAlg::ConfigurableAlgImpl::m_name
private

Definition at line 90 of file ConfigurableAlg.cxx.


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