]>
Commit | Line | Data |
---|---|---|
66e0997c | 1 | // $Id$ |
a387ee7c | 2 | // $MpId: testPadsUpEtc.C,v 1.6 2005/08/24 08:53:27 ivana Exp $ |
66e0997c | 3 | // |
4 | // Test macro that starts from a given pad and prints | |
5 | // all pads up, down, right, left from this pad | |
6 | // (up to the plane border). | |
7 | ||
8 | void testPadsUpEtc(AliMpStationType station = kStation1, | |
9 | AliMpPlaneType planeType = kBendingPlane) | |
10 | { | |
a387ee7c | 11 | AliMpSectorReader reader(station, planeType); |
e8c253a0 | 12 | AliMpSector* sector = reader.BuildSector(); |
13 | AliMpSectorSegmentation segmentation(sector); | |
66e0997c | 14 | |
e8c253a0 | 15 | AliMpIntPair indices(85, 101); |
16 | if( planeType == kNonBendingPlane) indices = AliMpIntPair(129, 10); | |
66e0997c | 17 | |
18 | AliMpPad pad; | |
e8c253a0 | 19 | if (segmentation.HasPad(indices)) { |
66e0997c | 20 | |
e8c253a0 | 21 | pad = segmentation.PadByIndices(indices); |
66e0997c | 22 | cout << "Pad: " << pad << endl << endl; |
23 | ||
24 | cout << "######### GO UP ############### " << endl; | |
25 | ||
26 | AliMpPadPair nextPads(pad, pad); | |
27 | while (nextPads.GetFirst().IsValid()) { | |
e8c253a0 | 28 | nextPads = segmentation.PadsUp(nextPads.GetFirst()); |
66e0997c | 29 | cout << " up 1: " << nextPads.GetFirst() << endl; |
30 | cout << " 2: " << nextPads.GetSecond() << endl; | |
31 | } | |
32 | ||
33 | cout << "######### GO DOWN ############### " << endl; | |
34 | ||
35 | nextPads = AliMpPadPair(pad, pad); | |
36 | while (nextPads.GetFirst().IsValid()) { | |
e8c253a0 | 37 | nextPads = segmentation.PadsDown(nextPads.GetFirst()); |
66e0997c | 38 | cout << " down 1: " << nextPads.GetFirst() << endl; |
39 | cout << " 2: " << nextPads.GetSecond() << endl; | |
40 | } | |
41 | ||
42 | cout << "######### GO RIGHT ############### " << endl; | |
43 | ||
44 | nextPads = AliMpPadPair(pad, pad); | |
45 | while (nextPads.GetFirst().IsValid()) { | |
e8c253a0 | 46 | nextPads = segmentation.PadsRight(nextPads.GetFirst()); |
66e0997c | 47 | cout << " right 1: " << nextPads.GetFirst() << endl; |
48 | cout << " 2: " << nextPads.GetSecond() << endl; | |
49 | } | |
50 | ||
51 | cout << "######### GO LEFT ############### " << endl; | |
52 | ||
53 | nextPads = AliMpPadPair(pad, pad); | |
54 | while (nextPads.GetFirst().IsValid()) { | |
e8c253a0 | 55 | nextPads = segmentation.PadsLeft(nextPads.GetFirst()); |
66e0997c | 56 | cout << " left 1: " << nextPads.GetFirst() << endl; |
57 | cout << " 2: " << nextPads.GetSecond() << endl; | |
58 | } | |
59 | } | |
60 | } |