GENIEGenerator
Loading...
Searching...
No Matches
genie::GHepVirtualList Class Reference

A GHepVirtualList is a 'virtual' collection of GHepParticles. Is virtual because it does not own but only points to GHepParticles owned by the generated GHepRecord. Use it if in your event generation algorithm you need to define & use a GHepRecord subset (without duplicating the GHepParticle entries) All 'named' lists are managed by the GHepVirtualListFolder singleton and get cleared after the generation of each event is completed. More...

#include <GHepVirtualList.h>

Inheritance diagram for genie::GHepVirtualList:
[legend]
Collaboration diagram for genie::GHepVirtualList:
[legend]

Public Member Functions

 GHepVirtualList ()
 GHepVirtualList (int size)
 GHepVirtualList (const GHepVirtualList &vlist)
 ~GHepVirtualList ()

Detailed Description

A GHepVirtualList is a 'virtual' collection of GHepParticles. Is virtual because it does not own but only points to GHepParticles owned by the generated GHepRecord. Use it if in your event generation algorithm you need to define & use a GHepRecord subset (without duplicating the GHepParticle entries) All 'named' lists are managed by the GHepVirtualListFolder singleton and get cleared after the generation of each event is completed.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n July 16, 2005
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 35 of file GHepVirtualList.h.

Constructor & Destructor Documentation

◆ GHepVirtualList() [1/3]

genie::GHepVirtualList::GHepVirtualList ( )

References GHepVirtualList().

Referenced by GHepVirtualList(), and GHepVirtualList().

◆ GHepVirtualList() [2/3]

GHepVirtualList::GHepVirtualList ( int size)

Definition at line 35 of file GHepVirtualList.cxx.

35 :
36TClonesArray("genie::GHepParticle", size)
37{
38 this->SetOwner(false);
39}

◆ GHepVirtualList() [3/3]

GHepVirtualList::GHepVirtualList ( const GHepVirtualList & vlist)

Definition at line 41 of file GHepVirtualList.cxx.

41 :
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}
void Expand(std::string &s)
Expand env vars/homedirs/wildcards in s.
Definition Utils.cxx:8

References GHepVirtualList().

◆ ~GHepVirtualList()

GHepVirtualList::~GHepVirtualList ( )

Definition at line 59 of file GHepVirtualList.cxx.

60{
61 this->Clear();
62}

The documentation for this class was generated from the following files: