19#include "GaudiKernel/IToolSvc.h"
50 (
const std::string&
type,
51 const std::string& name,
52 const IInterface* parent)
74 declareProperty(
"SaveSCAAddress",
m_savesca);
119 ATH_CHECK( detStore()->retrieve (idHelper,
"CaloCell_ID") );
186 return StatusCode::SUCCESS;
200 StatusCode
sc = evtStore()->retrieve(larFebHeaderContainer);
201 if (
sc.isFailure() || !larFebHeaderContainer) {
202 ATH_MSG_DEBUG(
"Cannot read LArFebHeaderContainer from StoreGate! SCA address not saved." );
203 larFebHeaderContainer=NULL;
209 StatusCode
sc =evtStore()->retrieve(larOFIterCont);
210 if (
sc.isFailure()) {
211 ATH_MSG_DEBUG(
"Can't retrieve LArOFIterResultsContainer from StoreGate." );
214 ATH_MSG_DEBUG(
"Got LArOFIterResultsContainer from StoreGate." );
220 size_t febHeaderContIdx=0;
221 size_t ofcIterContIdx=0;
222 size_t ofcIterContIdx_temp=0;
227 const long gain=digit.gain();
233 return StatusCode::FAILURE;
270 const std::vector<short>& vSamples=digit.samples();
272 size_t n=vSamples.size();
273 int nsamples=vSamples.size();
274 const bool connected=cabling->isOnlineConnected(chid);
280 (*m_samples).resize(n);
281 for (
size_t i=0;i<n;++i) {
282 (*m_samples)[i] = vSamples[i] ;
290 const Identifier id=cabling->cnvToIdentifier(chid);
292 if (
m_emId->is_lar_em(
id)) {
298 else if (
m_hecId->is_lar_hec(
id)) {
304 else if (
m_fcalId->is_lar_fcal(
id)) {
311 ATH_MSG_WARNING(
"LArDigit Id "<< MSG::hex <<
id.get_compact() << MSG::dec
313 <<
") appears to be neither EM nor HEC nor FCAL." );
335 ATH_MSG_DEBUG(
" m_savesca and FebHead, OFIterCont " <<
m_savesca <<
" " << larFebHeaderContainer <<
" " <<larOFIterCont );
340 if (larFebHeaderContainer ){
342 const size_t febHead_s=larFebHeaderContainer->
size();
345 for(;febHeaderContIdx<febHead_s && chanFebId!=larFebHeaderContainer->
at(febHeaderContIdx)->FEBId();
349 if (febHeaderContIdx<febHead_s) {
350 const std::vector<unsigned short>& sca=larFebHeaderContainer->
at(febHeaderContIdx)->
SCA();
352 if ((
long)n!=nsamples){
362 for (
size_t i=0;i<n;++i) {
370 ATH_MSG_ERROR(
"LArDigitContainer and LArFebHeaderContainer out of sync!" );
385 const size_t iterRes_s=larOFIterCont->size();
387 ofcIterContIdx_temp = ofcIterContIdx;
389 for(;ofcIterContIdx<iterRes_s && chid!=larOFIterCont->at(ofcIterContIdx).getChannelID();++ofcIterContIdx)
393 if( ofcIterContIdx>=iterRes_s) {
396 <<
" in LArOFIterResultsContainer. CellIndex="<<
m_cellIndex );
398 ofcIterContIdx = ofcIterContIdx_temp;
414 return StatusCode::FAILURE;
442 return StatusCode::SUCCESS ;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Helper class for offline cell identifiers.
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
const LArEM_ID * em_idHelper() const
access to EM idHelper
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
value_type get_compact() const
Get the compact id.
Liquid Argon digit base class.
bool getConverged() const
float getDelay_final() const
HWIdentifier getChannelID() const
float getAmplitude() const
unsigned getOFCIndex() const
unsigned getPeakSample_final() const
Block filler tool for noisy FEB information.