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

Detailed Description

Utility class describing the data used to fill each column of the list view container.

Created by KVClassFactory on Wed Apr 9 13:54:31 2008 Author: franklan

Definition at line 32 of file KVLVContainer.h.

#include <KVLVContainer.h>

Public Member Functions

 KVLVColumnData (TClass *cl, const Char_t *name, const Char_t *method="")
 
virtual ~KVLVColumnData ()
 
Int_t Compare (TObject *ob1, TObject *ob2)
 
void GetData (TObject *, Double_t &)
 
void GetData (TObject *, KVDatime &)
 
void GetData (TObject *, Long_t &)
 
void GetData (TObject *, TString &)
 
const Char_tGetDataString (TObject *)
 Format string with column data for object.
 
virtual Bool_t IsBoolean () const
 
virtual void SetDataFormat (const Char_t *fmt)
 
virtual void SetIsBoolean (Bool_t isit=kTRUE)
 
virtual void SetIsDateTime (KVDatime::EKVDateFormat fmt=KVDatime::kCTIME, Bool_t with_reference=kTRUE)
 

Private Types

enum  { kDatimeRef = (Int_t)TMethodCall::kNone + 1 , kDatimeInt , kTString }
 

Private Member Functions

Int_t Compare_date (TObject *o1, TObject *o2)
 
Int_t Compare_double (TObject *o1, TObject *o2)
 
Int_t Compare_long (TObject *o1, TObject *o2)
 
Int_t Compare_string (TObject *o1, TObject *o2)
 

Private Attributes

TString fDataFormat
 format for displaying numerical data
 
Bool_t fDate
 kTRUE if column contains TDatime date & time info
 
KVDatime::EKVDateFormat fFmt
 format for presenting date & time
 
Bool_t fIsBoolean
 kTRUE if column data is a boolean (i.e. 1 or 0, kTRUE or kFALSE)
 
Bool_t fIsKVDatime
 kTRUE if date & time is in KVDatime object, TDatime if not
 
TMethodCall fMethCall
 method call object
 
TString fMethod
 method used to retrieve data from objects
 
TString fName
 name used on button at top of column
 
Int_t fRetType
 return type of data retrieval method
 
TString result
 string used to store object data
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kDatimeRef 
kDatimeInt 
kTString 

Definition at line 45 of file KVLVContainer.h.

Constructor & Destructor Documentation

◆ KVLVColumnData()

KVLVColumnData::KVLVColumnData ( TClass cl,
const Char_t name,
const Char_t method = "" 
)
inline

Definition at line 56 of file KVLVContainer.h.

◆ ~KVLVColumnData()

virtual KVLVColumnData::~KVLVColumnData ( )
inlinevirtual

Definition at line 84 of file KVLVContainer.h.

Member Function Documentation

◆ Compare()

Int_t KVLVColumnData::Compare ( TObject ob1,
TObject ob2 
)

Compare (for sorting) the two objects based on the type of data stored in this column. The sorting depends on the return type of the data. for integers: return 1 if ob1->data < ob2->data etc. for floats: return 1 if ob1->data < ob2->data etc. for strings: alphabetical sorting using TString::CompareTo for dates: chronological order (earliest first)

Definition at line 265 of file KVLVContainer.cpp.

◆ Compare_date()

Int_t KVLVColumnData::Compare_date ( TObject o1,
TObject o2 
)
private

Definition at line 210 of file KVLVContainer.cpp.

◆ Compare_double()

Int_t KVLVColumnData::Compare_double ( TObject o1,
TObject o2 
)
private

Definition at line 246 of file KVLVContainer.cpp.

◆ Compare_long()

Int_t KVLVColumnData::Compare_long ( TObject o1,
TObject o2 
)
private

Definition at line 234 of file KVLVContainer.cpp.

◆ Compare_string()

Int_t KVLVColumnData::Compare_string ( TObject o1,
TObject o2 
)
private

Definition at line 222 of file KVLVContainer.cpp.

◆ GetData() [1/4]

