ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArTest
LArEventTest
src
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
5
#include "
LArEventTest/CheckLArFebHeader.h
"
6
#include <vector>
7
#include "GaudiKernel/IToolSvc.h"
8
#include "
LArRawEvent/LArFebHeaderContainer.h
"
9
10
CheckLArFebHeader::CheckLArFebHeader
(
const
std::string& name, ISvcLocator* pSvcLocator)
11
:
AthAlgorithm
(name, pSvcLocator),
12
m_onlineHelper
(0)
13
{
14
m_count
=0;
15
//declareProperty("KeyList",m_keylistproperty);
16
}
17
18
CheckLArFebHeader::~CheckLArFebHeader
()
19
{
20
}
21
22
StatusCode
CheckLArFebHeader::initialize
()
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
33
StatusCode
CheckLArFebHeader::execute
(
const
EventContext&
/*ctx*/
)
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
67
StatusCode
CheckLArFebHeader::finalize
()
68
{
69
ATH_MSG_DEBUG
(
">>> Finalize"
);
70
return
StatusCode::SUCCESS;
71
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CheckLArFebHeader.h
LArFebHeaderContainer.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
AthCommonAlgorithm< Gaudi::Algorithm >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
CheckLArFebHeader::CheckLArFebHeader
CheckLArFebHeader(const std::string &name, ISvcLocator *pSvcLocator)
Definition
CheckLArFebHeader.cxx:10
CheckLArFebHeader::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition
CheckLArFebHeader.h:33
CheckLArFebHeader::~CheckLArFebHeader
~CheckLArFebHeader()
Definition
CheckLArFebHeader.cxx:18
CheckLArFebHeader::finalize
StatusCode finalize()
Definition
CheckLArFebHeader.cxx:67
CheckLArFebHeader::initialize
StatusCode initialize()
Definition
CheckLArFebHeader.cxx:22
CheckLArFebHeader::m_count
int m_count
Definition
CheckLArFebHeader.h:32
CheckLArFebHeader::execute
StatusCode execute(const EventContext &ctx)
Execute method.
Definition
CheckLArFebHeader.cxx:33
HWIdentifier
Definition
HWIdentifier.h:13
Identifier::get_compact
value_type get_compact() const
Get the compact id.
LArFebHeaderContainer
Container class for LArFebHeader.
Definition
LArFebHeaderContainer.h:20
LArFebHeader
Holds information from the FEB Header.
Definition
LArFebHeader.h:21
Generated on
for ATLAS Offline Software by
1.17.0