ATLAS Offline Software
Loading...
Searching...
No Matches
LArRodDecoder.cxx File Reference

Go to the source code of this file.

Functions

static const InterfaceID IID_ILArRodDecoder ("LArRodDecoder", 1, 0)
StatusCode LArRodDecoder::initialize ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode LArRodDecoder::initialize ATLAS_NOT_THREAD_SAFE ( )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Definition at line 74 of file LArRodDecoder.cxx.

75{
76 // Before anything, access message service
77 m_StatusNMask = !m_StatusMask;
78
79 StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
80 if (sc.isFailure()) {
81 ATH_MSG_ERROR ("Could not get LArOnlineID helper !");
82 return sc;
83 }
84
85 ATH_CHECK( m_evt.initialize() );
86
87 std::vector<std::string>::const_iterator it = m_LArCellCorrNames.begin();
88 std::vector<std::string>::const_iterator it_end = m_LArCellCorrNames.end();
89 for(; it!=it_end;++it)
90 {
91 IAlgTool* tool;
92 CaloCellCorrection* corr;
93 Gaudi::Utils::TypeNameString li(*it);
94 if((toolSvc()->retrieveTool(li.type(), li.name(), tool)).isFailure() )
95 {
96 ATH_MSG_ERROR(" Can't get AlgTool for CaloCellCorrection ");
97 return StatusCode::FAILURE;
98 }
99
100 corr = dynamic_cast<CaloCellCorrection*> (tool);
101 if(!corr )
102 {
103 ATH_MSG_ERROR(" Can't d-cast to CaloCellCorrection* ");
104 return StatusCode::FAILURE;
105 }
106 m_LArCellCorrTools.push_back(corr);
107 }
108
109 //Build list of preselected Feedthroughs
110 if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
111 ATH_MSG_INFO("Building list of selected feedthroughs");
112 for (const unsigned BE : m_vBEPreselection) {
113 for (const unsigned PN : m_vPosNegPreselection) {
114 for (const unsigned FT : m_vFTPreselection) {
115 HWIdentifier finalFTId=m_onlineHelper->feedthrough_Id(BE,PN,FT);
116 unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
117 ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << BE << " pos/neg=" << PN << " FT=" << FT
118 << " (0x" << std::hex << finalFTId32 << std::dec << ")");
119 m_vFinalPreselection.push_back(finalFTId32);
120 }
121 }
122 }
123 std::sort(m_vFinalPreselection.begin(),m_vFinalPreselection.end());
124 }//end if something set
125 else {
126 if (m_vBEPreselection.size() || m_vPosNegPreselection.size() || m_vFTPreselection.size()) {
127 ATH_MSG_ERROR("Feedthrough preselection: jobOption inconsistency! ");
128 ATH_MSG_ERROR("Need to set all three jobOptions BEPreselection PNPreselecton and FTPreselection");
129 return StatusCode::FAILURE;
130 }
131 ATH_MSG_DEBUG("No feedthrough preselection by jobOptions.");
132 }
133 return sc;
134}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
::StatusCode StatusCode
StatusCode definition for legacy code.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ IID_ILArRodDecoder()

const InterfaceID IID_ILArRodDecoder ( "LArRodDecoder" ,
1 ,
0  )
static