ATLAS Offline Software
TrigSpacePointCountsCnvTool.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 // $Id:$
6 
7 // EDM include(s):
11 // Local include(s):
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< ITrigSpacePointCountsCnvTool >( this );
23  }
24 
25 
37 
38  // A small sanity check. The output container should really be empty...
39  if( !xaod->empty() ) {
40  ATH_MSG_WARNING( "The output xAOD container is not empty (size=="
41  << xaod->size() << ")" );
42  }
43 
44 
47 
48  ATH_MSG_VERBOSE("AOD TrigSpacePointCountsCollection size:: "<< aod->size());
49 
50  for(; tspc_iter != tspc_iter_end; ++tspc_iter){
51  // Add a new muon RoI object to the output:
53  xaod->push_back( xtspc );
54 
55  // Now fill it with data:
56  xtspc->setContentsPixelClusEndcapC((*tspc_iter)->pixelClusEndcapC().contents());
57  xtspc->setContentsPixelClusBarrel((*tspc_iter)->pixelClusBarrel().contents());
58  xtspc->setContentsPixelClusEndcapA((*tspc_iter)->pixelClusEndcapA().contents());
59  xtspc->setPixelClusTotBins((*tspc_iter)->pixelClusEndcapC().nbins_x());
60  xtspc->setPixelClusTotMin((*tspc_iter)->pixelClusEndcapC().min_x());
61  xtspc->setPixelClusTotMax((*tspc_iter)->pixelClusEndcapC().max_x());
62  xtspc->setPixelClusSizeBins((*tspc_iter)->pixelClusEndcapC().nbins_y());
63  xtspc->setPixelClusSizeMin((*tspc_iter)->pixelClusEndcapC().min_y());
64  xtspc->setPixelClusSizeMax((*tspc_iter)->pixelClusEndcapC().max_y());
65  xtspc->setSctSpEndcapC((*tspc_iter)->sctSpEndcapC());
66  xtspc->setSctSpBarrel((*tspc_iter)->sctSpBarrel());
67  xtspc->setSctSpEndcapA((*tspc_iter)->sctSpEndcapA());
68 
69  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusEndcapC::contents::size:: "<<(*tspc_iter)->pixelClusEndcapC().contents().size()<< " "<<xtspc->contentsPixelClusEndcapC().size() );
70  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusBarrel::contents::size:: "<<(*tspc_iter)->pixelClusBarrel().contents().size()<< " "<<xtspc->contentsPixelClusBarrel().size() );
71  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusEndcapA::contents::size:: "<<(*tspc_iter)->pixelClusEndcapA().contents().size()<< " "<<xtspc->contentsPixelClusEndcapC().size() );
72  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusTotBins:: "<< (*tspc_iter)->pixelClusEndcapC().nbins_x()<< " " <<xtspc->pixelClusTotBins() );
73  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusTotMin:: "<< (*tspc_iter)->pixelClusEndcapC().min_x()<< " " <<xtspc->pixelClusTotMin() );
74  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusTotMax:: "<< (*tspc_iter)->pixelClusEndcapC().max_x()<< " " <<xtspc->pixelClusTotMax() );
75  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusSizeBins:: "<< (*tspc_iter)->pixelClusEndcapC().nbins_y()<< " " <<xtspc->pixelClusSizeBins() );
76  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusSizeMin:: "<< (*tspc_iter)->pixelClusEndcapC().min_y()<< " " <<xtspc->pixelClusSizeMin() );
77  ATH_MSG_VERBOSE("AOD vs xAOD pixelClusSizeMax:: "<< (*tspc_iter)->pixelClusEndcapC().max_y()<< " " <<xtspc->pixelClusSizeMax() );
78  ATH_MSG_VERBOSE("AOD vs xAOD sctSpEndcapC:: "<<(*tspc_iter)->sctSpEndcapC() << " " << xtspc->sctSpEndcapC() );
79  ATH_MSG_VERBOSE("AOD vs xAOD sctSpBarrel:: "<<(*tspc_iter)->sctSpBarrel() << " " << xtspc->sctSpBarrel() );
80  ATH_MSG_VERBOSE("AOD vs xAOD sctSpEndcapA:: "<<(*tspc_iter)->sctSpEndcapA() << " " << xtspc->sctSpEndcapA() );
81  }
82  // Return gracefully:
83  return StatusCode::SUCCESS;
84  }
85 
86 } // namespace xAODMaker
xAOD::TrigSpacePointCounts_v1::setPixelClusSizeMax
void setPixelClusSizeMax(float val_max)
xAOD::TrigSpacePointCounts_v1::pixelClusSizeBins
unsigned int pixelClusSizeBins() const
xAOD::TrigSpacePointCounts_v1::contentsPixelClusEndcapC
const std::vector< float > & contentsPixelClusEndcapC() const
getters
xAOD::TrigSpacePointCounts_v1::sctSpBarrel
unsigned int sctSpBarrel() const
xAOD::TrigSpacePointCounts_v1::setContentsPixelClusEndcapC
void setContentsPixelClusEndcapC(const std::vector< float > &contentsPixelClusEndcapC)
xAOD::TrigSpacePointCounts_v1::pixelClusTotBins
unsigned int pixelClusTotBins() const
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::TrigSpacePointCounts_v1::setSctSpEndcapC
void setSctSpEndcapC(unsigned int sctEC)
xAOD::TrigSpacePointCounts_v1::setPixelClusTotMax
void setPixelClusTotMax(float val_max)
TrigSpacePointCountsContainer.h
xAOD::TrigSpacePointCounts_v1::setSctSpEndcapA
void setSctSpEndcapA(unsigned int setEA)
xAOD::TrigSpacePointCounts_v1::sctSpEndcapA
unsigned int sctSpEndcapA() const
xAODMaker::TrigSpacePointCountsCnvTool::TrigSpacePointCountsCnvTool
TrigSpacePointCountsCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: TrigSpacePointCountsCnvTool.cxx:16
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAODMaker
Definition: StoreGateSvc.h:72
xAOD::TrigSpacePointCounts_v1::setContentsPixelClusEndcapA
void setContentsPixelClusEndcapA(const std::vector< float > &contentsPixelClusEndcapA)
xAOD::TrigSpacePointCounts_v1::setContentsPixelClusBarrel
void setContentsPixelClusBarrel(const std::vector< float > &contentsPixelClusBarrel)
xAOD::TrigSpacePointCounts_v1::setPixelClusTotBins
void setPixelClusTotBins(unsigned int val_N)
TrigSpacePointCountsCollection
Definition: TrigSpacePointCountsCollection.h:20
TrigSpacePointCountsCollection.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TrigSpacePointCounts_v1::pixelClusSizeMin
float pixelClusSizeMin() const
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAOD::TrigSpacePointCounts_v1::setPixelClusSizeMin
void setPixelClusSizeMin(float val_min)
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::TrigSpacePointCounts_v1::setPixelClusTotMin
void setPixelClusTotMin(float val_min)
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::TrigSpacePointCounts
TrigSpacePointCounts_v1 TrigSpacePointCounts
Definition: Event/xAOD/xAODTrigMinBias/xAODTrigMinBias/TrigSpacePointCounts.h:11
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::TrigSpacePointCounts_v1::sctSpEndcapC
unsigned int sctSpEndcapC() const
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::TrigSpacePointCounts_v1
Definition: TrigSpacePointCounts_v1.h:12
xAODMaker::TrigSpacePointCountsCnvTool::convert
virtual StatusCode convert(const TrigSpacePointCountsCollection *aod, xAOD::TrigSpacePointCountsContainer *xaod) const override
Function that fills an existing xAOD::TrigSpacePointCountsContainer.
Definition: TrigSpacePointCountsCnvTool.cxx:35
xAOD::TrigSpacePointCounts_v1::pixelClusTotMin
float pixelClusTotMin() const
xAOD::TrigSpacePointCounts_v1::pixelClusSizeMax
float pixelClusSizeMax() const
AthAlgTool
Definition: AthAlgTool.h:26
xAOD::TrigSpacePointCounts_v1::pixelClusTotMax
float pixelClusTotMax() const
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.
TrigSpacePointCountsCnvTool.h
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::TrigSpacePointCounts_v1::contentsPixelClusBarrel
const std::vector< float > & contentsPixelClusBarrel() const
xAOD::TrigSpacePointCounts_v1::setSctSpBarrel
void setSctSpBarrel(unsigned int setB)
TrigSpacePointCounts.h
xAOD::TrigSpacePointCounts_v1::setPixelClusSizeBins
void setPixelClusSizeBins(unsigned int val_N)