63 std::unique_ptr< L1RCTChannelMask >
66 std::cout <<
" Current key is " << objectKey <<std::endl;
70 std::vector< std::string > dc_maskStrings;
71 dc_maskStrings.push_back(
"HCAL_MASK_CR00_EVEN" );
72 dc_maskStrings.push_back(
"HCAL_MASK_CR00_ODD" );
73 dc_maskStrings.push_back(
"HCAL_MASK_CR01_EVEN" );
74 dc_maskStrings.push_back(
"HCAL_MASK_CR01_ODD" );
75 dc_maskStrings.push_back(
"HCAL_MASK_CR02_EVEN" );
76 dc_maskStrings.push_back(
"HCAL_MASK_CR02_ODD" );
77 dc_maskStrings.push_back(
"HCAL_MASK_CR03_EVEN" );
78 dc_maskStrings.push_back(
"HCAL_MASK_CR03_ODD" );
79 dc_maskStrings.push_back(
"HCAL_MASK_CR04_EVEN" );
80 dc_maskStrings.push_back(
"HCAL_MASK_CR04_ODD" );
81 dc_maskStrings.push_back(
"HCAL_MASK_CR05_EVEN" );
82 dc_maskStrings.push_back(
"HCAL_MASK_CR05_ODD" );
83 dc_maskStrings.push_back(
"HCAL_MASK_CR06_EVEN" );
84 dc_maskStrings.push_back(
"HCAL_MASK_CR06_ODD" );
85 dc_maskStrings.push_back(
"HCAL_MASK_CR07_EVEN" );
86 dc_maskStrings.push_back(
"HCAL_MASK_CR07_ODD" );
87 dc_maskStrings.push_back(
"HCAL_MASK_CR08_EVEN" );
88 dc_maskStrings.push_back(
"HCAL_MASK_CR08_ODD" );
89 dc_maskStrings.push_back(
"HCAL_MASK_CR09_EVEN" );
90 dc_maskStrings.push_back(
"HCAL_MASK_CR09_ODD" );
91 dc_maskStrings.push_back(
"HCAL_MASK_CR10_EVEN" );
92 dc_maskStrings.push_back(
"HCAL_MASK_CR10_ODD" );
93 dc_maskStrings.push_back(
"HCAL_MASK_CR11_EVEN" );
94 dc_maskStrings.push_back(
"HCAL_MASK_CR11_ODD" );
95 dc_maskStrings.push_back(
"HCAL_MASK_CR12_EVEN" );
96 dc_maskStrings.push_back(
"HCAL_MASK_CR12_ODD" );
97 dc_maskStrings.push_back(
"HCAL_MASK_CR13_EVEN" );
98 dc_maskStrings.push_back(
"HCAL_MASK_CR13_ODD" );
99 dc_maskStrings.push_back(
"HCAL_MASK_CR14_EVEN" );
100 dc_maskStrings.push_back(
"HCAL_MASK_CR14_ODD" );
101 dc_maskStrings.push_back(
"HCAL_MASK_CR15_EVEN" );
102 dc_maskStrings.push_back(
"HCAL_MASK_CR15_ODD" );
103 dc_maskStrings.push_back(
"HCAL_MASK_CR16_EVEN" );
104 dc_maskStrings.push_back(
"HCAL_MASK_CR16_ODD" );
105 dc_maskStrings.push_back(
"HCAL_MASK_CR17_EVEN" );
106 dc_maskStrings.push_back(
"HCAL_MASK_CR17_ODD" );
107 dc_maskStrings.push_back(
"ECAL_MASK_CR00_EVEN" );
108 dc_maskStrings.push_back(
"ECAL_MASK_CR00_ODD" );
109 dc_maskStrings.push_back(
"ECAL_MASK_CR01_EVEN" );
110 dc_maskStrings.push_back(
"ECAL_MASK_CR01_ODD" );
111 dc_maskStrings.push_back(
"ECAL_MASK_CR02_EVEN" );
112 dc_maskStrings.push_back(
"ECAL_MASK_CR02_ODD" );
113 dc_maskStrings.push_back(
"ECAL_MASK_CR03_EVEN" );
114 dc_maskStrings.push_back(
"ECAL_MASK_CR03_ODD" );
115 dc_maskStrings.push_back(
"ECAL_MASK_CR04_EVEN" );
116 dc_maskStrings.push_back(
"ECAL_MASK_CR04_ODD" );
117 dc_maskStrings.push_back(
"ECAL_MASK_CR05_EVEN" );
118 dc_maskStrings.push_back(
"ECAL_MASK_CR05_ODD" );
119 dc_maskStrings.push_back(
"ECAL_MASK_CR06_EVEN" );
120 dc_maskStrings.push_back(
"ECAL_MASK_CR06_ODD" );
121 dc_maskStrings.push_back(
"ECAL_MASK_CR07_EVEN" );
122 dc_maskStrings.push_back(
"ECAL_MASK_CR07_ODD" );
123 dc_maskStrings.push_back(
"ECAL_MASK_CR08_EVEN" );
124 dc_maskStrings.push_back(
"ECAL_MASK_CR08_ODD" );
125 dc_maskStrings.push_back(
"ECAL_MASK_CR09_EVEN" );
126 dc_maskStrings.push_back(
"ECAL_MASK_CR09_ODD" );
127 dc_maskStrings.push_back(
"ECAL_MASK_CR10_EVEN" );
128 dc_maskStrings.push_back(
"ECAL_MASK_CR10_ODD" );
129 dc_maskStrings.push_back(
"ECAL_MASK_CR11_EVEN" );
130 dc_maskStrings.push_back(
"ECAL_MASK_CR11_ODD" );
131 dc_maskStrings.push_back(
"ECAL_MASK_CR12_EVEN" );
132 dc_maskStrings.push_back(
"ECAL_MASK_CR12_ODD" );
133 dc_maskStrings.push_back(
"ECAL_MASK_CR13_EVEN" );
134 dc_maskStrings.push_back(
"ECAL_MASK_CR13_ODD" );
135 dc_maskStrings.push_back(
"ECAL_MASK_CR14_EVEN" );
136 dc_maskStrings.push_back(
"ECAL_MASK_CR14_ODD" );
137 dc_maskStrings.push_back(
"ECAL_MASK_CR15_EVEN" );
138 dc_maskStrings.push_back(
"ECAL_MASK_CR15_ODD" );
139 dc_maskStrings.push_back(
"ECAL_MASK_CR16_EVEN" );
140 dc_maskStrings.push_back(
"ECAL_MASK_CR16_ODD" );
141 dc_maskStrings.push_back(
"ECAL_MASK_CR17_EVEN" );
142 dc_maskStrings.push_back(
"ECAL_MASK_CR17_ODD" );
148 "RCT_DEADCHANNEL_SUMMARY",
149 "RCT_DEADCHANNEL_SUMMARY.ID",
152 "RCT_RUN_SETTINGS_KEY",
153 "RCT_RUN_SETTINGS_KEY.ID",
161 edm::LogError(
"L1-O2O" ) <<
"Problem with L1RCTChannelMask key." ;
165 return std::unique_ptr< L1RCTChannelMask >() ;
170 long long hcal_temp = 0LL;
172 for(
int i = 0 ;
i < 36 ;
i++) {
174 for(
int j = 0; j < 32 ; j++)
176 m->hcalMask[
i/2][
i%2][j] = ((hcal_temp >> j ) & 1) == 1;
178 m->hfMask[
i/2][
i%2][j-28] = ((hcal_temp >> j ) & 1) == 1;
180 for(
int i = 36;
i < 72 ;
i++) {
182 for(
int j = 0; j < 28 ; j++) {
184 m->ecalMask[k/2][k%2][j] = ((ecal_temp >> j ) & 1) ==1;
192 std::vector< std::string > cardMaskStrings;
193 cardMaskStrings.push_back(
"RC0");
194 cardMaskStrings.push_back(
"RC1");
195 cardMaskStrings.push_back(
"RC2");
196 cardMaskStrings.push_back(
"RC3");
197 cardMaskStrings.push_back(
"RC4");
198 cardMaskStrings.push_back(
"RC5");
199 cardMaskStrings.push_back(
"RC6");
200 cardMaskStrings.push_back(
"JSC");
203 std::vector< std::string > crateIDStrings;
204 crateIDStrings.push_back(
"RCT_CRATE_0");
205 crateIDStrings.push_back(
"RCT_CRATE_1");
206 crateIDStrings.push_back(
"RCT_CRATE_2");
207 crateIDStrings.push_back(
"RCT_CRATE_3");
208 crateIDStrings.push_back(
"RCT_CRATE_4");
209 crateIDStrings.push_back(
"RCT_CRATE_5");
210 crateIDStrings.push_back(
"RCT_CRATE_6");
211 crateIDStrings.push_back(
"RCT_CRATE_7");
212 crateIDStrings.push_back(
"RCT_CRATE_8");
213 crateIDStrings.push_back(
"RCT_CRATE_9");
214 crateIDStrings.push_back(
"RCT_CRATE_10");
215 crateIDStrings.push_back(
"RCT_CRATE_11");
216 crateIDStrings.push_back(
"RCT_CRATE_12");
217 crateIDStrings.push_back(
"RCT_CRATE_13");
218 crateIDStrings.push_back(
"RCT_CRATE_14");
219 crateIDStrings.push_back(
"RCT_CRATE_15");
220 crateIDStrings.push_back(
"RCT_CRATE_16");
221 crateIDStrings.push_back(
"RCT_CRATE_17");
227 "RCT_RUN_SETTINGS_KEY",
228 "RCT_RUN_SETTINGS_KEY.ID",
232 for( std::vector<std::string>::iterator crate = crateIDStrings.begin(); crate !=crateIDStrings.end() ; ++crate) {
238 "CRATE_CONF_DUMMY.CRATE_CONF",
242 "RCT_CRATE_CONF.RCT_KEY",
247 for(std::vector<std::string>::iterator card = cardMaskStrings.begin(); card!=cardMaskStrings.end(); ++card){
248 cardConfResults.
fillVariable(*card,extantCard[cardNum]);
250 if(!extantCard[cardNum]){
254 for (
int k = 0 ;
k <4 ;
k++) {
256 m->ecalMask[crateNum][0][(cardNum/2)*8 +
k ] |= !extantCard[cardNum];
257 m->ecalMask[crateNum][1][(cardNum/2)*8 +
k ] |= !extantCard[cardNum];
258 m->hcalMask[crateNum][0][(cardNum/2)*8 +
k ] |= !extantCard[cardNum];
259 m->hcalMask[crateNum][1][(cardNum/2)*8 +
k ] |= !extantCard[cardNum];
264 for (
int k = 0 ;
k <4 ;
k++) {
265 m->hfMask[crateNum][0][
k] |= !extantCard[cardNum];
266 m->hfMask[crateNum][1][
k] |= !extantCard[cardNum];
271 for(
int k = 0;
k < 8 ;
k++ ){
272 m->hcalMask[crateNum][cardNum%2][(cardNum/2)*8 +
k] |= !extantCard[cardNum];
273 m->ecalMask[crateNum][cardNum%2][(cardNum/2)*8 +
k] |= !extantCard[cardNum];
300 return std::unique_ptr< L1RCTChannelMask >(
m);
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
l1t::OMDSReader m_omdsReader
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
L1RCTChannelMaskOnlineProd(const edm::ParameterSet &iConfig)
~L1RCTChannelMaskOnlineProd() override
std::unique_ptr< L1RCTChannelMask > newObject(const std::string &objectKey) override