CMS 3D CMS Logo

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;
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  //hlt for(int kr = 0; kr < num_runs; kr++){
312  for(int kr = num_runs -1; kr < num_runs; kr++){
313  // int krmax = std::min(num_runs, 1000);
314  // for(int kr = 0; kr < krmax; kr++){
315  //hlt if(m_to_transfer.size() < 20 ) {
316 
317  if(run_vec[kr].getRunTag().getGeneralTag() != "GLOBAL") continue;
318  bool somediff = false;
319  // initialize this run status to all OK
320  irun = (unsigned long) run_vec[kr].getRunNumber();
321  for(int k = 0 ; k < 2; k++ ) {
322  for(int iphi = 0 ; iphi < 72; iphi++) {
323  for(int ieta = 0 ; ieta < 17; ieta++) {
324  newEBStatus[iphi][ieta][k] = 0;
325  }
326  }
327  for(int ix = 0 ; ix < 20; ix++) {
328  for(int iy = 0 ; iy < 20; iy++) {
329  newEEStatus[ix][iy][k] = 0;
330  }
331  }
332  } // loop over side
333 
334 
335 
336  // these are the online conditions DB classes readout FEDs
337  std::map<EcalLogicID, RunDat> fed_dat;
338  econn->fetchDataSet(&fed_dat, &run_vec[kr]);
339 
340  // these are the online conditions DB classes unread FEs
341  typedef std::map<EcalLogicID, RunDat>::const_iterator fedIter;
342  // EcalLogicID ecid_xt;
343  RunDat rdat_fe;
344  EcalLogicID idfed;
345 
346  std::map<EcalLogicID, RunFEConfigDat> feconfig;
347  econn->fetchDataSet(&feconfig, &run_vec[kr]);
348 
349  if(fed_dat.empty() || feconfig.empty()) {
350  std::cout << " run " << irun << " tag " << run_vec[kr].getRunTag().getGeneralTag()
351  << " Run type " << run_vec[kr].getRunTag().getRunTypeDef().getRunType()
352  << " feconfig and/or read FED size = 0, leaving..." << std::endl;
353  continue;
354  }
355 
356 
357  if(fed_dat.size() != 54 ) {
358  int SM[36] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
359  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
360  int Sect[2][9] = {{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0}};
361  for (fedIter p=fed_dat.begin(); p!=fed_dat.end(); p++) {
362  idfed = p->first;
363  int sm = 0;
364  int z = 0;
365  if(idfed.getLogicID()<2000000000){// eb
366  sm = idfed.getID1();
367  // std::cout << " EB " << sm;
368  SM[sm - 1] = 1;
369  }
370  else { // ee
371  z = idfed.getID1();
372  sm = idfed.getID2();
373  // std::cout << " EE " << z << " " << sm;
374  int izz = z;
375  if(z == -1) izz = 0;
376  Sect[izz][sm - 1] = 1;
377  }
378  } // loop over all FED
380  /* if(irun == 124089) {
381  Sect[0][2] = 0;
382  Sect[1][7] = 0;
383  } */
385  // mark all TT/SC in the not read out FEDs
386  for(int sm = 0; sm < 36; sm++) // barrel
387  if(SM[sm] != 1) {
388  //std::cout << " missing EB " << sm + 1 << std::endl;
389  if(sm < 18)
390  for(int tt = 0; tt < 68; tt++)
391  newEBStatus[iphiEB[sm][tt] - 1][ietaEB[sm][tt] - 1][0] = 1;
392  else
393  for(int tt = 0; tt < 68; tt++)
394  newEBStatus[iphiEB[sm - 18][tt] - 1][ietaEB[sm - 18][tt] - 1][1] = 1;
395  }
396  for(int z = 0; z < 2; z++) // endcaps
397  for(int sec = 0; sec < 9; sec++)
398  if(Sect[z][sec] != 1) {
399  //std::cout << " missing EE " << z << " " << sec + 1 << std::endl;
400  int sec18 = sec;
401  if(z == 1) sec18 = sec + 9;
402  for(int sc = 0 ; sc < 41; sc++) {
403  if(ixx[sec18][sc][0] != 0) {
404  newEEStatus[ixx[sec18][sc][0] - 1][iyy[sec18][sc][0] - 1][z] = 1;
405  if(ixx[sec18][sc][1] != 0) {
406  newEEStatus[ixx[sec18][sc][1] - 1][iyy[sec18][sc][1] - 1][z] = 1;
407  if(ixx[sec18][sc][2] != 0) {
408  newEEStatus[ixx[sec18][sc][2] - 1][iyy[sec18][sc][2] - 1][z] = 1;
409  }
410  }
411  }
412  } // loop over all possible SC in a sector
413  } // not read out sector
414  } // not all FED are read out
415 
416  typedef std::map<EcalLogicID, RunFEConfigDat>::const_iterator feConfIter;
417  // EcalLogicID ecid_xt;
418  RunFEConfigDat rd_fe;
419 
420  int fe_conf_id = 0;
421  for (feConfIter p=feconfig.begin(); p!=feconfig.end(); p++) {
422  // ecid_xt = p->first;
423  rd_fe = p->second;
424  fe_conf_id = rd_fe.getConfigId();
425  }
426 
427  // reading this configuration
428  ODFEDAQConfig myconfig;
429  myconfig.setId(fe_conf_id);
430  econn->fetchConfigSet(&myconfig);
431 
432  // list of bad towers
433  int myTT = myconfig.getBadTTId();
434  ODBadTTInfo mybadTT;
435  std::vector< ODBadTTDat > badTT_dat;
436  unsigned NbadTT = 0;
437 
438  /* if(myTT == 0) {
439  std::cout << " myTT = 0" << std::endl;
440  continue;
441  }
442  else {
443  */
444  if(myTT != 0) {
445  mybadTT.setId(myTT);
446  econn->fetchConfigSet(&mybadTT);
447 
448  econn->fetchConfigDataSet(&badTT_dat, &mybadTT);
449  NbadTT = badTT_dat.size();
450  }
451 
452  /* std::cout << " run " << irun << " tag " << run_vec[kr].getRunTag().getGeneralTag()
453  << " Run type " << run_vec[kr].getRunTag().getRunTypeDef().getRunType()
454  << " number of read FEDs " << fed_dat.size()
455  << " number of bad FEs " << NbadTT
456  << " fe_conf_id " << fe_conf_id << std::endl;
457  */
458 
459  // *daqFile << " run " << irun << " bad TT number " << NbadTT << "\n" << "Towers : ";
460  for(size_t iTT = 0; iTT < NbadTT; iTT++){
461  int fed_id = badTT_dat[iTT].getFedId();
462  int tt_id = badTT_dat[iTT].getTTId();
463  // int SM = badTT_dat[iTT].getSMId(); // SM always 0!
464  int side = 0; // EB/EE-
465  //*daqFile << fed_id << "/" << tt_id << " ";
466  // std::cout << fed_id << "/" << tt_id << "/" << SM << "/" ;
467  // std::cout << fed_id << "/" << tt_id << "/";
468  if(fed_id >= 610 && fed_id <= 645) { // barrel
469  if(tt_id > 68) {
470  //std::cout << " Problem in Fed " << fed_id << " TT " << tt_id << " Give up " << std::endl;
471  continue;
472  }
473  if(fed_id > 627) side = +1; // EB+
474  if(m_debug) std::cout << " phi " << iphiEB[fed_id - 610][tt_id - 1]
475  << " eta " << ietaEB[fed_id - 610][tt_id - 1]
476  << " side " << side << std::endl;
477  newEBStatus[iphiEB[fed_id - 610][tt_id - 1] - 1][ietaEB[fed_id - 610][tt_id - 1] - 1][side] = 1;
478  }
479  else if(fed_id <= 609 || (fed_id >= 646 && fed_id <= 654)) { // endcap
480  if(tt_id > 41) {
481  //std::cout << " Problem in Fed " << fed_id << " SC " << tt_id << " Give up " << std::endl;
482  continue;
483  }
484  if(fed_id < 610) { // EE-
485  if(m_debug) std::cout << " x " << ixx[fed_id - 601][tt_id - 1][0]
486  << " y " << iyy[fed_id - 601][tt_id - 1][0];
487  newEEStatus[ixx[fed_id - 601][tt_id - 1][0] - 1][iyy[fed_id - 601][tt_id - 1][0] - 1][side] = 1;
488  if(ixx[fed_id - 601][tt_id - 1][1] != 0) { // partial SC
489  if(m_debug) std::cout << " x2 " << ixx[fed_id - 601][tt_id - 1][1]
490  << " y2 " << iyy[fed_id - 601][tt_id - 1][1];
491  newEEStatus[ixx[fed_id - 601][tt_id - 1][1] - 1][iyy[fed_id - 601][tt_id - 1][1] - 1][side] = 1;
492  if(ixx[fed_id - 601][tt_id - 1][2] != 0) { // partial SC
493  if(m_debug) std::cout << " x3 " << ixx[fed_id - 601][tt_id - 1][2]
494  << " y3 " << iyy[fed_id - 601][tt_id - 1][2];
495  newEEStatus[ixx[fed_id - 601][tt_id - 1][2] - 1][iyy[fed_id - 601][tt_id - 1][2] - 1][side] = 1;
496  }
497  }
498  if(m_debug) std::cout << " side " << side << std::endl;
499  }
500  else { // EE+
501  side = +1;
502  if(m_debug) std::cout << " x " << ixx[fed_id - 637][tt_id - 1][0]
503  << " y " << iyy[fed_id - 637][tt_id - 1][0];
504  newEEStatus[ixx[fed_id - 637][tt_id - 1][0] - 1][iyy[fed_id - 637][tt_id - 1][0] - 1][side] = 1;
505  if(ixx[fed_id - 637][tt_id - 1][1] != 0) { // partial SC
506  if(m_debug) std::cout << " x2 " << ixx[fed_id - 637][tt_id - 1][1]
507  << " y2 " << iyy[fed_id - 637][tt_id - 1][1];
508  newEEStatus[ixx[fed_id - 637][tt_id - 1][1] - 1][iyy[fed_id - 637][tt_id - 1][1] - 1][side] = 1;
509  if(ixx[fed_id - 637][tt_id - 1][2] != 0) { // partial SC
510  if(m_debug) std::cout << " x3 " << ixx[fed_id - 637][tt_id - 1][2]
511  << " y3 " << iyy[fed_id - 637][tt_id - 1][2];
512  newEEStatus[ixx[fed_id - 637][tt_id - 1][2] - 1][iyy[fed_id - 637][tt_id - 1][2] - 1][side] = 1;
513  }
514  }
515  if(m_debug) std::cout << " side " << side << std::endl;
516  }
517  }
518  else {
519  std::cout << " Strange Fed " << fed_id << " TT/SC " << tt_id << " Give up " << std::endl;
520  continue;
521  }
522  } // end loop over iTT
523  if(m_debug) std::cout << std::endl;
524  //*daqFile << std::endl;
525  for(int k = 0 ; k < 2; k++ ) {
526  int iz = -1;
527  if(k == 1) iz = 1;
528  if(m_debug) std::cout << " Side : " << k << " barrel " << std::endl; // barrel
529  for(int iphi = 0 ; iphi < 72; iphi++) {
530  for(int ieta = 0 ; ieta < 17; ieta++) {
531  if(newEBStatus[iphi][ieta][k] != oldEBStatus[iphi][ieta][k]) {
532  somediff = true;
533  EcalTrigTowerDetId ebid(iz, EcalBarrel, ieta + 1, iphi + 1);
534  daq_temp->setValue( ebid, newEBStatus[iphi][ieta][k]);
535  if(m_debug) std::cout << " change in EB side " << iz << " phi " << iphi +1 << " eta " << ieta + 1 << std::endl;
536  } // new status
537  if(m_debug) std::cout << newEBStatus[iphi][ieta][k] << " " ;
538  oldEBStatus[iphi][ieta][k] = newEBStatus[iphi][ieta][k];
539  }
540  if(m_debug) std::cout << std::endl;
541  }
542  if(m_debug) std::cout << " endcaps " << std::endl; // endcap
543  for(int iy = 0 ; iy < 20; iy++) {
544  for(int ix = 0 ; ix < 20; ix++) {
545  if (EcalScDetId::validDetId(ix + 1, iy + 1, iz )){
546  if(newEEStatus[ix][iy][k] != oldEEStatus[ix][iy][k]) {
547  somediff = true;
548  EcalScDetId eeid(ix + 1, iy + 1, iz);
549  daq_temp->setValue( eeid, newEEStatus[ix][iy][k]);
550  if(m_debug) std::cout << " change in EE side " << iz << " x " << ix +1 << " y " << iy + 1 << std::endl;
551  } // new status
552  if(m_debug) std::cout << newEEStatus[ix][iy][k] << " " ;
553  oldEEStatus[ix][iy][k] = newEEStatus[ix][iy][k];
554  } // valid SC
555  else {
556  if(m_debug) std::cout << ". ";
557  }
558  }
559  if(m_debug) std::cout << std::endl;
560  }
561  } // loop over side
562 
563  if(somediff) {
564 
565  // we copy the last valid record to the object that is sent to the DB
566  EcalDAQTowerStatus* daq_pop = new EcalDAQTowerStatus();
567 
568 
569 
570  int iz = -1;
571  for(int k = 0 ; k < 2; k++ ) {
572  if(k == 1) iz = 1;
573  for(int iphi = 1 ; iphi < 73; iphi++) {
574  for(int ieta = 1 ; ieta < 18; ieta++) {
575  if (EcalTrigTowerDetId::validDetId(iz,EcalBarrel,ieta,iphi )){
576  EcalTrigTowerDetId ebid(iz,EcalBarrel,ieta,iphi);
577  uint16_t dbStatus = 0;
578  dbStatus =(daq_temp->barrel( ebid.hashedIndex())).getStatusCode();
579  daq_pop->setValue( ebid, dbStatus );
580  }
581  } // end loop over ieta
582  } // end loop over iphi
583 
584  // endcap
585  for(int ix = 1 ; ix < 21; ix++) {
586  for(int iy = 1 ; iy < 21; iy++) {
587  if (EcalScDetId::validDetId(ix,iy,iz )){
588  EcalScDetId eeid(ix,iy,iz);
589 
590  EcalDAQTowerStatus::const_iterator it =daq_temp->find(eeid.rawId());
591  uint16_t dbStatus = 0;
592  if ( it != daq_temp->end() ) {
593  dbStatus = it->getStatusCode();
594  }
595  daq_pop->setValue( eeid, dbStatus );
596  }
597  } // end loop over iy
598  } // end loop over ix
599  } // end loop over k (side)
600 
601 
602 
603  std::cout << "Generating popcon record for run "<< irun << std::endl;
604 
605  m_to_transfer.push_back(std::make_pair((EcalDAQTowerStatus*)daq_pop, irun));
606 
607  ss << "Run=" << irun << "_DAQchanged_"<<std::endl;
608  m_userTextLog = ss.str()+";";
609  } // some change found
610  else {
611 
612  std::cout<< "Run" << irun << " DAQ record was the same as previous run " << std::endl;
613  ss << "Run=" << irun << "_DAQunchanged_"<<std::endl;
614  m_userTextLog = ss.str()+";";
615 
616  } // no change
617 
618  // hlt } // check on number of already transferred runs
619  } // loop over runs
620  } // check on run number > 0
621 
622  // disconnect from DB
623  delete econn;
624  delete daq_temp;
625  if(m_debug) std::cout << "Ecal - > end of getNewObjects -----------\n";
626 }
size
Write out results.
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 fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setValue(const uint32_t id, const Item &item)
void getNewObjects() override
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:44
cond::ValidityInterval lastInterval
Definition: Types.h:75
EcalCondDBInterface * econn
int getID1() const
Definition: EcalLogicID.cc:46
int getLogicID() const
Definition: EcalLogicID.cc:41
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
int getBadTTId() const
Definition: ODFEDAQConfig.h:36
int k[5][pyjets_maxn]
void setId(int id)
Definition: ODBadTTInfo.h:18
RunList fetchRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
int iphiEB[36][68]
def getRunNumber(filename)
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
void fetchConfigDataSet(std::vector< DATT > *fillMap, ICONF *iconf) noexcept(false)
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36