7 #include "GaudiKernel/StatusCode.h"
19 m_tgcCablingDbTool(
"TGCCablingDbTool") {
73 return StatusCode::SUCCESS;
76 std::vector<std::string> *tmp_ASD2PP_DIFF_12 =
m_tgcCablingDbTool->giveASD2PP_DIFF_12();
77 if(!tmp_ASD2PP_DIFF_12)
return StatusCode::FAILURE;
82 for (
const std::string&
s : *tmp_ASD2PP_DIFF_12) {
83 char letter =
s.at(0);
84 if(letter==
'/'||letter==
'*')
continue;
87 delete tmp_ASD2PP_DIFF_12;
88 tmp_ASD2PP_DIFF_12 =
nullptr;
93 if(!
sc.isSuccess())
return sc;
96 if(!
sc.isSuccess())
return sc;
98 if(!
sc.isSuccess())
return sc;
100 if(!
sc.isSuccess())
return sc;
104 if(!
sc.isSuccess())
return sc;
106 if(!
sc.isSuccess())
return sc;
108 if(!
sc.isSuccess())
return sc;
110 if(!
sc.isSuccess())
return sc;
114 if(!
sc.isSuccess())
return sc;
116 if(!
sc.isSuccess())
return sc;
118 if(!
sc.isSuccess())
return sc;
120 if(!
sc.isSuccess())
return sc;
124 return StatusCode::SUCCESS;
130 std::vector<std::vector<int> >&
info)
141 const std::string &buf = (*it);
143 char firstl = buf.at(0);
144 if(firstl==
'/'||firstl==
'*')
continue;
146 std::istringstream
line(buf);
155 const std::string &buf = (*it);
157 char firstl = buf.at(0);
158 if(firstl==
'/'||firstl==
'*')
continue;
159 if(firstl==
'E'||firstl==
'F')
break;
160 std::istringstream
line(buf);
161 std::vector<int>
entry;
162 int t_side, t_sector;
166 if((t_side==
side) && (t_sector==sector)) {
167 for(
int i=2;
i<8;
i++) {
170 entry.push_back(temp);
182 return StatusCode::SUCCESS;
193 if(sector<0)
return nullptr;
251 bool orChannel)
const {
262 bool orChannel)
const {
263 if(orChannel)
return nullptr;
264 if(ppin->
isValid()==
false)
return nullptr;
272 if(databaseP==
nullptr)
return nullptr;
277 if(
i<0)
return nullptr;
306 bool orChannel)
const {
307 if(orChannel)
return nullptr;
308 if(asdout->
isValid()==
false)
return nullptr;
310 const bool asdoutisStrip = asdout->
isStrip();
311 const bool asdoutisBackward = asdout->
isBackward();
312 const bool asdoutisEndcap = asdout->
isEndcap();
313 const bool asdoutisTriplet = asdout->
isTriplet();
314 const int asdoutLayer = asdout->
getLayer();
315 const int asdoutChamber = asdout->
getChamber();
316 const int asdoutChannel = asdout->
getChannel();
324 if(databaseP==
nullptr)
return nullptr;
328 for(
int i=0;
i<MaxEntry;
i++) {
330 int layer = asdoutLayer;
332 if(!asdoutisBackward) {
337 int elecChannel = asdoutChannel;
341 if(asdoutisEndcap&&asdoutisTriplet)
368 std::shared_ptr<TGCDatabaseASDToPP>&
database) {
369 if (!
database)
return StatusCode::FAILURE;
370 std::vector<std::vector<int>>
info;
372 if(!
sc.isSuccess())
return sc;
374 size_t info_size =
info.size();
375 if(!info_size)
return StatusCode::SUCCESS;
379 if(!
database)
return StatusCode::FAILURE;
382 for(
size_t i=0;
i<info_size;
i++) {
386 return StatusCode::SUCCESS;