GENIEGenerator
Loading...
Searching...
No Matches
InteractionList.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, 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
14
15using std::endl;
16using namespace genie;
17
18//____________________________________________________________________________
19namespace genie {
20 ostream & operator << (ostream & stream, const InteractionList & intl)
21 {
22 intl.Print(stream);
23
24 return stream;
25 }
26}
27//___________________________________________________________________________
29vector<Interaction *>()
30{
31
32}
33//___________________________________________________________________________
35vector<Interaction *>()
36{
37 this->Copy(intl);
38}
39//___________________________________________________________________________
44//___________________________________________________________________________
46{
47 InteractionList::const_iterator iter;
48
49 for(iter = this->begin(); iter != this->end(); ++iter) {
50 Interaction * interaction = *iter;
51 delete interaction;
52 interaction = 0;
53 }
54 this->clear();
55}
56//___________________________________________________________________________
58{
59 InteractionList::const_iterator iter;
60 for(iter = intl.begin(); iter != intl.end(); ++iter) {
61 Interaction * interaction = *iter;
62 this->push_back(new Interaction(*interaction));
63 }
64}
65//___________________________________________________________________________
67{
68 this->Reset();
69
70 InteractionList::const_iterator iter;
71 for(iter = intl.begin(); iter != intl.end(); ++iter) {
72 Interaction * interaction = *iter;
73 this->push_back(new Interaction(*interaction));
74 }
75}
76//___________________________________________________________________________
77void InteractionList::Print(ostream & stream) const
78{
79 InteractionList::const_iterator iter;
80
81 for(iter = this->begin(); iter != this->end(); ++iter) {
82 Interaction * interaction = *iter;
83 if(interaction) stream << *interaction;
84 else stream << "\n******** NULL INTERACTION ********" << endl;
85 }
86}
87//___________________________________________________________________________
89{
90 this->Copy(intl);
91 return (*this);
92}
93//___________________________________________________________________________
vector< vector< double > > clear
void Append(const InteractionList &intl)
InteractionList & operator=(const InteractionList &intl)
void Print(ostream &stream) const
void Copy(const InteractionList &intl)
Summary information for an interaction.
Definition Interaction.h:56
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)