ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollection.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GENERATOROBJECTSMCEVENTCOLLECTION_H
6#define GENERATOROBJECTSMCEVENTCOLLECTION_H 1
7
8
11#include "AtlasHepMC/GenEvent.h"
14
29
47
48inline
52
57
58
60{
61 if (this != &in) {
62 // Force a deep copy on the DataVector
63 //
64 for (const HepMC::GenEvent* ev : in)
65 {
67 auto ri = ev->run_info();
68 if (ri) {
69 std::shared_ptr<HepMC3::GenRunInfo> nri = std::make_shared<HepMC3::GenRunInfo>(*(ri.get()));
70 nev->set_run_info(std::move(nri));
71 }
72 // Fill barcodes attribute in copied GenEvent
75 }
76 }
77
78 return *this;
79}
80
81inline
84
85
87
88#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition DataVector.h:842
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
DataVector< HepMC::GenEvent >::iterator EventIterator
const HepMC::GenEvent * find(int evtNumber) const
McEventCollection & operator=(const McEventCollection &)
DataVector< HepMC::GenEvent >::const_iterator EventConstIterator
int ev
Definition globals.cxx:25
void fillBarcodesAttribute(GenEvent *e)
Definition GenEvent.h:393
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39