2 // $MpId: testGraphics.C,v 1.12 2005/09/26 16:05:25 ivana Exp $
4 // Test macro for drawing sector data.
6 void testGraphics(AliMpStationType station = kStation1,
7 AliMpPlaneType plane = kBendingPlane,
8 Bool_t rootInput = false)
10 AliMpSector *sector = 0;
12 AliMpSectorReader r(station, plane);
13 sector=r.BuildSector();
16 TString filePath = AliMpFiles::Instance()->SectorFilePath(station,plane);
17 filePath.ReplaceAll("zones.dat", "sector.root");
19 TFile f(filePath.Data(), "READ");
20 sector = (AliMpSector*)f.Get("Sector");
23 AliMpVPainter *painter=AliMpVPainter::CreatePainter(sector);
25 TCanvas* canvas = new TCanvas();
27 for (int i=0;i<4;++i) {
32 //first, paint the whole sector
38 //paint each row segments in each row
41 //paint each motifs, in each row segments in each row
43 painter->Draw("RSMP");
44 //paint each pads, in each motifs, in each row segments in each row
46 painter->Draw("RSMT");
48 ///////////////////////////////
49 //now paint each rows, wwith its name
52 //paint each row segments in each row, and its name
55 //paint each motifs, in each row segments in each row
57 painter->Draw("RSMX");
59 painter->Draw("RSMI");
61 ///////////////////////////////
62 //now paint each zones
65 //paint each sub-zones, in each zones
68 //paint each row segments, in each sub-zone, ...
71 // each motifs, in each row segments, ...
73 painter->Draw("ZSSM");
75 ///////////////////////////////
76 //now paint each zones with its name
79 //paint each sub-zones, in each zones with its name
82 //paint each row segments, in each sub-zone, ... with its name
84 painter->Draw("ZSST");
85 // each motifs, in each row segments, ... with its name
87 painter->Draw("ZSSMT");
88 // now, draw a specific motif, in a whole canvas, and
89 // print all its pad names
90 Int_t id = sector->GetRow(5)->GetRowSegment(0)->GetMotifPositionId(0);
91 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(id);
92 motifPainter = AliMpVPainter::CreatePainter(motifPos);
93 TCanvas* onepad = new TCanvas("onepad","One motif");
94 motifPainter->Draw("PT");