![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/StatusCode.h"
20 m_tgcCablingDbTool(
"TGCCablingDbTool"),
21 m_ASD2PP_DIFF_12(nullptr) {
40 if(
db && !(
db->isCommon())) {
114 if(!
sc.isSuccess()) {
115 return StatusCode::SUCCESS;
118 std::vector<std::string> *tmp_ASD2PP_DIFF_12 =
m_tgcCablingDbTool->giveASD2PP_DIFF_12();
119 if(!tmp_ASD2PP_DIFF_12)
return StatusCode::FAILURE;
125 for (
const std::string&
s : *tmp_ASD2PP_DIFF_12) {
126 char letter =
s.at(0);
127 if(letter==
'/'||letter==
'*')
continue;
130 delete tmp_ASD2PP_DIFF_12;
131 tmp_ASD2PP_DIFF_12 =
nullptr;
136 if(!
sc.isSuccess())
return sc;
138 if(!
sc.isSuccess())
return sc;
140 if(!
sc.isSuccess())
return sc;
142 if(!
sc.isSuccess())
return sc;
146 if(!
sc.isSuccess())
return sc;
148 if(!
sc.isSuccess())
return sc;
150 if(!
sc.isSuccess())
return sc;
152 if(!
sc.isSuccess())
return sc;
156 if(!
sc.isSuccess())
return sc;
158 if(!
sc.isSuccess())
return sc;
160 if(!
sc.isSuccess())
return sc;
162 if(!
sc.isSuccess())
return sc;
166 return StatusCode::SUCCESS;
172 std::vector<std::vector<int> >&
info)
183 const std::string &buf = (*it);
185 char firstl = buf.at(0);
186 if(firstl==
'/'||firstl==
'*')
continue;
188 std::istringstream
line(buf);
197 const std::string &buf = (*it);
199 char firstl = buf.at(0);
200 if(firstl==
'/'||firstl==
'*')
continue;
201 if(firstl==
'E'||firstl==
'F')
break;
202 std::istringstream
line(buf);
203 std::vector<int>
entry;
204 int t_side, t_sector;
208 if((t_side==
side) && (t_sector==sector)) {
209 for(
int i=2;
i<8;
i++) {
212 entry.push_back(temp);
224 return StatusCode::SUCCESS;
235 if(sector<0)
return nullptr;
293 bool orChannel)
const {
304 bool orChannel)
const {
305 if(orChannel)
return nullptr;
306 if(ppin->
isValid()==
false)
return nullptr;
314 if(databaseP==
nullptr)
return nullptr;
319 if(
i<0)
return nullptr;
349 bool orChannel)
const {
350 if(orChannel)
return nullptr;
351 if(asdout->
isValid()==
false)
return nullptr;
353 const bool asdoutisStrip = asdout->
isStrip();
354 const bool asdoutisBackward = asdout->
isBackward();
355 const bool asdoutisEndcap = asdout->
isEndcap();
356 const bool asdoutisTriplet = asdout->
isTriplet();
357 const int asdoutLayer = asdout->
getLayer();
358 const int asdoutChamber = asdout->
getChamber();
359 const int asdoutChannel = asdout->
getChannel();
367 if(databaseP==
nullptr)
return nullptr;
371 for(
int i=0;
i<MaxEntry;
i++) {
373 int layer = asdoutLayer;
375 if(!asdoutisBackward) {
380 int elecChannel = asdoutChannel;
384 if(asdoutisEndcap&&asdoutisTriplet)
413 if(!
db)
return StatusCode::FAILURE;
415 std::vector<std::vector<int> >
info;
418 if(!
sc.isSuccess())
return sc;
420 size_t info_size =
info.size();
421 if(!info_size)
return StatusCode::SUCCESS;
425 if(!
db)
return StatusCode::FAILURE;
430 for(
size_t i=0;
i<info_size;
i++) {
434 return StatusCode::SUCCESS;
TGCDatabase * m_ESDdb[TGCIdBase::MaxSideType][TGCId::NumberOfEndcapSector]
TGCDatabase * getDatabase(const int side, const int region, const int sector, const int module) const
virtual TGCChannelId * getChannelOut(const TGCChannelId *asdout, bool orChannel=false) const
RegionType getRegionType(void) const
StatusCode getUpdateInfo(const int side, const int sector, const std::string &blockname, std::vector< std::vector< int > > &info)
TGCDatabase * m_EWDdb[TGCIdBase::MaxSideType][TGCId::NumberOfEndcapSector]
virtual int getChannel(void) const
TGCDatabase * m_ESIdb[TGCIdBase::MaxSideType][TGCId::NumberOfInnerSector]
std::vector< std::string > * m_ASD2PP_DIFF_12
TGCDatabase * m_FSDdb[TGCIdBase::MaxSideType][TGCId::NumberOfForwardSector]
int getChamber(void) const
TGCDatabase * m_FSIdb[TGCIdBase::MaxSideType][TGCId::NumberOfInnerSector]
virtual ~TGCCableASDToPP(void)
TGCDatabase * m_EWIdb[TGCIdBase::MaxSideType][TGCId::NumberOfInnerSector]
ModuleType getModuleType(void) const
virtual int getSector(void) const
virtual int getEntry(int entry, int column) const
TGCDatabase * m_ESTdb[TGCIdBase::MaxSideType][TGCId::NumberOfEndcapSector]
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual int getMaxEntry(void) const
StatusCode updateIndividualDatabase(const int side, const int sector, const std::string &blockname, TGCDatabase *&database)
SideType getSideType(void) const
bool isEndcap(void) const
virtual TGCChannelId * getChannelIn(const TGCChannelId *ppin, bool orChannel=false) const
bool isBackward(void) const
TGCDatabase * m_FWDdb[TGCIdBase::MaxSideType][TGCId::NumberOfForwardSector]
virtual bool isValid(void) const
StatusCode updateDatabase()
virtual int getIndexDBOut(int *indexOut) const
SignalType getSignalType(void) const
TGCDatabase * m_commonDb[TGCIdBase::MaxRegionType][TGCIdBase::MaxModuleType]
Pointers of common databases are recorded in this array.
ToolHandle< ITGCCablingDbTool > m_tgcCablingDbTool
TGCDatabase * m_EWTdb[TGCIdBase::MaxSideType][TGCId::NumberOfEndcapSector]
TGCDatabase * m_FWTdb[TGCIdBase::MaxSideType][TGCId::NumberOfForwardSector]
bool isTriplet(void) const
TGCDatabase * m_FWIdb[TGCIdBase::MaxSideType][TGCId::NumberOfInnerSector]
virtual TGCChannelId * getChannel(const TGCChannelId *channelId, bool orChannel=false) const
static const int s_stripForward[]
TGCDatabase * m_FSTdb[TGCIdBase::MaxSideType][TGCId::NumberOfForwardSector]
void initialize(const std::string &filename)