laura is hosted by Hepforge, IPPP Durham
Laura++  v1r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauDatabasePDG.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2008 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
23 #ifndef LAU_DATABASE_PDG
24 #define LAU_DATABASE_PDG
25 
26 #include <map>
27 #include "TString.h"
28 
29 class TDatabasePDG;
30 class LauParticlePDG;
31 
33 
34  public:
36 
40  static const LauParticlePDG* particle(Int_t code);
41 
43 
47  static const LauParticlePDG* particle(const TString& string);
48 
50 
54  static Int_t code(const TString& string);
55 
57 
61  static TString string(Int_t code);
62 
63  private:
64  // private methods
65 
68 
71 
73  LauDatabasePDG( const LauDatabasePDG& other );
74 
76  LauDatabasePDG& operator=( const LauDatabasePDG& other );
77 
79  static LauDatabasePDG& get();
80 
82  void addMissingParticles();
83 
85 
89  const LauParticlePDG* createParticle(Int_t theCode);
90 
92 
96  const LauParticlePDG* createParticle(const TString& theString);
97 
99 
103  Int_t pdgCode(const TString& theString);
104 
106 
110  TString pdgName(Int_t theCode);
111 
112  // private data
113 
116 
118  TDatabasePDG* theDatabase_;
119 
121  typedef std::map<Int_t,const LauParticlePDG*> LauPDGList;
122 
125 
127  const Bool_t debug_;
128 
129  ClassDef(LauDatabasePDG,0)
130 
131 };
132 
133 #endif
TDatabasePDG * theDatabase_
The ROOT database.
Class for storing particle properties.
~LauDatabasePDG()
Destructor.
TString pdgName(Int_t theCode)
Get the associated name string for a given pdgCode.
const Bool_t debug_
Debug flag - set in constructor.
LauDatabasePDG()
Constructor.
void addMissingParticles()
Add particles to the ROOT database that are missing from the default setup.
Singleton class that provides access to particle property records.
LauDatabasePDG & operator=(const LauDatabasePDG &other)
Copy assignment (not implemented)
static const LauParticlePDG * particle(Int_t code)
Get particle object based on the PDG code.
static LauDatabasePDG * theInstance_
The singleton instance.
std::map< Int_t, const LauParticlePDG * > LauPDGList
The type to hold the list of wrapped particle objects.
const LauParticlePDG * createParticle(Int_t theCode)
Create particle in the database for a given PDG code and return the new particle. ...
LauPDGList particles_
The list of particle objects.
Int_t pdgCode(const TString &theString)
Get the associated pdgCode for a given particle name string.
static Int_t code(const TString &string)
Method to convert from a particle name string into a PDG code.
static TString string(Int_t code)
Method to convert from a PDG code to a particle name string.