]>
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__) | |
5 | #include "AliMpSt345Reader.h" | |
6 | #include "AliMpPCB.h" | |
7 | #include "AliMpMotifPosition.h" | |
8 | #include "Riostream.h" | |
9 | #endif | |
10 | ||
11 | void testReadPCB() | |
12 | { | |
13 | const char* pcbToTest[] = { "B1", "B2", "B3+", "B3-", "N1", "N2+", "N2-", | |
14 | "N3", "R1B", "R1N", "R2B", "R2N", "R3B", "R3N", "S2B", "S2N" }; | |
15 | ||
16 | Int_t N = sizeof(pcbToTest)/sizeof(const char*); | |
17 | ||
18 | for ( Int_t i = 0; i < N; ++i ) | |
19 | { | |
20 | AliMpPCB* pcb = AliMpSt345Reader::ReadPCB(pcbToTest[i]); | |
21 | if (pcb) | |
22 | { | |
23 | pcb->Print(); | |
24 | for ( Int_t j = 0; j < pcb->GetSize(); ++j ) | |
25 | { | |
26 | AliMpMotifPosition* pos = pcb->GetMotifPosition(j); | |
27 | cout << " " << j << " "; | |
28 | pos->Print(); | |
29 | } | |
30 | } | |
31 | else | |
32 | { | |
33 | cout << "Cannot read " << pcbToTest[i] << endl; | |
34 | } | |
35 | } | |
36 | } |