Logo ROOT  
Reference Guide
TParticleClassPDG.h
Go to the documentation of this file.
1 // @(#)root/eg:$Id$
2 // Author: Pasha Murat 12/02/99
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef TParticleClassPDG_hh
12 #define TParticleClassPDG_hh
13 
14 #include "TNamed.h"
15 #include "TObjArray.h"
16 
17 class TParticlePDG;
18 
19 class TParticleClassPDG : public TNamed {
20 public:
21 //------------------------------------------------------------------------------
22 // data members
23 //------------------------------------------------------------------------------
24 protected:
25  TObjArray* fListOfParticles; // list of (non-owned) particles
26 
29  {if(this!=&pcp) {TNamed::operator=(pcp); fListOfParticles=pcp.fListOfParticles;}
30  return *this;
31  }
32 //------------------------------------------------------------------------------
33 // functions
34 //------------------------------------------------------------------------------
35 public:
36  // ****** constructors and destructor
37 
38  TParticleClassPDG(const char* name = 0);
39  virtual ~TParticleClassPDG();
40  // ****** access methods
41 
44  }
45 
47  return (TParticlePDG*) fListOfParticles->At(i);
48  }
49 
51 
52  // ****** modifiers
53 
55 
56  // ****** overloaded methods of TObject
57 
58  virtual void Print(Option_t* opt="") const; // *MENU*
59 
60  Bool_t IsFolder() const { return kTRUE; }
61  virtual void Browse(TBrowser* b);
62 
63  ClassDef(TParticleClassPDG,1) // PDG static particle definition
64 };
65 
66 #endif
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TObjArray
An array of TObjects.
Definition: TObjArray.h:37
Option_t
const char Option_t
Definition: RtypesCore.h:66
TNamed::operator=
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Definition: TNamed.cxx:51
TParticleClassPDG::Browse
virtual void Browse(TBrowser *b)
browse this particle class
Definition: TParticleClassPDG.cxx:66
TParticleClassPDG::Print
virtual void Print(Option_t *opt="") const
Print the entire information of this kind of particle.
Definition: TParticleClassPDG.cxx:46
TParticleClassPDG::GetListOfParticles
TObjArray * GetListOfParticles()
Definition: TParticleClassPDG.h:50
TNamed.h
TParticlePDG
Description of the static properties of a particle.
Definition: TParticlePDG.h:19
TParticleClassPDG::operator=
TParticleClassPDG & operator=(const TParticleClassPDG &pcp)
Definition: TParticleClassPDG.h:28
TParticleClassPDG::~TParticleClassPDG
virtual ~TParticleClassPDG()
destructor, class doesn't own its particles...
Definition: TParticleClassPDG.cxx:35
TObjArray::At
TObject * At(Int_t idx) const
Definition: TObjArray.h:166
b
#define b(i)
Definition: RSha256.hxx:100
bool
TObjArray::Add
void Add(TObject *obj)
Definition: TObjArray.h:74
TParticleClassPDG::GetParticle
TParticlePDG * GetParticle(Int_t i)
Definition: TParticleClassPDG.h:46
TParticleClassPDG::AddParticle
void AddParticle(TObject *p)
Definition: TParticleClassPDG.h:54
TObjArray::GetEntriesFast
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TParticleClassPDG::fListOfParticles
TObjArray * fListOfParticles
Definition: TParticleClassPDG.h:25
TParticleClassPDG
Utility class used internally by TDatabasePDG.
Definition: TParticleClassPDG.h:19
TParticleClassPDG::GetNParticles
Int_t GetNParticles()
Definition: TParticleClassPDG.h:42
TParticleClassPDG::IsFolder
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TParticleClassPDG.h:60
TObjArray.h
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TParticleClassPDG::TParticleClassPDG
TParticleClassPDG(const TParticleClassPDG &pcp)
Definition: TParticleClassPDG.h:27
int