GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
genie::InteractionList Class Reference

A vector of Interaction objects. More...

#include <InteractionList.h>

Inheritance diagram for genie::InteractionList:
Inheritance graph
[legend]
Collaboration diagram for genie::InteractionList:
Collaboration graph
[legend]

Public Member Functions

 InteractionList ()
 
 InteractionList (const InteractionList &intl)
 
 ~InteractionList ()
 
void Reset (void)
 
void Append (const InteractionList &intl)
 
void Copy (const InteractionList &intl)
 
void Print (ostream &stream) const
 
InteractionListoperator= (const InteractionList &intl)
 

Friends

ostream & operator<< (ostream &stream, const InteractionList &intl)
 

Detailed Description

A vector of Interaction objects.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
May 13, 2005
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 34 of file InteractionList.h.

Constructor & Destructor Documentation

InteractionList::InteractionList ( )

Definition at line 28 of file InteractionList.cxx.

28  :
29 vector<Interaction *>()
30 {
31 
32 }
InteractionList::InteractionList ( const InteractionList intl)

Definition at line 34 of file InteractionList.cxx.

References Copy().

34  :
35 vector<Interaction *>()
36 {
37  this->Copy(intl);
38 }
void Copy(const InteractionList &intl)
InteractionList::~InteractionList ( )

Definition at line 40 of file InteractionList.cxx.

References Reset().

41 {
42  this->Reset();
43 }

Member Function Documentation

void InteractionList::Append ( const InteractionList intl)

Definition at line 57 of file InteractionList.cxx.

Referenced by genie::XSecAlgorithmMap::BuildMap(), and genie::InteractionGeneratorMap::BuildMap().

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 }
Summary information for an interaction.
Definition: Interaction.h:56
void InteractionList::Copy ( const InteractionList intl)

Definition at line 66 of file InteractionList.cxx.

References Reset().

Referenced by InteractionList(), and operator=().

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 }
Summary information for an interaction.
Definition: Interaction.h:56
InteractionList & InteractionList::operator= ( const InteractionList intl)

Definition at line 88 of file InteractionList.cxx.

References Copy().

89 {
90  this->Copy(intl);
91  return (*this);
92 }
void Copy(const InteractionList &intl)
void InteractionList::Print ( ostream &  stream) const

Definition at line 77 of file InteractionList.cxx.

Referenced by genie::operator<<().

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 }
Summary information for an interaction.
Definition: Interaction.h:56
void InteractionList::Reset ( void  )

Definition at line 45 of file InteractionList.cxx.

References clear.

Referenced by Copy(), and ~InteractionList().

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 }
Summary information for an interaction.
Definition: Interaction.h:56
vector< vector< double > > clear

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const InteractionList intl 
)
friend

Definition at line 20 of file InteractionList.cxx.

21  {
22  intl.Print(stream);
23 
24  return stream;
25  }
void Print(ostream &stream) const

The documentation for this class was generated from the following files: