ATLAS Offline Software
Loading...
Searching...
No Matches
CheckLArFebHeader.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CheckLArFebHeader.h"
6#include <vector>
7#include "GaudiKernel/IToolSvc.h"
9
13
15{
16 ATH_MSG_INFO ( "Initialize" );
17 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
18
19 m_count=0;
20 ATH_MSG_DEBUG ( "======== CheckLArFebHeader initialize successfully ========" );
21 return StatusCode::SUCCESS;
22}
23
24
25StatusCode CheckLArFebHeader::execute(const EventContext& /*ctx*/)
26{
27 m_count++;
28 const LArFebHeaderContainer *larFebHeaderContainer = nullptr;
29 ATH_CHECK( evtStore()->retrieve(larFebHeaderContainer) );
30
31 for (const LArFebHeader* feb : *larFebHeaderContainer) {
32 if(feb->CheckErrorELVL1Id() || feb->CheckErrorBCId()) {
33 HWIdentifier febid=feb->FEBId();
34 int barrel_ec = m_onlineHelper->barrel_ec(febid);
35 int pos_neg = m_onlineHelper->pos_neg(febid);
36 int FT = m_onlineHelper->feedthrough(febid);
37 int slot = m_onlineHelper->slot(febid);
38 int BCID = feb->BCId();
39 int LVL1ID = feb->ELVL1Id();
40 int FebBCID = feb->FebBCId();
41 int FebLVL1ID = feb->FebELVL1Id();
42
43 ATH_MSG_FATAL ( "TTC information mismatch in event " << m_count << ":" );
44 ATH_MSG_FATAL ( " FEBID = " << febid.get_compact() );
45 ATH_MSG_FATAL ( " BARREL/EC = " << barrel_ec << " POS/NEG = " << pos_neg );
46 ATH_MSG_FATAL ( " FT = " << FT << " SLOT = " << slot );
47 ATH_MSG_FATAL ( " TTC from ROD: LVL1ID = " << LVL1ID << " BCID = " << BCID );
48 ATH_MSG_FATAL ( " TTC from FEB: LVL1ID = " << FebLVL1ID << " BCID = " << FebBCID );
49
50 return StatusCode::FAILURE;
51 } // End if
52 else
53 ATH_MSG_DEBUG ( "FEB header consistent." );
54 } // End FebHeader loop
55
56 return StatusCode::SUCCESS;
57}
58
60{
61 ATH_MSG_DEBUG ( ">>> Finalize" );
62 return StatusCode::SUCCESS;
63}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
const LArOnlineID * m_onlineHelper
StatusCode execute(const EventContext &ctx)
Execute method.
value_type get_compact() const
Get the compact id.
Container class for LArFebHeader.
Holds information from the FEB Header.