2 // $MpId: testGraphics.C,v 1.11 2005/08/24 08:53:27 ivana Exp $
4 // Test macro for drawing sector data.
6 void testGraphics(AliMpStationType station = kStation1,
7 AliMpPlaneType plane = kBendingPlane)
9 AliMpSectorReader r(station, plane);
10 AliMpSector *sector=r.BuildSector();
11 AliMpVPainter *painter=AliMpVPainter::CreatePainter(sector);
13 TCanvas* canvas = new TCanvas();
15 for (int i=0;i<4;++i) {
20 //first, paint the whole sector
26 //paint each row segments in each row
29 //paint each motifs, in each row segments in each row
31 painter->Draw("RSMP");
32 //paint each pads, in each motifs, in each row segments in each row
34 painter->Draw("RSMT");
36 ///////////////////////////////
37 //now paint each rows, wwith its name
40 //paint each row segments in each row, and its name
43 //paint each motifs, in each row segments in each row
45 painter->Draw("RSMX");
47 painter->Draw("RSMI");
49 ///////////////////////////////
50 //now paint each zones
53 //paint each sub-zones, in each zones
56 //paint each row segments, in each sub-zone, ...
59 // each motifs, in each row segments, ...
61 painter->Draw("ZSSM");
63 ///////////////////////////////
64 //now paint each zones with its name
67 //paint each sub-zones, in each zones with its name
70 //paint each row segments, in each sub-zone, ... with its name
72 painter->Draw("ZSST");
73 // each motifs, in each row segments, ... with its name
75 painter->Draw("ZSSMT");
76 // now, draw a specific motif, in a whole canvas, and
77 // print all its pad names
78 Int_t id = sector->GetRow(5)->GetRowSegment(0)->GetMotifPositionId(0);
79 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(id);
80 motifPainter = AliMpVPainter::CreatePainter(motifPos);
81 TCanvas* onepad = new TCanvas("onepad","One motif");
82 motifPainter->Draw("PT");