[root] / trunk / tree / tree / src / TLeafC.cxx Repository:
ViewVC logotype

Log of /trunk/tree/tree/src/TLeafC.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 7485 byte(s)
Diff to previous 43597
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 43597 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 31 13:48:47 2012 UTC (2 years, 9 months ago) by axel
File length: 7470 byte(s)
Diff to previous 43278
Rework TTree::ReadStream() / ReadFile(), mainly to fix delimited reading of string columns:
TLeaf::ReadValue() now takes an optional delimiter argument that is ignored for all but TLeafC. Here, input stops when reading this character, instead of at the first whitespace.
Use that in TTree::ReadStream() to delimit reading of TLeafC.
TTree::ReadStream() now tokenizes the row itself, and passes a stringstream containing nothing but the current column to TLeaf::ReadValue().
Improve error handling, improve debug output.
Clearly state which lines are skipped due to errors and why.
Fix windows files leaving '\n' in branch names when reading them from the file.
Separate concepts of number of input line (for communication with user) and number of good lines (as returned).
Simplify EOF-without-newline case.
Add error message for TLeaf::ReadValue(), i.e. if ReadValue() is called on a derived class that doesn't implement it.

Revision 43278 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 7 17:39:46 2012 UTC (2 years, 10 months ago) by pcanal
File length: 7404 byte(s)
Diff to previous 41244
Fix cov 35502 (unintentional integer overflow

Revision 41244 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 6 19:42:35 2011 UTC (3 years, 3 months ago) by pcanal
File length: 7394 byte(s)
Diff to previous 40833
Fix Coverity issues:

TBranchSTL: cov 34339 Resource leak (false positive)
TTableDescriptor.cxx: cov 34219,34220 explicit null dereference
TSQLStructure.cxx: cov 34204,34205,34206 Explicit null dereferenced 
TTabCom.cxx: cov 34168 Explicit null dereferenced 
TClassRef.cxx: cove 34165 Explicit null dereferenced (false positive but still confusing coding).
TBufferXML.cxx: 34070 Explicit null dereferenced
TFriendProxyDescriptor.cxx: cov 34066 Uninitialized scalar field
TTreeCloner.cxx: cov 34034057 Dereference null return (stat) 63 Uninitialized scalar field 
TParallelCoordEditor.cxx: 34051,34059,34060,34061 Dereference null return value
TParallelCoord.cxx: 34050,34056, 34057 Dereference null return (stat) 
TBranchProxy.h: 34048 Dereference null return value 
TBranchProxy.cxx: 34043,34044,34045 Dereference null return value
TTree.cxx: 34039 Dereference null return value
TTreePlayer.cxx: 34037 Dereference null return value 
TLeafC.cxx: 34036 Dereference null return value

Revision 40833 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 8 02:50:43 2011 UTC (3 years, 4 months ago) by pcanal
File length: 7333 byte(s)
Diff to previous 36416
Avoid uninitialized memory read (past the array end) in TLeafC::ReadBasket

Revision 36416 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Oct 23 16:23:41 2010 UTC (4 years, 3 months ago) by brun
File length: 7222 byte(s)
Diff to previous 36407
use strlcpy

Revision 36407 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 22 02:04:08 2010 UTC (4 years, 3 months ago) by pcanal
File length: 7214 byte(s)
Diff to previous 31603
From Mike Marino:

Replace the overly generic ifstream by istream as the argument to ReadValue

Revision 31603 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 18:59:15 2009 UTC (5 years, 1 month ago) by pcanal
File length: 7216 byte(s)
Diff to previous 30179
Add missing initialization (found by coverity)

Revision 30179 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 15 17:30:18 2009 UTC (5 years, 4 months ago) by pcanal
File length: 7163 byte(s)
Diff to previous 25939
Avoid out of bounds read

Revision 25939 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 23 21:18:11 2008 UTC (6 years, 3 months ago) by pcanal
File length: 6873 byte(s)
Diff to previous 23521
Fix reading and writing leaflist 'name/C' when the string is empty.
This fixes https://savannah.cern.ch/bugs/?43135

Revision 23521 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 24 14:49:05 2008 UTC (6 years, 9 months ago) by brun
File length: 6037 byte(s)
Diff to previous 22902
From Bertrand:
- Add a few missing #include <string>

Revision 22902 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 31 09:48:42 2008 UTC (6 years, 9 months ago) by rdm
File length: 6019 byte(s)
Diff to previous 20882
move tree, treeplayer and treeviewer under tree meta directory.

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6019 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6019 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6068 byte(s)
Diff to previous 18667
remove :$ from tag line

Revision 18667 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 4 17:32:45 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6078 byte(s)
Diff to previous 17667
The value of TBasket:;fBasket was incorrect in some cases when using
the TTreeCloner.  This is solved (and thread safetly is improved) by
removing the gBranch global variable and using alternative mechanism
to set TBakset::fBasket.

Revision 17667 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 3 18:33:15 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6056 byte(s)
Diff to previous 16176
Use forward declaration of TClonesArray and fix consequences

Revision 16176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 11:05:20 2006 UTC (8 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6033 byte(s)
Diff to previous 15314
changed all Riostream.h in headers to Riosfwd.h. Riostream.h has "using namespace std"
and should only appear in implementation files.

Revision 15314 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 2 15:34:12 2006 UTC (8 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6014 byte(s)
Diff to previous 15015
Insure that the variable size array (if any) is properly resized in all the needed cases

Revision 15015 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 12 17:00:30 2006 UTC (8 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5940 byte(s)
Diff to previous 13207
Update TLeafC::ReadValue to properly resize the string (when possible).  This is needed for TTree::ReadFile

Revision 13207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 11 22:16:04 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5597 byte(s)
Diff to previous 12555
Update the spacing and documentation to match the coding rule

Revision 12555 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 29 18:10:54 2005 UTC (9 years, 4 months ago) by pcanal
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5691 byte(s)
Diff to previous 10336
factor the string storage into TBuffer

Revision 10336 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 18 12:32:12 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 6024 byte(s)
Diff to previous 5809
Implement new function TTree::ReadFile
Long64_t TTree::ReadFile(const char *filename, const char *branchDescriptor)
{
   // Create or simply read branches from filename
   // if branchDescriptor = "" (default), it is assumed that the Tree descriptor
   //    is given in the first line of the file with a syntax like
   //     A/D:Table[2]/F:Ntracks/I:astring/s
   //  otherwise branchDescriptor must be specified with the above syntax.
   //
   // A TBranch object is created for each variable in the expression.
   // The total number of rows read from the file is returned.

TNtuple::ReadFile has been modified to be consistent with TTree::ReadFile.
New function TLeaf::ReadValue implemented (and in all TLeaf derived classes).

Revision 5809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 13 22:12:55 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5775 byte(s)
Diff to previous 5502
From Philippe:
TLeafC was forgetting about its place holder if it encounters an empty string.  This is never recovered from! (i.e. the address stays null and nobody checks or change
it).

This patch correct the situation for simply making the string of null length.

Revision 5502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 25 19:54:45 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5769 byte(s)
Diff to previous 1987
Remove a limitation in TLeafC::FillBasket and TLeafC::ReadBasket.
A maximum of 255 characters could only be written/read.
To be back compatible and still have minimal overhead, the following
algorithm has been implemented.
If the length of the string to be written is less than 255 bytes,
we use the old agorithm.
If more or equal 255 characters, we write the constant 255 followed
by the real length of the long string in integer format.
Thanks to Markus Frank for noticing/reporting the problem.

Revision 1987 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 16 19:15:49 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5581 byte(s)
Diff to previous 1671
In TLeaf classes, initializes the first buffer element to 0 when
setting the leaf addresses.

Revision 1671 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 22 13:54:04 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5560 byte(s)
Diff to previous 1648
Forgot to update the SetAddress function like in all the other TLeaf.

Revision 1648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 21 08:56:08 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5544 byte(s)
Diff to previous 1581
Add a protection in the TLeaf::SetAddress in case fLeafCount=0.
This case may happen in case of classes not processed via TStreamerInfo
and containing C structs.

Revision 1581 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 12 07:34:40 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5501 byte(s)
Diff to previous 1491
In the SetAddress functions remove the computation of fNdata.
fNdata is already computed in TLeaf::ResetAddress and must not be
recomputed at this point. This solves a long standing problem
with memory corrupted, specially when running without libNew.

Revision 1491 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 29 09:18:49 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5525 byte(s)
Diff to previous 1483
In the TLeafX::SetAddress do not call the destructor for a vector if
the pointer is null.

Revision 1483 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 28 13:54:22 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5510 byte(s)
Diff to previous 1457
Forgot to take into account fLen when counting the maximum population
of a leaf. The fix was already done in the other TLeafs.

Revision 1457 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 24 16:32:24 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5508 byte(s)
Diff to previous 1455
New mods to support automatic array deletion and extension when reading
objects in split mode from a TClonesArray.

Revision 1455 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 24 12:02:22 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5508 byte(s)
Diff to previous 1387
Several changes in the SetAddress functions to support additional cases.

Revision 1387 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 16 16:15:13 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5258 byte(s)
Diff to previous 1205
Add new member function PrintValue

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5047 byte(s)
Diff to previous 680
      W A R N I N G   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
   virtual TObject    *Clone() const;
   virtual Int_t       Compare(const TObject *obj) const;
   virtual void        Delete(Option_t *option=""); // *MENU*
   virtual void        DrawClass() const; // *MENU*
   virtual void        DrawClone(Option_t *option="") const; // *MENU*
   virtual void        Dump() const; // *MENU*
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual ULong_t     Hash() const;
   virtual void        Inspect() const; // *MENU*
   virtual Bool_t      IsEqual(const TObject *obj) const;
   virtual void        ls(Option_t *option="") const;
   virtual void        Print(Option_t *option="") const;

A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.

Revision 680 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 29 07:51:12 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5331 byte(s)
Diff to previous 3
Enhancement of the automatic split mode by Philippe canal.
Variable length arrays are now supported.
The array has to be declared as:
        Int_t  myindex;
        Int_t *myarray;  //[myindex]
This also enables support for variable length C-style string:
        char  *mystring;
The mods make sure that MakeClass produces the correct code in this case.

Revision 3 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TLeafC.cxx
File length: 5028 byte(s)
Copied from: branches/rdm/tree/src/TLeafC.cxx revision 2
Diff to previous 2
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.

Revision 2 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: branches/rdm/tree/src/TLeafC.cxx
File length: 5028 byte(s)
Initial import of ROOT into CVS

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9