-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid TColor warning #43
Conversation
I could not build locally to test because it picks up old GSL 1.15 for some reason.
even if I have in
When compiling with old gsl, there is off-by-one warning here for index MarlinUtil/source/src/WeightedPoints3D.cc Lines 887 to 890 in f132e61
|
The GSL issue should be fixed by iLCSoft/iLCUtil#20 (however that might take a bit to land). In the meantime I am updating the CI to have that working again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous version also seems to have defined / registered non-existant TColors with ROOT. Are all the colors already known to ROOT?
As far as I understand, the previous version defined only one non-existent TColor with dummy RGB values (1,1,1) if the colour index is not known by ROOT. If a colour with index If a colour with index // Trying to creating colour with index 2, just reads ROOT default Red. 42 arguments are not used
root [0] TColor* test = new TColor(2, 42, 42, 42)
Warning in <TColor::TColor>: color 2 already defined
(TColor *) 0x3eb2050
root [1] test->GetRed()
(float) 1.00000f
root [2] test->GetGreen()
(float) 0.00000f
root [3] test->GetBlue()
(float) 0.00000f
// Creating colour with index 12345.
root [4] TColor* test_new = new TColor(12345, 42, 42, 42)
(TColor *) 0x3f06350
root [8] test_new->GetRed()
(float) 42.0000f
root [9] test_new->GetGreen()
(float) 42.0000f
root [10] test_new->GetBlue()
(float) 42.0000f |
What I meant was not how the |
I see. I am testing in ROOT and: TColor* c = new TColor(12345, 42, 42, 42); // 0x3390540
TColor* test_get1 = gROOT->GetColor(12345); // 0x3390540
test_get1->GetRed() // (float) 42.0000f
delete c;
test_get1->GetRed() // (float) 0.0000f
TColor* test_get2 = gROOT->GetColor(12345); // (TColor *) nullptr |
Thanks for checking, I wasn't aware of that. In that case, I think case the behavior is the same as before. |
98eee7f
to
60ff528
Compare
BEGINRELEASENOTES
ENDRELEASENOTES
This should fix the lengthy warnings like the one below when using event display: