2 // $MpId: testIndicesLimits.C,v 1.5 2005/10/28 15:36:08 ivana Exp $
4 // Test macro for indices limits.
6 #if !defined(__CINT__) || defined(__MAKECINT__)
8 #include "AliMpStation12Type.h"
9 #include "AliMpPlaneType.h"
10 #include "AliMpDataProcessor.h"
11 #include "AliMpDataMap.h"
12 #include "AliMpDataStreams.h"
13 #include "AliMpSector.h"
14 #include "AliMpSectorReader.h"
15 #include "AliMpSectorSegmentation.h"
17 #include "AliMpVRowSegment.h"
18 #include "AliMpMotifMap.h"
19 #include "AliMpMotifPosition.h"
20 #include "AliMpMotifType.h"
22 #include <Riostream.h>
28 void testIndicesLimits(AliMq::Station12Type station,AliMp::PlaneType plane)
30 AliMpDataProcessor mp;
31 AliMpDataMap* dataMap = mp.CreateDataMap("data");
32 AliMpDataStreams dataStreams(dataMap);
34 AliMpSectorReader r(dataStreams, station, plane);
36 AliMpSector *sector=r.BuildSector();
37 AliMpSectorSegmentation segmentation(sector);
40 for (Int_t i=0; i<sector->GetNofRows(); i++) {
41 AliMpRow* row = sector->GetRow(i);
44 << row->GetLowIndicesLimit() << " "
45 << row->GetHighIndicesLimit() << endl;
47 // Loop over row segments
48 for (Int_t j=0; j<row->GetNofRowSegments(); j++) {
49 AliMpVRowSegment* rowSegment = row->GetRowSegment(j);
52 << "th row segment limits: "
53 << rowSegment->GetLowIndicesLimit() << " "
54 << rowSegment->GetHighIndicesLimit() << endl;
56 // Loop over motif positions
57 for (Int_t k=0; k<rowSegment->GetNofMotifs(); k++) {
58 Int_t mposID = rowSegment->GetMotifPositionId(k);
59 AliMpMotifPosition* mPos =
60 sector->GetMotifMap()->FindMotifPosition(mposID);
64 << " motif position limits: "
65 << mPos->GetLowIndicesLimit() << " "
66 << mPos->GetHighIndicesLimit() << endl;
69 cerr << "Motif position "
70 << mposID << " not found in the map" << endl;
79 void testIndicesLimits()
81 AliMq::Station12Type station[2] = { AliMq::kStation1, AliMq::kStation2 };
82 AliMp::PlaneType plane[2] = { AliMp::kBendingPlane, AliMp::kNonBendingPlane };
84 for ( Int_t is = 0; is < 2; is++ ) {
85 for ( Int_t ip = 0; ip < 2; ip++ ) {
87 cout << "Running testIndicesLimits for "
88 << AliMq::Station12TypeName(station[is]) << " "
89 << AliMp::PlaneTypeName(plane[ip]) << " ... " << endl;
91 testIndicesLimits(station[is], plane[ip]);
93 cout << "... end running " << endl << endl;