StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MyPackageFancy.cxx
1 // $Id: MyPackageFancy.cxx,v 1.2 2009/11/24 22:23:25 fine Exp $
2 //*-- Author : Valery Fine(fine@bnl.gov) 24/11/2009
3 #include <stdlib.h>
4 #include <stdio.h>
5 #include "TString.h"
6 #include "TSystem.h"
7 
8 namespace {
9 // the text inside of namespace is a copy of the standalone application
10 #include "MyPackage.cxx"
11 }
12 
13 int MyPackageFancy(const char *infile="$USER/example.list"
14  , const char *outfile = "$SCRATCH/example.root")
15 {
16  TString sInFile = infile;
17  TString sOutFile = outfile;
18  // expand the environment variables if needed
19  gSystem->ExpandPathName(sInFile);
20  gSystem->ExpandPathName(sOutFile);
21 
22  char *argv[] = {(char*)"MyPackageFuncy",(char*) sInFile.Data(),(char*) sOutFile.Data() };
23 
24  printf( "\n\nUsage: root.exe -b -l -q \'%s.cxx+[(\"input_file\" [,\"output_file\"])\']\n",argv[0]);
25  printf( "------ The square brackets [] are to show the optional components\n");
26 
27  return main(3, argv);
28 }
29