KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDBTable Class Reference

Detailed Description

Table in a database.

Definition at line 34 of file KVDBTable.h.

#include <KVDBTable.h>

Inheritance diagram for KVDBTable:

Public Member Functions

 KVDBTable ()
 
 KVDBTable (const Char_t *name, const Char_t *title="", Bool_t unique=kFALSE)
 
virtual ~KVDBTable ()
 
virtual Bool_t AddRecord (KVDBRecord *add)
 
virtual const Char_tGetFullPath () const
 
virtual KVDBRecordGetRecord (const Char_t *rec_name) const
 
virtual KVDBRecordGetRecord (Int_t n) const
 
virtual KVSeqCollectionGetRecords () const
 
Bool_t HasDefaultFormat () const
 
virtual void ls (Option_t *option="*") const
 
void Rehash (void)
 
virtual void RemoveRecord (KVDBRecord *add)
 Remove a KVDBRecord from the list of available records.
 
void SetDefaultFormat (const TString &)
 
virtual void SetFullPath (const Char_t *path)
 
- Public Member Functions inherited from TFolder
 TFolder ()
 
 TFolder (const char *name, const char *title)
 
virtual ~TFolder ()
 
virtual void Add (TObject *obj)
 
TFolderAddFolder (const char *name, const char *title, TCollection *collection=nullptr)
 
void Browse (TBrowser *b) override
 
void Clear (Option_t *option="") override
 
void Copy (TObject &) const override
 
virtual const char * FindFullPathName (const char *name) const
 
virtual const char * FindFullPathName (const TObject *obj) const
 
TObjectFindObject (const char *name) const override
 
TObjectFindObject (const TObject *obj) const override
 
virtual TObjectFindObjectAny (const char *name) const
 
TCollectionGetListOfFolders () const
 
TClassIsA () const override
 
Bool_t IsFolder () const override
 
Bool_t IsOwner () const
 
void ls (Option_t *option="") const override
 
virtual Int_t Occurence (const TObject *obj) const
 
void RecursiveRemove (TObject *obj) override
 
virtual void Remove (TObject *obj)
 
void SaveAs (const char *filename="", Option_t *option="") const override
 
virtual void SetOwner (Bool_t owner=kTRUE)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
void Clear (Option_t *option="") override
 
TObjectClone (const char *newname="") const override
 
Int_t Compare (const TObject *obj) const override
 
void Copy (TObject &named) const override
 
virtual void FillBuffer (char *&buffer)
 
const char * GetName () const override
 
const char * GetTitle () const override
 
ULong_t Hash () const override
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 
TNamedoperator= (const TNamed &rhs)
 
void Print (Option_t *option="") const override
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
void ResetBit (UInt_t f)
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 

Private Member Functions

TObjectFindObject (const Char_t *) const
 
TObjectFindObject (const TObject *) const
 

Private Attributes

TString fDefFormatNumRec
 default formatting for names of numbered records
 
TString fFullPath
 full path to table in folder structure
 
Bool_t fIsUnique
 Must each record name be unique ?
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from TFolder
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 
- Protected Attributes inherited from TFolder
TCollectionfFolders
 
Bool_t fIsOwner
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Constructor & Destructor Documentation

◆ KVDBTable() [1/2]

KVDBTable::KVDBTable ( )

Definition at line 33 of file KVDBTable.cpp.

◆ KVDBTable() [2/2]

KVDBTable::KVDBTable ( const Char_t name,
const Char_t title = "",
Bool_t  unique = kFALSE 
)

Definition at line 43 of file KVDBTable.cpp.

◆ ~KVDBTable()

KVDBTable::~KVDBTable ( )
virtual

Definition at line 60 of file KVDBTable.cpp.

Member Function Documentation

◆ AddRecord()

Bool_t KVDBTable::AddRecord ( KVDBRecord rec)
virtual

Add a KVDBRecord to the list of available records and return kTRUE If a default formatting string for names of numbered records has been set (see SetDefaultFormat(const TString&)) the name of the record will be automatically set here according to the format and its number.

Definition at line 74 of file KVDBTable.cpp.

◆ FindObject() [1/2]

TObject * KVDBTable::FindObject ( const Char_t ) const
inlineprivatevirtual

Reimplemented from TObject.

Definition at line 37 of file KVDBTable.h.

◆ FindObject() [2/2]

TObject * KVDBTable::FindObject ( const TObject ) const
inlineprivatevirtual

Reimplemented from TObject.

Definition at line 41 of file KVDBTable.h.

◆ GetFullPath()

virtual const Char_t * KVDBTable::GetFullPath ( ) const
inlinevirtual

Definition at line 75 of file KVDBTable.h.

◆ GetRecord() [1/2]

virtual KVDBRecord * KVDBTable::GetRecord ( const Char_t rec_name) const
inlinevirtual

Definition at line 58 of file KVDBTable.h.

◆ GetRecord() [2/2]

KVDBRecord * KVDBTable::GetRecord ( Int_t  num) const
virtual

Sequential search for record using its number. To keep things simple, we only search in the top level of the folder structure.

NOTE: if there are many records, this sequential search can be long. If a default format for the record name using its number has been defined (see SetDefaultFormat(const TString&)) the search will be performed using the resulting formatted object name, which is fast (hash list).

Definition at line 146 of file KVDBTable.cpp.

◆ GetRecords()

virtual KVSeqCollection * KVDBTable::GetRecords ( ) const
inlinevirtual

Definition at line 63 of file KVDBTable.h.

◆ HasDefaultFormat()

Bool_t KVDBTable::HasDefaultFormat ( ) const
inline

Definition at line 81 of file KVDBTable.h.

◆ ls()

void KVDBTable::ls ( Option_t option = "*") const
virtual

Reimplemented from TObject.

Definition at line 106 of file KVDBTable.cpp.

◆ Rehash()

void KVDBTable::Rehash ( void  )

The list of records is a KVHashList or KVUniqueNameList Call this method if the names of the records change after having been added to the table, otherwise GetRecord(const char*) will not work.

Definition at line 172 of file KVDBTable.cpp.

◆ RemoveRecord()

void KVDBTable::RemoveRecord ( KVDBRecord add)
virtual

Remove a KVDBRecord from the list of available records.

Definition at line 93 of file KVDBTable.cpp.

◆ SetDefaultFormat()

void KVDBTable::SetDefaultFormat ( const TString fmt)

Set a default formatting string for names of numbered records. e.g. if fmt="Rec#%d", each record which is added to the table will have its name automatically set to "Rec#1", "Rec#2", etc., according to the record number. This allows to replace a slow sequential scan for a record based on number (GetRecord(Int_t)) with a fast hash-based look-up

Definition at line 122 of file KVDBTable.cpp.

◆ SetFullPath()

virtual void KVDBTable::SetFullPath ( const Char_t path)
inlinevirtual

Definition at line 71 of file KVDBTable.h.

Member Data Documentation

◆ fDefFormatNumRec

TString KVDBTable::fDefFormatNumRec
private

default formatting for names of numbered records

Definition at line 50 of file KVDBTable.h.

◆ fFullPath

TString KVDBTable::fFullPath
private

full path to table in folder structure

Definition at line 49 of file KVDBTable.h.

◆ fIsUnique

Bool_t KVDBTable::fIsUnique
private

Must each record name be unique ?

Definition at line 48 of file KVDBTable.h.