]>
Commit | Line | Data |
---|---|---|
66e0997c | 1 | // $Id$ |
57ff4119 | 2 | // $MpId: testSectorFind.C,v 1.10 2005/10/28 15:36:08 ivana Exp $ |
66e0997c | 3 | // |
4 | // Test macro for which verify that all FindPosition, FindIndices | |
5 | // and FindLocation methods are consistents between them. | |
6 | ||
f05d3eb1 | 7 | #if !defined(__CINT__) || defined(__MAKECINT__) |
8 | ||
9 | #include "AliMpStation12Type.h" | |
10 | #include "AliMpPlaneType.h" | |
11 | #include "AliMpDataProcessor.h" | |
12 | #include "AliMpDataMap.h" | |
13 | #include "AliMpDataStreams.h" | |
14 | #include "AliMpSector.h" | |
15 | #include "AliMpSectorSegmentation.h" | |
16 | #include "AliMpSectorReader.h" | |
17 | #include "AliMpArea.h" | |
18 | #include "AliMpVPadIterator.h" | |
19 | #include "AliMpVPainter.h" | |
20 | ||
21 | #include <Riostream.h> | |
22 | #include <TCanvas.h> | |
334be4b7 | 23 | |
f05d3eb1 | 24 | #endif |
66e0997c | 25 | |
6aa39548 | 26 | TCanvas* CreateTCanvas(const TString& name, const TString& title, |
27 | AliMq::Station12Type station, AliMp::PlaneType plane) | |
28 | { | |
29 | TString newName(name); | |
30 | TString newTitle(title); | |
31 | TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane); | |
32 | newName += unique; | |
33 | newTitle += unique; | |
34 | return new TCanvas(newName.Data(), newTitle.Data()); | |
35 | } | |
36 | ||
f05d3eb1 | 37 | void testSectorFind(AliMq::Station12Type station, AliMp::PlaneType plane) |
38 | { | |
39 | AliMpDataProcessor mp; | |
40 | AliMpDataMap* dataMap = mp.CreateDataMap("data"); | |
41 | AliMpDataStreams dataStreams(dataMap); | |
42 | ||
43 | AliMpSectorReader r(dataStreams, station, plane); | |
44 | AliMpSector* sector = r.BuildSector(); | |
66e0997c | 45 | AliMpSectorSegmentation segmentation(sector); |
f05d3eb1 | 46 | |
6aa39548 | 47 | CreateTCanvas("", "", station, plane); |
66e0997c | 48 | AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector); |
49 | painter->Draw("ZSSMP"); | |
50 | ||
51 | for (Int_t i=0; i<90;i++){ | |
52 | cout<<"Verifying column "<<i<<"....."<<endl; | |
53 | ||
54 | for (Int_t j=0;j<230;++j) | |
168e9c4d | 55 | segmentation.CircleTest(i,j); |
66e0997c | 56 | } |
57 | } | |
f05d3eb1 | 58 | |
6aa39548 | 59 | void testSt12SectorFind() |
f05d3eb1 | 60 | { |
61 | AliMq::Station12Type station[2] = { AliMq::kStation1, AliMq::kStation2 }; | |
62 | AliMp::PlaneType plane[2] = { AliMp::kBendingPlane, AliMp::kNonBendingPlane }; | |
63 | ||
64 | for ( Int_t is = 0; is < 2; is++ ) { | |
65 | for ( Int_t ip = 0; ip < 2; ip++ ) { | |
66 | ||
67 | cout << "Running testSectorFind for " | |
68 | << AliMq::Station12TypeName(station[is]) << " " | |
69 | << AliMp::PlaneTypeName(plane[ip]) << " ... " << endl; | |
70 | ||
71 | testSectorFind(station[is], plane[ip]); | |
72 | ||
73 | cout << "... end running " << endl << endl; | |
74 | } | |
75 | } | |
76 | } | |
77 |