GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for genie::GHepVirtualList:
Collaboration graph
[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 cern.ch> University of Liverpool
Created:
July 16, 2005
License:
Copyright (c) 2003-2024, 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::GHepVirtualList ( )

Definition at line 29 of file GHepVirtualList.cxx.

29  :
30 TClonesArray("genie::GHepParticle")
31 {
32  this->SetOwner(false);
33 }
GHepVirtualList::GHepVirtualList ( int  size)

Definition at line 35 of file GHepVirtualList.cxx.

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

Definition at line 41 of file GHepVirtualList.cxx.

References genie::evtlib::Expand().

41  :
42 TClonesArray("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
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39
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: