[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 (Inactive) Assignee: Philippe Canal
Resolution: Fixed Votes: 0
Labels: None

gcc4.9.1 SL6



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.

Comment by Philippe Canal [ 05/Jan/15 ]

Hi Bill,

I added:

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


Comment by Philippe Canal [ 05/Jan/15 ]


TClass::GetCheckSum(Bool_t &isvalid)

Comment by William Tanenbaum (Inactive) [ 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 Fri May 29 23:02:27 CEST 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.