ROOT  6.06/09
Reference Guide
TParticleClassPDG.cxx
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 
12 //______________________________________________________________________________
13 //
14 // Utility class used internally by TDatabasePDG
15 
16 #include "TDecayChannel.h"
17 #include "TParticlePDG.h"
18 #include "TParticleClassPDG.h"
19 
21 
22 ////////////////////////////////////////////////////////////////////////////////
23 ///default constructor
24 
26 {
27  fListOfParticles = new TObjArray(5);
28 }
29 
30 ////////////////////////////////////////////////////////////////////////////////
31 /// destructor, class doesn't own its particles...
32 
34  delete fListOfParticles;
35 }
36 
37 
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 ///
41 /// Print the entire information of this kind of particle
42 ///
43 
45 {
46  printf("Particle class: %-20s",GetName());
47  if (fListOfParticles) {
48  int banner_printed = 0;
50  TParticlePDG *p;
51  while ((p = (TParticlePDG*)next())) {
52  if (! banner_printed) {
53  p->Print("banner");
54  banner_printed = 1;
55  }
56  p->Print("");
57  }
58  }
59 }
60 
61 ////////////////////////////////////////////////////////////////////////////////
62 ///browse this particle class
63 
65 {
67 }
68 
69 
An array of TObjects.
Definition: TObjArray.h:39
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
const char Option_t
Definition: RtypesCore.h:62
virtual void Print(Option_t *opt="") const
Print the entire information of this kind of particle.
virtual void Print(Option_t *opt="") const
Print the entire information of this kind of particle.
virtual ~TParticleClassPDG()
destructor, class doesn't own its particles...
virtual void Browse(TBrowser *b)
browse this particle class
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
ClassImp(TParticleClassPDG) TParticleClassPDG
default constructor
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TObjArray * fListOfParticles
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
#define name(a, b)
Definition: linkTestLib0.cpp:5