void KVLVColumnData::GetData ( TObject obj,
Double_t i 
)

Definition at line 78 of file KVLVContainer.cpp.

◆ GetData() [2/4]

void KVLVColumnData::GetData ( TObject obj,
KVDatime i 
)

Definition at line 104 of file KVLVContainer.cpp.

◆ GetData() [3/4]

void KVLVColumnData::GetData ( TObject obj,
Long_t i 
)

Definition at line 69 of file KVLVContainer.cpp.

◆ GetData() [4/4]

void KVLVColumnData::GetData ( TObject obj,
TString i 
)

Definition at line 87 of file KVLVContainer.cpp.

◆ GetDataString()

const Char_t * KVLVColumnData::GetDataString ( TObject obj)

Format string with column data for object.

Definition at line 123 of file KVLVContainer.cpp.

◆ IsBoolean()

virtual Bool_t KVLVColumnData::IsBoolean ( ) const
inlinevirtual

Definition at line 98 of file KVLVContainer.h.

◆ SetDataFormat()

virtual void KVLVColumnData::SetDataFormat ( const Char_t fmt)
inlinevirtual

Override default formatting for integer ("%ld") or double ("%lf") data types

Definition at line 92 of file KVLVContainer.h.

◆ SetIsBoolean()

virtual void KVLVColumnData::SetIsBoolean ( Bool_t  isit = kTRUE)
inlinevirtual

Definition at line 88 of file KVLVContainer.h.

◆ SetIsDateTime()

void KVLVColumnData::SetIsDateTime ( KVDatime::EKVDateFormat  fmt = KVDatime::kCTIME,
Bool_t  with_reference = kTRUE 
)
virtual

If data in column is date & time info, use this method to

  • set the format for presenting the date & time. These are the formats available for KVDatime objects, i.e. KVDatime::kCTIME - ctime format (default) e.g. Thu Apr 10 10:48:34 2008 KVDatime::kSQL - SQL format e.g. 1997-01-15 20:16:28 KVDatime::kGANACQ - GANIL acquisition format e.g. 29-SEP-2005 09:42:17.00
  • define how the information is obtained from the object. The method given to the constructor must return either a reference/pointer to TDatime/KVDatime : with_reference=kTRUE (default) a UInt_t/time_t value (such as returned by TDatime::Convert) : with_reference=kFALSE

Definition at line 179 of file KVLVContainer.cpp.

Member Data Documentation

◆ fDataFormat

TString KVLVColumnData::fDataFormat
private

format for displaying numerical data

Definition at line 43 of file KVLVContainer.h.

◆ fDate

Bool_t KVLVColumnData::fDate
private

kTRUE if column contains TDatime date & time info

Definition at line 39 of file KVLVContainer.h.

◆ fFmt

KVDatime::EKVDateFormat KVLVColumnData::fFmt
private

format for presenting date & time

Definition at line 40 of file KVLVContainer.h.

◆ fIsBoolean

Bool_t KVLVColumnData::fIsBoolean
private

kTRUE if column data is a boolean (i.e. 1 or 0, kTRUE or kFALSE)

Definition at line 42 of file KVLVContainer.h.

◆ fIsKVDatime

Bool_t KVLVColumnData::fIsKVDatime
private

kTRUE if date & time is in KVDatime object, TDatime if not

Definition at line 41 of file KVLVContainer.h.

◆ fMethCall

TMethodCall KVLVColumnData::fMethCall
private

method call object

Definition at line 36 of file KVLVContainer.h.

◆ fMethod

TString KVLVColumnData::fMethod
private

method used to retrieve data from objects

Definition at line 35 of file KVLVContainer.h.

◆ fName

TString KVLVColumnData::fName
private

name used on button at top of column

Definition at line 34 of file KVLVContainer.h.

◆ fRetType

Int_t KVLVColumnData::fRetType
private

return type of data retrieval method

Definition at line 37 of file KVLVContainer.h.

◆ result

TString KVLVColumnData::result
private

string used to store object data

Definition at line 38 of file KVLVContainer.h.