Updated for new numbering of motif positions in mapping.
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testIndicesLimits.C
CommitLineData
72d8f376 1// $Id$
2//
e8c253a0 3// Test macro for indices limits.
72d8f376 4
5void testIndicesLimits(AliMpStationType station = kStation1,
6 AliMpPlaneType plane = kBendingPlane)
7{
8 AliMpReader reader(station, plane);
9 //reader.SetVerboseLevel(1);
10
11 // Read data
12 AliMpSector* sector = reader.BuildSector();
13
14 // Loop over rows
15 for (Int_t i=0; i<sector->GetNofRows(); i++) {
16 AliMpRow* row = sector->GetRow(i);
17 cout << i
18 << "th row limits: "
19 << row->GetLowIndicesLimit() << " "
20 << row->GetHighIndicesLimit() << endl;
21
22 // Loop over row segments
23 for (Int_t j=0; j<row->GetNofRowSegments(); j++) {
24 AliMpVRowSegment* rowSegment = row->GetRowSegment(j);
25 cout << " "
26 << j
27 << "th row segment limits: "
28 << rowSegment->GetLowIndicesLimit() << " "
29 << rowSegment->GetHighIndicesLimit() << endl;
30
31 // Loop over motif positions
32 for (Int_t k=0; k<rowSegment->GetNofMotifs(); k++) {
33 Int_t mposID = rowSegment->GetMotifPositionId(k);
34 AliMpMotifPosition* mPos =
35 sector->GetMotifMap()->FindMotifPosition(mposID);
36 if (mPos) {
37 cout << " "
38 << mPos->GetID()
39 << " motif position limits: "
40 << mPos->GetLowIndicesLimit() << " "
41 << mPos->GetHighIndicesLimit() << endl;
42 }
43 else {
44 cerr << "Motif position "
45 << mposID << " not found in the map" << endl;
46 }
47 }
48 }
49 }
50
51 delete sector;
52}
53
54
55