2 // $MpId: testPadsUpEtc.C,v 1.6 2005/08/24 08:53:27 ivana Exp $
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).
8 void testPadsUpEtc(AliMpStationType station = kStation1,
9 AliMpPlaneType planeType = kBendingPlane)
11 AliMpSectorReader reader(station, planeType);
12 AliMpSector* sector = reader.BuildSector();
13 AliMpSectorSegmentation segmentation(sector);
15 AliMpIntPair indices(85, 101);
16 if( planeType == kNonBendingPlane) indices = AliMpIntPair(129, 10);
19 if (segmentation.HasPad(indices)) {
21 pad = segmentation.PadByIndices(indices);
22 cout << "Pad: " << pad << endl << endl;
24 cout << "######### GO UP ############### " << endl;
26 AliMpPadPair nextPads(pad, pad);
27 while (nextPads.GetFirst().IsValid()) {
28 nextPads = segmentation.PadsUp(nextPads.GetFirst());
29 cout << " up 1: " << nextPads.GetFirst() << endl;
30 cout << " 2: " << nextPads.GetSecond() << endl;
33 cout << "######### GO DOWN ############### " << endl;
35 nextPads = AliMpPadPair(pad, pad);
36 while (nextPads.GetFirst().IsValid()) {
37 nextPads = segmentation.PadsDown(nextPads.GetFirst());
38 cout << " down 1: " << nextPads.GetFirst() << endl;
39 cout << " 2: " << nextPads.GetSecond() << endl;
42 cout << "######### GO RIGHT ############### " << endl;
44 nextPads = AliMpPadPair(pad, pad);
45 while (nextPads.GetFirst().IsValid()) {
46 nextPads = segmentation.PadsRight(nextPads.GetFirst());
47 cout << " right 1: " << nextPads.GetFirst() << endl;
48 cout << " 2: " << nextPads.GetSecond() << endl;
51 cout << "######### GO LEFT ############### " << endl;
53 nextPads = AliMpPadPair(pad, pad);
54 while (nextPads.GetFirst().IsValid()) {
55 nextPads = segmentation.PadsLeft(nextPads.GetFirst());
56 cout << " left 1: " << nextPads.GetFirst() << endl;
57 cout << " 2: " << nextPads.GetSecond() << endl;