74 const char *keydatetime,
Int_t cycle,
const char *classname)
92 const char *classname)
95 Int_t len2 = !keyname ? 0 : strlen(keyname);
98 if ((len1 > 0) && (strcmp(
GetName(), keyname) != 0))
102 len2 = !keytitle ? 0 : strlen(keytitle);
105 if ((len1 > 0) && (strcmp(
GetTitle(), keytitle) != 0))
109 len1 = !tm ? 0 : strlen(tm);
110 len2 = !keydatime ? 0 : strlen(keydatime);
113 if ((len1 > 0) && (strcmp(tm, keydatime) != 0))
120 len2 = !classname ? 0 : strlen(classname);
123 if ((len1 > 0) && (strcmp(
GetClassName(), classname) != 0))
169 if (!
f->WriteKeyData(
this)) {
171 Error(
"StoreKeyObject",
"Cannot write data to key tables");
207 if (
gROOT->GetForceStyle())
232 if (
gROOT->GetForceStyle())
300 Warning(
"XmlReadAny",
"Trying to read an emulated class (%s) to store in a compiled pointer (%s)",
305 return ((
char *)res) + delta;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
void InitMap() override
Create the fMap container and initialize them with the null object.
Converts data to SQL statements or read data from SQL tables.
void * SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj=nullptr)
Recreate object from sql structure.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
Int_t ReadKeys(Bool_t forceRead=kTRUE) override
void SetSeekDir(Long64_t v) override
Describe directory structure in memory.
virtual Long64_t GetSeekDir() const
virtual Int_t AppendKey(TKey *)
void SetName(const char *newname) override
Set the name for directory If the directory name is changed after the directory was written once,...
virtual void SetMother(TObject *mother)
virtual TList * GetListOfKeys() const
void * ReadObjectAny(const TClass *expectedClass) final
Read object of any type from SQL database.
void * ReadKeyObject(void *obj, const TClass *expectedClass)
Read object, associated with key, from database.
TObject * ReadObj() final
Read object derived from TObject class If it is not TObject or in case of error, return 0.
Long64_t fKeyId
! key identifier in KeysTables
Long64_t fObjId
! stored object identifier
void Delete(Option_t *option="") final
Removes key from current directory Note: TKeySQL object is not deleted.
Bool_t IsKeyModified(const char *keyname, const char *keytitle, const char *keydatime, Int_t cycle, const char *classname)
Compares keydata with provided and return kTRUE if key was modified Used in TFile::StreamKeysForDirec...
Long64_t GetDBKeyId() const
Long64_t GetDBDirId() const
return sql id of parent directory
TObject * ReadObjWithBuffer(char *bufferRead) final
Read object derived from TObject class If it is not TObject or in case of error, return 0.
Long64_t GetDBObjId() const
Int_t Read(TObject *obj) final
To read an object from the file.
void StoreKeyObject(const void *obj, const TClass *cl)
Stores object, associated with key, into data tables.
const char * GetTitle() const override
Returns title (title can contain 32x32 xpm thumbnail/icon).
TFile * GetFile() const
Returns file to which key belong.
TDatime fDatime
Date/Time of insertion in file.
virtual const char * GetClassName() const
TKey(const TKey &)=delete
const TDatime & GetDatime() const
Short_t fCycle
Cycle number.
TDirectory * GetMotherDir() const
Short_t GetCycle() const
Return cycle number associated to this key.
TDirectory * fMotherDir
!pointer to mother directory
TString fClassName
Object Class name.
TObject * Remove(TObject *obj) override
Remove object from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
TObject()
TObject constructor.
Access an SQL db via the TFile interface.