ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAlgorithms
TrigCaloRec
src
HLTCaloCellSumMaker.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
HLTCaloCellSumMaker.h
"
6
7
8
StatusCode
HLTCaloCellSumMaker::initialize
() {
9
ATH_CHECK
(
m_cellContainerKey
.initialize(
m_roiMode
) );
10
ATH_CHECK
(
m_cellContainerVKey
.initialize( !
m_roiMode
) );
11
return
StatusCode::SUCCESS;
12
}
13
14
15
StatusCode
HLTCaloCellSumMaker::execute
(
const
EventContext& context )
const
{
16
17
if
(
m_roiMode
) {
18
auto
roiCollection =
SG::makeHandle
(
m_cellContainerKey
, context );
19
if
( !roiCollection.isValid() ){
20
ATH_MSG_INFO
(
"empty container"
);
21
return
StatusCode::SUCCESS;
22
}
23
float
sum=0.;
24
for
(
auto
c : *roiCollection ) {sum+=c->et();}
25
ATH_MSG_DEBUG
(
"REGTEST: Executing "
<< name() <<
"... size : "
<< roiCollection->size() <<
"; Energy Et Sum : "
<< sum );
26
27
}
else
{
28
auto
roiCollection=
SG::makeHandle
(
m_cellContainerVKey
, context );
29
for
(
const
CaloCellContainer
* roiDescriptor : *roiCollection ) {
30
if
( !roiDescriptor->empty() ) {
31
float
sum=0.;
32
for
(
auto
c : *roiDescriptor ) {sum+=c->et();}
33
ATH_MSG_DEBUG
(
"REGTEST: Executing "
<< name() <<
"; size : "
<< roiDescriptor->size() <<
"; Energy ET Sum : "
<< sum );
34
}
else
{
ATH_MSG_INFO
(
"empty container"
); }
35
}
36
}
37
return
StatusCode::SUCCESS;
38
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HLTCaloCellSumMaker.h
CaloCellContainer
Container class for CaloCell.
Definition
CaloCellContainer.h:55
HLTCaloCellSumMaker::m_cellContainerVKey
SG::ReadHandleKey< ConstDataVector< CaloCellContainerVector > > m_cellContainerVKey
Definition
HLTCaloCellSumMaker.h:28
HLTCaloCellSumMaker::initialize
virtual StatusCode initialize() override
Definition
HLTCaloCellSumMaker.cxx:8
HLTCaloCellSumMaker::execute
virtual StatusCode execute(const EventContext &context) const override
Definition
HLTCaloCellSumMaker.cxx:15
HLTCaloCellSumMaker::m_cellContainerKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Definition
HLTCaloCellSumMaker.h:31
HLTCaloCellSumMaker::m_roiMode
Gaudi::Property< bool > m_roiMode
Definition
HLTCaloCellSumMaker.h:34
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
Generated on
for ATLAS Offline Software by
1.17.0