]>
Commit | Line | Data |
---|---|---|
66e0997c | 1 | // $Id$ |
334be4b7 | 2 | // $MpId: testReadMotifType.C,v 1.12 2005/09/26 16:05:25 ivana Exp $ |
66e0997c | 3 | // |
4 | // Test macro for reading motif type data. | |
5 | ||
f05d3eb1 | 6 | #if !defined(__CINT__) || defined(__MAKECINT__) |
7 | ||
8 | #include "AliMpStation12Type.h" | |
9 | #include "AliMpPlaneType.h" | |
10 | #include "AliMpDataProcessor.h" | |
11 | #include "AliMpDataMap.h" | |
12 | #include "AliMpDataStreams.h" | |
13 | #include "AliMpMotifReader.h" | |
14 | #include "AliMpVMotif.h" | |
15 | #include "AliMpMotifType.h" | |
16 | #include "AliMpMotifMap.h" | |
17 | #include "AliMpConstants.h" | |
18 | ||
19 | #include <Riostream.h> | |
20 | #include <TCanvas.h> | |
21 | #include <TH2.h> | |
22 | ||
23 | #endif | |
24 | ||
25 | ||
26 | void testReadMotifType(AliMq::Station12Type station, AliMp::PlaneType plane) | |
66e0997c | 27 | { |
f05d3eb1 | 28 | AliMpDataProcessor mp; |
29 | AliMpDataMap* dataMap = mp.CreateDataMap("data"); | |
30 | AliMpDataStreams dataStreams(dataMap); | |
31 | ||
32 | AliMpMotifReader r(dataStreams, AliMp::kStation12, station, plane); | |
66e0997c | 33 | //r.SetVerboseLevel(2); |
34 | ||
72d8f376 | 35 | TString names; |
36 | TString names2; | |
37 | Int_t nv =0; | |
f05d3eb1 | 38 | if ( station == AliMq::kStation1 ) { |
cddd101e | 39 | if ( plane == AliMp::kBendingPlane ) |
72d8f376 | 40 | names ="ABCDEFGHI"; |
41 | else | |
42 | names = "ABCDEFGHIJKLMN"; | |
f05d3eb1 | 43 | } |
44 | else if ( station == AliMq::kStation2 ) { | |
cddd101e | 45 | if ( plane == AliMp::kBendingPlane ) { |
72d8f376 | 46 | names ="ABCDEFGHIJKLMNOPQRSTUVWXY"; |
47 | names2 ="abcdefghimnptuv"; | |
48 | nv = 5; | |
49 | } | |
50 | else { | |
02502526 | 51 | names = "ABCEFGHIJKLMN"; |
72d8f376 | 52 | names2 ="abcdefgijklmnopqrstuwv"; |
02502526 | 53 | nv = 5; |
72d8f376 | 54 | } |
f05d3eb1 | 55 | } |
72d8f376 | 56 | |
66e0997c | 57 | for (Int_t i=0;i<names.Length();++i){ |
58 | r.BuildMotifType(names[i])->Print("G"); | |
59 | } | |
72d8f376 | 60 | |
61 | // motifs a1, b1, ..., u1, v1 | |
62 | for (Int_t i2=0;i2<names2.Length();++i2){ | |
63 | TString mtName = names2[i2]; | |
64 | mtName += "1"; | |
65 | r.BuildMotifType(mtName)->Print("G"); | |
66 | } | |
67 | ||
68 | // motifs v2, ..., v5, v6 | |
69 | TString names4="v"; | |
70 | for (Int_t i3=2;i3<nv+1;++i3) { | |
71 | TString mtName = "v"; | |
72 | mtName += i3; | |
73 | r.BuildMotifType(mtName)->Print("G"); | |
74 | } | |
66e0997c | 75 | } |
f05d3eb1 | 76 | |
77 | void testReadMotifType() | |
78 | { | |
79 | AliMq::Station12Type station[2] = { AliMq::kStation1, AliMq::kStation2 }; | |
80 | AliMp::PlaneType plane[2] = { AliMp::kBendingPlane, AliMp::kNonBendingPlane }; | |
81 | ||
82 | for ( Int_t is = 0; is < 2; is++ ) { | |
83 | for ( Int_t ip = 0; ip < 2; ip++ ) { | |
84 | ||
85 | cout << "Running testReadMotifType for " | |
86 | << AliMq::Station12TypeName(station[is]) << " " | |
87 | << AliMp::PlaneTypeName(plane[ip]) << " ... " << endl; | |
88 | ||
89 | testReadMotifType(station[is], plane[ip]); | |
90 | ||
91 | cout << "... end running " << endl << endl; | |
92 | } | |
93 | } | |
94 | } | |
95 |