ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7
10 ATH_CHECK( m_cellContainerVKey.initialize( !m_roiMode ) );
11 return StatusCode::SUCCESS;
12}
13
14
15StatusCode 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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Container class for CaloCell.
SG::ReadHandleKey< ConstDataVector< CaloCellContainerVector > > m_cellContainerVKey
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &context) const override
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Gaudi::Property< bool > m_roiMode
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())