ATLAS Offline Software
ElectronContainer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /********************************************************************
6 
7 NAME: ElectronContainer.cxx
8 PACKAGE: offline/Reconstruction/egammaEvent
9 
10 ********************************************************************/
11 
12 // INCLUDE HEADER FILES:
13 
15 #include "egammaEvent/Electron.h"
16 #include <iomanip>
17 #include <iostream>
18 
19 // END OF HEADER FILES INCLUDE
20 
22  DataVector<Analysis::Electron>(ownPolicy)
23 {}
24 
25 // print objects found in container
27 {
28 
30 
31  std::cout << "Number of Electron objects in container "
32  << this->size() << std::endl;
33 
34  for (c_itr=begin(); c_itr!=end(); ++c_itr)
35  {
36  (*c_itr)->print();
37  }
38 }
ElectronContainer.h
ElectronContainer::ElectronContainer
ElectronContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
Definition: ElectronContainer.cxx:21
SG::OwnershipPolicy
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
Definition: OwnershipPolicy.h:16
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Electron.h
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
DataVector< Analysis::Electron >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Electron
Class describing an electron.
ElectronContainer::print
void print()
Definition: ElectronContainer.cxx:26
DataVector< Analysis::Electron >::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector< Analysis::Electron >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.