ATLAS Offline Software
Loading...
Searching...
No Matches
LArRodDecoder.cxx File Reference
#include "LArByteStream/LArRodDecoder.h"
#include "GaudiKernel/TypeNameString.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/IToolSvc.h"
#include "LArByteStream/LArRodBlockStructure.h"
#include "LArByteStream/LArRodBlockPhysicsV5.h"
#include "LArByteStream/LArRodBlockPhysicsV6.h"
#include <algorithm>
#include <fstream>
#include "LArRawConditions/LArCalibParams.h"
#include "LArRecConditions/LArCalibLineMapping.h"
#include "LArCabling/LArOnOffIdMapping.h"

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 61 of file LArRodDecoder.cxx.

62{
63 // Before anything, access message service
64 m_StatusNMask = !m_StatusMask;
65
66 StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
67 if (sc.isFailure()) {
68 ATH_MSG_ERROR ("Could not get LArOnlineID helper !");
69 return sc;
70 }
71
72 ATH_CHECK( m_evt.initialize() );
73
74 std::vector<std::string>::const_iterator it = m_LArCellCorrNames.begin();
75 std::vector<std::string>::const_iterator it_end = m_LArCellCorrNames.end();
76 for(; it!=it_end;++it)
77 {
78 IAlgTool* tool;
79 CaloCellCorrection* corr;
80 Gaudi::Utils::TypeNameString li(*it);
81 if((toolSvc()->retrieveTool(li.type(), li.name(), tool)).isFailure() )
82 {
83 ATH_MSG_ERROR(" Can't get AlgTool for CaloCellCorrection ");
84 return StatusCode::FAILURE;
85 }
86
87 corr = dynamic_cast<CaloCellCorrection*> (tool);
88 if(!corr )
89 {
90 ATH_MSG_ERROR(" Can't d-cast to CaloCellCorrection* ");
91 return StatusCode::FAILURE;
92 }
93 m_LArCellCorrTools.push_back(corr);
94 }
95
96 //Build list of preselected Feedthroughs
97 if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
98 ATH_MSG_INFO("Building list of selected feedthroughs");
99 for (const unsigned BE : m_vBEPreselection) {
100 for (const unsigned PN : m_vPosNegPreselection) {
101 for (const unsigned FT : m_vFTPreselection) {
102 HWIdentifier finalFTId=m_onlineHelper->feedthrough_Id(BE,PN,FT);
103 unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
104 ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << BE << " pos/neg=" << PN << " FT=" << FT
105 << " (0x" << std::hex << finalFTId32 << std::dec << ")");
106 m_vFinalPreselection.push_back(finalFTId32);
107 }
108 }
109 }
110 std::sort(m_vFinalPreselection.begin(),m_vFinalPreselection.end());
111 }//end if something set
112 else {
113 if (m_vBEPreselection.size() || m_vPosNegPreselection.size() || m_vFTPreselection.size()) {
114 ATH_MSG_ERROR("Feedthrough preselection: jobOption inconsistency! ");
115 ATH_MSG_ERROR("Need to set all three jobOptions BEPreselection PNPreselecton and FTPreselection");
116 return StatusCode::FAILURE;
117 }
118 ATH_MSG_DEBUG("No feedthrough preselection by jobOptions.");
119 }
120 return sc;
121}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(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