84 const char *keydatetime,
Int_t cycle,
const char *classname)
109 const char *classname)
112 Int_t len2 = (keyname == 0) ? 0 : strlen(keyname);
115 if ((len1 > 0) && (strcmp(
GetName(), keyname) != 0))
119 len2 = (keytitle == 0) ? 0 : strlen(keytitle);
122 if ((len1 > 0) && (strcmp(
GetTitle(), keytitle) != 0))
126 len1 = (tm == 0) ? 0 : strlen(tm);
127 len2 = (keydatime == 0) ? 0 : strlen(keydatime);
130 if ((len1 > 0) && (strcmp(tm, keydatime) != 0))
137 len2 = (classname == 0) ? 0 : strlen(classname);
140 if ((len1 > 0) && (strcmp(
GetClassName(), classname) != 0))
188 Error(
"StoreKeyObject",
"Cannot write data to key tables");
214 return res == 0 ? 0 : 1;
226 if (
gROOT->GetForceStyle())
251 if (
gROOT->GetForceStyle())
303 if ((cl == 0) || (res == 0))
308 if (expectedClass != 0) {
317 Warning(
"XmlReadAny",
"Trying to read an emulated class (%s) to store in a compiled pointer (%s)",
322 return ((
char *)res) + delta;
virtual const char * GetName() const
Returns name of object.
void * SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj=0)
Recreate object from sql structure.
Long64_t fKeyId
! key identifier in KeysTables
virtual TList * GetListOfKeys() const
void SetSeekDir(Long64_t v)
void Set()
Set Date/Time to current time as reported by the system.
void * ReadKeyObject(void *obj, const TClass *expectedClass)
Read object, associated with key, from database.
Long64_t GetDBDirId() const
return sql id of parent directory
virtual const char * GetClassName() const
virtual void SetName(const char *name)
Set the name of the TNamed.
Long64_t fObjId
! stored object identifer
Long64_t GetDBKeyId() const
Long64_t StoreObjectInTables(Long64_t keyid, const void *obj, const TClass *cl)
Store object in database. Return stored object id or -1 if error.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
TKeySQL()
default constructor
TDirectory * GetMotherDir() const
TDirectory * fMotherDir
!pointer to mother directory
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
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...
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void StoreKeyObject(const void *obj, const TClass *cl)
Stores object, associated with key, into data tables.
virtual TObject * ReadObjWithBuffer(char *bufferRead)
Read object derived from TObject class If it is not TObject or in case of error, return 0...
TString fClassName
Object Class name.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TDatime fDatime
Date/Time of insertion in file.
Long64_t DefineNextKeyId()
Returns next possible key identifier.
Bool_t WriteKeyData(TKeySQL *key)
Add entry into keys table.
virtual ~TKeySQL()
TKeySQL destructor.
Access an SQL db via the TFile interface.
A ROOT file is structured in Directories (like a file system).
TFile * GetFile() const
Returns file to which key belong.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual Long64_t GetSeekDir() const
The ROOT global object gROOT contains a list of all defined classes.
void DeleteKeyFromDB(Long64_t keyid)
Remove key with specified id from keys table also removes all objects data, related to this table...
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
virtual Int_t AppendKey(TKey *)
Converts data to SQL statements or read data from SQL tables.
virtual void SetName(const char *newname)
Set the name for directory If the directory name is changed after the directory was written once...
Short_t fCycle
Cycle number.
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
Describe directory structure in memory.
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
virtual void * ReadObjectAny(const TClass *expectedClass)
Read object of any type from SQL database.
virtual TObject * ReadObj()
Read object derived from TObject class If it is not TObject or in case of error, return 0...
Mother of all ROOT objects.
TKeySQL represents meta-inforamtion about object, which was written to SQL database.
const TDatime & GetDatime() const
Long64_t GetDBObjId() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual const char * GetName() const
Returns name of object.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetMother(TObject *mother)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void Delete(Option_t *option="")
Removes key from current directory Note: TKeySQL object is not deleted.