]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/class.sh
Update master to aliroot
[u/mrichter/AliRoot.git] / HLT / PHOS / class.sh
CommitLineData
48b962f0 1classfilename=$1
2
3classfilename_h=$classfilename.h
4classfilename_cxx=$classfilename.cxx
5classname=$classfilename
6
7if [ -a $classfilename_h ] || [ -a $classfilename_cxx ];then
8 echo ERROR, $classfilename_h and $classfilename_cxx allready exist, delelte them or rename the class you want to make
9else
10 echo creating new files $classfilename_h and $classfilename_cxx
11 printf "#ifndef " > $classfilename_h
12 classguard=${classfilename_h/.h/_H}
13
14 echo $classguard | tr "[:lower:]" "[:upper:]" >> $classfilename_h
15 printf "#define " >> $classfilename_h
16 echo $classguard | tr "[:lower:]" "[:upper:]" >> $classfilename_h
17
18 printf "\n" >>$classfilename_h
19
20 printf "/**************************************************************************\n" >> $classfilename_h
21 printf " * This file is property of and copyright by the Experimental Nuclear *\n" >> $classfilename_h
22 printf " * Physics Group, Dep. of Physics *\n" >> $classfilename_h
23 printf " * University of Oslo, Norway, 2007 *\n" >> $classfilename_h
24 printf " * *\n" >> $classfilename_h
25 printf " * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*\n" >> $classfilename_h
26 printf " * Contributors are mentioned in the code where appropriate. *\n" >> $classfilename_h
27 printf " * Please report bugs to perthi@fys.uio.no *\n" >> $classfilename_h
28 printf " * *\n" >> $classfilename_h
29 printf " * Permission to use, copy, modify and distribute this software and its *\n" >> $classfilename_h
30 printf " * documentation strictly for non-commercial purposes is hereby granted *\n" >> $classfilename_h
31 printf " * without fee, provided that the above copyright notice appears in all *\n" >> $classfilename_h
32 printf " * copies and that both the copyright notice and this permission notice *\n" >> $classfilename_h
33 printf " * appear in the supporting documentation. The authors make no claims *\n" >> $classfilename_h
34 printf " * about the suitability of this software for any purpose. It is *\n" >> $classfilename_h
35 printf " * provided \"as is\" without express or implied warranty. *\n" >> $classfilename_h
36 printf " **************************************************************************/\n" >> $classfilename_h
37
38 printf "\n\n\n" >>$classfilename_h
39 printf "class " >> $classfilename_h
40 printf " $classname\n{\n\t$classname();\n\tvirtual ~$classname();\n};\n\n#endif\n" >> $classfilename_h
41
42 printf "/**************************************************************************\n" > $classfilename_cxx
43 printf " * This file is property of and copyright by the Experimental Nuclear *\n" >> $classfilename_cxx
44 printf " * Physics Group, Dep. of Physics *\n" >> $classfilename_cxx
45 printf " * University of Oslo, Norway, 2007 *\n" >> $classfilename_cxx
46 printf " * *\n" >> $classfilename_cxx
47 printf " * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*\n" >> $classfilename_cxx
48 printf " * Contributors are mentioned in the code where appropriate. *\n" >> $classfilename_cxx
49 printf " * Please report bugs to perthi@fys.uio.no *\n" >> $classfilename_cxx
50 printf " * *\n" >> $classfilename_cxx
51 printf " * Permission to use, copy, modify and distribute this software and its *\n" >> $classfilename_cxx
52 printf " * documentation strictly for non-commercial purposes is hereby granted *\n" >> $classfilename_cxx
53 printf " * without fee, provided that the above copyright notice appears in all *\n" >> $classfilename_cxx
54 printf " * copies and that both the copyright notice and this permission notice *\n" >> $classfilename_cxx
55 printf " * appear in the supporting documentation. The authors make no claims *\n" >> $classfilename_cxx
56 printf " * about the suitability of this software for any purpose. It is *\n" >> $classfilename_cxx
57 printf " * provided \"as is\" without express or implied warranty. *\n" >> $classfilename_cxx
58 printf " **************************************************************************/\n" >> $classfilename_cxx
59 printf "#include \"$classfilename_h\"\n\n" >> $classfilename_cxx
60 printf "$classname::$classname()\n{\n\n}\n\n" >> $classfilename_cxx
61 printf "$classname::~$classname()\n{\n\n}\n\n" >> $classfilename_cxx
62
63 emacs $classfilename_h &
64 emacs $classfilename_cxx &
65
66fi
67