GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GHepVirtualList.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, 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 
23 using std::string;
24 using namespace genie;
25 
27 
28 //___________________________________________________________________________
30 TClonesArray("genie::GHepParticle")
31 {
32  this->SetOwner(false);
33 }
34 //___________________________________________________________________________
36 TClonesArray("genie::GHepParticle", size)
37 {
38  this->SetOwner(false);
39 }
40 //___________________________________________________________________________
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 }
58 //___________________________________________________________________________
60 {
61  this->Clear();
62 }
63 //___________________________________________________________________________
void Expand(std::string &s)
Expand env vars/homedirs/wildcards in s.
Definition: Utils.cxx:8
A GHepVirtualList is a &#39;virtual&#39; collection of GHepParticles. Is virtual because it does not own but ...
ClassImp(CacheBranchFx)
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39