Project
Loading...
Searching...
No Matches
o2::utils::MemFileHelper Struct Reference

#include <MemFileHelper.h>

Public Types

using FileImage = std::vector< char >
 

Public Member Functions

 ClassDefNV (MemFileHelper, 1)
 

Static Public Member Functions

template<typename T >
static std::string getClassName (const T &obj)
 get the class name of the object
 
template<typename T >
static std::unique_ptr< TMemFile > createTMemFile (const T &obj, const std::string &fName, const std::string &optName="")
 dump object into the TMemFile named fileName. The stored object will be named according to the optName or its className
 
static std::unique_ptr< FileImagecreateFileImage (const TObject &obj, const std::string &fileName, const std::string &objName)
 
template<typename T >
static std::unique_ptr< FileImagecreateFileImage (const T &obj, const std::string &fileName, const std::string &optName="")
 
static std::string getClassName (const std::type_info &tinfo)
 get the class name of the object
 
static std::unique_ptr< TMemFile > createTMemFile (const TObject &rootObject, const std::string &fName, const std::string &objName)
 dump TObject the TMemFile named fileName. The stored object will be named according to the optName or its className
 
static std::unique_ptr< TMemFile > createTMemFile (const void *obj, const std::type_info &tinfo, const std::string &fName, const std::string &optName="")
 dump object into the TMemFile named fileName. The stored object will be named according to the optName or its className
 
static std::unique_ptr< FileImagecreateFileImage (const void *obj, const std::type_info &tinfo, const std::string &fileName, const std::string &optName="")
 

Detailed Description

Static class for with methods to dump any root-persistent class to a TMemFile or its binary image

Definition at line 33 of file MemFileHelper.h.

Member Typedef Documentation

◆ FileImage

Definition at line 34 of file MemFileHelper.h.

Member Function Documentation

◆ ClassDefNV()

o2::utils::MemFileHelper::ClassDefNV ( MemFileHelper  ,
 
)

◆ createFileImage() [1/3]

template<typename T >
static std::unique_ptr< FileImage > o2::utils::MemFileHelper::createFileImage ( const T &  obj,
const std::string &  fileName,
const std::string &  optName = "" 
)
inlinestatic

create binary image of the TMemFile containing the object and named fileName. The stored object will be named according to the objName

Definition at line 68 of file MemFileHelper.h.

◆ createFileImage() [2/3]

static std::unique_ptr< FileImage > o2::utils::MemFileHelper::createFileImage ( const TObject obj,
const std::string &  fileName,
const std::string &  objName 
)
inlinestatic

create binary image of the TMemFile containing the object and named fileName. The stored object will be named according to the objName

Definition at line 55 of file MemFileHelper.h.

◆ createFileImage() [3/3]

static std::unique_ptr< FileImage > o2::utils::MemFileHelper::createFileImage ( const void obj,
const std::type_info &  tinfo,
const std::string &  fileName,
const std::string &  optName = "" 
)
inlinestatic

create binary image of the TMemFile containing the object and named fileName. The stored object will be named according to the optName or its className

Definition at line 154 of file MemFileHelper.h.

◆ createTMemFile() [1/3]

template<typename T >
static std::unique_ptr< TMemFile > o2::utils::MemFileHelper::createTMemFile ( const T &  obj,
const std::string &  fName,
const std::string &  optName = "" 
)
inlinestatic

dump object into the TMemFile named fileName. The stored object will be named according to the optName or its className

Definition at line 47 of file MemFileHelper.h.

◆ createTMemFile() [2/3]

static std::unique_ptr< TMemFile > o2::utils::MemFileHelper::createTMemFile ( const TObject rootObject,
const std::string &  fName,
const std::string &  objName 
)
inlinestatic

dump TObject the TMemFile named fileName. The stored object will be named according to the optName or its className

Definition at line 90 of file MemFileHelper.h.

◆ createTMemFile() [3/3]

static std::unique_ptr< TMemFile > o2::utils::MemFileHelper::createTMemFile ( const void obj,
const std::type_info &  tinfo,
const std::string &  fName,
const std::string &  optName = "" 
)
inlinestatic

dump object into the TMemFile named fileName. The stored object will be named according to the optName or its className

Definition at line 111 of file MemFileHelper.h.

◆ getClassName() [1/2]

static std::string o2::utils::MemFileHelper::getClassName ( const std::type_info &  tinfo)
inlinestatic

get the class name of the object

Definition at line 75 of file MemFileHelper.h.

◆ getClassName() [2/2]

template<typename T >
static std::string o2::utils::MemFileHelper::getClassName ( const T &  obj)
inlinestatic

get the class name of the object

Definition at line 39 of file MemFileHelper.h.


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