KaliVeda
Toolkit for HIC analysis
KVDBRecord Class Reference

Detailed Description

Record folder for the database.

Base class for records in KVDataBase. It must be derived from to have the proper caracteristics for each type of record. It holds a list of keys. Each key must have the name of a table of the data base The folder owns the list of keys.

Definition at line 43 of file KVDBRecord.h.

#include <KVDBRecord.h>

Inheritance diagram for KVDBRecord:

Public Member Functions

 KVDBRecord ()
 
 KVDBRecord (const Char_t *name, const Char_t *title="")
 
virtual ~ KVDBRecord ()
 
virtual KVDBKey * AddKey (const Char_t *name, const Char_t *title, Bool_t check=kTRUE)
 
virtual Bool_t AddKey (KVDBKey *key, Bool_t check=kTRUE)
 
virtual Bool_t AddLink (const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
 
Int_t Compare (const TObject *obj) const override
 
virtual KVDBKey * GetKey (const Char_t *key) const
 
virtual TList * GetKeys () const
 
virtual KVDBRecord * GetLink (const Char_t *key, const Char_t *link) const
 Returns the record named "link" in the table named "key". More...
 
virtual KVRList * GetLinks (const Char_t *key) const
 Returns the list of records linked to this record in table "key". More...
 
virtual Int_t GetNumber () const
 
virtual KVDBTable * GetTable () const
 
void ls (Option_t *option="*") const override
 
void Print (Option_t *option="") const override
 
virtual void RemoveAllLinks (const Char_t *key)
 Remove all links between this record and the records in the DB table"key_name". More...
 
virtual void RemoveLink (const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
 Remove the link between this record and the record "rec" in the DB table"key_name". More...
 
virtual void SetNumber (Int_t n)
 
virtual void SetTable (const KVDBTable *table)
 

Constructor & Destructor Documentation

◆ KVDBRecord() [1/2]

KVDBRecord::KVDBRecord ( )

Definition at line 32 of file KVDBRecord.cpp.

◆ KVDBRecord() [2/2]

KVDBRecord::KVDBRecord ( const Char_t *  name,
const Char_t *  title = "" 
)

Definition at line 41 of file KVDBRecord.cpp.

◆ ~ KVDBRecord()

virtual KVDBRecord::~ KVDBRecord ( )
virtual

Member Function Documentation

◆ AddKey() [1/2]

KVDBKey * KVDBRecord::AddKey ( const Char_t *  name,
const Char_t *  title,
Bool_t  check = kTRUE 
)
virtual

Add a key to the list of available keys and return kTRUE it's added. If "check" is kTRUE , we check if the new key's name already exists, if not the key is added otherwise it's not added and the method return kFALSE.

Definition at line 95 of file KVDBRecord.cpp.

◆ AddKey() [2/2]

Bool_t KVDBRecord::AddKey ( KVDBKey *  key,
Bool_t  check = kTRUE 
)
virtual

Add a key to the list of available keys and return kTRUE if it is added. If "check" is kTRUE , we check if the new key's name already exists, if not the key is added otherwise it's not added and the method return kFALSE.

Definition at line 65 of file KVDBRecord.cpp.

◆ AddLink()

Bool_t KVDBRecord::AddLink ( const Char_t *  key_name,
KVDBRecord *  rec,
Bool_t  linkback = kTRUE 
)
virtual

Link this record to the record "rec" in the DB table with name "key_name" The record will be added to the list of records in KVDBKey "key_name"

Definition at line 122 of file KVDBRecord.cpp.

◆ Compare()

Int_t KVDBRecord::Compare ( const TObject *  obj) const
override

Compare two record numbers for sorting lists. Lists will be sorted in ascending order.

Definition at line 256 of file KVDBRecord.cpp.

◆ GetKey()

KVDBKey * KVDBRecord::GetKey ( const Char_t *  key) const
virtual

Definition at line 290 of file KVDBRecord.cpp.

◆ GetKeys()

TList * KVDBRecord::GetKeys ( ) const
virtual

Definition at line 301 of file KVDBRecord.cpp.

◆ GetLink()

KVDBRecord * KVDBRecord::GetLink ( const Char_t *  key,
const Char_t *  link 
) const
virtual

Returns the record named "link" in the table named "key".

Definition at line 186 of file KVDBRecord.cpp.

◆ GetLinks()

KVRList * KVDBRecord::GetLinks ( const Char_t *  key) const
virtual

Returns the list of records linked to this record in table "key".

Definition at line 206 of file KVDBRecord.cpp.

◆ GetNumber()

virtual Int_t KVDBRecord::GetNumber ( ) const
inlinevirtual

Definition at line 73 of file KVDBRecord.h.

◆ GetTable()

KVDBTable * KVDBRecord::GetTable ( ) const
virtual

Definition at line 271 of file KVDBRecord.cpp.

◆ ls()

void KVDBRecord::ls ( Option_t *  option = "*") const
override

Definition at line 243 of file KVDBRecord.cpp.

◆ Print()

void KVDBRecord::Print ( Option_t *  option = "") const
override

Definition at line 222 of file KVDBRecord.cpp.

◆ RemoveAllLinks()

void KVDBRecord::RemoveAllLinks ( const Char_t *  key)
virtual

Remove all links between this record and the records in the DB table"key_name".

Definition at line 166 of file KVDBRecord.cpp.

◆ RemoveLink()

void KVDBRecord::RemoveLink ( const Char_t *  key_name,
KVDBRecord *  rec,
Bool_t  linkback = kTRUE 
)
virtual

Remove the link between this record and the record "rec" in the DB table"key_name".

Definition at line 145 of file KVDBRecord.cpp.

◆ SetNumber()

virtual void KVDBRecord::SetNumber ( Int_t  n)
inlinevirtual

Reimplemented in KVDBRun.

Definition at line 77 of file KVDBRecord.h.

◆ SetTable()

void KVDBRecord::SetTable ( const KVDBTable *  table)
virtual

Definition at line 280 of file KVDBRecord.cpp.