|
ATLAS Offline Software
|
AlgTool providing offline -> hardware mapping information.
More...
#include <TRT_HWMappingSvc.h>
AlgTool providing offline -> hardware mapping information.
Definition at line 29 of file TRT_HWMappingSvc.h.
◆ TRT_HWMappingSvc()
TRT_HWMappingSvc::TRT_HWMappingSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TRT_HWMappingSvc()
TRT_HWMappingSvc::~TRT_HWMappingSvc |
( |
| ) |
|
|
virtualdefault |
◆ DumpMaps()
void TRT_HWMappingSvc::DumpMaps |
( |
| ) |
|
Dump HV-line/pad maps.
Dump TRT Maps //.
Definition at line 404 of file TRT_HWMappingSvc.cxx.
409 if ( theMap ==
nullptr ) {
410 ATH_MSG_WARNING(
"Couldn't retrieve DCS HV. Is TRTHWMapCondAlg added to condSeq?");
415 for (
int mapItr = 0; mapItr < (
int)theMap->get_Barrel_HV_Names()->size(); ++mapItr ) {
416 ATH_MSG_INFO( mapItr <<
" " << theMap->get_Barrel_HV_Names()->at(mapItr));
420 for (
int mapItr = 0; mapItr < (
int)theMap->get_EndcapA_HV_Names()->size(); ++mapItr ) {
421 ATH_MSG_INFO( mapItr <<
" " << theMap->get_EndcapA_HV_Names()->at(mapItr));
425 for (
int mapItr = 0; mapItr < (
int)theMap->get_EndcapC_HV_Names()->size(); ++mapItr ) {
426 ATH_MSG_INFO( mapItr <<
" " << theMap->get_EndcapC_HV_Names()->at(mapItr));
429 ATH_MSG_INFO(
"Dumping TRT Barrel HV-line/pad channel values...");
430 for (
int mapItr = 0; mapItr < (
int)theMap->get_Barrel_HV_Nums()->size(); ++mapItr ) {
431 ATH_MSG_INFO( mapItr <<
" " << theMap->get_Barrel_HV_Nums()->at(mapItr));
434 ATH_MSG_INFO(
"Dumping TRT EndcapA HV-line/pad channel values...");
435 for (
int mapItr = 0; mapItr < (
int)theMap->get_EndcapA_HV_Nums()->size(); ++mapItr ) {
436 ATH_MSG_INFO( mapItr <<
" " << theMap->get_EndcapA_HV_Nums()->at(mapItr));
439 ATH_MSG_INFO(
"Dumping TRT EndcapA HV-line/pad channel values...");
440 for (
int mapItr = 0; mapItr < (
int)theMap->get_EndcapC_HV_Nums()->size(); ++mapItr ) {
441 ATH_MSG_INFO( mapItr <<
" " << theMap->get_EndcapC_HV_Nums()->at(mapItr));
449 if (
sc.isFailure() ) {
450 ATH_MSG_ERROR(
"Couldn't get TRT Detector Manager. Can't ouput text file for monitoring.");
453 std::map< std::string, std::vector<Identifier> > chanNameStrawMap;
461 std::map< std::string, std::vector<Identifier> >
::iterator mapItr;
462 mapItr = chanNameStrawMap.find(HVchanName);
463 if ( mapItr == chanNameStrawMap.end() ) {
465 std::vector<Identifier>
vec;
466 vec.push_back(strawID);
467 chanNameStrawMap.insert( std::make_pair(HVchanName,
vec) );
470 (*mapItr).second.push_back(strawID);
475 std::map< std::string, std::vector<Identifier> >
::iterator mapItr;
476 for ( mapItr = chanNameStrawMap.begin(); mapItr != chanNameStrawMap.end(); ++mapItr ) {
477 std::vector<Identifier>::const_iterator idItr;
479 for ( idItr = (*mapItr).second.begin(); idItr != (*mapItr).second.end(); ++idItr ) {
◆ finalize()
StatusCode TRT_HWMappingSvc::finalize |
( |
| ) |
|
|
virtual |
◆ get_HV_BarrelPadNum()
Returns the HV pad for a barrel identifier.
Get HV pad for a barrel identifier //.
Definition at line 215 of file TRT_HWMappingSvc.cxx.
◆ get_HV_CoolChanName()
std::string TRT_HWMappingSvc::get_HV_CoolChanName |
( |
const Identifier |
ident | ) |
|
Returns the HV line logical name in COOL channel format (":","/" -> "_")
Get HV-line Logical Name in COOL channel format //.
Definition at line 86 of file TRT_HWMappingSvc.cxx.
88 std::string chanName =
"";
100 if ( theMap ==
nullptr ) {
101 ATH_MSG_WARNING(
"Couldn't retrieve DCS HV names. Is TRTHWMapCondAlg added to condSeq?");
106 if ( abs(barrel_ec) == 1 ) {
111 if ( hashedPad >= (
int)theMap->get_Barrel_HV_Names()->size() || hashedPad<0) {
114 }
else chanName = theMap->get_Barrel_HV_Names()->at(hashedPad);
116 }
else if ( barrel_ec == 2 ) {
120 int hashedCell =
hashThisEndcapCell( phi_module, layer_or_wheel, fourPlaneNum, cellNum );
122 if ( hashedCell >= (
int)theMap->get_EndcapA_HV_Names()->size() || hashedCell<0 ) {
125 }
else chanName = theMap->get_EndcapA_HV_Names()->at(hashedCell);
127 }
else if ( barrel_ec == -2 ) {
131 int hashedCell =
hashThisEndcapCell( phi_module, layer_or_wheel, fourPlaneNum, cellNum );
133 if ( hashedCell >= (
int)theMap->get_EndcapC_HV_Names()->size() || hashedCell<0) {
136 }
else chanName = theMap->get_EndcapC_HV_Names()->at(hashedCell);
◆ get_HV_CoolChanNum()
Returns the COOL channel number for an identifier.
Get COOL channel number for an identifier //.
Definition at line 149 of file TRT_HWMappingSvc.cxx.
163 if ( theMap ==
nullptr ) {
164 ATH_MSG_WARNING(
"Couldn't retrieve DCS HV numbers. Is TRTHWMapCondAlg added to condSeq?");
169 if ( abs(barrel_ec) == 1 ) {
175 if ( hashedPad >= (
int)theMap->get_Barrel_HV_Nums()->size() || hashedPad<0) {
178 }
else chanNum = theMap->get_Barrel_HV_Nums()->at(hashedPad);
180 }
else if ( barrel_ec == 2 ) {
184 int hashedPad =
hashThisEndcapCell( phi_module, layer_or_wheel, fourPlaneNum, cellNum );
186 if ( hashedPad >= (
int)theMap->get_EndcapA_HV_Nums()->size() || hashedPad<0) {
189 }
else chanNum = theMap->get_EndcapA_HV_Nums()->at(hashedPad);
192 }
else if ( barrel_ec == -2 ) {
196 int hashedPad =
hashThisEndcapCell( phi_module, layer_or_wheel, fourPlaneNum, cellNum );
198 if ( hashedPad >= (
int)theMap->get_EndcapC_HV_Nums()->size() || hashedPad<0) {
201 }
else chanNum = theMap->get_EndcapC_HV_Nums()->at(hashedPad);
◆ get_HV_Endcap4PlaneNum()
Returns the 4-plane wheel number for an endcap identifier.
Get 4-plane wheel number in 16- or 8-plane wheel for an endcap identifier //.
Definition at line 292 of file TRT_HWMappingSvc.cxx.
294 int fourPlaneWheelNum = -1;
310 if ( straw_layer >= 0 && straw_layer < 4 ) fourPlaneWheelNum = 0;
311 else if ( straw_layer >= 4 && straw_layer < 8 ) fourPlaneWheelNum = 1;
312 else if ( straw_layer >= 8 && straw_layer < 12 ) fourPlaneWheelNum = 2;
313 else if ( straw_layer >= 12 && straw_layer < 16 ) fourPlaneWheelNum = 3;
315 msg(MSG::WARNING) <<
"Straw layer number out of range for Endcap!" <<
endmsg;
316 fourPlaneWheelNum = -1;
319 return fourPlaneWheelNum;
◆ get_HV_EndcapCellNum()
Returns the HV cell for an endcap identifier.
Get HV cell for an endcap identifier //.
Definition at line 261 of file TRT_HWMappingSvc.cxx.
279 else if (
straw >= 8 &&
straw < 16 ) cellNum = 1;
280 else if (
straw >=16 &&
straw < 24 ) cellNum = 2;
282 msg(MSG::WARNING) <<
"Straw number out of range for Endcap!" <<
endmsg;
◆ get_HV_EndcapFuseNum()
Returns the fuse number (0-3) for an endcap identifier.
Get HV fuse for an endcap identifier //.
Definition at line 325 of file TRT_HWMappingSvc.cxx.
◆ hashThisBarrelPad()
int TRT_HWMappingSvc::hashThisBarrelPad |
( |
int |
sector, |
|
|
int |
module, |
|
|
int |
padNum |
|
) |
| |
Hashes a Barrel HV pad by sector/module/pad#.
Hash an HV pad by sector/module/pad# //.
Definition at line 225 of file TRT_HWMappingSvc.cxx.
238 int nPadsPerSector = 42+65+100;
242 case 0: padOffset = 0;
break;
243 case 1: padOffset = 42;
break;
244 case 2: padOffset = 42+65;
break;
246 msg(MSG::ERROR) <<
"Couldn't hash this pad: "
252 hashedPad += sector*nPadsPerSector;
253 hashedPad += padNum + padOffset;
◆ hashThisEndcapCell()
int TRT_HWMappingSvc::hashThisEndcapCell |
( |
int |
sector, |
|
|
int |
wheel, |
|
|
int |
layer, |
|
|
int |
cellNum |
|
) |
| |
Hashes an Endcap HV cell by sector/wheel/layer/cell#.
Hash an endcap HV cell by sector/wheel/layer/cell# //.
Definition at line 355 of file TRT_HWMappingSvc.cxx.
372 if ( wheel >= 0 && wheel < 6 ) wheelType = 0;
373 if ( wheel >= 6 && wheel < 14 ) wheelType = 1;
374 if ( wheelType == -1 ) {
375 msg(MSG::ERROR) <<
"Invalid wheel number." <<
endmsg;
379 int nCellsPerSector = (6*4+8*2)*3;
380 int fourPlaneWheelNum;
381 if ( wheelType == 0 ) {
382 fourPlaneWheelNum =
layer + 4*wheel;
384 fourPlaneWheelNum =
layer + 24 + 2*(wheel-6);
387 hashedCell = cellNum + 3*fourPlaneWheelNum + sector*nCellsPerSector;
◆ initialize()
StatusCode TRT_HWMappingSvc::initialize |
( |
| ) |
|
|
virtual |
Initialize //.
Definition at line 52 of file TRT_HWMappingSvc.cxx.
59 if (
sc.isFailure() ) {
66 if (
sc.isFailure() ) {
67 ATH_MSG_ERROR(
"Unable to retrieve pointer to TRT ID Helper." );
73 if (
sc.isFailure() ) {
◆ m_Barrel_HV_COOLFolderName
std::string TRT_HWMappingSvc::m_Barrel_HV_COOLFolderName |
|
private |
◆ m_detStore
◆ m_EndcapA_HV_COOLFolderName
std::string TRT_HWMappingSvc::m_EndcapA_HV_COOLFolderName |
|
private |
◆ m_EndcapC_HV_COOLFolderName
std::string TRT_HWMappingSvc::m_EndcapC_HV_COOLFolderName |
|
private |
◆ m_HWMapReadKey
◆ m_TRT_ID_Helper
◆ m_TRTStrawNeighbourSvc
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
Scalar phi() const
phi method
std::string m_Barrel_HV_COOLFolderName
jobOptions properties
const Amg::Vector3D & strawCenter(int straw) const
Straw Surface: Local -> global transform of the straw via integer.
std::vector< size_t > vec
int hashThisEndcapCell(int, int, int, int)
Hashes an Endcap HV cell by sector/wheel/layer/cell#.
std::string m_EndcapC_HV_COOLFolderName
int get_HV_BarrelPadNum(const Identifier)
Returns the HV pad for a barrel identifier.
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
ServiceHandle< StoreGateSvc > m_detStore
int hashThisBarrelPad(int, int, int)
Hashes a Barrel HV pad by sector/module/pad#.
int straw(const Identifier &id) const
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_EndcapA_HV_COOLFolderName
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
outFile
Comment Out Those You do not wish to run.
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
StatusCode initialize(bool used=true)
const_expanded_id_iterator straw_end(void) const
int phi_module(const Identifier &id) const
int get_HV_EndcapCellNum(const Identifier)
Returns the HV cell for an endcap identifier.
int get_HV_Endcap4PlaneNum(const Identifier)
Returns the 4-plane wheel number for an endcap identifier.
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
#define ATH_MSG_WARNING(x)
std::string get_HV_CoolChanName(const Identifier)
Returns the HV line logical name in COOL channel format (":","/" -> "_")
const_expanded_id_iterator straw_begin(void) const
For straw ids, only expanded id iterators are available.
SG::ReadCondHandleKey< TRTCond::HWMap > m_HWMapReadKey
const TRT_ID * m_TRT_ID_Helper
Straw Helpers.
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw: