NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
NAGASH::TFileHelper Class Reference

Provide fast access to ROOT objects inside a TFile. More...

#include "NAGASH/TFileHelper.h"

Inheritance diagram for NAGASH::TFileHelper:
NAGASH::Tool

Public Member Functions

 TFileHelper (std::shared_ptr< MSGTool > msg, const std::string &name)
 Constructor.
 
virtual ~TFileHelper ()
 Destructor.
 
void Close ()
 Close the ROOT file.
 
TH1 * Get (const std::string &name)
 Get TH1 object.
 
const std::vector< std::string > & GetListOfHistNames ()
 Get a vector stores the list of the names of histogram.
 
TGraph * GetTGraph (const std::string &name)
 Get TGraph object.
 
TTree * GetTree (const std::string &name)
 Get TTree object.
 

Private Attributes

std::vector< std::string > histnames
 
TFile * infile = nullptr
 
bool isopen = false
 
std::map< std::string, TKey * > map_name_graph
 
std::map< std::string, TKey * > map_name_hist
 
std::map< std::string, TKey * > map_name_tree
 

Additional Inherited Members

- Protected Member Functions inherited from NAGASH::Tool
 Tool ()=delete
 
 Tool (const Tool &tool)=delete
 
 Tool (std::shared_ptr< MSGTool > MSG)
 Constructor.
 
 Tool (Tool &&tool)=delete
 
virtual ~Tool ()=default
 
std::shared_ptr< MSGToolMSGUser ()
 return the MSGTool inside.
 
Tooloperator= (const Tool &tool)=delete
 
Tooloperator= (Tool &&tool)=delete
 

Detailed Description

Provide fast access to ROOT objects inside a TFile.

Definition at line 18 of file TFileHelper.h.

Constructor & Destructor Documentation

◆ TFileHelper()

NAGASH::TFileHelper::TFileHelper ( std::shared_ptr< MSGTool msg,
const std::string &  name 
)
inline

Constructor.

Parameters
msginput MSGTool.
namename of the ROOT file.

Definition at line 24 of file TFileHelper.h.

◆ ~TFileHelper()

virtual NAGASH::TFileHelper::~TFileHelper ( )
inlinevirtual

Destructor.

Definition at line 176 of file TFileHelper.h.

Member Function Documentation

◆ Close()

void NAGASH::TFileHelper::Close ( )
inline

Close the ROOT file.

Definition at line 153 of file TFileHelper.h.

◆ Get()

TH1 * NAGASH::TFileHelper::Get ( const std::string &  name)
inline

Get TH1 object.

Parameters
namename of the TH1 object.

Definition at line 80 of file TFileHelper.h.

◆ GetListOfHistNames()

const std::vector< std::string > & NAGASH::TFileHelper::GetListOfHistNames ( )
inline

Get a vector stores the list of the names of histogram.

Returns

Definition at line 170 of file TFileHelper.h.

◆ GetTGraph()

TGraph * NAGASH::TFileHelper::GetTGraph ( const std::string &  name)
inline

Get TGraph object.

Parameters
namename of the TGraph object

Definition at line 129 of file TFileHelper.h.

◆ GetTree()

TTree * NAGASH::TFileHelper::GetTree ( const std::string &  name)
inline

Get TTree object.

Parameters
namename of the TTree object.

Definition at line 104 of file TFileHelper.h.

Member Data Documentation

◆ histnames

std::vector<std::string> NAGASH::TFileHelper::histnames
private

Definition at line 185 of file TFileHelper.h.

◆ infile

TFile* NAGASH::TFileHelper::infile = nullptr
private

Definition at line 186 of file TFileHelper.h.

◆ isopen

bool NAGASH::TFileHelper::isopen = false
private

Definition at line 187 of file TFileHelper.h.

◆ map_name_graph

std::map<std::string, TKey *> NAGASH::TFileHelper::map_name_graph
private

Definition at line 183 of file TFileHelper.h.

◆ map_name_hist

std::map<std::string, TKey *> NAGASH::TFileHelper::map_name_hist
private

Definition at line 182 of file TFileHelper.h.

◆ map_name_tree

std::map<std::string, TKey *> NAGASH::TFileHelper::map_name_tree
private

Definition at line 184 of file TFileHelper.h.


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