]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDInputHandler.cxx
added creation of image file in the Finish method
[u/mrichter/AliRoot.git] / STEER / AliESDInputHandler.cxx
index 1be4fafe8e6fab6a9c0325ec6444d54ece91a2b9..f5d9641871f081f30d02c16e06cc4d0ebcdffa4b 100644 (file)
 
 ClassImp(AliESDInputHandler)
 
+static Option_t *gESDDataType = "ESD";
+
 //______________________________________________________________________________
 AliESDInputHandler::AliESDInputHandler() :
   AliInputEventHandler(),
   fEvent(0x0),
-  fBranches(""),
-  fBranchesOn(""),
   fAnalysisType(0),
   fNEvents(0),
   fUseTags(kFALSE),
@@ -64,8 +64,8 @@ AliESDInputHandler::~AliESDInputHandler()
 
 //______________________________________________________________________________
 AliESDInputHandler::AliESDInputHandler(const char* name, const char* title):
-    AliInputEventHandler(name, title), fEvent(0x0), fBranches(""), fBranchesOn(""), fAnalysisType(0),
-     fUseTags(kFALSE), fChainT(0), fTreeT(0), fRunTag(0)
+    AliInputEventHandler(name, title), fEvent(0x0), fAnalysisType(0),
+     fNEvents(0), fUseTags(kFALSE), fChainT(0), fTreeT(0), fRunTag(0)
 {
     // Constructor
 }
@@ -121,14 +121,12 @@ Bool_t AliESDInputHandler::Notify(const char* path)
     
     TString fileName(path);
     if(fileName.Contains("#AliESDs.root")){
-       fileName.ReplaceAll("#AliESDs.root", "");
        zip = kTRUE;
     } 
     else if (fileName.Contains("AliESDs.root")){
        fileName.ReplaceAll("AliESDs.root", "");
     }
     else if(fileName.Contains("#AliAOD.root")){
-       fileName.ReplaceAll("#AliAOD.root", "");
        zip = kTRUE;
     }
     else if(fileName.Contains("AliAOD.root")){
@@ -136,7 +134,6 @@ Bool_t AliESDInputHandler::Notify(const char* path)
     }
     else if(fileName.Contains("#galice.root")){
        // For running with galice and kinematics alone...
-       fileName.ReplaceAll("#galice.root", "");
        zip = kTRUE;
     }
     else if(fileName.Contains("galice.root")){
@@ -175,7 +172,7 @@ Bool_t AliESDInputHandler::Notify(const char* path)
     const char* name = 0x0;
     TString tagFilename;
     if (zip) {
-       TFile* file = TFile::Open(fileName.Data());
+       TFile* file = fTree->GetCurrentFile();
        TArchiveFile* arch = file->GetArchive();
        TObjArray* arr = arch->GetMembers();
        TIter next(arr);
@@ -208,31 +205,9 @@ Bool_t AliESDInputHandler::Notify(const char* path)
 }
 
 
-void AliESDInputHandler::SwitchOffBranches() const {
-  //
-  // Switch of branches on user request
-    TObjArray * tokens = fBranches.Tokenize(" ");
-    Int_t ntok = tokens->GetEntries();
-    for (Int_t i = 0; i < ntok; i++)  {
-       TString str = ((TObjString*) tokens->At(i))->GetString();
-       if (str.Length() == 0)
-           continue;
-       fTree->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 0);
-       AliInfo(Form("Branch %s switched off \n", str.Data()));
-    }
-}
 
-void AliESDInputHandler::SwitchOnBranches() const {
-  //
-  // Switch of branches on user request
-  TObjArray * tokens = fBranchesOn.Tokenize(" ");
-  Int_t ntok = tokens->GetEntries();
-
-  for (Int_t i = 0; i < ntok; i++)  {
-      TString str = ((TObjString*) tokens->At(i))->GetString();
-      if (str.Length() == 0)
-         continue;
-      fTree->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 1);
-      AliInfo(Form("Branch %s switched on \n", str.Data()));
-  }
+Option_t *AliESDInputHandler::GetDataType() const
+{
+// Returns handled data type.
+   return gESDDataType;
 }