Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class TParticlePDG;
18
19class TParticleClassPDG : public TNamed {
20public:
21//------------------------------------------------------------------------------
22// data members
23//------------------------------------------------------------------------------
24protected:
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//------------------------------------------------------------------------------
35public:
36 // ****** constructors and destructor
37
38 TParticleClassPDG(const char* name = 0);
39 ~TParticleClassPDG() override;
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 void Print(Option_t* opt="") const override; // *MENU*
59
60 Bool_t IsFolder() const override { return kTRUE; }
61 void Browse(TBrowser* b) override;
62
63 ClassDefOverride(TParticleClassPDG,1) // PDG static particle definition
64};
65
66#endif
#define b(i)
Definition RSha256.hxx:100
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
winID h TVirtualViewer3D TVirtualGLPainter p
char name[80]
Definition TGX11.cxx:110
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Definition TNamed.cxx:51
An array of TObjects.
Definition TObjArray.h:31
Int_t GetEntriesFast() const
Definition TObjArray.h:58
TObject * At(Int_t idx) const override
Definition TObjArray.h:164
void Add(TObject *obj) override
Definition TObjArray.h:68
Mother of all ROOT objects.
Definition TObject.h:41
Utility class used internally by TDatabasePDG.
TObjArray * GetListOfParticles()
TParticlePDG * GetParticle(Int_t i)
void Browse(TBrowser *b) override
browse this particle class
TObjArray * fListOfParticles
void AddParticle(TObject *p)
~TParticleClassPDG() override
destructor, class doesn't own its particles...
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
TParticleClassPDG & operator=(const TParticleClassPDG &pcp)
TParticleClassPDG(const TParticleClassPDG &pcp)
void Print(Option_t *opt="") const override
Print the entire information of this kind of particle.
Description of the static properties of a particle.