GENIEGenerator
Loading...
Searching...
No Matches
GHepVirtualList.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, The GENIE Collaboration
4 For the full text of the license visit http://copyright.genie-mc.org
5
6 Costas Andreopoulos <c.andreopoulos \at cern.ch>
7 University of Liverpool
8*/
9//____________________________________________________________________________
10
11#include <cassert>
12#include <string>
13
14#include <TLorentzVector.h>
15
22
23using std::string;
24using namespace genie;
25
27
28//___________________________________________________________________________
30TClonesArray("genie::GHepParticle")
31{
32 this->SetOwner(false);
33}
34//___________________________________________________________________________
36TClonesArray("genie::GHepParticle", size)
37{
38 this->SetOwner(false);
39}
40//___________________________________________________________________________
42TClonesArray("genie::GHepParticle", vlist.GetEntries())
43{
44 this->SetOwner(false);
45
46 // clean up
47 this->Clear();
48
49 // adjust size
50 this->Expand(vlist.GetEntries());
51
52 // copy event record entries
53 unsigned int ientry = 0;
54 GHepParticle * p = 0;
55 TIter ghepiter(&vlist);
56 while ( (p = (GHepParticle *) ghepiter.Next()) ) (*this)[ientry++] = p;
57}
58//___________________________________________________________________________
60{
61 this->Clear();
62}
63//___________________________________________________________________________
ClassImp(GHepVirtualList) GHepVirtualList
STDHEP-like event record entry that can fit a particle or a nucleus.
A GHepVirtualList is a 'virtual' collection of GHepParticles. Is virtual because it does not own but ...
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25