47 :
TKey(mother), fKeyId(-1), fObjId(-1)
67 :
TKey(mother), fKeyId(-1), fObjId(-1)
84 const char *keydatetime,
Int_t cycle,
const char *classname)
85 :
TKey(mother), fKeyId(keyid), fObjId(objid)
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))
186 if (!
f->WriteKeyData(
this)) {
188 Error(
"StoreKeyObject",
"Cannot write data to key tables");
212 return res == 0 ? 0 : 1;
224 if (
gROOT->GetForceStyle())
249 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 void InitMap()
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=0, 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.
void Set()
Set Date/Time to current time as reported by the system.
A ROOT file is structured in Directories (like a file system).
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
void SetSeekDir(Long64_t v)
Describe directory structure in memory.
virtual Long64_t GetSeekDir() const
virtual Int_t AppendKey(TKey *)
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual void SetName(const char *newname)
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
TKeySQL represents meta-inforamtion about object, which was written to SQL database.
void * ReadKeyObject(void *obj, const TClass *expectedClass)
Read object, associated with key, from database.
Long64_t fKeyId
! key identifier in KeysTables
TKeySQL()
default constructor
virtual ~TKeySQL()
TKeySQL destructor.
Long64_t fObjId
! stored object identifer
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 void Delete(Option_t *option="")
Removes key from current directory Note: TKeySQL object is not deleted.
Long64_t GetDBKeyId() const
virtual TObject * ReadObj()
Read object derived from TObject class If it is not TObject or in case of error, return 0.
virtual void * ReadObjectAny(const TClass *expectedClass)
Read object of any type from SQL database.
Long64_t GetDBDirId() const
return sql id of parent directory
virtual TObject * ReadObjWithBuffer(char *bufferRead)
Read object derived from TObject class If it is not TObject or in case of error, return 0.
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
Long64_t GetDBObjId() const
void StoreKeyObject(const void *obj, const TClass *cl)
Stores object, associated with key, into data tables.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TFile * GetFile() const
Returns file to which key belong.
TDatime fDatime
Date/Time of insertion in file.
virtual const char * GetClassName() const
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
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.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
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.
Access an SQL db via the TFile interface.