]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/macros/testGraphics.C
Updated for replacement of AliMpReader with AliMpSectorReader
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testGraphics.C
CommitLineData
66e0997c 1// $Id$
a387ee7c 2// $MpId: testGraphics.C,v 1.11 2005/08/24 08:53:27 ivana Exp $
66e0997c 3//
4// Test macro for drawing sector data.
5
6void testGraphics(AliMpStationType station = kStation1,
7 AliMpPlaneType plane = kBendingPlane)
8{
a387ee7c 9 AliMpSectorReader r(station, plane);
66e0997c 10 AliMpSector *sector=r.BuildSector();
11 AliMpVPainter *painter=AliMpVPainter::CreatePainter(sector);
12
13 TCanvas* canvas = new TCanvas();
14 TCanvas* c[4];
15 for (int i=0;i<4;++i) {
16 c[i] = new TCanvas();
17 c[i]->Divide(2,2);
18 }
19
20 //first, paint the whole sector
21 canvas->cd();
22 painter->Draw("");
23 //now paint each rows
24 c[0]->cd(1);
25 painter->Draw("R");
26 //paint each row segments in each row
27 c[0]->cd(2);
28 painter->Draw("RS");
29 //paint each motifs, in each row segments in each row
30 c[0]->cd(3);
31 painter->Draw("RSMP");
32 //paint each pads, in each motifs, in each row segments in each row
33 c[0]->cd(4);
34 painter->Draw("RSMT");
35
36 ///////////////////////////////
37 //now paint each rows, wwith its name
38 c[1]->cd(1);
39 painter->Draw("RT");
40 //paint each row segments in each row, and its name
41 c[1]->cd(2);
42 painter->Draw("RST");
43 //paint each motifs, in each row segments in each row
44 c[1]->cd(3);
45 painter->Draw("RSMX");
46 c[1]->cd(4);
47 painter->Draw("RSMI");
48
49 ///////////////////////////////
50 //now paint each zones
51 c[2]->cd(1);
52 painter->Draw("Z");
53 //paint each sub-zones, in each zones
54 c[2]->cd(2);
55 painter->Draw("ZS");
56 //paint each row segments, in each sub-zone, ...
57 c[2]->cd(3);
58 painter->Draw("ZSS");
59 // each motifs, in each row segments, ...
60 c[2]->cd(4);
61 painter->Draw("ZSSM");
62
63 ///////////////////////////////
64 //now paint each zones with its name
65 c[3]->cd(1);
66 painter->Draw("ZT");
67 //paint each sub-zones, in each zones with its name
68 c[3]->cd(2);
69 painter->Draw("ZST");
70 //paint each row segments, in each sub-zone, ... with its name
71 c[3]->cd(3);
72 painter->Draw("ZSST");
73 // each motifs, in each row segments, ... with its name
74 c[3]->cd(4);
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");
83}