ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSegmentCombination.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8namespace Muon {
9
14
19
24
26 {
27 if( this != &segc ){
28 clear();
29 copy( segc );
30 }
31 return *this;
32 }
33
35 {
36 m_nGood[0]=segc.getNGoodCscLayers(0);
37 m_nGood[1]=segc.getNGoodCscLayers(1);
38 unsigned int nst( segc.numberOfStations() );
39 for( unsigned int i=0;i<nst;++i ){
40 SegmentVec::const_iterator vit = segc.stationSegments( i )->begin();
41 SegmentVec::const_iterator vit_end = segc.stationSegments( i )->end();
42 std::unique_ptr<SegmentVec> newsegs(new SegmentVec());
43 for( ; vit!=vit_end; ++vit ) newsegs->push_back( std::unique_ptr<MuonSegment>((*vit)->clone()) );
44 m_segmentsPerStation.push_back(std::move(newsegs));
45 }
46 }
47
49 {
50 SegmentVecVec::iterator it = m_segmentsPerStation.begin();
51 SegmentVecVec::iterator it_end = m_segmentsPerStation.end();
52
53 for( ; it!=it_end; ++it ){
54 SegmentVec::iterator vit = (*it)->begin();
55 SegmentVec::iterator vit_end = (*it)->end();
56 for( ; vit!=vit_end; ++vit ) (*vit).reset();
57 (*it)->clear();
58 (*it).reset();
59 }
61 }
62
63}
MuonSegmentCombination()
Default constructor.
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
void copy(const MuonSegmentCombination &segc)
copy data
MuonSegmentCombination & operator=(const MuonSegmentCombination &)
assigment operator
unsigned int numberOfStations() const
Number of stations with segment.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.