1 /******************************************************************************
2 * T H E R M I N A T O R *
3 * THERMal heavy-IoN generATOR *
6 * Authors of the model: Wojciech Broniowski, Wojciech.Broniowski@ifj.edu.pl, *
7 * Wojciech Florkowski, Wojciech.Florkowski@ifj.edu.pl *
8 * Authors of the code: Adam Kisiel, kisiel@if.pw.edu.pl *
9 * Tomasz Taluc, ttaluc@if.pw.edu.pl *
10 * Code designers: Adam Kisiel, Tomasz Taluc, Wojciech Broniowski, *
11 * Wojciech Florkowski *
13 * For the detailed description of the program and furhter references *
14 * to the description of the model plesase refer to: nucl-th/0011222, *
15 * accessibile at: http://www.arxiv.org/nucl-th/0011222 *
17 * Homepage: http://hirg.if.pw.edu.pl/en/therminator/ *
19 * This code can be freely used and redistributed. However if you decide to *
20 * make modifications to the code, please contact the authors, especially *
21 * if you plan to publish the results obtained with such modified code. *
22 * Any publication of results obtained using this code must include the *
23 * reference to nucl-ex/0011222 and the published version of it, when *
26 *****************************************************************************/
27 #include "ParticleDB.h"
29 ParticleDB::ParticleDB()
31 mParticleTable.clear();
32 mParticleNames.clear();
35 ParticleDB::~ParticleDB()
40 ParticleDB::AddParticleType(ParticleType *aPartType)
42 mParticleTable.push_back(*aPartType);
43 mParticleNames[aPartType->GetName()] = mParticleTable.size()-1;
44 return mParticleTable.size()-1;
48 ParticleDB::GetParticleType(int aIndex)
50 return &(mParticleTable[aIndex]);
54 ParticleDB::GetParticleType(std::string aName)
56 return &(mParticleTable[mParticleNames[aName]]);
60 ParticleDB::GetParticleTypeIndex(std::string aName)
62 return mParticleNames[aName];
66 ParticleDB::GetParticleTypeCount()
68 return mParticleTable.size();
72 ParticleDB::ExistsParticleType(std::string aName)
74 return mParticleNames.count(aName);