80 void *
operator new(
size_t sz) {
return TObject::operator
new(sz); }
81 void *
operator new[](
size_t sz) {
return TObject::operator
new[](sz); }
82 void *
operator new(
size_t sz,
void *vp) {
return TObject::operator
new(sz, vp); }
83 void *
operator new[](
size_t sz,
void *vp) {
return TObject::operator
new[](sz, vp); }
84 void operator delete(
void *vp);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
Using a TBrowser one can browse all ROOT objects.
Describe directory structure in memory.
This class implements a shared memory region mapped to a file.
static TMapFile * WhichMapFile(void *addr)
void * GetBreakval() const
Return the current location in the memory region for this malloc heap which represents the end of mem...
Int_t fWritten
Number of objects written so far.
static TMapFile * Create(const char *name, Option_t *option="READ", Int_t size=kDefaultMapSize, const char *title="")
Create a memory mapped file.
TMapRec * fLast
Last object in list of shared objects.
Int_t fVersion
ROOT version (or -1 for shadow map file)
const char * GetOption() const
ULongptr_t fBaseAddr
Base address of mapped memory region.
TObject * Remove(TObject *obj)
void Close(Option_t *option="")
Close a mapped file.
TDirectory * fDirectory
Pointer to directory associated to this mapfile.
void SumBuffer(Int_t bufsize)
Increment statistics for buffer sizes of objects in this file.
void Update(TObject *obj=0)
Update an object (or all objects, if obj == 0) in shared memory.
void * GetMmallocDesc() const
TObject * Get(const char *name, TObject *retObj=nullptr)
Return pointer to object retrieved from shared memory.
void * GetBaseAddr() const
char * fTitle
Title of mapped file.
void InitDirectory()
Create the directory associated to this mapfile.
TMapRec * GetLast() const
Bool_t IsWritable() const
TMapFile & operator=(const TMapFile &rhs)=delete
void RemoveAll()
Remove all objects from shared memory.
Double_t fSum2Buffer
Sum of squares of buffer sizes of objects written so far.
Bool_t fWritable
TRUE if mapped file opened in RDWR mode.
Longptr_t fOffset
Offset in bytes for region mapped by reader.
void * OrgAddress(void *addr) const
Bool_t IsFolder() const
Returns kTRUE in case object is a folder (i.e. contains browsable lists).
void DeleteSemaphore()
Delete the semaphore.
Longptr_t fSemaphore
Modification semaphore (or getpid() for WIN32)
TList * fBrowseList
List of KeyMapFile objects.
TMapRec * fFirst
List of streamed objects is shared memory.
ULongptr_t fhSemaphore
HANDLE of WIN32 Mutex object to implement semaphore.
static void * MapToAddress()
Return the base address at which we would like the next TMapFile's mapped data to start.
TObject * fGetting
Don't deadlock in update mode, when from Get() Add() is called.
TMapFile * FindShadowMapFile()
Returns shadow map file.
void Browse(TBrowser *b)
Browse contents of TMapFile.
void ls(Option_t *option="") const
List contents of TMapFile.
void * fMmallocDesc
Pointer to mmalloc descriptor.
Double_t fSumBuffer
Sum of buffer sizes of objects written so far.
static void * fgMmallocDesc
Used in Close() and operator delete()
TDirectory * GetDirectory() const
void CreateSemaphore(Int_t pid=0)
Create semaphore used for synchronizing access to shared memory.
Longptr_t fFd
Descriptor of mapped file.
Int_t fSize
Original start size of memory mapped region.
TObject * Remove(TObject *obj, Bool_t lock)
Remove object from shared memory.
Int_t ReleaseSemaphore()
Release semaphore. Returns 0 if OK, -1 on error.
static void SetMapAddress(Longptr_t addr)
Set preferred map address.
char * fName
Name of mapped file.
Bool_t cd(const char *path=0)
Cd to associated directory.
TMapFile()
Default ctor. Does not much except setting some basic values.
char * fOption
Directory creation options.
Int_t AcquireSemaphore()
Acquire semaphore. Returns 0 if OK, -1 on error.
const char * GetName() const
Returns name of object.
TObject * Remove(const char *name)
void Add(const TObject *obj, const char *name="")
Add an object to the list of objects to be stored in shared memory.
virtual ~TMapFile()
TMapFiles may not be deleted, since we want to keep the complete TMapFile object in the mapped file f...
static Longptr_t fgMapAddress
Map to this address, set address via SetMapAddress()
const char * GetTitle() const
Returns title of object.
void Print(Option_t *option="") const
Print some info about the mapped file.
Int_t GetBestBuffer()
Return the best buffer size for objects in this file.
TMapRec * GetFirst() const
Keep track of an object in the mapped file.
TObject * fObject
Pointer to original object.
TMapRec & operator=(const TMapRec &)=delete
Int_t fBufSize
Buffer size.
TMapRec(const TMapRec &)=delete
const char * GetClassName(Longptr_t offset=0) const
TMapRec * fNext
Next MapRec in list.
TObject * GetObject() const
This method returns a pointer to the original object.
const char * GetName(Longptr_t offset=0) const
TMapRec * GetNext(Longptr_t offset=0) const
void * GetBuffer(Longptr_t offset=0) const
char * fClassName
Class name.
void * fBuffer
Buffer containing object of class name.
Mother of all ROOT objects.