00001 // @(#)root/eg:$Id: TParticleClassPDG.cxx 21393 2007-12-17 08:55:42Z brun $ 00002 // Author: Pasha Murat 12/02/99 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 //______________________________________________________________________________ 00013 // 00014 // Utility class used internally by TDatabasePDG 00015 00016 #include "TDecayChannel.h" 00017 #include "TParticlePDG.h" 00018 #include "TParticleClassPDG.h" 00019 00020 ClassImp(TParticleClassPDG) 00021 00022 //______________________________________________________________________________ 00023 TParticleClassPDG::TParticleClassPDG(const char* name): TNamed(name,name) 00024 { 00025 //default constructor 00026 fListOfParticles = new TObjArray(5); 00027 } 00028 00029 //______________________________________________________________________________ 00030 TParticleClassPDG::~TParticleClassPDG() { 00031 // destructor, class doesn't own its particles... 00032 00033 delete fListOfParticles; 00034 } 00035 00036 00037 00038 //______________________________________________________________________________ 00039 void TParticleClassPDG::Print(Option_t *) const 00040 { 00041 // 00042 // Print the entire information of this kind of particle 00043 // 00044 00045 printf("Particle class: %-20s",GetName()); 00046 if (fListOfParticles) { 00047 int banner_printed = 0; 00048 TIter next(fListOfParticles); 00049 TParticlePDG *p; 00050 while ((p = (TParticlePDG*)next())) { 00051 if (! banner_printed) { 00052 p->Print("banner"); 00053 banner_printed = 1; 00054 } 00055 p->Print(""); 00056 } 00057 } 00058 } 00059 00060 //______________________________________________________________________________ 00061 void TParticleClassPDG::Browse(TBrowser* b) 00062 { 00063 //browse this particle class 00064 if (fListOfParticles) fListOfParticles->Browse(b); 00065 } 00066 00067