Re: [ROOT] pdg.dat

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Mon Nov 05 2001 - 15:26:29 MET


Hi Rene et al,

On Mon, 05 Nov 2001 11:52:07 +0000
Rene Brun <Rene.Brun@cern.ch> wrote
concerning "Re: [ROOT] pdg.dat":
> The TDatabasePDG class is initialized by reading
> $ROOTSYS/etc/pdg_table.txt by default. 

There's in fact problem here if you build ROOT with the configure
option --prefix, since the class TDatabasePDG does not implment the
choice of etcdir.   The lines are now: 

  if (strlen(FileName) == 0) {
    sprintf(default_name,"%s/etc/pdg_table.txt",gSystem->Getenv("ROOTSYS"));
    fn = gEnv->GetValue("Root.DatabasePDG",default_name);
  }
  else {
    fn = FileName;
  } 

They should be something like 

    if (!FileName  || !FileName[0] == '\0')
      fn = gEnv->GetValue("Root.DatabasePDG",Form(
  #ifdef   ROOTETCDIR
  	                                          "%s/pdg_table.txt", 
                                                  ROOTETCDIR
  #else 
                                                  "%s/etc/pdg_table.txt", 
                                                  gSystem->Getenv("ROOTSYS")
  #endif
      );
    else 
      fn = FileName;

(I don't like to use C functions if C++/ROOT alternatives exists :-)

Yours, 

Christian Holm Christensen -------------------------------------------
Address: Sankt Hansgade 23, 1. th.           Phone:  (+45) 35 35 96 91 
         DK-2200 Copenhagen N                Cell:   (+45) 28 82 16 23
         Denmark                             Office: (+45) 353  25 305 
Email:   cholm@nbi.dk                        Web:    www.nbi.dk/~cholm



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:06 MET