GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BaryonResList.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::BaryonResList
5 
6 \brief Encapsulates a list of baryon resonances.
7 
8 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
9  University of Liverpool
10 
11 \created May 03, 2004
12 
13 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _BARYON_RES_LIST_H_
19 #define _BARYON_RES_LIST_H_
20 
21 #include <vector>
22 #include <iostream>
23 #include <string>
24 #include <iterator>
25 
27 
28 using std::vector;
29 using std::ostream;
30 using std::string;
31 
32 namespace genie {
33 
34 class BaryonResList;
35 ostream & operator << (ostream & stream, const BaryonResList & rl);
36 
38 {
39 public:
40 
41  BaryonResList();
42  BaryonResList(const BaryonResList & rl);
43  virtual ~BaryonResList();
44 
45  void DecodeFromNameList (string list, string delimiter = ",");
46 
47  unsigned int NResonances (void) const;
48  string ResonanceName (unsigned int ires) const;
49  Resonance_t ResonanceId (unsigned int ires) const;
50  int ResonancePdgCode (unsigned int ires) const;
51  bool Find (Resonance_t res) const;
52 
53  void Clear (void);
54  void Copy (const BaryonResList & rl);
55  void Print (ostream & stream) const;
56 
57  friend ostream & operator << (ostream & stream, const BaryonResList & rl);
58  auto begin() noexcept -> typename vector<Resonance_t>::iterator;
59  auto end() noexcept -> typename vector<Resonance_t>::iterator;
60  auto begin() const noexcept -> typename vector<Resonance_t>::const_iterator;
61  auto end() const noexcept -> typename vector<Resonance_t>::const_iterator;
62  auto cbegin() const noexcept -> typename vector<Resonance_t>::const_iterator;
63  auto cend() const noexcept -> typename vector<Resonance_t>::const_iterator;
64 
65 private:
66 
67  vector<Resonance_t> * fResVec;
68 };
69 
70 } // genie namepace
71 
72 #endif // _BARYON_RES_LIST_H_
vector< Resonance_t > * fResVec
Definition: BaryonResList.h:67
void Copy(const BaryonResList &rl)
void DecodeFromNameList(string list, string delimiter=",")
string ResonanceName(unsigned int ires) const
Encapsulates a list of baryon resonances.
Definition: BaryonResList.h:37
auto cbegin() const noexcept-> typename vector< Resonance_t >::const_iterator
enum genie::EResonance Resonance_t
unsigned int NResonances(void) const
auto cend() const noexcept-> typename vector< Resonance_t >::const_iterator
void Print(ostream &stream) const
friend ostream & operator<<(ostream &stream, const BaryonResList &rl)
bool Find(Resonance_t res) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
auto end() noexcept-> typename vector< Resonance_t >::iterator
int ResonancePdgCode(unsigned int ires) const
auto begin() noexcept-> typename vector< Resonance_t >::iterator
Resonance_t ResonanceId(unsigned int ires) const