Table in a database.
Definition at line 34 of file KVDBTable.h.
#include <KVDBTable.h>
◆ KVDBTable() [1/2]
◆ KVDBTable() [2/2]
| KVDBTable::KVDBTable |
( |
const Char_t * |
name, |
|
|
const Char_t * |
title = "", |
|
|
Bool_t |
unique = kFALSE |
|
) |
| |
◆ ~ KVDBTable()
◆ AddRecord()
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 75 of file KVDBTable.cpp.
◆ GetFullPath()
| virtual const Char_t* KVDBTable::GetFullPath |
( |
| ) |
const |
|
inlinevirtual |
◆ GetRecord() [1/2]
| virtual KVDBRecord* KVDBTable::GetRecord |
( |
const Char_t * |
rec_name | ) |
const |
|
inlinevirtual |
◆ 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 148 of file KVDBTable.cpp.
◆ GetRecords()
◆ HasDefaultFormat()
| Bool_t KVDBTable::HasDefaultFormat |
( |
| ) |
const |
|
inline |
◆ ls()
| void KVDBTable::ls |
( |
Option_t * |
option = "*" | ) |
const |
|
override |
◆ 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 174 of file KVDBTable.cpp.
◆ RemoveRecord()
◆ 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 124 of file KVDBTable.cpp.
◆ SetFullPath()
| virtual void KVDBTable::SetFullPath |
( |
const Char_t * |
path | ) |
|
|
inlinevirtual |