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:

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 <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

July 16, 2005

Copyright (c) 2003-2020, 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

genie::GHepVirtualList::GHepVirtualList ( )
GHepVirtualList::GHepVirtualList ( int  size)

Definition at line 35 of file GHepVirtualList.cxx.

35  :
36 TClonesArray("genie::GHepParticle", size)
37 {
38  this->SetOwner(false);
39 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
GHepVirtualList::GHepVirtualList ( const GHepVirtualList vlist)

Definition at line 41 of file GHepVirtualList.cxx.

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
p
Definition: test.py:223
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: