#ifdef WITHALIEN
#include <TGridResult.h>
#include <TFileMerger.h>
+#include <TFile.h>
#endif
#include <TChain.h>
#include <TGrid.h>
fESDTreeName("esdTree"),
fAmgr(0)
{
+ //ctor
+ // connects to alien and creates an analysis manager
+
fTimer.Reset() ;
TString token = gSystem->Getenv("GRID_TOKEN") ;
fESDTreeName(""),
fAmgr(0x0)
{
-
+ //copy ctor
+ // connects to alien and creates an analysis manager
+
fESDTreeName = ag.fESDTreeName ;
TString token = gSystem->Getenv("GRID_TOKEN") ;
//______________________________________________________________________________
void AliAnalysisGoodies::Help() const
{
+ // helper
+ // display all available utilities
AliInfo("Analysis utilities:\n") ;
printf(" *** Alien2Local : copy files ESD files listed in an xml collection from AliEn catalog to local storage and creates a local xml collection \n") ;
printf(" usage: Alien2Local(in, out)\n") ;
collectionOu->SetCollectionName(collectionNameOu) ;
collectionOu->WriteHeader() ;
- TFileMerger merger ;
-
const char* ocwd = gSystem->WorkingDirectory();
Int_t counter = 1 ;
AliInfo(Form("Copying %s to %s\n", fileTURL.Data(), dir.Data())) ;
collectionOu->WriteBody(counter, collectionIn->GetGUID(""), collectionIn->GetLFN(""), dir, list) ;
counter++ ;
- merger.Cp(fileTURL, dir) ;
+ TFile::Cp(fileTURL, dir) ;
}
collectionOu->Export() ;
gSystem->ChangeDirectory(ocwd) ;
char filename[20] ;
if (opt == "AOD" ) {
- if ( fAmgr->GetEventHandler() == 0x0) {
+ if ( fAmgr->GetOutputEventHandler() == 0x0) {
AliAODHandler * aodHandler = new AliAODHandler() ;
aodHandler->SetOutputFileName(Form("%s_0.root",task->GetName())) ;
- fAmgr->SetEventHandler(aodHandler) ;
+ fAmgr->SetOutputEventHandler(aodHandler) ;
}
sprintf(filename, "default") ;
}
- else {
- if ( fAmgr->GetEventHandler() == 0x0) {
- AliAODHandler * aodHandler = new AliAODHandler() ;
- fAmgr->SetEventHandler(aodHandler) ;
- }
+ else
sprintf(filename, "%s_%d.root",task->GetName(), index) ;
- }
AliAnalysisDataContainer * taskOuput = 0x0 ;
if ( fAmgr->GetOutputs() )