ATLAS Offline Software
TOBArray.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 // TOBArray.cxx
5 // TopoCore
6 // Created by Joerg Stelzer on 11/17/12.
7 
8 #include "L1TopoEvent/TOBArray.h"
13 
14 #include <algorithm>
15 
16 void TCS::TOBArray::print(std::ostream &o) const {
17  for(const_iterator tob = m_data.begin(); tob != m_data.end(); ++tob) {
18  if( tob!=begin() ) o << std::endl;
19  o << **tob;
20  }
21 }
22 
23 void
25  m_data.push_back(CompositeTOB::createOnHeap(tob));
26 }
27 
28 void
30  std::sort(m_data.begin(), m_data.end(), fnc);
31 }
TCS::TOBArray::print
virtual void print(std::ostream &) const
Definition: TOBArray.cxx:16
TCS::DataArrayImpl< GenericTOB >::const_iterator
data_t::const_iterator const_iterator
Definition: DataArrayImpl.h:18
InputTOBArray.h
TCS::sort_fnc
bool() sort_fnc(GenericTOB *tob1, GenericTOB *tob2)
Definition: TOBArray.h:22
m_data
std::vector< T > m_data
Definition: TrackTruthMatchingBaseAlg.cxx:660
CompositeTOB.h
ClusterTOBArray.h
TCS::CompositeTOB::createOnHeap
static CompositeTOB * createOnHeap(const CompositeTOB &tob)
Definition: CompositeTOB.cxx:35
TCS::TOBArray::push_back
void push_back(const CompositeTOB &tob)
Definition: TOBArray.cxx:24
JetTOBArray.h
TCS::CompositeTOB
Definition: CompositeTOB.h:16
TCS::TOBArray::sort
void sort(sort_fnc)
Definition: TOBArray.cxx:29
TOBArray.h
TCS::DataArrayImpl< GenericTOB >::m_data
data_t m_data
Definition: DataArrayImpl.h:50
TCS::DataArrayImpl< GenericTOB >::begin
iterator begin()
Definition: DataArrayImpl.h:40
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623