Skip to content

Commit

Permalink
adding AliPhysics to analysis manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrosseo committed Jan 21, 2015
1 parent f530236 commit 72e5e91
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions ANALYSIS/ANALYSIS/AliAnalysisGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ enum EPluginBits {
virtual void SetAPIVersion(const char *version) = 0;
virtual void SetROOTVersion(const char *version) = 0;
virtual void SetAliROOTVersion(const char *version) = 0;
virtual void SetAliPhysicsVersion(const char *version) = 0;
virtual void SetUser(const char *user) = 0;
virtual void SetTTL(Int_t ttl=30000) = 0;
virtual void SetGridWorkingDir(const char *name="workdir") = 0;
Expand Down
18 changes: 18 additions & 0 deletions ANALYSIS/ANALYSISalice/AliAnalysisAlien.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ AliAnalysisAlien::AliAnalysisAlien()
fAPIVersion(),
fROOTVersion(),
fAliROOTVersion(),
fAliPhysicsVersion(),
fExternalPackages(),
fUser(),
fGridWorkingDir(),
Expand Down Expand Up @@ -194,6 +195,7 @@ AliAnalysisAlien::AliAnalysisAlien(const char *name)
fAPIVersion(),
fROOTVersion(),
fAliROOTVersion(),
fAliPhysicsVersion(),
fExternalPackages(),
fUser(),
fGridWorkingDir(),
Expand Down Expand Up @@ -276,6 +278,7 @@ AliAnalysisAlien::AliAnalysisAlien(const AliAnalysisAlien& other)
fAPIVersion(other.fAPIVersion),
fROOTVersion(other.fROOTVersion),
fAliROOTVersion(other.fAliROOTVersion),
fAliPhysicsVersion(other.fAliPhysicsVersion),
fExternalPackages(other.fExternalPackages),
fUser(other.fUser),
fGridWorkingDir(other.fGridWorkingDir),
Expand Down Expand Up @@ -400,6 +403,7 @@ AliAnalysisAlien &AliAnalysisAlien::operator=(const AliAnalysisAlien& other)
fAPIVersion = other.fAPIVersion;
fROOTVersion = other.fROOTVersion;
fAliROOTVersion = other.fAliROOTVersion;
fAliPhysicsVersion = other.fAliPhysicsVersion;
fExternalPackages = other.fExternalPackages;
fUser = other.fUser;
fGridWorkingDir = other.fGridWorkingDir;
Expand Down Expand Up @@ -1750,6 +1754,10 @@ Bool_t AliAnalysisAlien::CreateJDL()
fGridJDL->AddToPackages("AliRoot", fAliROOTVersion,"VO_ALICE", "List of requested packages");
fMergingJDL->AddToPackages("AliRoot", fAliROOTVersion, "VO_ALICE", "List of requested packages");
}
if (!fAliPhysicsVersion.IsNull()) {
fGridJDL->AddToPackages("AliPhysics", fAliPhysicsVersion,"VO_ALICE", "List of requested packages");
fMergingJDL->AddToPackages("AliPhysics", fAliPhysicsVersion, "VO_ALICE", "List of requested packages");
}
if (!fROOTVersion.IsNull()) {
fGridJDL->AddToPackages("ROOT", fROOTVersion);
fMergingJDL->AddToPackages("ROOT", fROOTVersion);
Expand Down Expand Up @@ -2553,6 +2561,7 @@ void AliAnalysisAlien::Print(Option_t *) const
else
printf("= ROOT version requested________________________ default\n");
printf("= AliRoot version requested_____________________ %s\n", fAliROOTVersion.Data());
printf("= AliPhysics version requested__________________ %s\n", fAliPhysicsVersion.Data());
if (!fAliRootMode.IsNull())
printf("= Requested AliRoot mode________________________ %s\n", fAliRootMode.Data());
if (fNproofWorkers)
Expand Down Expand Up @@ -2586,6 +2595,7 @@ void AliAnalysisAlien::Print(Option_t *) const
printf("= Version of API requested: ____________________ %s\n", fAPIVersion.Data());
printf("= Version of ROOT requested: ___________________ %s\n", fROOTVersion.Data());
printf("= Version of AliRoot requested: ________________ %s\n", fAliROOTVersion.Data());
printf("= Version of AliPhysics requested: _____________ %s\n", fAliPhysicsVersion.Data());
if (fUser.Length())
printf("= User running the plugin: _____________________ %s\n", fUser.Data());
printf("= Grid workdir relative to user $HOME: _________ %s\n", fGridWorkingDir.Data());
Expand Down Expand Up @@ -2691,6 +2701,7 @@ void AliAnalysisAlien::SetDefaults()
fAPIVersion = "";
fROOTVersion = "";
fAliROOTVersion = "";
fAliPhysicsVersion = "";
fUser = ""; // Your alien user name
fGridWorkingDir = "";
fGridDataDir = ""; // Can be like: /alice/sim/PDC_08a/LHC08c9/
Expand Down Expand Up @@ -3478,6 +3489,13 @@ Bool_t AliAnalysisAlien::StartAnalysis(Long64_t /*nentries*/, Long64_t /*firstEn
return kFALSE;
}
}
if ( ! fAliPhysicsVersion.IsNull() ) {
if (gROOT->ProcessLine(Form("gProof->EnablePackage(\"VO_ALICE@AliPhysics::%s\", (TList*)%p, kTRUE);",
fAliPhysicsVersion.Data(), &optionsList))) {
Error("StartAnalysis", "There was an error trying to enable package VO_ALICE@AliPhysics::%s", fAliPhysicsVersion.Data());
return kFALSE;
}
}
}
// Enable first par files from fAdditionalLibs
if (!parLibs.IsNull()) {
Expand Down
5 changes: 4 additions & 1 deletion ANALYSIS/ANALYSISalice/AliAnalysisAlien.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class AliAnalysisAlien : public AliAnalysisGrid {
const char *GetROOTVersion() const {return fROOTVersion;}
virtual void SetAliROOTVersion(const char *version) {fAliROOTVersion=version;}
const char *GetAliROOTVersion() const {return fAliROOTVersion;}
virtual void SetAliPhysicsVersion(const char *version) {fAliPhysicsVersion=version;}
const char *GetAliPhysicsVersion() const {return fAliPhysicsVersion;}
virtual void SetUser(const char *user) {fUser = user;}
const char *GetUser() const {return fUser;}
virtual void SetTTL(Int_t ttl=30000) {fTTL = ttl;}
Expand Down Expand Up @@ -268,6 +270,7 @@ class AliAnalysisAlien : public AliAnalysisGrid {
TString fAPIVersion; // API version
TString fROOTVersion; // ROOT version
TString fAliROOTVersion; // AliROOT version
TString fAliPhysicsVersion; // AliPhysics version
TString fExternalPackages; // External packages
TString fUser; // AliEn user name
TString fGridWorkingDir; // AliEn directory containing the input packages
Expand Down Expand Up @@ -305,6 +308,6 @@ class AliAnalysisAlien : public AliAnalysisGrid {
TString fFriendLibs; // List of libs (separated by blacs) needed for friends processing
TString fTreeName; // Name of the tree to be analyzed

ClassDef(AliAnalysisAlien, 26) // Class providing some AliEn utilities
ClassDef(AliAnalysisAlien, 27) // Class providing some AliEn utilities
};
#endif

0 comments on commit 72e5e91

Please sign in to comment.