Skip to content
Snippets Groups Projects
  1. May 11, 2006
  2. Apr 27, 2006
  3. Apr 18, 2006
  4. Apr 12, 2006
  5. Mar 20, 2006
  6. Mar 18, 2006
    • Fons Rademakers's avatar
      From Axel: · 48cd001d
      Fons Rademakers authored
      Dictionary G__%.o: G__%.cxx rules now in main Makefile instead of Module.mk's
      => changes in Module.mk.
      
      First Module.mk's included, then Makefile.precomp - we need ALLHDRS defined
      
      Split $(PCHEXTRAOBJ) and $(PCHFILE) rules - fixes clash with make -j2
      
      Define CINTCXXFLAGS:= - otherwise they will contain PCHCXXFLAGS via
      their definition as a copy of CXXFLAGS.
      
      MSVC: prevent LNK4206 linker warning (-Yl...)
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@14301 27541ba8-7e3a-0410-8455-c3a389f83636
      48cd001d
  7. Feb 01, 2006
    • Philippe Canal's avatar
      From Sergei Linev: · 186aa6e8
      Philippe Canal authored
      Move CreateKey from TDirectory to TFile
      Here is also optimisation of SQL statements and adjustement for Oracle.
      Implementation of ClassBegin()/ClassMember()/ClassEnd() methdos for TBufferSQL2 and TBufferXML.
      I also implementation for ClassMemeber() method for case of "raw:data" for SQL and XML cases.
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13977 27541ba8-7e3a-0410-8455-c3a389f83636
      186aa6e8
  8. Jan 25, 2006
  9. Dec 10, 2005
    • Fons Rademakers's avatar
      From Axel: · 0ab88198
      Fons Rademakers authored
      handle in a consistent way the new rootcint options -cint (default),
      -reflex and -gccxml. The type of dictionary to be used can be specified
      like: ./configure --with-dicttype=reflex. Notice that this option is
      there only for the developers working on the migration to the new
      dictionary system.
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13609 27541ba8-7e3a-0410-8455-c3a389f83636
      0ab88198
  10. Dec 09, 2005
    • Fons Rademakers's avatar
      From Axel: · f4578298
      Fons Rademakers authored
      in case we have gmake >= 3.80 we can use the new | (order) syntax where
      all dependencies after the | are required to be there but not trigger
      execution of the rule. This should greatly enhance the build experience
      on Win32 and AIX (platforms that need the EXPLICITLINK option).
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13584 27541ba8-7e3a-0410-8455-c3a389f83636
      f4578298
  11. Dec 07, 2005
  12. Dec 02, 2005
  13. Dec 01, 2005
    • Philippe Canal's avatar
      From Sergei Linev: · 87d979f2
      Philippe Canal authored
      This patch allows more clear representation of TClonesArray data in TSQLFile.
      
      It also solves problem of correct saving of array of objects in TSQLFile.
      I redefine in TBufferSQL2 following functions:
      
      void WriteFastArray(void* start, const TClass* cl, Int_t n, TMemberStreamer* s)
      Int_t WriteFastArray(void** startp, const TClass* cl, Int_t n, Bool_t isPreAlloc, TMemberStreamer* s)
      void ReadFastArray(void* start, const TClass* cl, Int_t n = 1, TMemberStreamer* s = 0)
      void ReadFastArray(void** startp, const TClass* cl, Int_t n = 1, Bool_t isPreAlloc = kFALSE, TMemberStreamer* s = 0)
      
      In these functions I make replacement which I propose before - instead of cl->Streamer(buf, obj),
      I use buf->StreamObject(obj, cl) ("parenthesis" arround cl->Streamer(buf, obj) call)
      In case of TBufferSQL2 I treat StreamObject() as WriteObject()/ReadObject()
      calls. Therefore, I can solve problem with objects array. Now it is easy to produce one column for
      each array element.
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13435 27541ba8-7e3a-0410-8455-c3a389f83636
      87d979f2
    • Rene Brun's avatar
      Remove unused statement in TSQLStructure::TryConvertObjectArray · e4dd4a79
      Rene Brun authored
      git-svn-id: http://root.cern.ch/svn/root/trunk@13420 27541ba8-7e3a-0410-8455-c3a389f83636
      e4dd4a79
  14. Nov 29, 2005
  15. Nov 28, 2005
    • Philippe Canal's avatar
      From Sergei Linev: · 0bbc87fb
      Philippe Canal authored
      I made following modification:
      
      1. Usage of table indexes. By default, they created only for basic tables: KeysTable and ObjectsTable.
         It is possible to configure TSQLFile to create indexes also for other type of tables or disable indexes at all.
      
      2. Use of transaction. Now by default this option on and protect storage of object data to datatables.
         For some types of MySQL tables transaction are not supported, therefore I include in configurations
         possibility to setup type of table which should be used.
      
      3. Configurations. For all kind of configuration I create small table.
         Configurations can be changed only when TSQLFile is created with option "CREATE" or "RECREATE".
         In that case configurations can be changed until first write operation.
      
      4. Locking. I did not use "native" database locking mechnism while they are very different in MySQL and Oracle and
         may differ also in other SQL database. I put in Configuration table one flag, which says if database is already
         opened for writing by other TSQLFile instance and prevent other TSQLFile to have write access.
         For emergency cases one can use "BREAKLOCK" option in TSQLFile constructor to ignore that locking.
         This is not real locking and any other user with normal sql queries can disturb tables data, but I do not see
         now other solution, which may work for different databases. May be you know better solutions?
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13383 27541ba8-7e3a-0410-8455-c3a389f83636
      0bbc87fb
  16. Nov 24, 2005
    • Philippe Canal's avatar
      From Sergei Linev: · f75951d4
      Philippe Canal authored
      I introduce new function TSQLFile::MakeSelectQuery.
      It produces SQL query, which can be used outside ROOT to get all objects data (including data from parent classes)
      with single SELECT statement. As result, one table with all data is produced.
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13349 27541ba8-7e3a-0410-8455-c3a389f83636
      f75951d4
  17. Nov 22, 2005
    • Philippe Canal's avatar
      From Sergei: · 88f5249a
      Philippe Canal authored
      Fix white spaces, add more comment to functions, add CVS tag lines and copyright.
      It should now work  for array of objects and most stl classes.
      I put limitation for array size. If array with fixed size exceed limit (default 20),
      array will be converted to raw data, otherwise each element of array will be presented as
      single column.
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13317 27541ba8-7e3a-0410-8455-c3a389f83636
      88f5249a
  18. Nov 21, 2005
    • Philippe Canal's avatar
      From Sergey: · 6b861d0c
      Philippe Canal authored
      Introduce a "transparent" access to SQL data base via standard TFile interface.
      
      The main approach that each class (but not each object) has one or two tables
      with names like $(CLASSNAME)_ver$(VERSION) and $(CLASSNAME)_streamer_ver$(VERSION)
      For example: TAxis_ver8 or TList_streamer_ver5
      Second kind of tables appears, when some of class members can not be converted to
      normalized form or when class has custom streamer.
      For instance, for TH1 class two tables are required: TH1_ver4 and TH1_streamer_ver4
      Most of memebers are stored in TH1_ver4 table columnwise, and only memeber:
      
      Double_t*  fBuffer;  //[fBufferSize]
      
      can not be represented as column while size of array is not known apriory.
      Therefore, fBuffer will be written as list of values in TH1_streamer_ver4 table.
      
      All objects, stored in the DB, will be registered in table "ObjectsTable".
      In this there are following columns:
      "key:id"  - key identifier to which belong object
      "obj:id"  - object identifier
      "Class"   - object class name
      "Version" - object class version
      Data in each "ObjectsTable" row uniqly identify, in which table
      and which column object is stored.
      
      In normal situation all class data should be sorted columnwise.
      Up to now following member are supported:
      1) Basic data types
      Here is everything clear. Column SQL type will be as much as possible
      close to the original type of value.
      2) Fixed array of basic data types
      In this case n columns like fArr[0], fArr[1] and so on will be created.
      If there is multidimensional array, names will be fArr2[1][2][1] and so on
      3) Parent class
      In this case version of parent class is stored and
      data of parent class will be stored with the same obj:id in corrspondent table.
      There is a special case, when parent store nothing (this is for instance TQObject).
      In that case just -1 is written to avoid any extra checks if table exist or not.
      4) Object as data member.
      In that case object is saved in normal way to data base and column
      will contain id of this object.
      5) Pointer on object
      Same as before. In case if object was already stored, just its id
      will be placed in the column. For NULL pointer 0 is used.
      6) TString
      Now column with limited width like VARCAHR(255) in MySQL is used.
      Later this will be improved to support maximum possible strings
      7) Anything else.
      Data will be converted to raw format and saved in _streamer_ table.
      Each row supplied with obj:id and row:id, where row:id indicates
      data, corresponding to this particular data member, and column
      will contain this raw:id
      
      See the TSQLFile documentation for more details.
      
      example of a session saving data to a SQL data base
      =====================================================
      
      const char* dbname = "mysql://host.domain:3306/dbname";
      const char* username = "username";
      const char* userpass = "userpass";
      
      // Clean data base and create primary tables
      TSQLFile* f = new TSQLFile(dbname, "recreate", username, userpass);
      // Write with standard I/O functions
      arr->Write("arr",TObject::kSingleKey);
      h1->Write("histo");
      // Close connection to DB
      delete f;
      
      example of a session read data from SQL data base
      =====================================================
      
      // Open database again in read-only mode
      TSQLFile* f = new TSQLFile(dbname, "open", username, userpass);
      // Show list of keys
      f->ls();
      // Read stored object, again standard ROOT I/O
      TH1* h1 = (TH1*) f->Get("histo");
      if (h1!=0) { h1->SetDirectory(0); h1->Draw(); }
      TObject* obj = f->Get("arr");
      if (obj!=0) obj->Print("*");
      // close connection to DB
      delete f;
      
      Known problems and open questions.
      1) TTree is not supported by TSQLFile. There is independent development
      of TTreeSQL, which allows to store trees directly in SQL database
      2) TClonesArray is not tested, will be adjusted soon.
      3) TDirectory cannot work. Hopefully, will (changes in ROOT basic I/O is required)
      4) Streamer infos are not written to file, therefore schema evolution
      is not yet supported. All eforts are done to enable this feature in
      the near future
      
      
      git-svn-id: http://root.cern.ch/svn/root/trunk@13312 27541ba8-7e3a-0410-8455-c3a389f83636
      6b861d0c
Loading