Warning in <Sumw2>: Sum of squares of profile bin weights structure already created

Hello guys,
There is still a “warning” that Warning in <Sumw2>: Sum of squares of profile bin weights structure already created in the below process of calculation.
I found when I uncomment the line. his_a->Sumw2(kFALSE); and his_b->Sumw2(kFALSE);
the Warning dispear. I think the warning coming from the for loop, so that multi-tprofile have some name, right? I am now sure whehter there is some difference bewteen them.

for(){
 
TH2D* a = (TH2D*)file->Get(" ");
TProfile* tp_a = (TProfile*)a->ProfileX("tp_a",1,-1,"i");
TH1D* his_a = tp_a->ProjectionX("");

TH2D* b = (TH2D*)file->Get(" ");
TProfile* tp_b = (TProfile *)b->ProfileX("tp_b",1,-1,"i");
TH1D* his_b = tp_b->ProjectionX(" " );
 
TH1D *his_c = (TH1D*)file->Get("");
 Double_t aux_x = -2.0*(his_c->GetMean());

 //his_a->Sumw2(kFALSE);
 //his_b->Sumw2(kFALSE);

 his_b->Scale(aux_x)
 his_a->Add(his_b);
 vn_data->Scale(-1.0/const.)
}

Hello,
I try to changed the name of TProfile to have a different name for “for loop”.
I found the warning disappear.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.