ATLAS Offline Software
CMMEtSumsCnvTool.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 
6 // EDM include(s):
10 
11 // Local include(s):
12 #include "CMMEtSumsCnvTool.h"
13 
14 namespace xAODMaker {
15 
17  const std::string& name,
18  const IInterface* parent )
19  : AthAlgTool( type, name, parent ) {
20 
21  // Declare the interface(s) provided by the tool:
22  declareInterface< ICMMEtSumsCnvTool >( this );
23  }
24 
36 
37  // A small sanity check. The output container should really be empty...
38  if( !xaod->empty() ) {
39  ATH_MSG_WARNING( "The output xAOD container is not empty (size=="
40  << xaod->size() << ")" );
41  }
42 
43  // Loop over the ESD objects:
46  for( ; itr != end; ++itr ) {
47 
49  xaod->push_back( x );
50 
51  x->setCrate( (*itr)->crate() );
52  x->setDataID( (*itr)->dataID() );
53  x->setPeak( (*itr)->peak() );
54  x->addEt( (*itr)->EtVec() , (*itr)->EtErrorVec() );
55  x->addEx( (*itr)->ExVec() , (*itr)->ExErrorVec() );
56  x->addEy( (*itr)->EyVec() , (*itr)->EyErrorVec() );
57  }
58 
59  // Return gracefully:
60  return StatusCode::SUCCESS;
61  }
62 
63 } // namespace xAODMaker
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::CMMEtSums_v1
Description of CMMEtSums_v1.
Definition: CMMEtSums_v1.h:23
CMMEtSumsCollection.h
xAODMaker
Definition: StoreGateSvc.h:72
x
#define x
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector< LVL1::CMMEtSums >
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::CMMEtSums
CMMEtSums_v1 CMMEtSums
Define the latest version of the CMMEtSums class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMMEtSums.h:14
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CMMEtSumsContainer.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAODMaker::CMMEtSumsCnvTool::convert
virtual StatusCode convert(const DataVector< LVL1::CMMEtSums > *esd, xAOD::CMMEtSumsContainer *xaod) override
Function that fills an existing xAOD::EmTauRoIContainer.
Definition: CMMEtSumsCnvTool.cxx:34
CMMEtSumsAuxContainer.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAODMaker::CMMEtSumsCnvTool::CMMEtSumsCnvTool
CMMEtSumsCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: CMMEtSumsCnvTool.cxx:16
CMMEtSumsCnvTool.h