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