ant
A2 ant: class-based analysis framework
ant::WrapTFileOutput Class Reference

#include <WrapTFile.h>

+ Inheritance diagram for ant::WrapTFileOutput:
+ Collaboration diagram for ant::WrapTFileOutput:

Public Types

enum  mode_t { mode_t::create, mode_t::recreate, mode_t::update }
 

Public Member Functions

 WrapTFileOutput (const std::string &filename, bool changeDirectory=false, mode_t Mode=mode_t::recreate)
 
virtual ~WrapTFileOutput ()
 
void cd ()
 
template<class T , typename... Args>
T * CreateInside (Args &&... args)
 
template<typename T >
int WriteObject (T *obj, const std::string &name)
 
 WrapTFileOutput (const WrapTFileOutput &)=delete
 
WrapTFileOutputoperator= (const WrapTFileOutput &)=delete
 
- Public Member Functions inherited from ant::WrapTFile
void Traverse (std::function< void(TKey *)> func) const
 Traverse applies given function to each leaf in the tree of TDirectory. More...
 
template<class T >
std::list< T * > GetListOf () const
 GetListOf Generate a list with all Object in File of provided Type. More...
 
template<typename T >
bool GetObject (const std::string &name, T *&ptr) const
 Find TObject of type T and given name in the file(s). More...
 
template<typename Hist >
std::shared_ptr< Hist > GetSharedHist (const std::string &name) const
 
template<typename T >
std::shared_ptr< T > GetSharedClone (const std::string &name) const
 
template<typename T >
bool GetObjectClone (const std::string &name, T &object) const
 
virtual ~WrapTFile ()
 
 WrapTFile (const WrapTFile &)=delete
 
WrapTFileoperator= (const WrapTFile &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from ant::WrapTFile
std::unique_ptr< TFile > openFile (const std::string &filename, const std::string mode)
 
 WrapTFile ()
 
- Static Protected Member Functions inherited from ant::WrapTFile
static bool hasROOTmagic (const std::string &filename)
 
- Protected Attributes inherited from ant::WrapTFile
std::list< std::unique_ptr< TFile > > files
 

Member Enumeration Documentation

◆ mode_t

Enumerator
create 
recreate 
update 

Constructor & Destructor Documentation

◆ WrapTFileOutput() [1/2]

WrapTFileOutput::WrapTFileOutput ( const std::string &  filename,
bool  changeDirectory = false,
mode_t  Mode = mode_t::recreate 
)
explicit

◆ ~WrapTFileOutput()

WrapTFileOutput::~WrapTFileOutput ( )
virtual

◆ WrapTFileOutput() [2/2]

ant::WrapTFileOutput::WrapTFileOutput ( const WrapTFileOutput )
delete

Member Function Documentation

◆ cd()

void WrapTFileOutput::cd ( )

◆ CreateInside()

template<class T , typename... Args>
T* ant::WrapTFileOutput::CreateInside ( Args &&...  args)
inline

◆ operator=()

WrapTFileOutput& ant::WrapTFileOutput::operator= ( const WrapTFileOutput )
delete

◆ WriteObject()

template<typename T >
int ant::WrapTFileOutput::WriteObject ( T *  obj,
const std::string &  name 
)
inline

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