diff --git a/Tools/AlgorithmToolSetup/CMakeLists.txt b/Tools/AlgorithmToolSetup/CMakeLists.txt deleted file mode 100644 index d5d49bc1323ff3a0e49be9cab6f606b3c11f5aef..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# Package: AlgorithmToolSetup -################################################################################ - -# Declare the package name: -atlas_subdir( AlgorithmToolSetup ) - -# Install files from the package: -atlas_install_runtime( src/*.templ src/*.txt share/AlgorithmToolSetup.sh ) -atlas_install_scripts( share/*.sh ) - diff --git a/Tools/AlgorithmToolSetup/ReadMe b/Tools/AlgorithmToolSetup/ReadMe deleted file mode 100755 index 4649a0c885ec2a50ac595f48d439366588c04aba..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/ReadMe +++ /dev/null @@ -1,41 +0,0 @@ -This tool is meant to do the repetitive part in setting up a new Tool or a new Algorithm. It is also set up in a way to encourage clean -programming, following the conventions for software development in Atlas. Just start the shell script corresponding -to your shell (.sh or .csh), it will inquire everything it needs to know interactively. Make sure that your environment is set up properly, -the utility is working in the directory specified by $TestArea. The utility directory is for the time being assumed to be directly under the -$TestArea directory. Please make sure that the utility directory is located correctly. Once the tool is in CVS, the directory will -automatically be located correctly, when it is checked out. - -What the utility does: - -- If the package directory for the new algorithm specified by the user - does not yet exist, the package directory will be set up, including subdirectories. - Otherwise, the files for the new algorithm or tool will be inserted in the already existing directory. - -- It creates all files necessary for the new algorithm/tool to be compiled (Although, of course, the code won't do - much at this stage.) For a new tool, named (by the user) 'NewTool', part of the package 'NewPackage' in the directory - '$TestArea/NewPath' the following files are created : - ../NewPath/NewPackage: - ChangeLog - ../NewPath/NewPackage/cmt: - requirements - ../NewPath/NewPackage/doc: - mainpage.h - ../NewPath/NewPackage/NewPackage: - INewTool.h (interface only for Tools, will not be created for algorithms) - NewTool.h - ../NewPath/NewPackage/share: - ../NewPath/NewPackage/src: - NewTool.cxx - ../NewPath/NewPackage/src/components: - NewPackage_entries.cxx - NewPackage_load.cxx - -If the new algorithm/tool is inserted into an already existing package, the ChangeLog, the requirements and the mainpage file -as well as the files in the components directory are not created. A standard entry is added to the ChangeLog. -However, the files in the components directory have to be edited by hand, when an algorithm/tool is added to an existing -package in order to make it compile. - -Tools created by the utility are always derived from an Interface. The interface is always placed in the same directory -as the Tool's header file. - -Martin Siebel <Martin.Siebel@CERN.ch>, May 2006 \ No newline at end of file diff --git a/Tools/AlgorithmToolSetup/share/AlgorithmToolSetup.sh b/Tools/AlgorithmToolSetup/share/AlgorithmToolSetup.sh deleted file mode 100755 index 88c977712890f03240b6f4faff1b7b7982b43529..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/share/AlgorithmToolSetup.sh +++ /dev/null @@ -1,295 +0,0 @@ -#!/usr/local/bin/bash -# -# Basic Utility to create standard athena algorithms or tools -# M.Siebel, 05.2006 <Martin.Siebel@CERN.ch> -# -binDir=`dirname $0` -srcDir=`dirname $binDir` -# -# inquiry section -# -echo -echo -cat $srcDir/introAlgorithmToolSetup.txt -echo -echo " o-----------------------o" -echo " | Do you want to set up |" -echo " | |" -echo " | (1) a Tool |" -echo " | (2) an Algorithm |" -echo " o-----------------------o" -echo -isTool=" " -while [ "${isTool}" != "1" -a "${isTool}" != "2" ] -do - read isTool - if [ "$isTool" != "1" -a "$isTool" != "2" ] - then - echo " Please enter only '1' or '2' " - fi -done -algName="" -while [ "$algName" == "" ] -do - if [ $isTool = 1 ] - then - echo - echo " o-----------------------------o" - echo " | Please enter the TOOL NAME: |" - echo " o-----------------------------o" - echo - else - echo - echo " o----------------------------------o" - echo " | Please enter the ALGORITHM NAME: |" - echo " o----------------------------------o" - echo - fi - read algName -done -packageName="" -while [ "$packageName" == "" ] -do - echo - echo " o---------------------------------------------------o" - echo " | Please enter the PACKAGE NAME (e.g. RecExCommon): |" - echo " o---------------------------------------------------o" - echo - read packageName -done -packageDir="" -while [ "$packageDir" == "" ] -do - echo - echo " o--------------------------------------------------o" - echo " | Please enter the PACKAGE PATH beyond '/offline/' |" - echo " | and without the new package's directory |" - echo " | (e.g. Reconstruction/RecExample ): |" - echo " o--------------------------------------------------o" - echo - read packageDir -done -thisDir=`pwd` -targetDir=$thisDir/$packageDir/$packageName -if [ -d $targetDir ] -then - echo - echo " The Package $packageDir/$packageName does already exist. Do you want to insert $algName into it? (y/n)" - echo - answer=" " - while [ "$answer" != "y" -a "$answer" != "n" ] - do - read answer - if [ $answer = "y" ] - then - if [ -e ${targetDir}/${packageName}/${algName}.h ] - then - echo - echo " The file $targetDir/$packageName/$algName.h already exists. --> Cancel setup" - echo " Have a nice day ..." - exit 1 - else - isInsert=1 - fi - elif [ "$answer" = "n" ] - then - echo - echo " Have a nice day ... bye!" - exit 1 - else - echo " Please answer only with 'y' or 'n' " - fi - done -else - echo - echo " The Package $packageDir/$packageName does not exist. Do you want to create it? (y/n)" - echo - answer=" " - while [ "$answer" != "y" -a "$answer" != "n" ] - do - read answer - if [ "$answer" = "y" ] - then - isInsert=0 - elif [ "$answer" = "n" ] - then - echo - echo " Have a nice day ... bye!" - exit 1 - else - echo " Please answer only with 'y' or 'n' " - fi - done -fi -answer="n" -nameSpace="" -while [ "$nameSpace" == "" -a "$answer" != "yes" ] -do - echo - echo " o--------------------------------------------------o" - echo " | Please enter the NAMESPACE (e.g. Trk,InDet,...): |" - echo " o--------------------------------------------------o" - echo - read nameSpace - if [ "$nameSpace" == "" ] - then - echo - echo " *###################################################*" - echo " # #" - echo " # W A R N I N G ! #" - echo " # #" - echo " # You did not specify a namespace for your code #" - echo " # The use of namespaces is #" - echo " # ** REQUIRED ** #" - echo " # by ATLAS C++ Coding Standards. #" - echo " # (see coding standards document, par. 2.4/NC4) #" - echo " # #" - echo " # If you are positively sure you want to #" - echo " # proceed without a namespace type yes, #" - echo " # type anything else to return and choose #" - echo " # a namespace. #" - echo " # #" - echo " *###################################################*" - echo - read answer - fi -done -authorName="" -while [ "$authorName" == "" ] -do - echo - echo " o----------------------------o" - echo " | Please enter YOUR NAME: |" - echo " | (not as mail address, that |" - echo " | will be the next question)|" - echo " o----------------------------o" - echo - read authorName -done -authorMail="" -while [ "$authorMail" == "" ] -do - echo - echo " o-----------------------------------o" - echo " | Please enter YOUR E-MAIL ADDRESS: |" - echo " o-----------------------------------o" - echo - read authorMail -done -# -# create directories -# -if [ $isInsert -eq 0 ] -then - echo " Setting up directory" - mkdir -p $targetDir - mkdir -p $targetDir/$packageName - mkdir -p $targetDir/src - mkdir -p $targetDir/src/components - mkdir -p $targetDir/cmt - mkdir -p $targetDir/doc -fi -# -# copy files -# -echo " Setting up basic files" -if [ $isTool -eq 1 ] -then - type="tool" - cp $srcDir/interface_tool.templ $targetDir/$packageName/I${algName}.h -else - type="alg" -fi -cp $srcDir/source_$type.templ $targetDir/src/$algName.cxx -cp $srcDir/header_$type.templ $targetDir/src/$algName.h -if [ $isInsert -eq 0 ] -then - cp $srcDir/requirements.templ $targetDir/cmt/requirements - cp $srcDir/version.templ $targetDir/cmt/version.cmt - cp $srcDir/mainpage.templ $targetDir/doc/mainpage.h - cp $srcDir/entries_$type.templ $targetDir/src/components/${packageName}_entries.cxx - cp $srcDir/load.templ $targetDir/src/components/${packageName}_load.cxx - cp $srcDir/ChangeLog.templ $targetDir/ChangeLog -else - # Add to ChangeLog - mv $targetDir/ChangeLog $targetDir/ChangeLog.tmp - cp $srcDir/ChangeLog.templ $targetDir/ChangeLog - cat $targetDir/ChangeLog.tmp >> $targetDir/ChangeLog - rm -f $targetDir/ChangeLog.tmp -fi -# -# replace keys -# -cppKey=`echo "${nameSpace}${algName}" | tr "[:lower:]" "[:upper:]"` -today=`date +%F` -fileList="$targetDir/src/$algName.cxx $targetDir/src/$algName.h $targetDir/ChangeLog" -if [ $isInsert -eq 0 ] -then - fileList="$fileList $targetDir/cmt/requirements $targetDir/cmt/version.cmt $targetDir/doc/mainpage.h $targetDir/src/components/${packageName}_entries.cxx $targetDir/src/components/${packageName}_load.cxx" -fi -if [ $isTool -eq 1 ] -then - fileList="$fileList $targetDir/$packageName/I${algName}.h" -fi -echo " Editing files: " $fileList -for file in $fileList -do - cat $file |sed s/@algName@/$algName/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@packageName@/$packageName/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@authorName@/"$authorName"/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@CppKey@/$cppKey/g > ${file}.tmp ; mv -f ${file}.tmp $file - if [ "$nameSpace" != "" ] - then - cat $file |sed s/@nameSpace@/$nameSpace/g > ${file}.tmp ; mv -f ${file}.tmp $file - else - cat $file |sed s/@nameSpace@::/" "/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed 's#namespace @nameSpace@#// No NameSpace selected#g' > ${file}.tmp ; mv -f ${file}.tmp $file - fi - cat $file |sed s/@authorMail@/"$authorMail"/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@date@/$today/g > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@algName@/$algName/g > ${file}.tmp ; mv -f ${file}.tmp $file -done -if [ "$nameSpace" == "" ] -then - if [ $isTool -eq 1 ] - then - file="$targetDir/$packageName/$algName.h" - echo "making adjustments not to use a namespace in $file" - cat $file |sed '52d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '16d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '16,50s/^ //g' > ${file}.tmp ; mv -f ${file}.tmp $file - file="$targetDir/$packageName/I$algName.h" - echo "making adjustments not to use a namespace in $file" - cat $file |sed '29d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '11d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '11,27s/^ //g' > ${file}.tmp ; mv -f ${file}.tmp $file - file="$targetDir/src/components/${packageName}_entries.cxx" - echo "making adjustments not to use a namespace in $file" - cat $file |sed '4c DECLARE_TOOL_FACTORY( @algName@ )' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '8c DECLARE_TOOL( @algName@ )' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@algName@/$algName/g > ${file}.tmp ; mv -f ${file}.tmp $file - else - file="$targetDir/$packageName/$algName.h" - echo "making adjustments not to use a namespace in $file" - cat $file |sed '59d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '18d' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '18,57s/^ //g' > ${file}.tmp ; mv -f ${file}.tmp $file - file="$targetDir/src/components/${packageName}_entries.cxx" - echo "making adjustments not to use a namespace in $file" - cat $file |sed '4c DECLARE_ALGORITHM_FACTORY( @algName@ )' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed '7c DECLARE_ALGORITHM( @algName@ )' > ${file}.tmp ; mv -f ${file}.tmp $file - cat $file |sed s/@algName@/$algName/g > ${file}.tmp ; mv -f ${file}.tmp $file - fi -fi -# -# Printout Goodbye -# -if [ $isInsert -eq 1 ] -then - cat $srcDir/exitAlgorithmToolSetup_insert.txt -else - cat $srcDir/exitAlgorithmToolSetup.txt -fi - - - diff --git a/Tools/AlgorithmToolSetup/src/AlgorithmToolSetupReadMe.txt b/Tools/AlgorithmToolSetup/src/AlgorithmToolSetupReadMe.txt deleted file mode 100755 index 4649a0c885ec2a50ac595f48d439366588c04aba..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/AlgorithmToolSetupReadMe.txt +++ /dev/null @@ -1,41 +0,0 @@ -This tool is meant to do the repetitive part in setting up a new Tool or a new Algorithm. It is also set up in a way to encourage clean -programming, following the conventions for software development in Atlas. Just start the shell script corresponding -to your shell (.sh or .csh), it will inquire everything it needs to know interactively. Make sure that your environment is set up properly, -the utility is working in the directory specified by $TestArea. The utility directory is for the time being assumed to be directly under the -$TestArea directory. Please make sure that the utility directory is located correctly. Once the tool is in CVS, the directory will -automatically be located correctly, when it is checked out. - -What the utility does: - -- If the package directory for the new algorithm specified by the user - does not yet exist, the package directory will be set up, including subdirectories. - Otherwise, the files for the new algorithm or tool will be inserted in the already existing directory. - -- It creates all files necessary for the new algorithm/tool to be compiled (Although, of course, the code won't do - much at this stage.) For a new tool, named (by the user) 'NewTool', part of the package 'NewPackage' in the directory - '$TestArea/NewPath' the following files are created : - ../NewPath/NewPackage: - ChangeLog - ../NewPath/NewPackage/cmt: - requirements - ../NewPath/NewPackage/doc: - mainpage.h - ../NewPath/NewPackage/NewPackage: - INewTool.h (interface only for Tools, will not be created for algorithms) - NewTool.h - ../NewPath/NewPackage/share: - ../NewPath/NewPackage/src: - NewTool.cxx - ../NewPath/NewPackage/src/components: - NewPackage_entries.cxx - NewPackage_load.cxx - -If the new algorithm/tool is inserted into an already existing package, the ChangeLog, the requirements and the mainpage file -as well as the files in the components directory are not created. A standard entry is added to the ChangeLog. -However, the files in the components directory have to be edited by hand, when an algorithm/tool is added to an existing -package in order to make it compile. - -Tools created by the utility are always derived from an Interface. The interface is always placed in the same directory -as the Tool's header file. - -Martin Siebel <Martin.Siebel@CERN.ch>, May 2006 \ No newline at end of file diff --git a/Tools/AlgorithmToolSetup/src/ChangeLog.templ b/Tools/AlgorithmToolSetup/src/ChangeLog.templ deleted file mode 100755 index 13c3a22956796603c84fba0abe92017fa03ff308..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/ChangeLog.templ +++ /dev/null @@ -1,2 +0,0 @@ -@date@ @authorName@ <@authorMail@> - Setup of @algName@ (empty) using SetupUtility diff --git a/Tools/AlgorithmToolSetup/src/entries_alg.templ b/Tools/AlgorithmToolSetup/src/entries_alg.templ deleted file mode 100755 index c0e059d9d5de39c3dec809f300197b2b37abd571..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/entries_alg.templ +++ /dev/null @@ -1,8 +0,0 @@ -#include "GaudiKernel/DeclareFactoryEntries.h" -#include "../@algName@.h" - -DECLARE_NAMESPACE_ALGORITHM_FACTORY( @nameSpace@ , @algName@ ) - -DECLARE_FACTORY_ENTRIES( @packageName@ ) { - DECLARE_NAMESPACE_ALGORITHM( @nameSpace@ , @algName@ ) -} diff --git a/Tools/AlgorithmToolSetup/src/entries_tool.templ b/Tools/AlgorithmToolSetup/src/entries_tool.templ deleted file mode 100755 index 260263787247e9227271e0fa49febbe341af4460..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/entries_tool.templ +++ /dev/null @@ -1,10 +0,0 @@ -#include "GaudiKernel/DeclareFactoryEntries.h" -#include "../@algName@.h" - -DECLARE_NAMESPACE_TOOL_FACTORY( @nameSpace@, @algName@ ) - -DECLARE_FACTORY_ENTRIES( @packageName@ ) -{ - DECLARE_NAMESPACE_TOOL( @nameSpace@, @algName@ ) -} - diff --git a/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup.txt b/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup.txt deleted file mode 100755 index f7268287f260fb9e97d8eacbc27cf988e37e1c0d..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup.txt +++ /dev/null @@ -1,12 +0,0 @@ - - o--------------------------------------------------------o - | The empty files for the Algorithm/Tool are now set up | - | and ready to compile. Remember to type 'cmt config' | - | before 'make' | - | | - | Please do not forget to remove the standard comments | - | from the header file and the doc/mainpage.h file and | - | to replace them with meaningful comments. | - | (Don't forget, your name is already there ... ;-) ) | - | | - o--------------------------------------------------------o diff --git a/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup_insert.txt b/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup_insert.txt deleted file mode 100755 index 6b64318ae0b56552dd25ff3e6536cf6911f40609..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/exitAlgorithmToolSetup_insert.txt +++ /dev/null @@ -1,13 +0,0 @@ - - o--------------------------------------------------------o - | The empty files for the Algorithm/Tool are now set up. | - | You still have to add your new Algorithm or Tool to | - | the files in src/components. | - | After that they are ready to compile. | - | | - | Please do not forget to remove the standard comments | - | from the header file and the doc/mainpage.h file and | - | to replace them with meaningful comments. | - | (Don't forget, your name is already there ... ;-) ) | - | | - o--------------------------------------------------------o diff --git a/Tools/AlgorithmToolSetup/src/header_alg.templ b/Tools/AlgorithmToolSetup/src/header_alg.templ deleted file mode 100755 index 2aa00f6e5176fcb3610229033c743548c7a069a8..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/header_alg.templ +++ /dev/null @@ -1,53 +0,0 @@ -/////////////////////////////////////////////////////////////////// -// @algName@.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef @CppKey@_H -#define @CppKey@_H - -// Gaudi includes -#include "AthenaBaseComps/AthAlgorithm.h" -#include <string> - -class AtlasDetectorID; -class Identifier; - -namespace @nameSpace@ -{ - - /** @class @algName@ - - This is for the Doxygen-Documentation. - Please delete these lines and fill in information about - the Algorithm! - Please precede every member function declaration with a - short Doxygen comment stating the purpose of this function. - - @author @authorName@ <@authorMail@> - */ - - class @algName@ : public AthAlgorithm - { - public: - - /** Standard Athena-Algorithm Constructor */ - @algName@(const std::string& name, ISvcLocator* pSvcLocator); - /** Default Destructor */ - ~@algName@(); - - /** standard Athena-Algorithm method */ - StatusCode initialize(); - /** standard Athena-Algorithm method */ - StatusCode execute(); - /** standard Athena-Algorithm method */ - StatusCode finalize(); - - private: - - /** member variables for algorithm properties: */ - // int/double/bool m_propertyName; - - }; -} // end of namespace - -#endif diff --git a/Tools/AlgorithmToolSetup/src/header_tool.templ b/Tools/AlgorithmToolSetup/src/header_tool.templ deleted file mode 100755 index 9211b953ebaa09db35c19659997b418586f261ca..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/header_tool.templ +++ /dev/null @@ -1,49 +0,0 @@ -/////////////////////////////////////////////////////////////////// -// @algName@.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef @CppKey@_H -#define @CppKey@_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "@packageName@/I@algName@.h" - -class AtlasDetectorID; -class Identifier; - -namespace @nameSpace@ -{ - - /** @class @algName@ - - This is for the Doxygen-Documentation. - Please delete these lines and fill in information about - the Algorithm! - Please precede every member function declaration with a - short Doxygen comment stating the purpose of this function. - - @author @authorName@ <@authorMail@> - */ - - class @algName@ : virtual public I@algName@, public AthAlgTool - { - public: - @algName@(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~@algName@ (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize(); - /** standard Athena-Algorithm method */ - virtual StatusCode finalize (); - - private: - - /** member variables for algorithm properties: */ - // int/double/bool m_propertyName; - - }; -} // end of namespace - -#endif diff --git a/Tools/AlgorithmToolSetup/src/interface_tool.templ b/Tools/AlgorithmToolSetup/src/interface_tool.templ deleted file mode 100755 index fdc49ce4cb213519924a9b385982229033d03631..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/interface_tool.templ +++ /dev/null @@ -1,31 +0,0 @@ -/////////////////////////////////////////////////////////////////// -// I@algName@.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef I@CppKey@_H -#define I@CppKey@_H - -#include "GaudiKernel/IAlgTool.h" - - -namespace @nameSpace@ -{ - - - static const InterfaceID IID_I@algName@("@nameSpace@::I@algName@", 1, 0); - - class I@algName@ : virtual public IAlgTool { - public: - static const InterfaceID& interfaceID( ) ; - - // enter declaration of your interface-defining member functions here - - }; - - inline const InterfaceID& @nameSpace@::I@algName@::interfaceID() - { - return IID_I@algName@; - } - -} // end of namespace - -#endif diff --git a/Tools/AlgorithmToolSetup/src/introAlgorithmToolSetup.txt b/Tools/AlgorithmToolSetup/src/introAlgorithmToolSetup.txt deleted file mode 100755 index 4dd367a1c63b6e06c98ca5711f020dfacf1c0e2a..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/introAlgorithmToolSetup.txt +++ /dev/null @@ -1,21 +0,0 @@ - - o--------------------------------------------------------o - | | - | This tool sets up the basic files needed to write new | - | algorithms or tools within the Athena framework. | - | | - | It requires the name of the algorithm/tool to be | - | created, the name of the package, where it is to be | - | located and the path to the package. | - | | - | If the targeted package already exists, the new | - | algorithm/tool will be added to the package | - | | - | This tool sets up the cmt/requirements file, the | - | header and the source file, the components files and | - | the doc/mainpage file. | - | | - | | - | Martin Siebel, 05/2006 | - | <Martin.Siebel@CERN.ch> | - o--------------------------------------------------------o diff --git a/Tools/AlgorithmToolSetup/src/load.templ b/Tools/AlgorithmToolSetup/src/load.templ deleted file mode 100755 index ab9fad27d5b15096323d1b6880396a22557ac2f9..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/load.templ +++ /dev/null @@ -1,5 +0,0 @@ - -#include "GaudiKernel/LoadFactoryEntries.h" - -LOAD_FACTORY_ENTRIES( @packageName@ ) - diff --git a/Tools/AlgorithmToolSetup/src/mainpage.templ b/Tools/AlgorithmToolSetup/src/mainpage.templ deleted file mode 100755 index b388313a8152338cb42f2a164c83560126beaa68..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/mainpage.templ +++ /dev/null @@ -1,16 +0,0 @@ -/** -@page PackageName_page PackageName (package) - ->> Please enter an overview of the created package here: What does it contain? - -@author @authorName@ <@authorMail@> - -@section @packageName@Intro Introduction - ->> Please enter a brief description of the package here. - -@section @packageName@Req Requirements - -@include requirements - -*/ diff --git a/Tools/AlgorithmToolSetup/src/requirements.templ b/Tools/AlgorithmToolSetup/src/requirements.templ deleted file mode 100755 index bb38c7636f6226b488f010f90163e17361b2b1b5..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/requirements.templ +++ /dev/null @@ -1,16 +0,0 @@ -package @packageName@ - -author @authorName@ <@authorMail@> - -public - -use AtlasPolicy AtlasPolicy-* -use AthenaBaseComps AthenaBaseComps-* Control - -apply_pattern component_library -library @packageName@ *.cxx components/*.cxx - -private -#macro cppdebugflags '$(cppdebugflags_s)' -#macro_remove componentshr_linkopts "-Wl,-s" - diff --git a/Tools/AlgorithmToolSetup/src/source_alg.templ b/Tools/AlgorithmToolSetup/src/source_alg.templ deleted file mode 100755 index 30124a7c379caf7aff2d293245dbacfae835eb57..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/source_alg.templ +++ /dev/null @@ -1,56 +0,0 @@ -/////////////////////////////////////////////////////////////////// -// @algName@.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "@algName@.h" - -//================ Constructor ================================================= - -@nameSpace@::@algName@::@algName@(const std::string& name, ISvcLocator* pSvcLocator) - : - AthAlgorithm(name,pSvcLocator) -{ - // template for property decalration - //declareProperty("PropertyName", m_propertyName); -} - -//================ Destructor ================================================= - -@nameSpace@::@algName@::~@algName@() -{} - - -//================ Initialisation ================================================= - -StatusCode @nameSpace@::@algName@::initialize() -{ - // Code entered here will be executed once at program start. - - ATH_MSG_INFO (" initialize()"); - - // retrieve something from StoreGate (it's an AthAlg member!) - // StatusCode sc = evtStore()->retrieve("MyCollection",m_collection); - // if (sc.isFailure()) ATH_MSG_ERROR ("Could not retrieve ...!"); - - ATH_MSG_INFO ("initialize() successful in " << name()); - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode @nameSpace@::@algName@::finalize() -{ - // Code entered here will be executed once at the end of the program run. - return StatusCode::SUCCESS; -} - -//================ Execution ==================================================== - -StatusCode @nameSpace@::@algName@::execute() -{ - // Code entered here will be executed once per event - return StatusCode::SUCCESS; -} - -//============================================================================================ - diff --git a/Tools/AlgorithmToolSetup/src/source_tool.templ b/Tools/AlgorithmToolSetup/src/source_tool.templ deleted file mode 100755 index 6709fce2e95298e26e1b3dd7944217a494a4bb2f..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/source_tool.templ +++ /dev/null @@ -1,48 +0,0 @@ -/////////////////////////////////////////////////////////////////// -// @algName@.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "@algName@.h" - -//================ Constructor ================================================= - -@nameSpace@::@algName@::@algName@(const std::string& t, - const std::string& n, - const IInterface* p ) - : - AthAlgTool(t,n,p) -{ - declareInterface<I@algName@>(this); - - // template for property decalration - //declareProperty("PropertyName", m_propertyName); -} - -//================ Destructor ================================================= - -@nameSpace@::@algName@::~@algName@() -{} - - -//================ Initialisation ================================================= - -StatusCode @nameSpace@::@algName@::initialize() -{ - - StatusCode sc = AlgTool::initialize(); - if (sc.isFailure()) return sc; - - ATH_MSG_INFO ("initialize() successful in " << name()); - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode @nameSpace@::@algName@::finalize() -{ - StatusCode sc = AlgTool::finalize(); - return sc; -} - -//============================================================================================ - diff --git a/Tools/AlgorithmToolSetup/src/version.templ b/Tools/AlgorithmToolSetup/src/version.templ deleted file mode 100644 index 66024deb15a60cb125d230b8569689dbb8b07f87..0000000000000000000000000000000000000000 --- a/Tools/AlgorithmToolSetup/src/version.templ +++ /dev/null @@ -1 +0,0 @@ -@packageName@-00-00-00 diff --git a/Tools/Scripts/share/addpkg b/Tools/Scripts/share/addpkg deleted file mode 100755 index 2750d059316cb672f55dd3521466872a1691c925..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/addpkg +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env sh - -# Author: Amir Farbin (afarbin@cern.ch) -# -# Wishlist: write a cleaner version in python! - -pkgName=$1 -rel=$2 -#base=/afs/cern.ch/atlas/software/dist -base=$SITEROOT/atlas/software/dist - -if [ $# -eq 0 ] ; then - echo - echo Checkout an ATLAS Athena package from CVS repository. - echo - echo Usage: - echo " addpkg <PackageName> [ <Release>/<Tag> ]" - echo - echo "<PackageName>: the full name of the package." - echo " (ex: Reconstruction/RecExample/RecExCommon)" - echo - echo "<Release>: the Athena release version. This is an optional parameter." - echo " If no release or tag is specified, addpkg will attempt to checkout " - echo " version corresponding to your present release version." - echo - echo "<Tag>: may be supplied instead of <Release>. (ex: RecExCommon-00-03-42)" - exit 1; -fi - - -if [ "X$rel" = "X" ] ; then - rel=`cmt show macro_value ATLAS_RELEASE` - echo Using release $rel. -fi - -if [ -e $base/$rel ] ; then - pkgPath=$base/$rel/$pkgName - tag=`ls $pkgPath` - cmt co -r $tag $pkgName -else - cmt co -r $rel $pkgName -fi diff --git a/Tools/Scripts/share/delalg b/Tools/Scripts/share/delalg deleted file mode 100755 index d1b4b579a7c586595261e9fe40eef4b06a0b07d5..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/delalg +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env sh - -# Author: Amir Farbin (afarbin@cern.ch) -# -# Wishlist: write a cleaner version in python! This script can be so much nicer... - - -if [ $# -ne 1 ] - then - echo - echo "Remove an existing ATLAS Athena Algorithm. Must be run from the" - echo "base or cmt directory of a package. The Algorithm should have been" - echo "created by newalg script." - echo - echo Usage: - echo " delalg <AlgorithmName>" - echo - echo " <AlgorithmName>: Name of the algorithm." - exit 1; -fi - -algname=$1 - -myPWD=`pwd` - -incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - -if test $incmtdir -lt 1 - then - cd cmt - incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - if test $incmtdir -lt 1 - then - cd ../cmt - incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - fi -fi - -if test $incmtdir -lt 1 - then - echo Could not find cmt directory for package. Try switching to the" - echo "base or cmt directory of this package. - exit 1 -fi - -packagename=`cmt show macro_value package` - -if [ "X$packagename" = "X" ] - then - echo Could not determine package name. - exit 1 -fi - -echo Package name: $packagename -cd .. - -rm -i src/${algname}.cxx -rm -i ${packagename}/${algname}.h -mv src/components/${packagename}_entries.cxx src/components/${packagename}_entries.cxx.bak -grep -v "XXX${algname}XXX" src/components/${packagename}_entries.cxx.bak > src/components/${packagename}_entries.cxx diff --git a/Tools/Scripts/share/newalg b/Tools/Scripts/share/newalg deleted file mode 100755 index 5652dafb418320d05e48c4153437e10c6c12a6ab..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/newalg +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env sh - -# Author: Amir Farbin (afarbin@cern.ch) -# -# Wishlist: write a cleaner version in python! This script can be so much nicer... - -if [ $# -ne 1 ] - then - echo - echo "Create an empty ATLAS Athena Algorithm. Must be run from the" - echo "base or cmt directory of a package." - echo - echo Usage: - echo " newalg <AlgorithmName>" - echo - echo " <AlgorithmName>: Name of new algorithm." - exit 1; -fi - -algname=$1 - -myPWD=`pwd` - -incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - -if test $incmtdir -lt 1 - then - cd cmt - incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - if test $incmtdir -lt 1 - then - cd ../cmt - incmtdir=`pwd | grep cmt | wc | tr -s " " | cut -d" " -f 3` - fi -fi - -if test $incmtdir -lt 1 - then - echo Could not find cmt directory for package. Try switching to the" - echo "base or cmt directory of this package. - exit 1 -fi - -packagename=`cmt show macro_value package` - -if [ "X$packagename" = "X" ] - then - echo Could not determine package name. - exit 1 -fi - -echo Package name: $packagename -cd .. - -algnameup=`echo $algname | tr 'a-z' 'A-Z'` - -if [ -e src/${algname}.cxx ] || [ -e ${packagename}/${algname}.h ] - then - echo Algorithm with name ${algname} already exists... Exiting. - exit 1 -fi - -echo "Adding algorithm $algname to package $packagename." - -echo "Adding src/${algname}.cxx." -cat > src/${algname}.cxx <<EOF - -#include "${packagename}/${algname}.h" -#include "GaudiKernel/Algorithm.h" - -${algname}::${algname}(const std::string& name, ISvcLocator* pSvcLocator) : - Algorithm(name,pSvcLocator) -{ } - -${algname}::~${algname}() -{ } - -StatusCode ${algname}::initialize() { - return StatusCode::SUCCESS; -} - -StatusCode ${algname}::execute() { - return StatusCode::SUCCESS; -} - -StatusCode ${algname}::finalize() { - return StatusCode::SUCCESS; -} - -EOF - -echo "Adding ${packagename}/${algname}.h." - -cat > ${packagename}/${algname}.h <<EOF - -#ifndef ${algnameup}_H -#define ${algnameup}_H - -#include "GaudiKernel/Algorithm.h" -#include <string> - -class ${algname} : public Algorithm -{ - public: - ${algname}(const std::string& name,ISvcLocator* pSvcLocator); - virtual ~${algname}(); - - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); - -}; - -#endif // ${algnameup}_H - -EOF - -testfiles=`grep ${algname} src/components/${packagename}_entries.cxx | wc | tr -s " " | cut -d " " -f2` - -if test $testfiles -gt 0 - then - echo Algorithm ${algname} appears to have been previously added to components. Components unchanged. - exit 0 -else - -# Update entries file - - echo "Updating src/components/${packagename}_entries.cxx." - - mv src/components/${packagename}_entries.cxx src/components/${packagename}_entries.cxx.bak - grep -h "include" src/components/${packagename}_entries.cxx.bak >> src/components/${packagename}_entries.cxx - echo "#include \"${packagename}/${algname}.h\" // XXX${algname}XXX Keep this comment for remove-athena-algorithm " >> src/components/${packagename}_entries.cxx - grep -h "DECLARE_ALGORITHM_FACTORY" src/components/${packagename}_entries.cxx.bak >> src/components/${packagename}_entries.cxx - grep -h "DECLARE_TOOL_FACTORY" src/components/${packagename}_entries.cxx.bak >> src/components/${packagename}_entries.cxx - echo "DECLARE_ALGORITHM_FACTORY( ${algname} ) ; // XXX${algname}XXX Keep this comment for remove-athena-algorithm" >> src/components/${packagename}_entries.cxx - echo "DECLARE_FACTORY_ENTRIES( ${packagename} ) {" >> src/components/${packagename}_entries.cxx - grep -h "DECLARE_ALGORITHM" src/components/${packagename}_entries.cxx.bak | grep -v "FACTORY" >> src/components/${packagename}_entries.cxx - grep -h "DECLARE_TOOL" src/components/${packagename}_entries.cxx.bak | grep -v "FACTORY" >> src/components/${packagename}_entries.cxx - echo "DECLARE_ALGORITHM( ${algname} ) ; // XXX${algname}XXX Keep this comment for remove-athena-algorithm" >> src/components/${packagename}_entries.cxx - echo "}" >> src/components/${packagename}_entries.cxx - -# Update load file - -# echo "Updating src/components/${packagename}_load.cxx." -# cp src/components/${packagename}_load.cxx src/components/${packagename}_load.cxx.bak -# echo "LOAD_FACTORY_ENTRIES(${algname})" >> src/components/${packagename}_load.cxx -fi - -echo To use ${algname} add the following to your jobOptions file: -echo "theApp.Dlls += [ \"${algname}\" ]" -echo "${algname} = Algorithm( \"${algname}\" )" - -cd $myPWD \ No newline at end of file diff --git a/Tools/Scripts/share/newpac b/Tools/Scripts/share/newpac deleted file mode 100755 index b616039c30525614061b2b3bb191cd7adf8d4585..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/newpac +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash - -# -# purpose: create a new package -# author : Dieter.Best@cern.ch -# date : 22.November.2005 -# - -function usage() { - echo - echo " create a new package " - echo - echo " usage: " - echo " `basename $0` <package name>" - echo - echo " example: " - echo " `basename $0` MyPackage" - echo - exit -} - -####################################################################### -# -# M A I N -# -####################################################################### - -# -# input parameter -# -if [ $# -eq 0 ] ; then - usage; exit 0; -fi - -# will be a parameter, set a default here -PKG="MyAnalysis" -PKG=$1 - -cmt create ${PKG} ${PKG}-00-00-01 - -HERE=`pwd` -PACK=${HERE}/${PKG}/${PKG}-00-00-01 - -# setup dir -cd ${PACK}/cmt -cat > requirements <<EOF -package ${PKG} -author ATLAS $USER -use AtlasPolicy AtlasPolicy-01-* -use GaudiInterface GaudiInterface-01-* External -library ${PKG} *.cxx -s=components *.cxx -apply_pattern component_library -EOF - -# sources -mkdir -p ${PACK}/src/components -cd ${PACK}/src/components -cat > ${PKG}_entries.cxx <<EOF -#include "GaudiKernel/DeclareFactoryEntries.h" -DECLARE_FACTORY_ENTRIES(${PKG}) { -} -EOF -cat > ${PKG}_load.cxx <<EOF -#include "GaudiKernel/LoadFactoryEntries.h" -LOAD_FACTORY_ENTRIES(${PKG}) -EOF - -# include files -mkdir ${PACK}/${PKG} - -# job options -mkdir ${PACK}/share - -# run dir -mkdir ${PACK}/run - -# setup -cd ${PACK}/cmt; cmt config; source setup.sh; -#make - -exit 0 diff --git a/Tools/Scripts/share/newpkg b/Tools/Scripts/share/newpkg deleted file mode 100755 index 61bf479b2d02fa7add922588a54b76e62c4da80b..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/newpkg +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env bash - -# -# purpose: create a new package -# author : Dieter.Best@cern.ch -# date : 22.November.2005 -# - -function usage() { - echo - echo " usage: " - echo " newpkg <package name> <algorithm name>" - echo - echo " example: " - echo " newpkg MyPackage MyAlgorithm" - echo - exit -} - -####################################################################### -# -# M A I N -# -####################################################################### - -# -# input parameter -# -if [ $# -eq 0 ] ; then - usage; exit 0; -fi - -# will be a parameter, set a default here -PKG="MyAnalysis" -ALG="MyAlg" -PKG=$1 -ALG=$2 - -# cd into your workdir - -cmt create ${PKG} ${PKG}-00-00-01 -cd ${PKG}/${PKG}-00-00-01/cmt -cat > requirements <<EOF -################################################# -package ${PKG} - -author ATLAS $USER - -use AtlasPolicy AtlasPolicy-01-* -use GaudiInterface GaudiInterface-01-* External - -library ${PKG} *.cxx -s=components *.cxx - -apply_pattern component_library - -apply_pattern declare_joboptions files="${ALG}_jobOptions.py" -################################################# -EOF - -cd ../src/ -cat > ${ALG}.cxx<<EOF -#include "${PKG}/${ALG}.h" -#include "GaudiKernel/MsgStream.h" - -///////////////////////////////////////////////////////////////////////////// - -${ALG}::${ALG}(const std::string& name, ISvcLocator* pSvcLocator) : -Algorithm(name, pSvcLocator) -{ - -// Part 2: Properties go here - - -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode ${ALG}::initialize(){ - -// Part 1: Get the messaging service, print where you are -MsgStream log(msgSvc(), name()); -log << MSG::INFO << "initialize()" << endmsg; - -return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode ${ALG}::execute() { - -// Part 1: Get the messaging service, print where you are -MsgStream log(msgSvc(), name()); -log << MSG::INFO << "execute()" << endmsg; - -// Part 2: Print out the different levels of messages -log << MSG::INFO << "Your new package and algorithm are successfully installed" << endmsg; - -return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode ${ALG}::finalize() { - -// Part 1: Get the messaging service, print where you are -MsgStream log(msgSvc(), name()); -log << MSG::INFO << "finalize()" << endmsg; - -return StatusCode::SUCCESS; -} -EOF - -mkdir components -cd components -cat > ${PKG}_entries.cxx <<EOF -#include "${PKG}/${ALG}.h" -#include "GaudiKernel/DeclareFactoryEntries.h" - -DECLARE_ALGORITHM_FACTORY( ${ALG} ); - -DECLARE_FACTORY_ENTRIES(${PKG}) { -DECLARE_ALGORITHM( ${ALG} ); -} -EOF -cat > ${PKG}_load.cxx <<EOF -#include "GaudiKernel/LoadFactoryEntries.h" -LOAD_FACTORY_ENTRIES(${PKG}) -EOF -# -# include files -# -cd ../../ -mkdir ${PKG} -cd ${PKG} -cat > ${ALG}.h<<EOF -#include "GaudiKernel/Algorithm.h" -class ${ALG}:public Algorithm { -public: -${ALG} (const std::string& name, ISvcLocator* pSvcLocator); -StatusCode initialize(); -StatusCode execute(); -StatusCode finalize(); -}; -EOF -cd .. -# -# jobOptions -# -mkdir share -cd share -cat > ${ALG}_jobOptions.py<<EOF -# -# Job options file -# -#============================================================== - -#-------------------------------------------------------------- -# ATLAS default Application Configuration options -#-------------------------------------------------------------- - -theApp.setup( MONTECARLO ) - -#-------------------------------------------------------------- -# Private Application Configuration options -#-------------------------------------------------------------- - -#load relevant libraries -theApp.Dlls += [ "${PKG}" ] - -#top algorithms to be run -theApp.TopAlg = [ "${ALG}" ] -${ALG} = Algorithm( "${ALG}" ) - -#-------------------------------------------------------------- -# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL) -#-------------------------------------------------------------- - -MessageSvc.OutputLevel = INFO - -#-------------------------------------------------------------- -# Event related parameters -#-------------------------------------------------------------- - -# Number of events to be processed (default is 10) -theApp.EvtMax = 1 - -#============================================================== -# -# End of job options file -# -############################################################### -EOF - -cd ../cmt -cmt config -source setup.sh -make - -exit 0 diff --git a/Tools/Scripts/share/newrel b/Tools/Scripts/share/newrel deleted file mode 100755 index cb88b6eb9ee1e51c4ea9205fcb194471cf55e712..0000000000000000000000000000000000000000 --- a/Tools/Scripts/share/newrel +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env sh - -# Author: Amir Farbin (afarbin@cern.ch) -# -# Instructions to modify this script to run at other sites: -# -# Simply change the ATLASDistArea and CMTDefault to point to where kits (or releases) are -# installed at your site. Also appropriately set "CMTSite". You may also change the default -# CVSROOT by specifying one below. Examples of more customization at the bottom of this -# script. -# -# -# Wishlist: write a cleaner version in python! - -if [ X$DistArea = "X" ] - then - ATLASDistArea="/afs/cern.ch/atlas/software/dist" -fi - -CMTDefault="/afs/cern.ch/sw/contrib/CMT/v1r18p20050501" -CMTSite="CERN" -CVSRoot="" -CVSRootNightlies=":kserver:atlas-sw.cern.ch:/atlascvs" # This is only used for nightlies at CERN - -release=$1 -directory=$2 - - -if [ $# -ne 2 ] - then - echo - echo "Create a new ATLAS Athena test release. Using the appropriate" - echo "cmt version for requested given release." - echo - echo Usage: - echo " newrel <ReleaseVersion> <ReleaseDirectory>" - echo - echo " <ReleaseVersion>: Athena release version. (ex: 10.0.1)" - echo " Note: you may use atlrel_N for nightly release N. " - echo - echo " <ReleaseDirectory>: Target directory for requirements" - echo " and setup files (ie new your working directory)." - echo " A new directory will be created if <ReleaseDirectory>" - echo " does not exist. " - echo - echo "Current Distribution Area set to " $ATLASDistArea - echo "(You may change this by setting the ATLASDistArea environment" - echo "variable.)" - echo - echo "Note: Instructions for modifying this script for other sites " - echo "are in the script itself." - exit 1; -fi - -nightlycheck=`echo $release | grep "atlrel" | wc | tr -s " " | cut -d " " -f2` - -postfix=$3 - -if test $nightlycheck -eq 1 - then - echo "Nightly Release" - distarea=$ATLASDistArea - release="nightlies/rel/$release" -else - distarea=$ATLASDistArea -fi - -# Try to figure out the proper CMT version from setup file - -setupfile="$distarea/$release/Reconstruction/RecExample/RecExCommon/RecExCommon-*/cmt/setup.sh" - -#echo $setupfile -if [ -e $setupfile ] - then - cmtdir=`grep "CMTROOT=" $setupfile | cut -d "=" -f2 | cut -d ";" -f1` - - if [ -e $cmtdir ] - then - echo Using $cmtdir - else - cmtdir=$CMTDefault # Default - echo Failed to figure out the cmt Version - echo Defaulting to $cmtdir - fi -fi - - -currentdir=`pwd` - -mkdir -p $directory - -rm -f $directory/setup.sh -rm -f $directory/setup.csh - -touch $directory/setup.sh -touch $directory/setup.csh - -#rm -f $directory/requirements -#touch $directory/requirements - -if [ -e $directory/requirements ] - then - echo $directory/requirements found. No requirements file written. - echo Please make sure $directory/requirements file includes: - echo path_prepend CMTPATH \"$currentdir/$directory\" -else - touch $directory/requirements - - cat >> $directory/requirements <<EOF - -################################# Atlas requirements file ####################### -# Setup Environment -# -# Created by "newrel" script by Amir Farbin -# -# - -set CMTSITE $CMTSite - -macro ATLAS_DIST_AREA "$distarea" - -# -# Select releases as they are available -# - -macro ATLAS_RELEASE "$release" - -apply_tag opt - -use AtlasSettings v* \$(ATLAS_DIST_AREA) - -path_remove CMTPATH "$currentdir/$directory" -path_prepend CMTPATH "$currentdir/$directory" - -################################# Atlas requirements file ##################### - -EOF - -fi - -if test $nightlycheck -eq 1 - then - echo "set CVSROOT \"$CVSRootNightlies\" " >> $directory/requirements -fi - -if [ X$CVSRoot = "X" ] - then - echo Using Default CVSROOT. -else - echo "set CVSROOT \"$CVSRoot\" " >> $directory/requirements - echo Using CVSROOT = $CVSRoot. -fi - -cd $directory -source $cmtdir/mgr/setup.sh -cmt config -mv setup.sh setup.cmt.sh -mv setup.csh setup.cmt.csh -cd - - - -# You may add any additional environment setup here... make sure you do it for both sh and csh. -# Some examples are commented out below. - -# Pre-setup a kit -# echo "source $ATLASDistArea/setup.sh" >> $directory/setup.sh - -echo "source setup.cmt.sh" >> $directory/setup.sh - -# Setup local version of ROOT -#echo "export ROOTSYS=/share/data1/app/atlasinteractive/root3" >> $directory/setup.sh - -# Add something to LD_LIBRARY_PATH -#echo "export LD_LIBRARY_PATH=/share/data1/app/atlasinteractive/root3/lib\${LD_LIBRARY_PATH}" >> $directory/setup.sh - - - -#echo "source $kitdir/$release$postfix/setup.csh" >> $directory/setup.csh - -echo "source setup.cmt.csh" >> $directory/setup.csh - -#echo "setenv ROOTSYS /share/data1/app/atlasinteractive/root3" >> $directory/setup.csh -#echo "setenv LD_LIBRARY_PATH /share/data1/app/atlasinteractive/root3/lib:\${LD_LIBRARY_PATH}" >> $directory/setup.csh - -#setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${distarea}/$release/usr/lib" >> $directory/setup.csh