AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAFRailway.C
Go to the documentation of this file.
1 
11 #ifndef AAFHELPER_C
12 #define AAFHELPER_C
13 #include "ProofRailway.C"
14 #ifndef __CINT__
15 # include "AvailableSoftware.C"
16 # include <TUrl.h>
17 # include <TString.h>
18 # include <TProof.h>
19 # include <AliAnalysisManager.h>
20 #else
21 class TUrl;
22 class AliAnalysisAlien;
23 #endif
24 
25 // ===================================================================
72 struct AAFRailway : public ProofRailway
73 {
80  AAFRailway(const TUrl& url, Int_t verbose)
81  : ProofRailway(url, verbose)
82  {
83  fOptions.Add("aliroot", "VERSION", "AliROOT version", "last");
84  fOptions.Add("root", "VERISON", "ROOT version", "last");
85  fOptions.Add("nocache", "Disable tree cache");
86  }
87  virtual ~AAFRailway() {}
93  virtual const char* AliPhysicsParName() const
94  {
95  return Form("VO_ALICE@AliPhysics::%s", fOptions.Get("aliphysics").Data());
96  }
98  {
99  return true;
100  }
106  virtual const char* AliROOTParName() const
107  {
108  return Form("VO_ALICE@AliRoot::%s", fOptions.Get("aliroot").Data());
109  }
111  {
112  return true;
113  }
120  virtual Bool_t PreSetup()
121  {
122  TString aliphysics("last");
123  TString aliroot("last");
124  TString root("last");
125  if (fOptions.Has("aliphysics")) aliphysics = fOptions.Get("aliphysics");
126  if (fOptions.Has("aliroot")) aliroot = fOptions.Get("aliroot");
127  if (fOptions.Has("root")) root = fOptions.Get("root");
128 
129  AvailableSoftware::Check(aliphysics,aliroot, root);
130  fOptions.Set("aliphysics", aliphysics);
131  fOptions.Set("aliroot", aliroot);
132  fOptions.Set("root", root);
133 
134  fBasePars = false;
135 
136  // Set this before we try to access the cluster
137  gEnv->SetValue("XSec.GSI.DelegProxy", "2");
138 
139  TProof::Mgr(fUrl.GetHost())
140  ->SetROOTVersion(Form("VO_ALICE@ROOT::%s", root.Data()));
141 
142  if (!ProofRailway::PreSetup()) return false;
143 
144  if (fOptions.Has("nocache"))
145  gProof->SetParameter("PROOF_UseTreeCache", 0);
146  return true;
147  }
151  virtual const Char_t* UrlHelp() const
152  {
153  return "proof://alice-caf*/<dataset>?[&<options>][#<treename>]";
154  }
158  virtual const char* Desc() const { return "AAF (deprecated)"; }
159 };
160 #endif
161 //
162 // EOF
163 //
virtual Bool_t CreateAliPhysicsPar()
Definition: AAFRailway.C:97
OptionList fOptions
Definition: Railway.C:643
virtual const char * Desc() const
Definition: AAFRailway.C:158
const char * url
virtual Bool_t CreateAliROOTPar()
Definition: AAFRailway.C:110
virtual ~AAFRailway()
Definition: AAFRailway.C:87
char Char_t
Definition: External.C:18
virtual const char * AliROOTParName() const
Definition: AAFRailway.C:106
Definition: External.C:92
const TString & Get(const TString &name) const
Definition: Option.C:596
virtual Bool_t PreSetup()
Definition: ProofRailway.C:641
AAFRailway(const TUrl &url, Int_t verbose)
Definition: AAFRailway.C:80
Bool_t Has(const TString &name) const
Definition: Option.C:584
int Int_t
Definition: External.C:63
static Bool_t Check(TString &aliphysics, TString &aliroot, TString &root)
void Set(const TString &name, const TString &value)
Definition: Option.C:736
virtual Bool_t PreSetup()
Definition: AAFRailway.C:120
TUrl fUrl
Definition: Railway.C:642
virtual const Char_t * UrlHelp() const
Definition: AAFRailway.C:151
Option * Add(const TString &name, const TString &arg, const TString &desc, const TString &val="")
Definition: Option.C:421
Find available packages.
bool Bool_t
Definition: External.C:53
virtual const char * AliPhysicsParName() const
Definition: AAFRailway.C:93
Bool_t fBasePars