GENIEGenerator
Loading...
Searching...
No Matches
genie::InteractionList Class Reference

A vector of Interaction objects. More...

#include <InteractionList.h>

Inheritance diagram for genie::InteractionList:
[legend]
Collaboration diagram for genie::InteractionList:
[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 \at cern.ch> University of Liverpool
Created:\n May 13, 2005
License:\n Copyright (c) 2003-2025, 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() [1/2]

InteractionList::InteractionList ( )

Definition at line 28 of file InteractionList.cxx.

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

Referenced by Append(), Copy(), InteractionList(), operator<<, and operator=().

◆ InteractionList() [2/2]

InteractionList::InteractionList ( const InteractionList & intl)

Definition at line 34 of file InteractionList.cxx.

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

References Copy(), and InteractionList().

◆ ~InteractionList()

InteractionList::~InteractionList ( )

Definition at line 40 of file InteractionList.cxx.

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

References Reset().

Member Function Documentation

◆ Append()

void InteractionList::Append ( const InteractionList & intl)

Definition at line 57 of file InteractionList.cxx.

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}

References InteractionList().

◆ Copy()

void InteractionList::Copy ( const InteractionList & intl)

Definition at line 66 of file InteractionList.cxx.

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}

References InteractionList(), and Reset().

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

◆ operator=()

InteractionList & InteractionList::operator= ( const InteractionList & intl)

Definition at line 88 of file InteractionList.cxx.

89{
90 this->Copy(intl);
91 return (*this);
92}

References Copy(), and InteractionList().

◆ Print()

void InteractionList::Print ( ostream & stream) const

Definition at line 77 of file InteractionList.cxx.

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}

Referenced by operator<<.

◆ Reset()

void InteractionList::Reset ( void )

Definition at line 45 of file InteractionList.cxx.

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}
vector< vector< double > > clear

References clear.

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

◆ operator<<

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

References InteractionList(), and Print().


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