Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Framework
GHEP
GHepVirtualList.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2020, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7
University of Liverpool & STFC Rutherford Appleton Laboratory
8
*/
9
//____________________________________________________________________________
10
11
#include <cassert>
12
#include <string>
13
14
#include <TLorentzVector.h>
15
16
#include "
Framework/GHEP/GHepParticle.h
"
17
#include "
Framework/GHEP/GHepVirtualList.h
"
18
#include "
Framework/GHEP/GHepStatus.h
"
19
#include "
Framework/Interaction/Interaction.h
"
20
#include "
Framework/Messenger/Messenger.h
"
21
#include "
Framework/ParticleData/PDGUtils.h
"
22
23
using
std::string
;
24
using namespace
genie
;
25
26
ClassImp
(
GHepVirtualList
)
27
28
//___________________________________________________________________________
29
GHepVirtualList
::
GHepVirtualList
() :
30
TClonesArray("
genie
::
GHepParticle
")
31
{
32
this->SetOwner(
false
);
33
}
34
//___________________________________________________________________________
35
GHepVirtualList::GHepVirtualList
(
int
size
) :
36
TClonesArray(
"genie::GHepParticle"
, size)
37
{
38
this->SetOwner(
false
);
39
}
40
//___________________________________________________________________________
41
GHepVirtualList::GHepVirtualList
(
const
GHepVirtualList
& vlist) :
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
//___________________________________________________________________________
59
GHepVirtualList::~GHepVirtualList
()
60
{
61
this->Clear();
62
}
63
//___________________________________________________________________________
GHepStatus.h
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
string
std::string string
Definition:
nybbler.cc:12
genie::GHepVirtualList::GHepVirtualList
GHepVirtualList()
genie::evtlib::Expand
void Expand(std::string &s)
Expand env vars/homedirs/wildcards in s.
Definition:
Utils.cxx:8
genie::GHepVirtualList::~GHepVirtualList
~GHepVirtualList()
Definition:
GHepVirtualList.cxx:59
util::size
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition:
StdUtils.h:92
genie::GHepVirtualList
A GHepVirtualList is a 'virtual' collection of GHepParticles. Is virtual because it does not own but ...
Definition:
GHepVirtualList.h:35
Interaction.h
GHepParticle.h
test.p
p
Definition:
test.py:223
Messenger.h
GHepVirtualList.h
ClassImp
ClassImp(GHepVirtualList) GHepVirtualList
Definition:
GHepVirtualList.cxx:26
PDGUtils.h
genie::GHepParticle
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition:
GHepParticle.h:39
Generated by
1.8.11