ATLAS Offline Software
PhotonContainer.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: PhotonContainer.cxx
8 PACKAGE: offline/Reconstruction/egammaEvent
9 
10 ********************************************************************/
11 
12 // INCLUDE HEADER FILES:
13 
15 #include "egammaEvent/Photon.h"
16 #include <iomanip>
17 #include <iostream>
18 
19 // END OF HEADER FILES INCLUDE
20 
22  DataVector<Analysis::Photon>(ownPolicy)
23 {}
24 
25 // print objects found in container
27 {
28 
30 
31  std::cout << "Number of Photon 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 }
Photon.h
PhotonContainer::PhotonContainer
PhotonContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
Definition: PhotonContainer.cxx:21
Photon
Class describing an photon
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
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
DataVector< Analysis::Photon >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
PhotonContainer::print
void print()
Definition: PhotonContainer.cxx:26
DataVector< Analysis::Photon >::size
size_type size() const noexcept
Returns the number of elements in the collection.
PhotonContainer.h
DataVector< Analysis::Photon >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.