--- /dev/null
+# this is the startup process for root
+Executable="root.sh";
+Jobtag={"comment:AliEn tutorial batch example - ESD"};
+
+# we split per storage element
+Split="se";
+
+# we want each job to read 100 input files
+SplitMaxInputFileNumber="5";
+
+# this job has to run in the ANALYSIS partition
+Requirements=( member(other.GridPartitions,"Analysis") );
+
+# we need ROOT and the API service configuration package
+Packages={"APISCONFIG::V2.2","pchrist@ROOT::v5.15.04"};
+TTL = "30000";
+
+#ROOT will read this collection file to know, which files to analyze
+InputDataList="wn.xml";
+
+#ROOT requires the collection file in the xml-single format
+InputDataListFormat="merge:/alice/cern.ch/user/p/pchrist/test/ESD/global.xml";
+
+# this is our collection file containing the files to be analyzed
+InputDataCollection="LF:/alice/cern.ch/user/p/pchrist/test/ESD/global.xml,nodownload";
+
+InputFile= {"LF:/alice/cern.ch/user/p/pchrist/test/ESD/runProcess.C",
+ "LF:/alice/cern.ch/user/p/pchrist/test/ESD/demoBatch.C",
+ "LF:/alice/cern.ch/user/p/pchrist/test/ESD/ESD.par",
+ "LF:/alice/cern.ch/user/p/pchrist/test/ESD/ANALYSIS.par",
+ "LF:/alice/cern.ch/user/p/pchrist/test/ESD/AliAnalysisTaskPt.h",
+ "LF:/alice/cern.ch/user/p/pchrist/test/ESD/AliAnalysisTaskPt.cxx"};
+
+# Output archive
+OutputArchive={"log_archive:stdout,stderr@Alice::CERN::se","root_archive.zip:*.root@Alice::CERN::se"};
+
+# Output directory
+OutputDir="/alice/cern.ch/user/p/pchrist/test/ESD/output/#alien_counter#";
+
+# email
+Email="Panos.Christakoglou@cern.ch";
--- /dev/null
+void runProcess() {
+ TStopwatch timer;
+ timer.Start();
+
+ printf("*** Connect to AliEn ***\n");
+ TGrid::Connect("alien://");
+ gSystem->Load("libProofPlayer.so");
+
+ //____________________________________________________//
+ //_____________Setting up ESD.par_____________________//
+ //____________________________________________________//
+ setupPar("ESD");
+ gSystem->Load("libVMC.so");
+ gSystem->Load("libESD.so");
+
+ //_____________________________________________________________//
+ //_____________Setting up ANALYSIS_NEW.par_____________________//
+ //_____________________________________________________________//
+ setupPar("ANALYSIS");
+ gSystem->Load("libANALYSIS.so");
+
+ gROOT->LoadMacro("AliAnalysisTaskPt.cxx+");
+ gROOT->LoadMacro("demoBatch.C");
+ demoBatch();
+
+ //gROOT->LoadMacro("CreateXML.C");
+ //CreateXML();
+
+ timer.Stop();
+ timer.Print();
+}
+
+Int_t setupPar(const char* pararchivename) {
+ ///////////////////
+ // Setup PAR File//
+ ///////////////////
+ if (pararchivename) {
+ char processline[1024];
+ sprintf(processline,".! tar xvzf %s.par",pararchivename);
+ gROOT->ProcessLine(processline);
+ const char* ocwd = gSystem->WorkingDirectory();
+ gSystem->ChangeDirectory(pararchivename);
+
+ // check for BUILD.sh and execute
+ if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
+ printf("*******************************\n");
+ printf("*** Building PAR archive ***\n");
+ printf("*******************************\n");
+
+ if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
+ Error("runProcess","Cannot Build the PAR Archive! - Abort!");
+ return -1;
+ }
+ }
+ // check for SETUP.C and execute
+ if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
+ printf("*******************************\n");
+ printf("*** Setup PAR archive ***\n");
+ printf("*******************************\n");
+ gROOT->Macro("PROOF-INF/SETUP.C");
+ }
+
+ gSystem->ChangeDirectory("../");
+ }
+
+ return 1;
+}