]>
Commit | Line | Data |
---|---|---|
dd3e6c2b | 1 | // $Id$ |
2 | // $MpId: testReadPCB.C,v 1.1 2005/09/19 19:02:53 ivana Exp $ | |
3 | ||
4 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
f05d3eb1 | 5 | |
6 | #include "AliMpStation12Type.h" | |
7 | #include "AliMpPlaneType.h" | |
8 | #include "AliMpDataProcessor.h" | |
9 | #include "AliMpDataMap.h" | |
10 | #include "AliMpDataStreams.h" | |
11 | #include "AliMpSlatMotifMap.h" | |
dd3e6c2b | 12 | #include "AliMpSt345Reader.h" |
13 | #include "AliMpPCB.h" | |
14 | #include "AliMpMotifPosition.h" | |
f05d3eb1 | 15 | |
16 | #include <Riostream.h> | |
17 | ||
dd3e6c2b | 18 | #endif |
19 | ||
20 | void testReadPCB() | |
21 | { | |
f05d3eb1 | 22 | AliMpDataProcessor mp; |
23 | AliMpDataMap* dataMap = mp.CreateDataMap("data"); | |
24 | AliMpDataStreams dataStreams(dataMap); | |
25 | ||
26 | AliMpSlatMotifMap* motifMap = new AliMpSlatMotifMap(); | |
27 | AliMpSt345Reader r(dataStreams, motifMap); | |
28 | ||
dd3e6c2b | 29 | const char* pcbToTest[] = { "B1", "B2", "B3+", "B3-", "N1", "N2+", "N2-", |
30 | "N3", "R1B", "R1N", "R2B", "R2N", "R3B", "R3N", "S2B", "S2N" }; | |
31 | ||
32 | Int_t N = sizeof(pcbToTest)/sizeof(const char*); | |
33 | ||
34 | for ( Int_t i = 0; i < N; ++i ) | |
35 | { | |
f05d3eb1 | 36 | AliMpPCB* pcb = r.ReadPCB(pcbToTest[i]); |
dd3e6c2b | 37 | if (pcb) |
38 | { | |
39 | pcb->Print(); | |
40 | for ( Int_t j = 0; j < pcb->GetSize(); ++j ) | |
41 | { | |
42 | AliMpMotifPosition* pos = pcb->GetMotifPosition(j); | |
43 | cout << " " << j << " "; | |
44 | pos->Print(); | |
45 | } | |
46 | } | |
47 | else | |
48 | { | |
49 | cout << "Cannot read " << pcbToTest[i] << endl; | |
50 | } | |
51 | } | |
52 | } |