CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalDAQHandler.cc
Go to the documentation of this file.
3 
4 
5 
7 
8 #include<iostream>
9 
10 // maps from EcalElectronicsMapping
11 // iphiEB and ietaEB[FedId - 610][towerId - 1]
12 // ixx and iyy[FEDid][iTT - 1][3] where FEDid -= 601 if FEDid < 610, FEDid -= 637 else
13 // pos = 0/2 filled when needed. ixx/iyy = 0 if unused
14 
15 int iphiEB[36][68] = {
16  {1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4},
17  {5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8,5,6,7,8},
18  {9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12,9,10,11,12},
19  {13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16,13,14,15,16},
20  {17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20,17,18,19,20},
21  {21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24,21,22,23,24},
22  {25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28,25,26,27,28},
23  {29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32,29,30,31,32},
24  {33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36,33,34,35,36},
25  {37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40,37,38,39,40},
26  {41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44,41,42,43,44},
27  {45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48,45,46,47,48},
28  {49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52,49,50,51,52},
29  {53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56,53,54,55,56},
30  {57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60,57,58,59,60},
31  {61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64,61,62,63,64},
32  {65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68,65,66,67,68},
33  {69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72,69,70,71,72},
34  {4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1,4,3,2,1},
35  {8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5,8,7,6,5},
36  {12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9,12,11,10,9},
37  {16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13,16,15,14,13},
38  {20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17,20,19,18,17},
39  {24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21,24,23,22,21},
40  {28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25,28,27,26,25},
41  {32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29,32,31,30,29},
42  {36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33,36,35,34,33},
43  {40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37,40,39,38,37},
44  {44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41,44,43,42,41},
45  {48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45,48,47,46,45},
46  {52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49,52,51,50,49},
47  {56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53,56,55,54,53},
48  {60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57,60,59,58,57},
49  {64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61,64,63,62,61},
50  {68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65,68,67,66,65},
51  {72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69,72,71,70,69}
52 };
53 int ietaEB[36][68] = {
54  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
55  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
56  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
57  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
58  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
59  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
60  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
61  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
62  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
63  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
64  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
65  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
66  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
67  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
68  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
69  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
70  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
71  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
72  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
73  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
74  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
75  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
76  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
77  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
78  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
79  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
80  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
81  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
82  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
83  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
84  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
85  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
86  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
87  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
88  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17},
89  {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17}
90 };
91 int ixx[18][41][3] = {
92  {{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{19,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
93  {{16,0,0},{17,0,0},{18,17,0},{16,0,0},{17,0,0},{18,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{12,20,19},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
94  {{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,13,0},{13,0,0},{14,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
95  {{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,8,0},{8,0,0},{7,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
96  {{5,0,0},{4,0,0},{3,4,0},{5,0,0},{4,0,0},{3,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{9,1,2},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
97  {{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{2,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
98  {{8,0,0},{8,0,0},{7,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{3,2,9},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{5,4,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{5,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{9,0,0},{9,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
99  {{8,0,0},{8,0,0},{8,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{13,0,0},{13,0,0},{13,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0}},
100  {{13,0,0},{13,0,0},{14,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{18,19,12},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{16,17,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{16,0,0},{14,0,0},{14,0,0},{15,0,0},{15,0,0},{12,0,0},{12,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
101  {{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{19,0,0},{17,0,0},{18,0,0},{19,0,0},{20,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
102  {{16,0,0},{17,0,0},{18,17,0},{16,0,0},{17,0,0},{18,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{19,0,0},{12,20,19},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
103  {{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{13,0,0},{14,0,0},{15,0,0},{16,13,0},{13,0,0},{14,0,0},{13,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
104  {{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{8,0,0},{7,0,0},{6,0,0},{5,8,0},{8,0,0},{7,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
105  {{5,0,0},{4,0,0},{3,4,0},{5,0,0},{4,0,0},{3,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{9,1,2},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
106  {{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{2,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
107  {{8,0,0},{8,0,0},{7,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{3,2,9},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{5,4,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{5,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{9,0,0},{9,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
108  {{13,0,0},{13,0,0},{13,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{8,0,0},{8,0,0},{8,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0}},
109  {{13,0,0},{13,0,0},{14,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{18,19,12},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{18,0,0},{16,17,0},{13,0,0},{14,0,0},{15,0,0},{16,0,0},{17,0,0},{16,0,0},{14,0,0},{14,0,0},{15,0,0},{15,0,0},{12,0,0},{12,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
110 };
111 int iyy[18][41][3] = {
112  {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
113  {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
114  {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
115  {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
116  {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
117  {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
118  {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
119  {{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0}},
120  {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
121  {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
122  {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
123  {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
124  {{20,0,0},{19,0,0},{18,0,0},{17,0,0},{20,0,0},{19,0,0},{18,0,0},{17,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{16,0,0},{15,0,0},{14,0,0},{13,0,0},{19,0,0},{19,0,0},{19,0,0},{18,0,0},{18,0,0},{18,0,0},{18,0,0},{17,0,0},{17,0,0},{17,0,0},{16,0,0},{16,0,0},{16,0,0},{19,20,0},{15,0,0},{15,0,0},{14,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
125  {{17,0,0},{17,0,0},{17,18,0},{16,0,0},{16,0,0},{16,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{15,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{14,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{13,0,0},{12,13,16},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{12,0,0},{11,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
126  {{12,0,0},{12,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{11,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{10,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{9,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{8,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
127  {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
128  {{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{3,0,0},{2,0,0},{1,0,0},{6,0,0},{5,0,0},{8,0,0},{7,0,0},{6,0,0},{5,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0},{4,0,0},{3,0,0},{2,0,0},{1,0,0}},
129  {{9,0,0},{8,0,0},{8,0,0},{7,0,0},{7,0,0},{7,0,0},{7,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{6,0,0},{4,5,9},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{5,0,0},{2,3,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{4,0,0},{3,0,0},{3,0,0},{2,0,0},{3,0,0},{2,0,0},{8,0,0},{7,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
130 };
131 
133  : m_name(ps.getUntrackedParameter<std::string>("name","EcalDAQHandler")) {
134 
135  std::cout << "EcalDAQ Source handler constructor\n" << std::endl;
136  m_firstRun =(unsigned long)atoi( ps.getParameter<std::string>("firstRun").c_str());
137  m_lastRun =(unsigned long)atoi( ps.getParameter<std::string>("lastRun").c_str());
138  m_sid = ps.getParameter<std::string>("OnlineDBSID");
139  m_user = ps.getParameter<std::string>("OnlineDBUser");
140  m_pass = ps.getParameter<std::string>("OnlineDBPassword");
141  m_location = ps.getParameter<std::string>("location");
142  m_runtype = ps.getParameter<std::string>("runtype");
143  m_gentag = ps.getParameter<std::string>("gentag");
144  m_debug = ps.getParameter<bool>("debug");
145 
146  std::cout << m_sid << "/" << m_user << std::endl;
147 
148 }
149 
151 }
152 
153 
154 uint16_t popcon::EcalDAQHandler::OffDBStatus( uint16_t dbStatus , int pos ) {
155  uint16_t hv_off_dbstatus = ( dbStatus & (1 << pos ) ) ;
156  if(hv_off_dbstatus>0) hv_off_dbstatus=1;
157  return hv_off_dbstatus;
158 }
159 
160 
162  if(m_debug) std::cout << "------- Ecal DAQ - > getNewObjects\n";
163 
164  std::ostringstream ss;
165  ss<<"ECAL ";
166 
167  unsigned long long max_since = 1;
168 
169  // this is the last inserted run
170  max_since = tagInfo().lastInterval.first;
171 
172  // this is the last object in the DB
173  std::cout << " max_since : " << max_since << std::endl;
174 
175 
176  uint16_t oldEBStatus[72][17][2];
177  uint16_t newEBStatus[72][17][2];
178  uint16_t oldEEStatus[20][20][2];
179  uint16_t newEEStatus[20][20][2];
180 
181  // we copy the last valid record to a temporary object peds
182  EcalDAQTowerStatus* daq_temp = new EcalDAQTowerStatus();
183 
184  if(tagInfo().size) {
185  Ref daq_db = lastPayload();
186  if(m_debug) std::cout << "retrieved last payload " << std::endl;
187 
188  // barrel
189  int iz = -1;
190  for(int k = 0 ; k < 2; k++ ) {
191  if(k == 1) iz = 1;
192  for(int iphi = 1 ; iphi < 73; iphi++) {
193  for(int ieta = 1 ; ieta < 18; ieta++) {
194  if (EcalTrigTowerDetId::validDetId(iz,EcalBarrel,ieta,iphi )){
195  EcalTrigTowerDetId ebid(iz,EcalBarrel,ieta,iphi);
196 
197  uint16_t dbStatus = 0;
198  dbStatus =(daq_db->barrel( ebid.hashedIndex())).getStatusCode();
199  oldEBStatus[iphi - 1][ieta -1][k] = dbStatus;
200 
201  EcalDAQTowerStatus::const_iterator it =daq_db->find(ebid.rawId());
202  if ( it != daq_db->end() ) {
203  } else {
204  std::cout<<"*** error channel not found: eta/phi ="<< ieta << "/" << iphi << std::endl;
205  }
206  daq_temp->setValue( ebid, dbStatus );
207  if(m_debug && dbStatus != 0) std::cout << "barrel side " << k << " phi " << iphi << " eta " << ieta << " status " << dbStatus << std::endl;
208  }
209  } // end loop over ieta
210  } // end loop over iphi
211 
212  // endcap
213  for(int ix = 1 ; ix < 21; ix++) {
214  for(int iy = 1 ; iy < 21; iy++) {
215  if (EcalScDetId::validDetId(ix,iy,iz )){
216  EcalScDetId eeid(ix,iy,iz);
217 
218  EcalDAQTowerStatus::const_iterator it =daq_db->find(eeid.rawId());
219 
220  uint16_t dbStatus = 0;
221  if ( it != daq_db->end() ) {
222  dbStatus = it->getStatusCode();
223  }
224  oldEEStatus[ix - 1][iy -1][k] = dbStatus;
225  daq_temp->setValue( eeid, dbStatus );
226  if(m_debug && dbStatus != 0) std::cout << "endcap side " << k << " x " << ix << " y " << iy << " status " << dbStatus << std::endl;
227  }
228  } // end loop over iy
229  } // end loop over ix
230  } // end loop over k (side)
231  } // check if there is already a payload
232  else {
233  if(m_debug) std::cout << " No db found : set default values " << std::endl;
234  // barrel
235  int iz = -1;
236  for(int k = 0 ; k < 2; k++ ) {
237  if(k == 1) iz = 1;
238  for(int iphi = 1 ; iphi < 73; iphi++) {
239  for(int ieta = 1 ; ieta < 18; ieta++) {
240  if (EcalTrigTowerDetId::validDetId(iz,EcalBarrel,ieta,iphi )){
241  EcalTrigTowerDetId ebid(iz,EcalBarrel,ieta,iphi);
242 
243  uint16_t dbStatus = 0;
244  oldEBStatus[iphi - 1][ieta -1][k] = dbStatus;
245  daq_temp->setValue( ebid, dbStatus );
246  } // valid Id
247  } // end loop over ieta
248  } // end loop over iphi
249  // endcap
250  for(int ix = 1 ; ix < 21; ix++) {
251  for(int iy = 1 ; iy < 21; iy++) {
252  if (EcalScDetId::validDetId(ix,iy,iz )){
253  EcalScDetId eeid(ix,iy,iz);
254  uint16_t dbStatus = 0;
255  oldEEStatus[ix - 1][iy -1][k] = dbStatus;
256  daq_temp->setValue( eeid, dbStatus );
257  } // valid Id
258  } // end loop over iy
259  } // end loop over ix
260  } // end loop over k (side)
261  } // no payload set default values
262 
263  // now read the actual status from the online DB
264 
265 
266  if(m_debug) std::cout << "Retrieving DAQ status from OMDS DB ... " << std::endl;
267  econn = new EcalCondDBInterface( m_sid, m_user, m_pass );
268  if(m_debug) std::cout << "Connection done" << std::endl;
269 
270  if (!econn) {
271  std::cout << " Problem with OMDS: connection parameters " << m_sid << "/" << m_user << "/" << m_pass << std::endl;
272  throw cms::Exception("OMDS not available");
273  }
274 
275  // code from EcalTPGBadTTHandler.cc
276  LocationDef my_locdef;
277  my_locdef.setLocation(m_location);
278 
279  RunTypeDef my_rundef;
280  my_rundef.setRunType(m_runtype);
281 
282  RunTag my_runtag;
283  my_runtag.setLocationDef( my_locdef );
284  my_runtag.setRunTypeDef( my_rundef );
285  my_runtag.setGeneralTag(m_gentag);
286 
287  // range of validity
288  int min_run = 0;
289  if(m_firstRun < (unsigned long)max_since) {
290  min_run= (int)max_since+1; // we have to add 1 to the last transferred one
291  }
292  else { min_run=(int)m_firstRun; }
293  int max_run=(int)m_lastRun;
294  std::cout << "min_run " << min_run << " max_run " << max_run << std::endl;
295 
296  RunList my_list;
297  my_list = econn->fetchRunListByLocation(my_runtag, min_run, max_run, my_locdef);
298 
299  std::vector<RunIOV> run_vec = my_list.getRuns();
300  int num_runs = run_vec.size();
301 
302  std::cout << " number of runs is : " << num_runs << std::endl;
303 
304  unsigned long irun=0;
305  if(num_runs > 0){
306  // char outfile[800];
307  //sprintf(outfile,"BadChannelsEB_run%d.txt",min_run);
308  //ofstream *daqFile;
309  //daqFile = new ofstream(outfile,ios::out);
310 
311  // for(int kr = 0; kr < num_runs; kr++){
312  int krmax = std::min(num_runs, 1000);
313  for(int kr = 0; kr < krmax; kr++){
314  if(m_to_transfer.size() < 20 ) {
315 
316  if(run_vec[kr].getRunTag().getGeneralTag() != "GLOBAL") continue;
317  bool somediff = false;
318  // initialize this run status to all OK
319  irun = (unsigned long) run_vec[kr].getRunNumber();
320  for(int k = 0 ; k < 2; k++ ) {
321  for(int iphi = 0 ; iphi < 72; iphi++) {
322  for(int ieta = 0 ; ieta < 17; ieta++) {
323  newEBStatus[iphi][ieta][k] = 0;
324  }
325  }
326  for(int ix = 0 ; ix < 20; ix++) {
327  for(int iy = 0 ; iy < 20; iy++) {
328  newEEStatus[ix][iy][k] = 0;
329  }
330  }
331  } // loop over side
332 
333 
334 
335  // these are the online conditions DB classes readout FEDs
336  std::map<EcalLogicID, RunDat> fed_dat;
337  econn->fetchDataSet(&fed_dat, &run_vec[kr]);
338 
339  // these are the online conditions DB classes unread FEs
340  typedef std::map<EcalLogicID, RunDat>::const_iterator fedIter;
341  // EcalLogicID ecid_xt;
342  RunDat rdat_fe;
343  EcalLogicID idfed;
344 
345  std::map<EcalLogicID, RunFEConfigDat> feconfig;
346  econn->fetchDataSet(&feconfig, &run_vec[kr]);
347 
348  if(fed_dat.size() == 0 || feconfig.size() == 0) {
349  std::cout << " run " << irun << " tag " << run_vec[kr].getRunTag().getGeneralTag()
350  << " Run type " << run_vec[kr].getRunTag().getRunTypeDef().getRunType()
351  << " feconfig and/or read FED size = 0, leaving..." << std::endl;
352  continue;
353  }
354 
355 
356  if(fed_dat.size() != 54 ) {
357  int SM[36] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
358  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
359  int Sect[2][9] = {{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0}};
360  for (fedIter p=fed_dat.begin(); p!=fed_dat.end(); p++) {
361  idfed = p->first;
362  int sm = 0;
363  int z = 0;
364  if(idfed.getLogicID()<2000000000){// eb
365  sm = idfed.getID1();
366  // std::cout << " EB " << sm;
367  SM[sm - 1] = 1;
368  }
369  else { // ee
370  z = idfed.getID1();
371  sm = idfed.getID2();
372  // std::cout << " EE " << z << " " << sm;
373  int izz = z;
374  if(z == -1) izz = 0;
375  Sect[izz][sm - 1] = 1;
376  }
377  } // loop over all FED
379  /* if(irun == 124089) {
380  Sect[0][2] = 0;
381  Sect[1][7] = 0;
382  } */
384  // mark all TT/SC in the not read out FEDs
385  for(int sm = 0; sm < 36; sm++) // barrel
386  if(SM[sm] != 1) {
387  //std::cout << " missing EB " << sm + 1 << std::endl;
388  if(sm < 18)
389  for(int tt = 0; tt < 68; tt++)
390  newEBStatus[iphiEB[sm][tt] - 1][ietaEB[sm][tt] - 1][0] = 1;
391  else
392  for(int tt = 0; tt < 68; tt++)
393  newEBStatus[iphiEB[sm - 18][tt] - 1][ietaEB[sm - 18][tt] - 1][1] = 1;
394  }
395  for(int z = 0; z < 2; z++) // endcaps
396  for(int sec = 0; sec < 9; sec++)
397  if(Sect[z][sec] != 1) {
398  //std::cout << " missing EE " << z << " " << sec + 1 << std::endl;
399  int sec18 = sec;
400  if(z == 1) sec18 = sec + 9;
401  for(int sc = 0 ; sc < 41; sc++) {
402  if(ixx[sec18][sc][0] != 0) {
403  newEEStatus[ixx[sec18][sc][0] - 1][iyy[sec18][sc][0] - 1][z] = 1;
404  if(ixx[sec18][sc][1] != 0) {
405  newEEStatus[ixx[sec18][sc][1] - 1][iyy[sec18][sc][1] - 1][z] = 1;
406  if(ixx[sec18][sc][2] != 0) {
407  newEEStatus[ixx[sec18][sc][2] - 1][iyy[sec18][sc][2] - 1][z] = 1;
408  }
409  }
410  }
411  } // loop over all possible SC in a sector
412  } // not read out sector
413  } // not all FED are read out
414 
415  typedef std::map<EcalLogicID, RunFEConfigDat>::const_iterator feConfIter;
416  // EcalLogicID ecid_xt;
417  RunFEConfigDat rd_fe;
418 
419  int fe_conf_id = 0;
420  for (feConfIter p=feconfig.begin(); p!=feconfig.end(); p++) {
421  // ecid_xt = p->first;
422  rd_fe = p->second;
423  fe_conf_id = rd_fe.getConfigId();
424  }
425 
426  // reading this configuration
427  ODFEDAQConfig myconfig;
428  myconfig.setId(fe_conf_id);
429  econn->fetchConfigSet(&myconfig);
430 
431  // list of bad towers
432  int myTT = myconfig.getBadTTId();
433  ODBadTTInfo mybadTT;
434  std::vector< ODBadTTDat > badTT_dat;
435  unsigned NbadTT = 0;
436 
437  /* if(myTT == 0) {
438  std::cout << " myTT = 0" << std::endl;
439  continue;
440  }
441  else {
442  */
443  if(myTT != 0) {
444  mybadTT.setId(myTT);
445  econn->fetchConfigSet(&mybadTT);
446 
447  econn->fetchConfigDataSet(&badTT_dat, &mybadTT);
448  NbadTT = badTT_dat.size();
449  }
450 
451  /* std::cout << " run " << irun << " tag " << run_vec[kr].getRunTag().getGeneralTag()
452  << " Run type " << run_vec[kr].getRunTag().getRunTypeDef().getRunType()
453  << " number of read FEDs " << fed_dat.size()
454  << " number of bad FEs " << NbadTT
455  << " fe_conf_id " << fe_conf_id << std::endl;
456  */
457 
458  // *daqFile << " run " << irun << " bad TT number " << NbadTT << "\n" << "Towers : ";
459  for(size_t iTT = 0; iTT < NbadTT; iTT++){
460  int fed_id = badTT_dat[iTT].getFedId();
461  int tt_id = badTT_dat[iTT].getTTId();
462  // int SM = badTT_dat[iTT].getSMId(); // SM always 0!
463  int side = 0; // EB/EE-
464  //*daqFile << fed_id << "/" << tt_id << " ";
465  // std::cout << fed_id << "/" << tt_id << "/" << SM << "/" ;
466  // std::cout << fed_id << "/" << tt_id << "/";
467  if(fed_id >= 610 && fed_id <= 645) { // barrel
468  if(tt_id > 68) {
469  //std::cout << " Problem in Fed " << fed_id << " TT " << tt_id << " Give up " << std::endl;
470  continue;
471  }
472  if(fed_id > 627) side = +1; // EB+
473  if(m_debug) std::cout << " phi " << iphiEB[fed_id - 610][tt_id - 1]
474  << " eta " << ietaEB[fed_id - 610][tt_id - 1]
475  << " side " << side << std::endl;
476  newEBStatus[iphiEB[fed_id - 610][tt_id - 1] - 1][ietaEB[fed_id - 610][tt_id - 1] - 1][side] = 1;
477  }
478  else if(fed_id <= 609 || (fed_id >= 646 && fed_id <= 654)) { // endcap
479  if(tt_id > 41) {
480  //std::cout << " Problem in Fed " << fed_id << " SC " << tt_id << " Give up " << std::endl;
481  continue;
482  }
483  if(fed_id < 610) { // EE-
484  if(m_debug) std::cout << " x " << ixx[fed_id - 601][tt_id - 1][0]
485  << " y " << iyy[fed_id - 601][tt_id - 1][0];
486  newEEStatus[ixx[fed_id - 601][tt_id - 1][0] - 1][iyy[fed_id - 601][tt_id - 1][0] - 1][side] = 1;
487  if(ixx[fed_id - 601][tt_id - 1][1] != 0) { // partial SC
488  if(m_debug) std::cout << " x2 " << ixx[fed_id - 601][tt_id - 1][1]
489  << " y2 " << iyy[fed_id - 601][tt_id - 1][1];
490  newEEStatus[ixx[fed_id - 601][tt_id - 1][1] - 1][iyy[fed_id - 601][tt_id - 1][1] - 1][side] = 1;
491  if(ixx[fed_id - 601][tt_id - 1][2] != 0) { // partial SC
492  if(m_debug) std::cout << " x3 " << ixx[fed_id - 601][tt_id - 1][2]
493  << " y3 " << iyy[fed_id - 601][tt_id - 1][2];
494  newEEStatus[ixx[fed_id - 601][tt_id - 1][2] - 1][iyy[fed_id - 601][tt_id - 1][2] - 1][side] = 1;
495  }
496  }
497  if(m_debug) std::cout << " side " << side << std::endl;
498  }
499  else { // EE+
500  side = +1;
501  if(m_debug) std::cout << " x " << ixx[fed_id - 637][tt_id - 1][0]
502  << " y " << iyy[fed_id - 637][tt_id - 1][0];
503  newEEStatus[ixx[fed_id - 637][tt_id - 1][0] - 1][iyy[fed_id - 637][tt_id - 1][0] - 1][side] = 1;
504  if(ixx[fed_id - 637][tt_id - 1][1] != 0) { // partial SC
505  if(m_debug) std::cout << " x2 " << ixx[fed_id - 637][tt_id - 1][1]
506  << " y2 " << iyy[fed_id - 637][tt_id - 1][1];
507  newEEStatus[ixx[fed_id - 637][tt_id - 1][1] - 1][iyy[fed_id - 637][tt_id - 1][1] - 1][side] = 1;
508  if(ixx[fed_id - 637][tt_id - 1][2] != 0) { // partial SC
509  if(m_debug) std::cout << " x3 " << ixx[fed_id - 637][tt_id - 1][2]
510  << " y3 " << iyy[fed_id - 637][tt_id - 1][2];
511  newEEStatus[ixx[fed_id - 637][tt_id - 1][2] - 1][iyy[fed_id - 637][tt_id - 1][2] - 1][side] = 1;
512  }
513  }
514  if(m_debug) std::cout << " side " << side << std::endl;
515  }
516  }
517  else {
518  std::cout << " Strange Fed " << fed_id << " TT/SC " << tt_id << " Give up " << std::endl;
519  continue;
520  }
521  } // end loop over iTT
522  if(m_debug) std::cout << std::endl;
523  //*daqFile << std::endl;
524  for(int k = 0 ; k < 2; k++ ) {
525  int iz = -1;
526  if(k == 1) iz = 1;
527  if(m_debug) std::cout << " Side : " << k << " barrel " << std::endl; // barrel
528  for(int iphi = 0 ; iphi < 72; iphi++) {
529  for(int ieta = 0 ; ieta < 17; ieta++) {
530  if(newEBStatus[iphi][ieta][k] != oldEBStatus[iphi][ieta][k]) {
531  somediff = true;
532  EcalTrigTowerDetId ebid(iz, EcalBarrel, ieta + 1, iphi + 1);
533  daq_temp->setValue( ebid, newEBStatus[iphi][ieta][k]);
534  if(m_debug) std::cout << " change in EB side " << iz << " phi " << iphi +1 << " eta " << ieta + 1 << std::endl;
535  } // new status
536  if(m_debug) std::cout << newEBStatus[iphi][ieta][k] << " " ;
537  oldEBStatus[iphi][ieta][k] = newEBStatus[iphi][ieta][k];
538  }
539  if(m_debug) std::cout << std::endl;
540  }
541  if(m_debug) std::cout << " endcaps " << std::endl; // endcap
542  for(int iy = 0 ; iy < 20; iy++) {
543  for(int ix = 0 ; ix < 20; ix++) {
544  if (EcalScDetId::validDetId(ix + 1, iy + 1, iz )){
545  if(newEEStatus[ix][iy][k] != oldEEStatus[ix][iy][k]) {
546  somediff = true;
547  EcalScDetId eeid(ix + 1, iy + 1, iz);
548  daq_temp->setValue( eeid, newEEStatus[ix][iy][k]);
549  if(m_debug) std::cout << " change in EE side " << iz << " x " << ix +1 << " y " << iy + 1 << std::endl;
550  } // new status
551  if(m_debug) std::cout << newEEStatus[ix][iy][k] << " " ;
552  oldEEStatus[ix][iy][k] = newEEStatus[ix][iy][k];
553  } // valid SC
554  else {
555  if(m_debug) std::cout << ". ";
556  }
557  }
558  if(m_debug) std::cout << std::endl;
559  }
560  } // loop over side
561 
562  if(somediff) {
563 
564  // we copy the last valid record to the object that is sent to the DB
565  EcalDAQTowerStatus* daq_pop = new EcalDAQTowerStatus();
566 
567 
568 
569  int iz = -1;
570  for(int k = 0 ; k < 2; k++ ) {
571  if(k == 1) iz = 1;
572  for(int iphi = 1 ; iphi < 73; iphi++) {
573  for(int ieta = 1 ; ieta < 18; ieta++) {
574  if (EcalTrigTowerDetId::validDetId(iz,EcalBarrel,ieta,iphi )){
575  EcalTrigTowerDetId ebid(iz,EcalBarrel,ieta,iphi);
576  uint16_t dbStatus = 0;
577  dbStatus =(daq_temp->barrel( ebid.hashedIndex())).getStatusCode();
578  daq_pop->setValue( ebid, dbStatus );
579  }
580  } // end loop over ieta
581  } // end loop over iphi
582 
583  // endcap
584  for(int ix = 1 ; ix < 21; ix++) {
585  for(int iy = 1 ; iy < 21; iy++) {
586  if (EcalScDetId::validDetId(ix,iy,iz )){
587  EcalScDetId eeid(ix,iy,iz);
588 
589  EcalDAQTowerStatus::const_iterator it =daq_temp->find(eeid.rawId());
590  uint16_t dbStatus = 0;
591  if ( it != daq_temp->end() ) {
592  dbStatus = it->getStatusCode();
593  }
594  daq_pop->setValue( eeid, dbStatus );
595  }
596  } // end loop over iy
597  } // end loop over ix
598  } // end loop over k (side)
599 
600 
601 
602  std::cout << "Generating popcon record for run "<< irun << std::endl;
603 
604  m_to_transfer.push_back(std::make_pair((EcalDAQTowerStatus*)daq_pop, irun));
605 
606  ss << "Run=" << irun << "_DAQchanged_"<<std::endl;
607  m_userTextLog = ss.str()+";";
608  } // some change found
609  else {
610 
611  std::cout<< "Run" << irun << " DAQ record was the same as previous run " << std::endl;
612  ss << "Run=" << irun << "_DAQunchanged_"<<std::endl;
613  m_userTextLog = ss.str()+";";
614 
615  } // no change
616 
617  } // check on number of already transferred runs
618  } // loop over runs
619  } // check on run number > 0
620 
621  // disconnect from DB
622  delete econn;
623  delete daq_temp;
624  if(m_debug) std::cout << "Ecal - > end of getNewObjects -----------\n";
625 }
EcalDAQTowerStatusMap EcalDAQTowerStatus
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:64
T getParameter(std::string const &) const
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:70
std::vector< RunIOV > getRuns()
Definition: RunList.cc:35
EcalDAQHandler(edm::ParameterSet const &)
unsigned long m_lastRun
void setId(int id)
Definition: ODFEDAQConfig.h:18
int iyy[18][41][3]
Definition: RunTag.h:13
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
int ixx[18][41][3]
void setValue(const uint32_t id, const Item &item)
const_iterator find(uint32_t rawId) const
int getID2() const
Definition: EcalLogicID.cc:51
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int getID1() const
Definition: EcalLogicID.cc:46
T min(T a, T b)
Definition: MathUtil.h:58
int getLogicID() const
Definition: EcalLogicID.cc:41
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
int getBadTTId() const
Definition: ODFEDAQConfig.h:36
void setId(int id)
Definition: ODBadTTInfo.h:18
int iphiEB[36][68]
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:33
int getConfigId() const
unsigned long m_firstRun
const Item & barrel(size_t hashedIndex) const
Definition: RunDat.h:11
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
int ietaEB[36][68]
uint16_t OffDBStatus(uint16_t dbStatus, int pos)
void setLocation(std::string loc)
Definition: LocationDef.cc:33
tuple cout
Definition: gather_cfg.py:121
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
tuple size
Write out results.