source: tools/pixelmap_test/PixelMapTest.cc@ 8866

Last change on this file since 8866 was 18, checked in by qweitzel, 16 years ago
change in pixelmap: file now defined via construtor
File size: 1.6 KB
Line 
1//simple test program to check the PixelMap class
2
3#include "../../pixelmap/PixelMap.h"
4#include <iostream>
5
6int main(){
7
8 std::cout << std::endl;
9 std::cout << "==============================" << std::endl;
10 std::cout << "PixelMap Test Program" << std::endl;
11 std::cout << "==============================" << std::endl;
12 std::cout << std::endl;
13
14 PixelMap* pm = new PixelMap("Test_PixelMap.txt", true);
15
16 pm->Print();
17
18 std::string drs1 = pm->DRS_to_Pixel(0,0,0,true);
19 std::cout << "Name: " << drs1 << std::endl;
20
21 std::string drs2 = pm->DRS_to_Pixel(1,0,0,true);
22 std::cout << "Name: " << drs2 << std::endl;
23
24 std::string drs3 = pm->DRS_to_Pixel(0,0,0,true);
25 std::cout << "Name: " << drs3 << std::endl;
26
27 std::string hv1 = pm->HV_to_Pixel(6,1,8,true);
28 std::cout << "Name: " << hv1 << std::endl;
29
30 std::string hv2 = pm->HV_to_Pixel(6,9,1,true);
31 std::cout << "Name: " << hv2 << std::endl;
32
33 std::string hv3 = pm->HV_to_Pixel(1,0,0,true);
34 std::cout << "Name: " << hv3 << std::endl;
35
36 unsigned int drsb1 = pm->Pixel_to_DRSboard("0-1-1",true);
37 std::cout << "Board: " << drsb1 << std::endl;
38
39 unsigned int drsb2 = pm->Pixel_to_DRSboard("1-0-0",true);
40 std::cout << "Board: " << drsb2 << std::endl;
41
42 pm->Print();
43
44 std::string drs4 = pm->DRS_to_Pixel(0,0,1,true);
45 std::cout << "Name: " << drs4 << std::endl;
46
47 unsigned int hvchain1 = pm->Pixel_to_HVchain("0-1-1",true);
48 std::cout << "Chain: " << hvchain1 << std::endl;
49
50 unsigned int hvchain2 = pm->Pixel_to_HVchain("1-0-0",true);
51 std::cout << "Chain: " << hvchain2 << std::endl;
52
53 delete pm;
54
55 return 0;
56
57}
Note: See TracBrowser for help on using the repository browser.