CFEL - ASG Software Suite  2.5.0
CASS
Static Public Member Functions | Private Types | Private Member Functions | Static Private Attributes | List of all members
cass::ROOTFileHelper Class Reference

root file creation More...

#include <rootfile_helper.h>

+ Collaboration diagram for cass::ROOTFileHelper:

Static Public Member Functions

static TFile * create (const std::string &rootfilename, const std::string &options="RECREATE")
 create and return an instance of the rootfile More...
 
static void close (TFile *rootfile)
 close root file More...
 

Private Types

typedef std::map< std::string, TFile * > rootfiles_t
 easier code More...
 

Private Member Functions

 ROOTFileHelper ()
 make default constructor private More...
 

Static Private Attributes

static rootfiles_t _rootfiles
 container for all the root files More...
 
static QMutex _mutex
 Singleton Mutex to lock write operations. More...
 

Detailed Description

root file creation

create an instance of a rootfile and return it. In case ROOT file aready exists return the instance of that root file.

Author
Lutz Foucar

Definition at line 28 of file rootfile_helper.h.

Member Typedef Documentation

typedef std::map<std::string,TFile *> cass::ROOTFileHelper::rootfiles_t
private

easier code

Definition at line 35 of file rootfile_helper.h.

Constructor & Destructor Documentation

cass::ROOTFileHelper::ROOTFileHelper ( )
inlineprivate

make default constructor private

Definition at line 32 of file rootfile_helper.h.

Member Function Documentation

void ROOTFileHelper::close ( TFile *  rootfile)
static

close root file

Parameters
rootfilepointer to the root file instance. pointer should be the same as the one returned in create()

Definition at line 37 of file rootfile_helper.cpp.

Referenced by cass::pp2001::aboutToQuit(), and cass::pp2000::aboutToQuit().

TFile * ROOTFileHelper::create ( const std::string &  rootfilename,
const std::string &  options = "RECREATE" 
)
static

create and return an instance of the rootfile

create an instance of the root file with the given parameters. If the rootfile already exists don't create a new one but return the one already existing

Returns
an instance of the TFile
Parameters
rootfilenamefilename of the rootfile
optionsstring containing the option with which the root file should be opened.

Definition at line 27 of file rootfile_helper.cpp.

Referenced by cass::pp2000::loadSettings().

Member Data Documentation

QMutex ROOTFileHelper::_mutex
staticprivate

Singleton Mutex to lock write operations.

Definition at line 65 of file rootfile_helper.h.

ROOTFileHelper::rootfiles_t ROOTFileHelper::_rootfiles
staticprivate

container for all the root files

Definition at line 62 of file rootfile_helper.h.


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