GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InteractionList.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 
14 
15 using std::endl;
16 using namespace genie;
17 
18 //____________________________________________________________________________
19 namespace genie {
20  ostream & operator << (ostream & stream, const InteractionList & intl)
21  {
22  intl.Print(stream);
23 
24  return stream;
25  }
26 }
27 //___________________________________________________________________________
29 vector<Interaction *>()
30 {
31 
32 }
33 //___________________________________________________________________________
35 vector<Interaction *>()
36 {
37  this->Copy(intl);
38 }
39 //___________________________________________________________________________
41 {
42  this->Reset();
43 }
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 //___________________________________________________________________________
77 void 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 //___________________________________________________________________________
Summary information for an interaction.
Definition: Interaction.h:56
void Append(const InteractionList &intl)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
A vector of Interaction objects.
vector< vector< double > > clear
void Print(ostream &stream) const
void Copy(const InteractionList &intl)
InteractionList & operator=(const InteractionList &intl)