fFileForTestMode(),
fRootVersionForProof(),
fAliRootMode(),
+ fProofProcessOpt(),
fMergeDirName(),
fInputFiles(0),
fPackages(0),
fModules(0),
- fProofParam()
+ fProofParam(),
+ fDropToShell(true)
{
// Dummy ctor.
SetDefaults();
fFileForTestMode(),
fRootVersionForProof(),
fAliRootMode(),
+ fProofProcessOpt(),
fMergeDirName(),
fInputFiles(0),
fPackages(0),
fModules(0),
- fProofParam()
+ fProofParam(),
+ fDropToShell(true)
{
// Default ctor.
SetDefaults();
fFileForTestMode(other.fFileForTestMode),
fRootVersionForProof(other.fRootVersionForProof),
fAliRootMode(other.fAliRootMode),
+ fProofProcessOpt(other.fProofProcessOpt),
fMergeDirName(other.fMergeDirName),
fInputFiles(0),
fPackages(0),
fModules(0),
- fProofParam()
+ fProofParam(),
+ fDropToShell(other.fDropToShell)
{
// Copy ctor.
fGridJDL = (TGridJDL*)gROOT->ProcessLine("new TAlienJDL()");
fFileForTestMode = other.fFileForTestMode;
fRootVersionForProof = other.fRootVersionForProof;
fAliRootMode = other.fAliRootMode;
+ fProofProcessOpt = other.fProofProcessOpt;
fMergeDirName = other.fMergeDirName;
+ fDropToShell = other.fDropToShell;
if (other.fInputFiles) {
fInputFiles = new TObjArray();
TIter next(other.fInputFiles);
if (!Submit()) return kFALSE;
}
- Info("StartAnalysis", "\n#### STARTING AN ALIEN SHELL FOR YOU. EXIT WHEN YOUR JOB %s HAS FINISHED. #### \
- \n You may exit at any time and terminate the job later using the option <terminate> \
- \n ##################################################################################", jobID.Data());
- gSystem->Exec("aliensh");
+ if (fDropToShell) {
+ Info("StartAnalysis", "\n#### STARTING AN ALIEN SHELL FOR YOU. EXIT WHEN YOUR JOB %s HAS FINISHED. #### \
+ \n You may exit at any time and terminate the job later using the option <terminate> \
+ \n ##################################################################################", jobID.Data());
+ gSystem->Exec("aliensh");
+ } else {
+ Info("StartAnalysis", "\n#### SUBMITTED JOB %s TO ALIEN QUEUE #### \
+ \n Remember to terminate the job later using the option <terminate> \
+ \n ##################################################################################", jobID.Data());
+ }
return kTRUE;
}
if (!fRunNumbers.Length() && !fRunRange[0]) break;
}
if (!ntosubmit) return kTRUE;
- Info("StartAnalysis", "\n #### STARTING AN ALIEN SHELL FOR YOU. You can exit any time or inspect your jobs in a different shell.##########\
- \n Make sure your jobs are in a final state (you can resubmit failed ones via 'masterjob <id> resubmit ERROR_ALL')\
- \n Rerun in 'terminate' mode to submit all merging stages, each AFTER the previous one completed. The final merged \
- \n output will be written to your alien output directory, while separate stages in <Stage_n>. \
- \n ################################################################################################################");
- gSystem->Exec("aliensh");
+ if (fDropToShell) {
+ Info("StartAnalysis", "\n #### STARTING AN ALIEN SHELL FOR YOU. You can exit any time or inspect your jobs in a different shell.##########\
+ \n Make sure your jobs are in a final state (you can resubmit failed ones via 'masterjob <id> resubmit ERROR_ALL')\
+ \n Rerun in 'terminate' mode to submit all merging stages, each AFTER the previous one completed. The final merged \
+ \n output will be written to your alien output directory, while separate stages in <Stage_n>. \
+ \n ################################################################################################################");
+ gSystem->Exec("aliensh");
+ } else {
+ Info("StartAnalysis", "\n #### STARTED MERGING JOBS FOR YOU #### \
+ \n Make sure your jobs are in a final state (you can resubmit failed ones via 'masterjob <id> resubmit ERROR_ALL') \
+ \n Rerun in 'terminate' mode to submit all merging stages, each AFTER the previous one completed. The final merged \
+ \n output will be written to your alien output directory, while separate stages in <Stage_n>. \
+ \n ################################################################################################################");
+ }
return kTRUE;
}
virtual void SetOutputSingleFolder(const char *folder) {fOutputSingle = folder; fSplitMode="file"; fSplitMaxInputFileNumber=1;}
virtual void SetFastReadOption(Bool_t on=kTRUE) {fFastReadOption = on ? 1 : 0;}
virtual void SetOverwriteMode(Bool_t on=kTRUE) {fOverwriteMode = on ? 1 : 0;}
+ virtual void SetDropToShell(Bool_t drop=true) {fDropToShell = drop;}
TGridJDL *GetGridJDL() const {return fGridJDL;}
TGridJDL *GetMergingJDL() const {return fMergingJDL;}
virtual void SetNproofWorkersPerSlave(Int_t nworkers) {fNproofWorkersPerSlave = nworkers;}
virtual void SetRootVersionForProof(const char *version) {fRootVersionForProof = version;}
virtual void SetAliRootMode(const char *mode) {fAliRootMode = mode;}
+ virtual void SetProofProcessOpt(const char *proofOpt="") {fProofProcessOpt = proofOpt;}
+ virtual TString GetProofProcessOpt() {return fProofProcessOpt;}
// .txt file containing the list of files to be chained in test mode
virtual void SetFileForTestMode(const char *filename) {fFileForTestMode = filename;}
virtual TChain *GetChainForTestMode(const char *treeName) const;
TString fFileForTestMode; // .txt file for the chain to be used in PROOF test mode
TString fRootVersionForProof; // ROOT version to be used in PROOF mode. The default one taken if empty.
TString fAliRootMode; // AliRoot mode among the list supported by the proof cluster
+ TString fProofProcessOpt; // Option passed to proof process
TString fMergeDirName; // Name of the directory that should be added to the output directory
TObjArray *fInputFiles; // List of input files to be processed by the job
TObjArray *fPackages; // List of packages to be used
TObjArray *fModules; // List of AliAnalysisTaskCfg modules
TMap fProofParam; // Key-value pairs for proof mode
+ Bool_t fDropToShell; // If true, execute aliensh on start
- ClassDef(AliAnalysisAlien, 20) // Class providing some AliEn utilities
+ ClassDef(AliAnalysisAlien, 21) // Class providing some AliEn utilities
};
#endif
}
fMode = kProofAnalysis;
TString line;
+ TString proofProcessOpt;
SetEventLoop(kTRUE);
// Set the dataset flag
TObject::SetBit(kUseDataSet);
} else {
dataset = fGridHandler->GetProofDataSet();
}
+
+ proofProcessOpt = fGridHandler->GetProofProcessOpt();
}
if (!gROOT->GetListOfProofs() || !gROOT->GetListOfProofs()->GetEntries()) {
line = Form("gProof->AddInput((TObject*)%p);", this);
gROOT->ProcessLine(line);
Long_t retv;
- line = Form("gProof->Process(\"%s\", \"AliAnalysisSelector\", \"\", %lld, %lld);",
- dataset, nentries, firstentry);
+ line = Form("gProof->Process(\"%s\", \"AliAnalysisSelector\", \"%s\", %lld, %lld);",
+ dataset,proofProcessOpt.Data(), nentries, firstentry);
cout << "===== RUNNING PROOF ANALYSIS " << GetName() << " ON DATASET " << dataset << endl;
retv = (Long_t)gROOT->ProcessLine(line);
return retv;