ATLAS Offline Software
Loading...
Searching...
No Matches
FSIHelper Class Reference

#include <SCT_FSIHelper.h>

Collaboration diagram for FSIHelper:

Public Member Functions

 FSIHelper (SCT_DataBase *rdb)
 ~FSIHelper ()
const std::vector< const FSIDetails * > & fsiVector (int wheel) const

Private Member Functions

void fill ()

Private Attributes

std::vector< std::vector< std::unique_ptr< FSIDetails > > > m_wheelLocMap
std::vector< std::vector< const FSIDetails * > > m_wheelLocMapConst
std::map< std::string, std::unique_ptr< FSILocation > > m_locationTypes
SCT_DataBasem_rdb

Detailed Description

Definition at line 61 of file SCT_FSIHelper.h.

Constructor & Destructor Documentation

◆ FSIHelper()

FSIHelper::FSIHelper ( SCT_DataBase * rdb)

Definition at line 37 of file SCT_FSIHelper.cxx.

38 : m_rdb(rdb)
39{
40 int numWheels = m_rdb->fwdGeneral()->getInt("NUMWHEELS");
41 m_wheelLocMap.resize(numWheels);
42 m_wheelLocMapConst.resize(numWheels);
43 fill();
44}
std::vector< std::vector< const FSIDetails * > > m_wheelLocMapConst
SCT_DataBase * m_rdb
std::vector< std::vector< std::unique_ptr< FSIDetails > > > m_wheelLocMap

◆ ~FSIHelper()

FSIHelper::~FSIHelper ( )

Definition at line 46 of file SCT_FSIHelper.cxx.

47{
48}

Member Function Documentation

◆ fill()

void FSIHelper::fill ( )
private

Definition at line 52 of file SCT_FSIHelper.cxx.

53{
54 // Loop through location types
55 for (int iLocIndex = 0; iLocIndex < m_rdb->fwdFSILocationSize(); iLocIndex++) {
56 std::string locType = m_rdb->fwdFSILocation(iLocIndex)->getString("LOCTYPE");
57 double radius = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCR") * Gaudi::Units::mm;
58 double rphi = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCPHI") * Gaudi::Units::deg;
59 int side = m_rdb->fwdFSILocation(iLocIndex)->getInt("SIDE");
60 m_locationTypes[locType] = std::make_unique<FSILocation>(locType, radius, rphi, side);
61 }
62
63 // Loop through all fsi's
64 for (int index = 0; index < m_rdb->fwdFSISize(); index++) {
65 unsigned int iWheel = m_rdb->fwdFSI(index)->getInt("WHEEL") - 1;
66 int simType = m_rdb->fwdFSI(index)->getInt("SIMTYPE");
67 std::string simTypeString = m_rdb->fwdFSIType(simType)->getString("TYPENAME");
68 int simTypeCheck = m_rdb->fwdFSIType(simType)->getInt("SIMTYPE");
69 std::string locationType = m_rdb->fwdFSI(index)->getString("LOCTYPE");
70 std::string actualType = m_rdb->fwdFSI(index)->getString("ACTUALTYPE");
71
72 if (simTypeCheck != simType) std::cout << "Error in simType to index match in table SctFwdFSIType" << std::endl;
73
74 FSILocation * location = m_locationTypes[locationType].get();
75 if (!location) std::cout << "Error filling FSI information. No FSI of type " << locationType << " found" << std::endl;
76 std::unique_ptr<FSIDetails> fsi = std::make_unique<FSIDetails>(location, simType, simTypeString, locationType, actualType);
77
78 if (iWheel >= m_wheelLocMap.size())
79 std::cout << "Error in FSIHelper: wheel number is out of range: " << iWheel << std::endl;
80
81 m_wheelLocMapConst[iWheel].push_back(fsi.get());
82 m_wheelLocMap[iWheel].push_back(std::move(fsi));
83
84 }
85}
std::map< std::string, std::unique_ptr< FSILocation > > m_locationTypes
str index
Definition DeMoScan.py:362

◆ fsiVector()

const std::vector< const FSIDetails * > & FSIHelper::fsiVector ( int wheel) const

Definition at line 89 of file SCT_FSIHelper.cxx.

90{
91 return m_wheelLocMapConst[iWheel];
92}

Member Data Documentation

◆ m_locationTypes

std::map<std::string, std::unique_ptr<FSILocation> > FSIHelper::m_locationTypes
private

Definition at line 75 of file SCT_FSIHelper.h.

◆ m_rdb

SCT_DataBase* FSIHelper::m_rdb
private

Definition at line 77 of file SCT_FSIHelper.h.

◆ m_wheelLocMap

std::vector<std::vector<std::unique_ptr<FSIDetails> > > FSIHelper::m_wheelLocMap
private

Definition at line 73 of file SCT_FSIHelper.h.

◆ m_wheelLocMapConst

std::vector<std::vector<const FSIDetails *> > FSIHelper::m_wheelLocMapConst
private

Definition at line 74 of file SCT_FSIHelper.h.


The documentation for this class was generated from the following files: