From 2e9bedc93e729897aef65e5d0cae2af723895f0c Mon Sep 17 00:00:00 2001 From: hristov Date: Mon, 12 Jun 2006 16:50:16 +0000 Subject: [PATCH] Visualization of the calibration data (Marian) --- TPC/AliTPCCalROC.cxx | 23 ++++++++++++++++++++++- TPC/AliTPCCalROC.h | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/TPC/AliTPCCalROC.cxx b/TPC/AliTPCCalROC.cxx index c43e8140234..5e53a06e020 100644 --- a/TPC/AliTPCCalROC.cxx +++ b/TPC/AliTPCCalROC.cxx @@ -26,7 +26,7 @@ #include "TMath.h" #include "TClass.h" #include "TFile.h" - +#include "TH2F.h" ClassImp(AliTPCCalROC) @@ -98,6 +98,27 @@ void AliTPCCalROC::Streamer(TBuffer &R__b) +void AliTPCCalROC::Draw(Option_t* option){ + // + // create histogram with values and draw it + // + UInt_t maxPad = 0; + for (UInt_t irow=0; irowmaxPad) maxPad = GetNPads(irow); + } + char name[1000]; + sprintf(name,"%s ROC%d",GetTitle(),fSector); + TH2F * his = new TH2F(name,name,fNRows+10,-5, fNRows+5, maxPad+10, -(Int_t(maxPad/2))-5, maxPad/2+5); + for (UInt_t irow=0; irowFill(irow+0.5,Int_t(ipad)-Int_t(npads/2)+0.5,GetValue(irow,ipad)); + } + } + his->Draw(option); +} + + void AliTPCCalROC::Test(){ // // example function to show functionality and tes AliTPCCalROC diff --git a/TPC/AliTPCCalROC.h b/TPC/AliTPCCalROC.h index 5cbd874ebd4..12e35d57a0a 100644 --- a/TPC/AliTPCCalROC.h +++ b/TPC/AliTPCCalROC.h @@ -30,6 +30,7 @@ class AliTPCCalROC : public TObject { Float_t GetValue(UInt_t channel) const { return fData[channel]; }; void SetValue(UInt_t row, UInt_t pad, Float_t vd) { if ( row