Hello again,
I’m currently searching for something that might be very simple, but i just can’t find the right command…
So I’m compiling an overview of my beamtime: How often did we shoot with which energy on which target. The targets are supposed to be on the X-Axis, the energy son the Y-Axis, I’m using TH2I. so far so good. What works to a point is
[code]
Int_t entries = Data.DAQData->Draw(“Zusatzwert_Energie:Zusatzwert_Target”, noLT, “goff”);
Double_t xvalues = new Double_t[entries];
Double_t yvalues = new Double_t[entries];
memcpy(xvalues, Data.DAQData->GetV2(), entriessizeof(Double_t));
memcpy(yvalues, Data.DAQData->GetV1(), entriessizeof(Double_t));
TH2I *overview_Targets = new TH2I("Anzahl Schüsse (ohne Leuchttarget)", "Anzahl Schüsse (ohne Leuchttarget)", 17, 0., 16., 51, 47.5, 302.5);
for(Int_t i = 0; i < entries; i++){
overview_Targets->Fill(xvalues[i], yvalues[i]);
}
overview_Targets->Draw("COLZ");
overview_Targets->Draw("Same Text");
[/code]
However, the branch Zusatzwert_Target contains TStrings and i would like those put on the X-Axis automatically. So is there an equivalent to TTree::GetV2 that returns a TString that i just can’t find.
Best wishes and Thanks in advance
test.pdf (15.1 KB)