Re: Load things in shell script.

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Tue Sep 24 2002 - 10:49:05 EDT

  • Next message: Christian Holm Christensen: "Re: Load things in shell script."

    Hi David, 
    
    David Sandberg <sandberg@hilux06.nbi.dk> wrote concerning
    Re: Load things in shell script. [Tue, 24 Sep 2002 16:35:02 +0200 (CEST)]
    ----------------------------------------------------------------------
    > Tjena.
    > 
    > I am talking about .sh shell. In the original script there is no error 
    > makeSpectra .C only in mail.
    > 
    > Basically I am trying something like 
    > 
    > #!/bin/sh 
    > 
    > bratroot -b -l <<EOF
    > #include "makeSpectra.C"
    > cout << "Hello from makeSpectra.C" << endl;
    > gSystem->Load("/nfs/hehi/hehi26/hehi/sandberg/brahms_app/pc_app/brag/acceptance/libAcceptance.so");
    > gROOT->LoadMacro("HelpFunctions.C");
    > plot90_350A();
    > .q
    > EOF
    > 
    > gSystem->Load and 
    > gROOT->LoadMacro 
    > are taken directly from LoadLibs.C, which I execute in bratroot 
    > .x LoadLibs.C
    
    You can just do 
    
      #!/bin/sh 
    
      bratroot -l -b <<EOF 
      .L makeSpectra.C
      ...
      EOF  
    
    That's it.  But, 
    
      #!/bin/sh 
    
      bratroot -l -b <<EOF 
      gROOT->LoadMacro("makeSpectra.C");
      ...
      EOF  
    
    is more or less the same.  And both should work iff ROOT's script
    search path contains a script called `makeSpectra.C'. 
    
    > 
    > On Tue, 24 Sep 2002, Christian Holm Christensen wrote:
    > 
    > > Hi David, 
    > > 
    > > [Questions like this to the list - please!] 
    > > 
    
    Please David, to the list.
    
    Yours, 
    
     ____ |  Christian Holm Christensen 
      |_| |	 -------------------------------------------------------------
        | |	 Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
         _|	          DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
        _|	          Denmark                    Office: (+45) 353  25 305
     ____|	 Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
     | |
    



    This archive was generated by hypermail 2b30 : Tue Sep 24 2002 - 11:34:10 EDT