134 log << MSG::DEBUG <<
"initGrouping "<<
endmsg;
139 log << MSG::ERROR <<
"Unknown grouping "<<
endmsg;
145 log << MSG::DEBUG <<
"Single group "<<
endmsg;
148 std::vector<HWIdentifier>::const_iterator febIt =
m_onlineHelper->feb_begin();
149 std::vector<HWIdentifier>::const_iterator febEnd =
m_onlineHelper->feb_end();
151 for (; febIt != febEnd; ++febIt) {
152 febIds.push_back((*febIt).get_identifier32().get_compact());
155 unsigned int nChanPerGain = 1;
156 unsigned int minGain = 0;
157 unsigned int nGains = 3;
163 log << MSG::DEBUG <<
"Subdetector grouping "<<
endmsg;
166 std::vector<HWIdentifier>::const_iterator febIt =
m_onlineHelper->feb_begin();
167 std::vector<HWIdentifier>::const_iterator febEnd =
m_onlineHelper->feb_end();
174 for (; febIt != febEnd; ++febIt) {
175 unsigned int febId = (*febIt).get_identifier32().get_compact();
177 emBarrel.push_back(febId);
180 emEndcap.push_back(febId);
183 hec.push_back(febId);
186 fcal.push_back(febId);
189 log << MSG::DEBUG <<
"Uassociated FEB id: "
190 << MSG::hex << (febId) << MSG::dec
197 unsigned int nChanPerGain = 4;
198 unsigned int minGain = 0;
199 unsigned int nGains = 3;
239 log << MSG::DEBUG <<
"Extended Subdetector grouping "<<
endmsg;
242 std::vector<HWIdentifier>::const_iterator febIt =
m_onlineHelper->feb_begin();
243 std::vector<HWIdentifier>::const_iterator febEnd =
m_onlineHelper->feb_end();
252 for (; febIt != febEnd; ++febIt) {
255 if(iside <0 || iside > 1) {
256 log << MSG::ERROR <<
"Wrong side id: "<< iside <<
" from: "
257 << MSG::hex << *febIt << MSG::dec <<
endmsg;
258 return (StatusCode::FAILURE);
260 unsigned int febId = (*febIt).get_identifier32().get_compact();
262 emBarrelPS[iside].push_back(febId);
265 emEndcapPS[iside].push_back(febId);
268 emBarrel[iside].push_back(febId);
271 emEndcap[iside].push_back(febId);
274 hec[iside].push_back(febId);
277 fcal[iside].push_back(febId);
280 log << MSG::DEBUG <<
"Uassociated FEB id: "
281 << MSG::hex << (febId) << MSG::dec
288 unsigned int nChanPerGain = 12;
289 unsigned int minGain = 0;
290 unsigned int nGains = 3;
292 for (
int iside=0; iside<2; ++iside) {
303 log << MSG::DEBUG <<
"FeedThrough grouping "<<
endmsg;
306 std::vector<HWIdentifier>::const_iterator febIt =
m_onlineHelper->feb_begin();
307 std::vector<HWIdentifier>::const_iterator febEnd =
m_onlineHelper->feb_end();
309 std::vector<LArCondFEBIdChanMap::FEBIdVector> ft(
m_onlineHelper->feedthroughHashMax());
312 for (; febIt != febEnd; ++febIt) {
320 if (fthash < ft.size()) {
324 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
325 << MSG::hex << febId << MSG::dec <<
" "
326 << ftid <<
" " << ft.size()
328 return (StatusCode::FAILURE);
332 unsigned int nChanPerGain = ft.size();
333 unsigned int minGain = 0;
334 unsigned int nGains = 3;
336 for (
unsigned int i = 0; i < ft.size(); ++i) {
342 log << MSG::DEBUG <<
"Extended FeedThrough grouping (PS goes seperatly, EMEC in HEC as well)"<<
endmsg;
345 std::vector<HWIdentifier>::const_iterator febIt =
m_onlineHelper->feb_begin();
346 std::vector<HWIdentifier>::const_iterator febEnd =
m_onlineHelper->feb_end();
350 std::vector<LArCondFEBIdChanMap::FEBIdVector> ft(
m_onlineHelper->feedthroughHashMax());
352 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftPS(
m_onlineHelper->feedthroughHashMax());
354 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftSpecial(8);
356 for (; febIt != febEnd; ++febIt) {
366 if (fthash >= ft.size()) {
367 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
368 << MSG::hex << febId << MSG::dec <<
" "
369 << ftid <<
" " << ft.size()
371 return (StatusCode::FAILURE);
385 ftSpecial[0].push_back(
m_onlineHelper->feb_Id(1,0,3,1).get_identifier32().get_compact());
386 ftSpecial[0].push_back(
m_onlineHelper->feb_Id(1,0,3,2).get_identifier32().get_compact());
388 ftSpecial[1].push_back(
m_onlineHelper->feb_Id(1,1,3,1).get_identifier32().get_compact());
389 ftSpecial[1].push_back(
m_onlineHelper->feb_Id(1,1,3,2).get_identifier32().get_compact());
391 ftSpecial[2].push_back(
m_onlineHelper->feb_Id(1,0,10,1).get_identifier32().get_compact());
392 ftSpecial[2].push_back(
m_onlineHelper->feb_Id(1,0,10,2).get_identifier32().get_compact());
394 ftSpecial[3].push_back(
m_onlineHelper->feb_Id(1,1,10,1).get_identifier32().get_compact());
395 ftSpecial[3].push_back(
m_onlineHelper->feb_Id(1,1,10,2).get_identifier32().get_compact());
397 ftSpecial[4].push_back(
m_onlineHelper->feb_Id(1,0,16,1).get_identifier32().get_compact());
398 ftSpecial[4].push_back(
m_onlineHelper->feb_Id(1,0,16,2).get_identifier32().get_compact());
400 ftSpecial[5].push_back(
m_onlineHelper->feb_Id(1,1,16,1).get_identifier32().get_compact());
401 ftSpecial[5].push_back(
m_onlineHelper->feb_Id(1,1,16,2).get_identifier32().get_compact());
403 ftSpecial[6].push_back(
m_onlineHelper->feb_Id(1,0,22,1).get_identifier32().get_compact());
404 ftSpecial[6].push_back(
m_onlineHelper->feb_Id(1,0,22,2).get_identifier32().get_compact());
406 ftSpecial[7].push_back(
m_onlineHelper->feb_Id(1,1,22,1).get_identifier32().get_compact());
407 ftSpecial[7].push_back(
m_onlineHelper->feb_Id(1,1,22,2).get_identifier32().get_compact());
411 unsigned int nChanPerGain = ft.size()+ftPS.size()+ftSpecial.size();
412 unsigned int minGain = 0;
413 unsigned int nGains = 3;
414 unsigned int iCoolChannel=0;
416 for (
unsigned int i = 0; i < ft.size(); ++i) {
419 for (
unsigned int i = 0; i < ftPS.size(); ++i) {
422 for (
unsigned int i = 0; i < ftSpecial.size(); ++i) {
427 return StatusCode::FAILURE;
433 log << MSG::DEBUG <<
"Number of channels per gain "
437 log << MSG::DEBUG <<
"Mininum gain value "
441 log << MSG::DEBUG <<
"Number of gain values "
445 log << MSG::DEBUG <<
"Number of offset channels "
449 log << MSG::DEBUG <<
"Total number of channels "
453 return (StatusCode::SUCCESS);