[ROOT-6989] TClass::GetCheckSum() must give indication of missing base class Created: 22/Dec/14  Updated: 05/Jan/15  Resolved: 05/Jan/15

Status: Closed
Project: ROOT
Component/s: Core Libraries
Affects Version/s: 6.02/02, 5.34/24
Fix Version/s: 6.04.00, 6.02/03

Type: Bug Priority: Blocker
Reporter: William Tanenbaum Assignee: Philippe Canal
Resolution: Fixed Votes: 0
Labels: None
Environment:

gcc4.9.1 SL6


Development:

 Description   

In a call of TClass::GetChecksum(). if a base class is unavailable,
the function returns normally with an incorrect check sum. The only indication of the error is an error message:
Error("GetCheckSum","Calculating the checksum for (%s) requires the base class (%s) meta information to be available!", GetName(),tbc->GetName());
Unfortunately, CMS calls TClass::GetChecksum() from a stand alone python script, and there is no obvious way to catch the error. This is a very serious problem, a blocker in fact, for both 5.34 and 6.02.
We already have checksums populated incorrectly because of this problem.
Since ROOT will not throw an exception in this case, the least it can do is to return an error return code instead of what it currently does, which is return an incorrect checksum.
If there is some reason to keep the current behavior, (ugh), perhaps an optional bool argument could be used to force an error return code in this case.



 Comments   
Comment by Philippe Canal [ 05/Jan/15 ]

Hi Bill,

I added:

TClass::GetCheckSum(ECheckSum code, Bool_t &isvalid)

Cheers,
Philippe.

Comment by Philippe Canal [ 05/Jan/15 ]

and

TClass::GetCheckSum(Bool_t &isvalid)

Comment by William Tanenbaum [ 05/Jan/15 ]

I see the fix is in the master branch. Can it also go into the v602-00-patches branch?

Comment by Philippe Canal [ 05/Jan/15 ]

Yes. Done.

Generated at Tue Sep 24 11:37:17 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.