not define this option, so that we only specify it once.
Execute AliAnalysis::SetDropToShell(false) in interpreter - until
patch is applied.
fOptions.Add("pattern","GLOB", "File/directory name pattern");
fOptions.Add("alien", "VERSION","Alien API version", "V1.1x");
fOptions.Add("concat", "Concatenate all runs");
- fOptions.Add("mc", "Assume MC input");
}
GridHelper(const GridHelper& o)
: PluginHelper(o), fRuns()
Info("GridHelper::RegisterRuns", "Reading runs from %s", s.Data());
std::ifstream in(s.Data());
if (!in) {
- Warning("GridHelper::RegisterRuns", "Failed to open %s", s.Data());
- continue;
+ s.Prepend("../");
+ in.open(s.Data());
+ if (!in) {
+ Warning("GridHelper::RegisterRuns", "Failed to open %s", s.Data());
+ continue;
+ }
}
while (!in.eof()) {
Int_t r;
fHandler->SetRunMode(operation);
// --- Add the run numbers ---------------------------------------
- fHandler->SetRunPrefix(mgr->GetMCtruthEventHandler() ? "" : "000");
+ fHandler->SetRunPrefix(fOptions.Has("mc") ? "%d" : "%09d");
Int_t nRun = RegisterRuns();
// --- Do not test copying ---------------------------------------
ret = DeduceType(fUrl.GetFile());
return ret;
}
+ /**
+ * Check if the MC option was set
+ *
+ * @return true if the MC option was given
+ */
+ virtual Bool_t IsMC() const { return fOptions.Has("mc"); }
/**
* The file part of tehe output URL - overwritten by derived classes.
*
Helper(const TUrl& url, Int_t verbose)
: fUrl(url), fOptions(), fVerbose(verbose)
{
+ fOptions.Add("mc", "Assume simulation input");
}
virtual Bool_t ParseOptions()
LiteHelper(const TUrl& url, Int_t verbose)
: ProofHelper(url, verbose), fChain(0)
{
- fOptions.Add("mc", "Scan for MC files (galice,kinematics,trackrefs)");
fOptions.Add("recursive","Recursive scan");
fOptions.Add("pattern", "GLOB", "File name pattern", "*.root");
fOptions.Remove("dsname");
LocalHelper(const TUrl& url, Int_t verbose)
: Helper(url, verbose), fChain(0)
{
- fOptions.Add("mc", "Scan for MC files (galice,kinematics,trackrefs)");
fOptions.Add("recursive","Scan recursive");
fOptions.Add("pattern", "GLOB", "File name pattern", "*.root");
}
// --- that we get offline+(A,C,E) events too --------------------
// ps->SetSkipTriggerClassSelection(true);
}
+ //__________________________________________________________________
+ /**
+ * @return 0 - AOD disabled
+ */
+ virtual AliVEventHandler* CreateOutputHandler(UShort_t) { return 0; }
/**
* Do not the centrality selection
*/
fHandler->SetROOTVersion(root);
fHandler->SetAliROOTVersion(aliroot);
+ // Execute through interpreter until patch is applied
+ gROOT->ProcessLine(Form("((AliAnalysisAlien*)%p)->SetDropToShell(false);",
+ fHandler));
if (fOptions.Has("mode"))
fHandler->SetAliRootMode(fOptions.Get("mode"));
else
{
fOptions.Add("help", "Show help");
fOptions.Add("date", "YYYY-MM-DD HH:MM", "Set date", "now");
- fOptions.Add("mc", "Assume MC input");
fOptions.Add("bare-ps", "Use bare physics selection w/o task");
fOptions.Add("verbose", "LEVEL", "Set verbosity level", 0);
fOptions.Add("url", "URL", "Job location & input URL");
fOptions.Add("events", "N", "Number of events to analyse", -1);
fOptions.Add("type", "ESD|AOD|USER", "Input data stype");
fOptions.Add("setup", "Only do the setup");
+ fOptions.Add("branches", "Load only requested branches");
fEscapedName = EscapeName(fName, "");
}
TrainSetup(const TrainSetup& o)
// --- Create the helper -----------------------------------------
TString url = fOptions.Get("url");
Int_t verbose = fOptions.AsInt("verbose");
- Bool_t mc = fOptions.AsBool("mc");
fHelper = Helper::Create(url.Data(), verbose);
if (!fHelper) {
// --- Check the type, if possible -------------------------------
UShort_t type = fHelper->InputType();
+ Bool_t mc = fHelper->IsMC();
if (fOptions.Has("type")) {
const TString& it = fOptions.Get("type");
if (it.EqualTo("ESD",TString::kIgnoreCase)) type = Helper::kESD;
// In test mode, collect system information on every event
// if (oper == kTest) mgr->SetNSysInfo(1);
if (verbose > 0) mgr->SetDebugLevel(verbose);
+ mgr->SetAutoBranchLoading(!fOptions.Has("branches"));
if (fHelper->Mode() == Helper::kLocal)
mgr->SetUseProgressBar(kTRUE, 100);
status = true;
}
catch (TString& e) {
- if (status) Warning("Run", e);
- else Error("Run", e);
+ if (status) Warning("Run", "%s", e.Data());
+ else Error("Run", "%s", e.Data());
}
if (fOptions.Has("date")) {
TString escaped = EscapeName(fName, "");
ret = train->Run();
}
catch (TString& e) {
- if (!e.IsNull()) Error("Main", e);
+ if (!e.IsNull()) Error("Main", "%s", e.Data());
}
if (gApplication && asProg) {
gSystem->Sleep(3);