ATLAS Offline Software
Loading...
Searching...
No Matches
TrigVertexCountsCnvTool.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):
9
10// Local include(s):
12
13namespace xAODMaker {
14
16 const std::string& name,
17 const IInterface* parent )
18 : AthAlgTool( type, name, parent ) {
19
20 // Declare the interface(s) provided by the tool:
21 declareInterface< ITrigVertexCountsCnvTool >( this );
22 }
23
35
36 // A small sanity check. The output container should really be empty...
37 if( !xaod->empty() ) {
38 ATH_MSG_WARNING( "The output xAOD container is not empty (size=="
39 << xaod->size() << ")" );
40 }
41 ATH_MSG_VERBOSE("AOD TrigVertexCountsCollection size:: "<< aod->size());
42
45
46 for(;tvc_iter != tvc_iter_end;++tvc_iter){
47 // Create a (single) output xAOD object.
49 xaod->push_back(xtvc);
50
51 xtvc->setVtxNtrks((*tvc_iter)->vtxNtrks());
52 xtvc->setVtxTrkPtSqSum((*tvc_iter)->vtxTrkPtSqSum());
53
54 ATH_MSG_VERBOSE("AOD vs xAOD::vtxNtrks size:: "<< (*tvc_iter)->vtxNtrks().size()<<" "<<xtvc->vtxNtrks().size());
55 ATH_MSG_VERBOSE("AOD vs xAOD:vtxTrkPtSqSum size:: "<< (*tvc_iter)->vtxTrkPtSqSum().size()<<" "<<xtvc->vtxTrkPtSqSum().size());
56 //
57 }
58 // Return gracefully:
59 return StatusCode::SUCCESS;
60 }
61
62} // namespace xAODMaker
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
TrigVertexCountsCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
virtual StatusCode convert(const TrigVertexCountsCollection *aod, xAOD::TrigVertexCountsContainer *xaod) const override
Function that fills an existing xAOD::TrigVertexCountsContainer.
void setVtxTrkPtSqSum(const std::vector< float > &m_vtxTrkPtSqSum)
const std::vector< float > & vtxTrkPtSqSum() const
void setVtxNtrks(const std::vector< unsigned int > &m_vtxNtrks)
const std::vector< unsigned int > & vtxNtrks() const
getters
TrigVertexCountsContainer_v1 TrigVertexCountsContainer