//______________________________________________________________________________ void MIDTFillGraph::EndOfRun() { TGraph *graphs[gAnalyzer->GetMidasDAQ()->GetTILTBankEntries()]; for (int i=0; i<gAnalyzer->GetMidasDAQ()->GetTILTBankEntries(); i++){ graphs[i] = new TGraph(); for (int k=0; k<GetMyGraphAt(i)->GetN(); k++) graphs[i]->SetPoint(k,GetMyGraphAt(i)->GetX()[k],GetMyGraphAt(i)->GetY()[k]); } fTreeFile->cd(); for (int i=0; i<gAnalyzer->GetMidasDAQ()->GetTILTBankEntries(); i++) graphs[i]->Write(Form("tilt_%d",i+1)); fTreeFile->Write(); fTreeFile->Close(); }
//______________________________________________________________________________ void MIDTFillGraph::EndOfRun() { TGraph *graphs[gAnalyzer->GetMidasDAQ()->GetLTRKBankEntries()]; int n = 0; for (int i=0; i<gAnalyzer->GetMidasDAQ()->GetLTRKBankEntries(); i++){ graphs[i] = new TGraph(); for (int k=0; k<GetMyGraphAt(i)->GetN(); k++) graphs[i]->SetPoint(k,GetMyGraphAt(i)->GetX()[k],GetMyGraphAt(i)->GetY()[k]); } fTreeFile->cd(); for (int i=0; i<gAnalyzer->GetMidasDAQ()->GetLTRKBankEntries(); i++){ if (i==0) graphs[i]->Write("position_r"); if (i==1) graphs[i]->Write("position_y"); if (i==2) graphs[i]->Write("position_azim"); } fTreeFile->Write(); fTreeFile->Close(); }
void DOTFillHisto::Event() { GetMyHistoAt(0)->Fill(gRandom->Gaus(0,10)); GetMyHistoAt(1)->Fill(gRandom->Gaus(0,20)); GetMyHistoAt(2)->Fill(gRandom->Gaus(0,30)); GetMyProfileAt(0)->Fill(gRandom->Gaus(0,10), gRandom->Gaus(0,10)); GetMyProfileAt(1)->Fill(gRandom->Gaus(0,20), gRandom->Gaus(0,20)); GetMyProfileAt(2)->Fill(gRandom->Gaus(0,30), gRandom->Gaus(0,30)); GetMyOtherHistoAt(0)->Fill(gRandom->Gaus(10,10)); GetMyOtherHistoAt(1)->Fill(gRandom->Gaus(10,20)); GetMyOtherHistoAt(2)->Fill(gRandom->Gaus(10,30)); GetMySingleHisto()->Fill(gRandom->Gaus(0,2)); GetMy2DHistoAt(0)->Fill(gRandom->Gaus(10,10),gRandom->Gaus(10,10)); GetMy2DHistoAt(1)->Fill(gRandom->Gaus(10,20),gRandom->Gaus(10,20)); GetMy2DHistoAt(2)->Fill(gRandom->Gaus(10,30),gRandom->Gaus(10,30)); for (int i=0;i<3;i++) for (int j=0;j<6;j++) GetMyGraphAt(i)->SetPoint(j,j,gRandom->Gaus(0,1)); }
//______________________________________________________________________________ void MIDTFillGraph::Event() { gStyle->SetStatH(0.2); gStyle->SetStatW(0.6); gStyle->SetCanvasColor(0); gStyle->SetTitleFillColor(0); gStyle->SetTitleBorderSize(0); gStyle->SetStatColor(0); gStyle->SetHistLineWidth(0); if (IsMyGraphActive()) { tStamp = gAnalyzer->GetActiveDAQ()->GetTimeStamp(); //cout<<" tstamp "<<tStamp<<" number of inpt entries "<<gAnalyzer->GetMidasDAQ()->GetTILTBankEntries()<<" number of tilt entries "<<gAnalyzer->GetMidasDAQ()->GetTILTBankEntries()<<endl; for (Int_t i = 0; i < gAnalyzer->GetMidasDAQ()->GetTILTBankEntries(); i++) { GetMyGraphAt(i)->SetPoint(GetMyGraphAt(i)->GetN(),gAnalyzer->GetActiveDAQ()->GetTimeStamp(),gAnalyzer->GetMidasDAQ()->GetTILTBankAt(i)); if (i < gAnalyzer->GetGSP()->GetNChannels()) {//loop is redundant? //GetMyGraphAt(i)->SetPoint(GetMyGraphAt(i)->GetN(),gAnalyzer->GetActiveDAQ()->GetTimeStamp(),gAnalyzer->GetMidasDAQ()->GetTILTBankAt(i)); GetMyGraphAt(i)->SetMarkerStyle(20); GetMyGraphAt(i)->SetMarkerColor(kRed); GetMyGraphAt(i)->SetLineColor(kBlue); GetMyGraphAt(i)->GetXaxis()->SetTimeDisplay(1); GetMyGraphAt(i)->GetXaxis()->SetTimeFormat("#splitline{%H:%M}{%d/%m} %F 1970-01-01 00:00:00"); GetMyGraphAt(i)->GetXaxis()->SetTitle(""); GetMyGraphAt(i)->GetYaxis()->SetTitle("ADC counts"); GetMyGraphAt(i)->SetTitle(Form("Run #%d",gAnalyzer->GetODB()->GetRunNumber())); GetMyGraphAt(i)->GetYaxis()->CenterTitle(1); GetMyGraphAt(i)->GetXaxis()->SetLabelOffset(0.02); GetMyGraphAt(i)->GetXaxis()->SetTitleSize(0.05); //tree stuff tilt[i] = gAnalyzer->GetMidasDAQ()->GetTILTBankAt(i); } } if (gAnalyzer->GetMidasDAQ()->GetTILTBankEntries() > 0) { fEventTree->Fill(); } } }