ATLAS Offline Software
Functions
LArRodDecoder.cxx File Reference
#include "LArByteStream/LArRodDecoder.h"
#include "GaudiKernel/ListItem.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/IToolSvc.h"
#include "LArByteStream/LArRodBlockStructure.h"
#include "LArByteStream/LArRodBlockTransparentV0.h"
#include "LArByteStream/LArRodBlockCalibrationV0.h"
#include "LArByteStream/LArRodBlockCalibrationV1.h"
#include "LArByteStream/LArRodBlockCalibrationV2.h"
#include "LArByteStream/LArRodBlockCalibrationV3.h"
#include "LArByteStream/LArRodBlockAccumulatedV3.h"
#include "LArByteStream/LArRodBlockPhysicsV0.h"
#include "LArByteStream/LArRodBlockPhysicsV1.h"
#include "LArByteStream/LArRodBlockPhysicsV2.h"
#include "LArByteStream/LArRodBlockPhysicsV3.h"
#include "LArByteStream/LArRodBlockPhysicsV4.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

StatusCode LArRodDecoder::initialize ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options. More...
 

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.

Install fatal handler with default options.

getLorentzAngle() Read LorentzAngle from HIST and write out into local DB

getBSErrors() Read BSErrors from Monitoring HIST and write out into local DB

getEfficiency() Read Efficiency from Monitoring HIST and write out into local DB

getRawOccupancy() Read RawOccupancy from Monitoring HIST and write out into local DB

getNoiseOccupancy() Read NoiseOccupancy from HIST and write out into local DB

getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats

beginning of the loop of channels

bad bit newly found

known bad bit

for low noisy cells

for high noisy cells

0.01 is used to scale "PER" to the same order of magnitude to "SIG"

smaller deviation: distorted

checking TmaxAmp, Not mixed with MaxAmp and Width

channel information output

Only dead or distorted, or short known BCs are considered below.

index of bc

Definition at line 75 of file LArRodDecoder.cxx.

76 {
77  // Before anything, access message service
78  m_StatusNMask = !m_StatusMask;
79 
80 
81  StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
82  if (sc.isFailure()) {
83  msg(MSG::ERROR) << "Could not get LArOnlineID helper !" << endmsg;
84  return sc;
85  }
86 
87  IToolSvc* toolSvc;
88  sc = service( "ToolSvc",toolSvc);
89  if (sc.isFailure())
90  {msg(MSG::ERROR) << "Unable to get ToolSvc" << endmsg;
91  return sc;
92  }
93 
94  ATH_CHECK( m_evt.initialize() );
95 
96  std::vector<std::string>::const_iterator it = m_LArCellCorrNames.begin();
97  std::vector<std::string>::const_iterator it_end = m_LArCellCorrNames.end();
98  for(; it!=it_end;++it)
99  {IAlgTool* tool;
100  CaloCellCorrection* corr;
101  ListItem li(*it);
102  if((toolSvc->retrieveTool(li.type(), li.name(), tool)).isFailure() )
103  {msg(MSG::ERROR) << " Can't get AlgTool for CaloCellCorrection " << endmsg;
104  return StatusCode::FAILURE;
105  }
106 
107  corr = dynamic_cast<CaloCellCorrection*> (tool);
108  if(!corr )
109  {msg(MSG::ERROR) << " Can't d-cast to CaloCellCorrection* " << endmsg;
110  return StatusCode::FAILURE;
111  }
112  m_LArCellCorrTools.push_back(corr);
113  }
114 
115  //Build list of preselected Feedthroughs
116  if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
117  ATH_MSG_INFO("Building list of selected feedthroughs");
118  for (const unsigned BE : m_vBEPreselection) {
119  for (const unsigned PN : m_vPosNegPreselection) {
120  for (const unsigned FT : m_vFTPreselection) {
121  HWIdentifier finalFTId=m_onlineHelper->feedthrough_Id(BE,PN,FT);
122  unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
123  ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << BE << " pos/neg=" << PN << " FT=" << FT
124  << " (0x" << std::hex << finalFTId32 << std::dec << ")");
125  m_vFinalPreselection.push_back(finalFTId32);
126  }
127  }
128  }
129  std::sort(m_vFinalPreselection.begin(),m_vFinalPreselection.end());
130  }//end if something set
131  else {
132  if (m_vBEPreselection.size() || m_vPosNegPreselection.size() || m_vFTPreselection.size()) {
133  msg(MSG::ERROR) << "Feedthrough preselection: jobOption inconsistency! "<< endmsg;
134  msg(MSG::ERROR) << "Need to set all three jobOptions BEPreselection PNPreselecton and FTPreselection" << endmsg;
135  return StatusCode::FAILURE;
136  }
137  ATH_MSG_DEBUG("No feedthrough preselection by jobOptions.");
138  }
139  return sc;
140 }
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CaloCellCorrection
Definition: CaloCellCorrection.h:51
HWIdentifier
Definition: HWIdentifier.h:13
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
LArNewCalib_Delay_OFC_Cali.FT
FT
Definition: LArNewCalib_Delay_OFC_Cali.py:120
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7