Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAlienPackage.h
Go to the documentation of this file.
1// @(#)root/alien:$Id$
2// Author: Lucia Jancurova/Andreas-Joachim Peters 1/10/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TAlienPackage
13#define ROOT_TAlienPackage
14
15#include "Rtypes.h"
16#include "TList.h"
17#include "TGrid.h"
18
19//////////////////////////////////////////////////////////////////////////
20// //
21// TAlienPackage //
22// //
23// Class providing package management functionality like the AliEn //
24// Package Management System. //
25// Allows to setup software packages on a local desktop like in the //
26// GRID environment. //
27// //
28//////////////////////////////////////////////////////////////////////////
29
31
32private:
33 TString fName; // package principal name
34 TString fVersion; // package version
35 TString fPlatform; // package platform
36 TString fInstallationDirectory; // installation directory
37 TString fAliEnMainPackageDir; // path to alien packages in the AliEn FC
38 TString fPostInstallCommand; // command to execute for postinstall
39 TString fEnableCommand; // command to enable the package
40 TList *fInstallList; // package list with names of dependency packages
41 TList *fPackages; // package list TPackage with this and dependency packages
42 Int_t fDebugLevel; // internal debug level
43 Bool_t fEnabled; // true if package is enabled for execution
44
45 Bool_t PostInstall (TString name, TString version); // runs the postinstall procedure for this package
46 Bool_t InstallSinglePackage (TString name, TString version, Bool_t isDep = kFALSE); // installs the defined package without dependencies
47 Bool_t InstallAllPackages (); // installs the defined package + all dependency packages
48
49 public:
51
52 TAlienPackage(const char *name,
53 const char *version,
54 const char *platform,
55 const char *installationdirectory = "/var/tmp/alien/packages");
56
57 virtual ~ TAlienPackage ();
58
59 Bool_t Enable(); // install/enable the defined package
60 const char *GetEnable(); // return shell command to enable package
61 Bool_t Exec(const char *cmdline); // execute <cmd> with this package
62 Bool_t UnInstall(); // uninstall the defined package
63 Bool_t ReInstall(); // reinstall the defined package
64 Bool_t CheckDependencies(); // get all the dependencies of a package
65
66 Bool_t IsDirectory(const char *dir1, const char *str); // check for <str> in GRID directory <dir1>
67 Bool_t CheckDirectories(TString name, TString version); // check that the defined package is existing as an alien package directory
68
69 void SetName(const TString & theValue) { fName = theValue; }
70 // set the name of the package
71 TString GetName() const { return fName; }
72 // get the name of the package
73 void SetVersion(const TString & theValue) { fVersion = theValue; }
74 // set the version of the package
75 TString GetVersion() const { return fVersion; }
76 // get the version of the package
77 void SetPlatform(const TString & theValue) { fPlatform = theValue; }
78 // set the platform for the package
79 TString GetPlatform() const { return fPlatform; }
80 // get the platform for the package
81 void SetInstallationDirectory(const TString & theValue) { fInstallationDirectory = theValue; }
82 // set the installation directory
84 // get the installation directory
85 void SetAliEnMainPackageDir(const TString & theValue) { fAliEnMainPackageDir = theValue; }
86 // set the alien path to look for the named package
88 // get the alien path to look for the named package
89 void SetInstallList(TList * theValue) { fInstallList = theValue; }
90 // set the install(dependency) package list
91 TList *GetInstallList() const { return fInstallList; }
92 // get the install(dependency) package list;
93 void SetDebugLevel(Int_t & theValue) { fDebugLevel = theValue; }
94 // set the internal debug level
96 // get the internal debug level
97
98 ClassDef (TAlienPackage, 0); // Alien package interface
99};
100
101#endif
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDef(name, id)
Definition Rtypes.h:337
char name[80]
Definition TGX11.cxx:110
TList * GetInstallList() const
TList * fPackages
TString fEnableCommand
Bool_t CheckDependencies()
Check the dependency packages of this package.
void SetVersion(const TString &theValue)
void SetInstallList(TList *theValue)
TString GetName() const
TString GetPlatform() const
Bool_t PostInstall(TString name, TString version)
Execute post_install procedure for a package.
TString GetAliEnMainPackageDir() const
Bool_t UnInstall()
Uninstall a package e.g. remove it from the local disk.
TAlienPackage()
Default constructor of a AliEn package constructing a ROOT:v5-16-00 for Linux-i686.
TString fPlatform
TString fAliEnMainPackageDir
const char * GetEnable()
Return shell command to enable package.
TString fInstallationDirectory
void SetAliEnMainPackageDir(const TString &theValue)
Bool_t Exec(const char *cmdline)
Execute package command.
Bool_t InstallAllPackages()
Installs a package and all its direct dependencies.
Bool_t ReInstall()
Reinstalls a package e.g. uninstall + install.
Bool_t IsDirectory(const char *dir1, const char *str)
Check that <str> is listed in GRID directory <dir1>.
Bool_t InstallSinglePackage(TString name, TString version, Bool_t isDep=kFALSE)
Install a single package.
Bool_t Enable()
Install/enable an AliEn package on the local computer.
TString fPostInstallCommand
Bool_t CheckDirectories(TString name, TString version)
Check the name and version directory of package/version given.
Int_t GetDebugLevel()
TString GetVersion() const
void SetPlatform(const TString &theValue)
void SetDebugLevel(Int_t &theValue)
TString GetInstallationDirectory() const
TList * fInstallList
void SetInstallationDirectory(const TString &theValue)
void SetName(const TString &theValue)
A doubly linked list.
Definition TList.h:38
Basic string class.
Definition TString.h:139