ROOT logo
/**************************************************************************
 * Author: Panos Christakoglou.                                           *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

//-----------------------------------------------------------------
//           AliESDTagCreator class
//   This is the class to deal with the tag creation (post process)
//   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
//-----------------------------------------------------------------

//ROOT
#include <Riostream.h>
#include <TFile.h>
#include <TString.h>
#include <TTree.h>
#include <TSystem.h>
#include <TChain.h>
#include <TList.h>
#include <TObjString.h>
#include <TLorentzVector.h>
#include <TMap.h>
#include <TTimeStamp.h>
#include <TRefArray.h>

//ROOT-AliEn
#include <TGrid.h>
#include <TGridResult.h>

//AliRoot
#include "AliRunTag.h"
#include "AliEventTag.h"
#include "AliESD.h"
#include "AliESDEvent.h"
#include "AliESDVertex.h"
#include "AliLog.h"
#include "AliGRPObject.h"

#include "AliESDTagCreator.h"

using std::ifstream;
ClassImp(AliESDTagCreator)


//______________________________________________________________________________
  AliESDTagCreator::AliESDTagCreator() :
    AliTagCreator(),
    fChain(new TChain("esdTree")), fGUIDList(new TList()), 
    fMD5List(new TList()), fTURLList(new TList()), fBranches(""), 
    meminfo(new MemInfo_t) {
  //==============Default constructor for a AliESDTagCreator================
}

//______________________________________________________________________________
AliESDTagCreator::~AliESDTagCreator() {
//================Default destructor for a AliESDTagCreator===================
  delete fChain;
  delete fGUIDList;
  delete fMD5List;
  delete fTURLList;
  delete meminfo;
}

//______________________________________________________________________________
Bool_t AliESDTagCreator::ReadGridCollection(TGridResult *fresult) {
  // Reads the entry of the TGridResult and creates the tags
  Int_t nEntries = fresult->GetEntries();

  TString alienUrl;
//   const char* guid;
//   const char* md5;
//   const char* turl;
//   Long64_t size = -1;

  Int_t counter = 0;
  for(Int_t i = 0; i < nEntries; i++) {
    alienUrl = fresult->GetKey(i,"turl");
//     guid = fresult->GetKey(i,"guid");
//     if(fresult->GetKey(i,"size")) size = atol (fresult->GetKey(i,"size"));
//     md5 = fresult->GetKey(i,"md5");
//     turl = fresult->GetKey(i,"turl");
//     if(md5 && !strlen(guid)) md5 = 0;
//     if(guid && !strlen(guid)) guid = 0;
    
    fChain->Add(alienUrl);
    //fGUIDList->Add(new TObjString(guid));
    //fMD5List->Add(new TObjString(md5));
    //fTURLList->Add(new TObjString(turl));
    
    //TFile *f = TFile::Open(alienUrl,"READ");
    //CreateTag(f,guid,md5,turl,size,counter);
    //f->Close();
    //delete f;	 
    counter += 1;
  }//grid result loop
  
  if (fChain->GetEntries() > 0) {
    AliInfo(Form("ESD chain created......."));	
    AliInfo(Form("Chain entries: %lld",fChain->GetEntries()));	
  } else {
    AliWarning(Form("No ESD files found !"));
    return kFALSE;
  }
    
  // Switch of branches on user request
  SwitchOffBranches();
  CreateTag(fChain,"grid");
  
  return kTRUE;
}

//______________________________________________________________________________
Bool_t AliESDTagCreator::ReadLocalCollection(const char *localpath) {
  // Checks the different subdirs of the given local path and in the
  // case where it finds an AliESDs.root file it creates the tags
  
  void *dira =  gSystem->OpenDirectory(localpath);
  Char_t fPath[512];
  const char * dirname = 0x0;
  const char * filename = 0x0;
  const char * pattern = "AliESDs.root"; 

  Int_t counter = 0;
  while((dirname = gSystem->GetDirEntry(dira))) {
    snprintf(fPath, 512,"%s/%s",localpath,dirname);
    void *dirb =  gSystem->OpenDirectory(fPath);
    while((filename = gSystem->GetDirEntry(dirb))) {
      if(strstr(filename,pattern)) {
	TString fESDFileName;
	fESDFileName = fPath;
	fESDFileName += "/";
	fESDFileName += pattern;

	fChain->Add(fESDFileName);

	//TFile *f = TFile::Open(fESDFileName,"READ");
	//CreateTag(f,fESDFileName,counter);
	//f->Close();
	//delete f;	 
	
	counter += 1;
      }//pattern check
    }//child directory's entry loop
  }//parent directory's entry loop

  AliInfo(Form("ESD chain created......."));	
  AliInfo(Form("Chain entries: %lld",fChain->GetEntries()));	
  // Switch of branches on user request
  SwitchOffBranches();
  CreateTag(fChain,"local");

  return kTRUE;
}

//______________________________________________________________________________
Bool_t AliESDTagCreator::ReadCAFCollection(const char *filename) {
  // Temporary solution for CAF: Takes as an input the ascii file that
  // lists the ESDs stored in the SE of the CAF and creates the tags.

  // Open the input stream
  ifstream in;
  in.open(filename);

  Int_t counter = 0;
  TString esdfile;
  // Read the input list of files and add them to the chain
  while(in.good()) {
    in >> esdfile;
    if (!esdfile.Contains("root")) continue; // protection

    fChain->Add(esdfile);
  
    //TFile *f = TFile::Open(esdfile,"READ");
    //CreateTag(f,esdfile,counter);
    //f->Close();
    //delete f;	 
    
    counter += 1;
  }

  AliInfo(Form("ESD chain created......."));	
  AliInfo(Form("Chain entries: %lld",fChain->GetEntries()));	
  // Switch of branches on user request
  SwitchOffBranches();
  CreateTag(fChain,"proof");

  return kTRUE;
}

//_____________________________________________________________________________
void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
  //private method that creates tag files
  TString fSession = type;
  TString fguid, fmd5, fturl, foldguid;
  TString fTempGuid;

  Int_t iRunNumber = 0;
  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the tag initialization - Memory used: %d MB",meminfo->fMemUsed));
  //Int_t tempmem = meminfo->fMemUsed;
  
  AliInfo(Form("Creating the ESD tags......."));	
  
  Int_t firstEvent = 0,lastEvent = 0;
  AliESDEvent *esd = new AliESDEvent();
  esd->ReadFromTree(chain);
  //  AliESD *esdold = 0x0;
  
  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the esd initialization - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  //tempmem = meminfo->fMemUsed;
  
  Int_t iInitRunNumber = -1;
  chain->GetEntry(0);
  TFile *f = chain->GetFile();
  fTempGuid = f->GetUUID().AsString();

  TString localFileName = "Run"; localFileName += esd->GetRunNumber(); 
  localFileName += ".Event"; localFileName += firstEvent; localFileName += "_"; localFileName += chain->GetEntries(); //localFileName += "."; localFileName += Counter;
  localFileName += ".ESD.tag.root";

  TString fileName;
 
  if(fStorage == 0) {
    fileName = localFileName.Data();      
    AliInfo(Form("Writing tags to local file: %s",fileName.Data()));
  }
  else if(fStorage == 1) {
    TString alienLocation = "/alien";
    alienLocation += gGrid->Pwd();
    alienLocation += fgridpath.Data();
    alienLocation += "/";
    alienLocation +=  localFileName;
    alienLocation += "?se=";
    alienLocation += fSE.Data();
    fileName = alienLocation.Data();
    AliInfo(Form("Writing tags to grid file: %s",fileName.Data()));
  }

  TFile* ftag = TFile::Open(fileName, "recreate");

  AliRunTag *tag = new AliRunTag();
  AliEventTag *evTag = new AliEventTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);
  // Run related information
  tag->SetMagneticField(esd->GetMagneticField());
  tag->SetBeamEnergy(esd->GetBeamEnergy());
  tag->SetBeamType(TString(esd->GetBeamType()));
  tag->SetActiveTriggerClasses(esd->GetESDRun()->GetActiveTriggerClasses());
  
  foldguid = "";

  for(Int_t iEventNumber = 0; iEventNumber < chain->GetEntries(); iEventNumber++) {
    FillEventTag(chain, evTag, iEventNumber, esd);

    if(iEventNumber == 0) iInitRunNumber = esd->GetRunNumber();
    iRunNumber = esd->GetRunNumber();
    if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD - You are trying to merge different runs!!!");

    TFile *file = chain->GetFile();
    //    const TUrl *url = file->GetEndpointUrl();
    fguid = file->GetUUID().AsString();

    if (foldguid == fguid) {
      tag->AddEventTag(*evTag);
    }
    else {
      AliFileTag *nftag = new AliFileTag();
      nftag->SetGUID(fguid);

//       if(fSession == "grid") {
// 	TString fturltemp = "alien://"; fturltemp += url->GetFile();
// 	fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
//       }
//       else fturl = url->GetFile();
      fturl = file->GetName();

      if(fSession == "grid") {
	nftag->SetMD5("");
	nftag->SetTURL(fturl);
	nftag->SetSize(0);
      }
      else {
	nftag->SetPath(fturl);
	nftag->SetSize(0);
	nftag->SetMD5("");
	nftag->SetTURL(fturl);
      }
      foldguid = fguid;
      
      if (tag->GetFileId(fguid) > -1)
	AliFatal("Adding a file which is already in the RunTag.");

      tag->AddFileTag(nftag);
    }

    tag->SetRunId(iInitRunNumber);
//     if(fIsSim) tag->SetDataType(0);
//     else tag->SetDataType(1);

//     if(fguid != fTempGuid) {
//       fTempGuid = fguid;
//       ttag->Fill();
//       tag->Clear("");
//     }
    if(iEventNumber+1 == chain->GetEntries()) {
      //AliInfo(Form("File: %s",fturl.Data()));

      ttag->Fill();
      tag->Clear("");
    }      
  }//event loop
  lastEvent = chain->GetEntries();
  
  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the event and track loop - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  //tempmem = meminfo->fMemUsed;

  //chain->Delete("");
  
  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the t->Delete - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  //tempmem = meminfo->fMemUsed;

  ftag->cd();
  tag->Clear();
  ttag->Write();
  ftag->Close();

  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the file closing - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  //tempmem = meminfo->fMemUsed;

  delete esd;
  delete tag;

  //gSystem->GetMemInfo(meminfo);
  //AliInfo(Form("After the delete objects - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
}

//_____________________________________________________________________________
void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5, const char *turl, Long64_t size, Int_t Counter) {
  //private method that creates tag files
  TString fguid = guid;
  TString fmd5 = md5;
  TString fturl = turl;
  /////////////
  //muon code//
  ////////////
    //  Double_t fMUONMASS = 0.105658369;
  //Variables
//   Double_t fX,fY,fZ ;
//   Double_t fThetaX, fThetaY, fPyz, fChisquare;
//   Double_t fPxRec, fPyRec, fPzRec, fEnergy;
//   Int_t fCharge;
//   TLorentzVector fEPvector;

//   Float_t fLowPtCut = 1.0;
//   Float_t fHighPtCut = 3.0;
//   Float_t fVeryHighPtCut = 10.0;
  ////////////

//   Double_t partFrac[5] = {0.01, 0.01, 0.85, 0.10, 0.05};

  // Creates the tags for all the events in a given ESD file
  Bool_t fIsSim = kTRUE;
//   Int_t ntrack;
//   Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
//   Int_t nPos, nNeg, nNeutr;
//   Int_t nK0s, nNeutrons, nPi0s, nGamas;
//   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
//   Int_t nMu1GeV, nMu3GeV, nMu10GeV;
//   Int_t nEl1GeV, nEl3GeV, nEl10GeV;
//   Float_t maxPt = .0, etamaxPt = -999., phimaxPt = -999., meanPt = .0, totalP = .0;
//   Int_t fVertexflag;
  Int_t iRunNumber = 0;
//   TString fVertexName;
//   TRefArray tmp;

  AliRunTag *tag = new AliRunTag();
  AliEventTag *evTag = new AliEventTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);
  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the tag initialization - Memory used: %d MB",meminfo->fMemUsed));
  Int_t tempmem = meminfo->fMemUsed;
  
  AliInfo(Form("Creating the ESD tags......."));	
  
  Int_t firstEvent = 0,lastEvent = 0;
  TTree *t = (TTree*) file->Get("esdTree");
  AliESDEvent *esd = new AliESDEvent();
  esd->ReadFromTree(t);
  
  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the esd initialization - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  tempmem = meminfo->fMemUsed;

  t->GetEntry(0);
  Int_t iInitRunNumber = esd->GetRunNumber();
  tag->SetMagneticField(esd->GetMagneticField());
  tag->SetBeamEnergy(esd->GetBeamEnergy());
  tag->SetBeamType(TString(esd->GetBeamType()));
  tag->SetActiveTriggerClasses(esd->GetESDRun()->GetActiveTriggerClasses());

  AliFileTag *eftag = new AliFileTag();
  eftag->SetMD5(md5);
  eftag->SetTURL(fturl);
  eftag->SetSize(size);
  tag->AddFileTag(eftag);

  Int_t iNumberOfEvents = (Int_t)t->GetEntries();
  for (Int_t iEventNumber = 0; iEventNumber < iNumberOfEvents; iEventNumber++) {
    FillEventTag(t, evTag, iEventNumber, esd);
    iRunNumber = esd->GetRunNumber();
    if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD!!!");
    
    tag->SetRunId(iInitRunNumber);
    if(fIsSim) tag->SetDataType(0);
    else tag->SetDataType(1);
    tag->AddEventTag(*evTag);
  }//event loop
  lastEvent = iNumberOfEvents;
  
  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the event and track loop - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  tempmem = meminfo->fMemUsed;
  t->Delete("");
  
  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the t->Delete - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  tempmem = meminfo->fMemUsed;

  TString localFileName = "Run"; localFileName += tag->GetRunId(); 
  localFileName += ".Event"; localFileName += firstEvent; localFileName += "_"; localFileName += lastEvent; localFileName += "."; localFileName += Counter;
  localFileName += ".ESD.tag.root";

  TString fileName;
  
  if(fStorage == 0) {
    fileName = localFileName.Data();      
    AliInfo(Form("Writing tags to local file: %s",fileName.Data()));
  }
  else if(fStorage == 1) {
    TString alienLocation = "/alien";
    alienLocation += gGrid->Pwd();
    alienLocation += fgridpath.Data();
    alienLocation += "/";
    alienLocation +=  localFileName;
    alienLocation += "?se=";
    alienLocation += fSE.Data();
    fileName = alienLocation.Data();
    AliInfo(Form("Writing tags to grid file: %s",fileName.Data()));
  }

  TFile* ftag = TFile::Open(fileName, "recreate");
  ftag->cd();
  ttag->Fill();
  tag->Clear();
  ttag->Write();
  ftag->Close();

  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the file closing - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
  tempmem = meminfo->fMemUsed;

  delete ftag;
  delete esd;

  delete tag;
  gSystem->GetMemInfo(meminfo);
  AliInfo(Form("After the delete objects - Memory used: %d MB - Increase: %d MB",meminfo->fMemUsed,meminfo->fMemUsed - tempmem));
}

//_____________________________________________________________________________
void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counter) {
  //private method that creates tag files
  /////////////
  //muon code//
  ////////////
  //  Double_t fMUONMASS = 0.105658369;
  //Variables
//   Double_t fX,fY,fZ ;
//   Double_t fThetaX, fThetaY, fPyz, fChisquare;
//   Double_t fPxRec, fPyRec, fPzRec, fEnergy;
//   Int_t fCharge;
//   TLorentzVector fEPvector;

//   Float_t fLowPtCut = 1.0;
//   Float_t fHighPtCut = 3.0;
//   Float_t fVeryHighPtCut = 10.0;
  ////////////

//   Double_t partFrac[5] = {0.01, 0.01, 0.85, 0.10, 0.05};

  // Creates the tags for all the events in a given ESD file
//   Bool_t fIsSim = kTRUE;
//   Int_t ntrack;
//   Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
//   Int_t nPos, nNeg, nNeutr;
//   Int_t nK0s, nNeutrons, nPi0s, nGamas;
//   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
//   Int_t nMu1GeV, nMu3GeV, nMu10GeV;
//   Int_t nEl1GeV, nEl3GeV, nEl10GeV;
//   Float_t maxPt = .0, etamaxPt = -999, phimaxPt = -999., meanPt = .0, totalP = .0;
//   Int_t fVertexflag;
  Int_t iRunNumber = 0;
//   TString fVertexName;
//   TRefArray tmp;

  AliRunTag *tag = new AliRunTag();
  AliEventTag *evTag = new AliEventTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);
  
  AliInfo(Form("Creating the ESD tags......."));	
  
  Int_t firstEvent = 0,lastEvent = 0;
  
  TTree *t = (TTree*) file->Get("esdTree");
  AliESDEvent *esd = new AliESDEvent();
  esd->ReadFromTree(t);
  
  t->GetEntry(0);
  Int_t iInitRunNumber = esd->GetRunNumber();
  tag->SetMagneticField(esd->GetMagneticField());
  tag->SetBeamEnergy(esd->GetBeamEnergy());
  tag->SetBeamType(TString(esd->GetBeamType()));
  tag->SetActiveTriggerClasses(esd->GetESDRun()->GetActiveTriggerClasses());

  AliFileTag *eftag = new AliFileTag();
  eftag->SetPath(filepath);
  eftag->SetTURL(Form("local://%s", filepath));
  eftag->SetSize(0);
  eftag->SetMD5("");
  tag->AddFileTag(eftag);

  Int_t iNumberOfEvents = (Int_t)t->GetEntries();
  for (Int_t iEventNumber = 0; iEventNumber < iNumberOfEvents; iEventNumber++) {
    FillEventTag(t, evTag, iEventNumber, esd);
    iRunNumber = esd->GetRunNumber();
    if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD!!!");
    //    evTag->SetPath(filepath);
    
    tag->SetRunId(iInitRunNumber);
//     if(fIsSim) tag->SetDataType(0);
//     else tag->SetDataType(1);
    tag->AddEventTag(*evTag);
  }//event loop
  lastEvent = iNumberOfEvents;
  
  t->Delete("");
  
  TString localFileName = "Run"; localFileName += tag->GetRunId(); 
  localFileName += ".Event"; localFileName += firstEvent; localFileName += "_"; localFileName += lastEvent; localFileName += "."; localFileName += Counter;
  localFileName += ".ESD.tag.root";

  TString fileName;
  
  if(fStorage == 0) {
    fileName = localFileName.Data();      
    AliInfo(Form("Writing tags to local file: %s",fileName.Data()));
  }
  else if(fStorage == 1) {
    TString alienLocation = "/alien";
    alienLocation += gGrid->Pwd();
    alienLocation += fgridpath.Data();
    alienLocation += "/";
    alienLocation +=  localFileName;
    alienLocation += "?se=";
    alienLocation += fSE.Data();
    fileName = alienLocation.Data();
    AliInfo(Form("Writing tags to grid file: %s",fileName.Data()));
  }

  TFile* ftag = TFile::Open(fileName, "recreate");
  ftag->cd();
  ttag->Fill();
  tag->Clear();
  ttag->Write();
  ftag->Close();

  delete ftag;
  delete esd;

  delete tag;
}

//_____________________________________________________________________________
void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRPObject *grpData, ULong_t * qa, Bool_t * es, Int_t qalength, Int_t eslength) {
  //GRP
  Float_t lhcLuminosity = 0.0;
  TString lhcState = "test";
  //UInt_t detectorMask = 0;
  Int_t detectorMask = 0;

  detectorMask = grpData->GetDetectorMask();
  time_t startTime = grpData->GetTimeStart();
  TTimeStamp t1(startTime);
  time_t endTime = grpData->GetTimeEnd();
  TTimeStamp t2(endTime);
  const char* beamtype = grpData->GetBeamType();
  Float_t beamenergy = grpData->GetBeamEnergy();


  /////////////
  //muon code//
  ////////////
//   Double_t fMUONMASS = 0.105658369;
  //Variables
//   Double_t fX,fY,fZ ;
//   Double_t fThetaX, fThetaY, fPyz, fChisquare;
//   Double_t fPxRec,fPyRec, fPzRec, fEnergy;
//   Int_t fCharge;
//   TLorentzVector fEPvector;

//   Float_t fLowPtCut = 1.0;
//   Float_t fHighPtCut = 3.0;
//   Float_t fVeryHighPtCut = 10.0;
  ////////////

//   Double_t partFrac[5] = {0.01, 0.01, 0.85, 0.10, 0.05};

  // Creates the tags for all the events in a given ESD file
//   Int_t ntrack;
//   Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
//   Int_t nPos, nNeg, nNeutr;
//   Int_t nK0s, nNeutrons, nPi0s, nGamas;
//   Int_t nCh1GeV, nCh3GeV, nCh10GeV;
//   Int_t nMu1GeV, nMu3GeV, nMu10GeV;
//   Int_t nEl1GeV, nEl3GeV, nEl10GeV;
//   Float_t maxPt = .0, etamaxPt = -999., phimaxPt = -999., meanPt = .0, totalP = .0;
//   Int_t fVertexflag;
  Int_t iRunNumber = 0;
  TString fguid, fmd5, fturl;
//   TString fVertexName("default");
//   TRefArray tmp;
  
  AliInfo(Form("Creating the ESD tags......."));	

  TFile *esdfile = TFile::Open("AliESDs.root");
  if (!esdfile || !esdfile->IsOpen()) {
    AliError(Form("opening failed"));
    delete esdfile;
    return ;
  }  
  Int_t lastEvent = 0;
  TTree *b = (TTree*) esdfile->Get("esdTree");
  AliESDEvent *esd = new AliESDEvent();
  esd->ReadFromTree(b);

  b->GetEntry(0);
  Int_t iInitRunNumber = esd->GetRunNumber();
  
  Int_t iNumberOfEvents = (Int_t)b->GetEntries();
  if ((fLastEvent == -1) || ((Int_t) b->GetEntries() < fLastEvent))
    lastEvent = fFirstEvent  + (Int_t)b->GetEntries() - 1;
  else lastEvent = fLastEvent;

  char fileName[256];
  snprintf(fileName, 256, "Run%d.Event%d_%d.ESD.tag.root", 
	  iInitRunNumber,fFirstEvent,lastEvent);
  AliInfo(Form("writing tags to file %s", fileName));
  AliDebug(1, Form("writing tags to file %s", fileName));
 
  TFile* ftag = TFile::Open(fileName, "recreate");
  
  AliRunTag *tag = new AliRunTag();
  AliEventTag *evTag = new AliEventTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);

  if ((fLastEvent != -1) && ((Int_t) b->GetEntries() > fLastEvent)) 
    iNumberOfEvents = fLastEvent + 1;

  AliFileTag *eftag = new AliFileTag();
  tag->AddFileTag(eftag);

  for (Int_t iEventNumber = fFirstEvent; iEventNumber < iNumberOfEvents; iEventNumber++) {
    FillEventTag(b, evTag, iEventNumber, esd);
    iRunNumber = esd->GetRunNumber();
    if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD!!!");

    if (iEventNumber == fFirstEvent) {
      TFile *file = b->GetCurrentFile();
//      const TUrl *url = file->GetEndpointUrl();
      fguid = file->GetUUID().AsString();

//       if(fStorage == 1) {
// 	TString fturltemp = "alien://"; fturltemp += url->GetFile();
// 	fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
//       }
//       else fturl = url->GetFile(); 
      fturl = file->GetName();
      
      //    evTag->SetGUID(fguid);
      ((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetGUID(fguid);
      if(fStorage == 1) {
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetMD5("");
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetTURL(fturl);
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetSize(0);
      }
      else {
	//      evTag->SetPath(fturl);
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetPath(fturl);
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetMD5("");
	((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetSize(0);
      }

    }

    tag->AddEventTag(*evTag);
  }    
  
  tag->SetLHCTag(lhcLuminosity,lhcState);
  tag->SetDetectorTag(esd->GetESDRun()->GetDetectorsInDAQ(), esd->GetESDRun()->GetDetectorsInReco());
  tag->SetActiveTriggerClasses(esd->GetESDRun()->GetActiveTriggerClasses());

  // Get magnetic field info
  Bool_t ok = kTRUE;
  
  Float_t l3Current = grpData->GetL3Current((AliGRPObject::Stats)0);
  if (l3Current == AliGRPObject::GetInvalidFloat()) {
    AliError("GRP/GRP/Data entry:  missing value for the L3 current !");
    ok = kFALSE;
  }
  
  Char_t l3Polarity = grpData->GetL3Polarity();
  if (l3Polarity == AliGRPObject::GetInvalidChar()) {
    AliError("GRP/GRP/Data entry:  missing value for the L3 polarity !");
    ok = kFALSE;
  }
  
  // Dipole
  Float_t diCurrent = grpData->GetDipoleCurrent((AliGRPObject::Stats)0);
  if (diCurrent == AliGRPObject::GetInvalidFloat()) {
    AliError("GRP/GRP/Data entry:  missing value for the dipole current !");
    ok = kFALSE;
  }
  
  Char_t diPolarity = grpData->GetDipolePolarity();
  if (diPolarity == AliGRPObject::GetInvalidChar()) {
    AliError("GRP/GRP/Data entry:  missing value for the dipole polarity !");
    ok = kFALSE;
  }
  
  if (ok && grpData->IsPolarityConventionLHC()) {
    if ((TMath::Abs(l3Current) > 29000.0) && (l3Polarity == 1))
      tag->SetMagneticField(-0.5);
    if ((TMath::Abs(l3Current) > 29000.0) && (l3Polarity == 0)) 
      tag->SetMagneticField(0.5);
    if (TMath::Abs(l3Current) < 2000.0) 
      tag->SetMagneticField(0.0);
    
    if ((TMath::Abs(diCurrent) > 5900.0) && (diPolarity == 1))
      tag->SetDipoleField(-0.2);
    if ((TMath::Abs(diCurrent) > 5900.0) && (diPolarity == 0))
      tag->SetDipoleField(0.2);
    if (TMath::Abs(diCurrent) < 500.0)
      tag->SetDipoleField(0.0);
  }
  
  tag->SetRunId(iInitRunNumber);
  tag->SetRunStartTime(t1.GetDate());
  tag->SetRunStopTime(t2.GetDate());
  tag->SetBeamEnergy(beamenergy);
  tag->SetBeamType(beamtype);
  
  //QA setting 
  tag->SetQAArray(qa, qalength) ; 
  tag->SetEventSpecies(es, eslength) ;

  ftag->cd();
  ttag->Fill();
  tag->Clear();
  ttag->Write();
  ftag->Close();
  esdfile->cd();
  delete esdfile;
  delete ftag;
  delete esd;
  delete tag;
  delete evTag;
}

void AliESDTagCreator::CreateESDTagsFullRun(TTree *chain, AliGRPObject *grpData, ULong_t * qa, Bool_t * es, Int_t qalength, Int_t eslength)
{
  //GRP
  Float_t lhcLuminosity = 0.0;
  TString lhcState = "test";
  //UInt_t detectorMask = 0;
  Int_t detectorMask = 0;

  detectorMask = grpData->GetDetectorMask();
  time_t startTime = grpData->GetTimeStart();
  TTimeStamp t1(startTime);
  time_t endTime = grpData->GetTimeEnd();
  TTimeStamp t2(endTime);
  const char* beamtype = grpData->GetBeamType();
  Float_t beamenergy = grpData->GetBeamEnergy();

  Int_t iRunNumber = 0;
  TString fguid, fmd5, fturl;
  TString fturlold;

  AliInfo(Form("Creating the ESD tags......."));	

  AliESDEvent *esd = new AliESDEvent();
  esd->ReadFromTree(chain);

  chain->GetEntry(0);
  Int_t iInitRunNumber = esd->GetRunNumber();
  
  Int_t iNumberOfEvents = (Int_t)chain->GetEntries();
  Int_t iFirstEvent = 0;

  char fileName[256];
  snprintf(fileName, 256, "Run%d.Event%d_%d.ESD.tag.root", 
	  iInitRunNumber,iFirstEvent,iNumberOfEvents);
  AliInfo(Form("writing tags to file %s", fileName));
  AliDebug(1, Form("writing tags to file %s", fileName));
 
  TFile* ftag = TFile::Open(fileName, "recreate");
 
  AliRunTag *tag = new AliRunTag();
  AliEventTag *evTag = new AliEventTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);

//   AliFileTag *eftag = new AliFileTag();
//   tag->AddFileTag(*eftag);

  for (Int_t iEventNumber = iFirstEvent; iEventNumber < iNumberOfEvents; iEventNumber++) {
    FillEventTag(chain, evTag, iEventNumber, esd);

    iRunNumber = esd->GetRunNumber();
    if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD!!!");
    
    TFile *file = chain->GetCurrentFile();
    //    const TUrl *url = file->GetName();
    fguid = file->GetUUID().AsString();
    fturl = file->GetName();
//     if(fStorage == 1) {
//       TString fturltemp = "alien://"; fturltemp += url->GetFile();
//       fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
//     }
//     else fturl = url->GetFile();

    if (fturl.CompareTo(fturlold)) {

      AliFileTag *eftag = new AliFileTag();
      
      //evTag->SetGUID(fguid);
      eftag->SetGUID(fguid);
      if(fStorage == 1) {
	//       evTag->SetMD5("");
	//       evTag->SetTURL(fturl);
	//       evTag->SetSize(0);
	eftag->SetPath("");
	eftag->SetMD5("");
	eftag->SetTURL(fturl);
	eftag->SetSize(0);
      }
      else {
	//       evTag->SetPath(fturl);
	//       evTag->SetTURL(fturl);
	eftag->SetPath(fturl);
	eftag->SetTURL(fturl);
	eftag->SetMD5("");
	eftag->SetSize(0);
      }

      tag->AddFileTag(eftag);
    
      fturlold = fturl;
      
    }
    else {
      //      cout << "FileTag found " << fturl.Data() << " " << fturlold.Data() << endl;
    }

    tag->AddEventTag(*evTag);
  }

  tag->SetLHCTag(lhcLuminosity,lhcState);
  tag->SetDetectorTag(esd->GetESDRun()->GetDetectorsInDAQ(), esd->GetESDRun()->GetDetectorsInReco());
  tag->SetActiveTriggerClasses(esd->GetESDRun()->GetActiveTriggerClasses());
  
  // Get magnetic field info
  Bool_t ok = kTRUE;
  
  Float_t l3Current = grpData->GetL3Current((AliGRPObject::Stats)0);
  if (l3Current == AliGRPObject::GetInvalidFloat()) {
    AliError("GRP/GRP/Data entry:  missing value for the L3 current !");
    ok = kFALSE;
  }
  
  Char_t l3Polarity = grpData->GetL3Polarity();
  if (l3Polarity == AliGRPObject::GetInvalidChar()) {
    AliError("GRP/GRP/Data entry:  missing value for the L3 polarity !");
    ok = kFALSE;
  }
  
  // Dipole
  Float_t diCurrent = grpData->GetDipoleCurrent((AliGRPObject::Stats)0);
  if (diCurrent == AliGRPObject::GetInvalidFloat()) {
    AliError("GRP/GRP/Data entry:  missing value for the dipole current !");
    ok = kFALSE;
  }
  
  Char_t diPolarity = grpData->GetDipolePolarity();
  if (diPolarity == AliGRPObject::GetInvalidChar()) {
    AliError("GRP/GRP/Data entry:  missing value for the dipole polarity !");
    ok = kFALSE;
  }
  
  if (ok && grpData->IsPolarityConventionLHC()) {
    if ((TMath::Abs(l3Current) > 29000.0) && (l3Polarity == 1))
      tag->SetMagneticField(-0.5);
    if ((TMath::Abs(l3Current) > 29000.0) && (l3Polarity == 0)) 
      tag->SetMagneticField(0.5);
    if (TMath::Abs(l3Current) < 2000.0) 
      tag->SetMagneticField(0.0);
    
    if ((TMath::Abs(diCurrent) > 5900.0) && (diPolarity == 1))
      tag->SetDipoleField(-0.2);
    if ((TMath::Abs(diCurrent) > 5900.0) && (diPolarity == 0))
      tag->SetDipoleField(0.2);
    if (TMath::Abs(diCurrent) < 500.0)
      tag->SetDipoleField(0.0);
  }
  
  tag->SetRunId(iInitRunNumber);
  tag->SetRunStartTime(t1.GetDate());
  tag->SetRunStopTime(t2.GetDate());
  tag->SetBeamEnergy(beamenergy);
  tag->SetBeamType(beamtype);
  
  //QA setting 
  tag->SetQAArray(qa, qalength) ; 
  tag->SetEventSpecies(es, eslength) ;

  ftag->cd();
  ttag->Fill();
  tag->Clear();
  ttag->Write();
  ftag->Close();
  delete ftag;
  delete esd;
  delete tag;
  delete evTag;
}

//_____________________________________________________________________________
void AliESDTagCreator::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();
    fChain->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 0);
    AliInfo(Form("Branch %s switched off \n", str.Data()));
  }
  delete tokens;
}

//_____________________________________________________________________________
void AliESDTagCreator::FillEventTag(TTree *chain, AliEventTag *evTag, Int_t iEventNumber, AliESDEvent *esd)
{
  // Fill the event specific information in the EventTag
  AliESD *esdold = 0x0;

  TString fTempGuid;

  /////////////
  //muon code//
  ////////////
  Double_t fMUONMASS = 0.105658369;
  //Variables
  Double_t fX,fY,fZ ;
  Double_t fThetaX, fThetaY, fPyz, fChisquare;
  Double_t fPxRec, fPyRec, fPzRec, fEnergy;
  Int_t fCharge;
  TLorentzVector fEPvector;

  Float_t fLowPtCut      =  1.0;
  Float_t fHighPtCut     =  3.0;
  Float_t fVeryHighPtCut = 10.0;
  ////////////

  Double_t partFrac[5] = {0.01, 0.01, 0.85, 0.10, 0.05};

  // Creates the tags for all the events in a given ESD file
  Bool_t fIsSim = kTRUE;
  Int_t ntrack;
  Int_t nProtons, nKaons, nPions, nMuons, nElectrons, nFWMuons, nFWMatchedMuons;
  Int_t nPos, nNeg, nNeutr;
  Int_t nK0s, nLambdas, nNeutrons, nPi0s, nGamas;
  Int_t nCh1GeV, nCh3GeV, nCh10GeV;
  Int_t nMu1GeV, nMu3GeV, nMu10GeV;
  Int_t nEl1GeV, nEl3GeV, nEl10GeV;
  Float_t maxPt = .0, etamaxPt = -999., phimaxPt = -999., meanPt = .0, totalP = .0;
  Int_t fVertexflag;
  TString fVertexName;

  TRefArray tmp;
  
  ntrack = 0; nPos = 0; nNeg = 0; nNeutr =0;
  nK0s = 0; nLambdas = 0; nNeutrons = 0; nPi0s = 0;
  nGamas = 0; nProtons = 0; nKaons = 0;
  nPions = 0; nMuons = 0; nElectrons = 0; nFWMuons = 0; nFWMatchedMuons = 0;	  
  nCh1GeV = 0; nCh3GeV = 0; nCh10GeV = 0;
  nMu1GeV = 0; nMu3GeV = 0; nMu10GeV = 0;
  nEl1GeV = 0; nEl3GeV = 0; nEl10GeV = 0;
  maxPt = .0; etamaxPt = -999.; phimaxPt = -999.; meanPt = .0; totalP = .0;
  fVertexflag = 1;
  
  chain->GetEntry(iEventNumber);    
  esdold = esd->GetAliESDOld();
  if(esdold) esd->CopyFromOldESD();
  
//   TFile *file = chain->GetFile();
//   const TUrl *url = file->GetEndpointUrl();
//   fguid = file->GetUUID().AsString();
//   if(fSession == "grid") {
//     TString fturltemp = "alien://"; fturltemp += url->GetFile();
//     fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
//   }
//   else fturl = url->GetFile();
  
  const AliESDVertex * vertexIn = esd->GetVertex();
  fVertexName = vertexIn->GetName();
  if(fVertexName == "default") fVertexflag = 0;
  
  for (Int_t iTrackNumber = 0; iTrackNumber < esd->GetNumberOfTracks(); iTrackNumber++) {
    AliESDtrack * esdTrack = esd->GetTrack(iTrackNumber);
    if(esdTrack->GetLabel() != 0) fIsSim = kTRUE;
    else if(esdTrack->GetLabel() == 0) fIsSim = kFALSE;
    UInt_t status = esdTrack->GetStatus();
    
    //select only tracks with ITS refit
    if ((status&AliESDtrack::kITSrefit)==0) continue;
    //select only tracks with TPC refit
    if ((status&AliESDtrack::kTPCrefit)==0) continue;
    
    //select only tracks with the "combined PID"
    if ((status&AliESDtrack::kESDpid)==0) continue;
    Double_t p[3];
    esdTrack->GetPxPyPz(p);
    Double_t pt2 = p[0]*p[0]+p[1]*p[1];
    Double_t momentum = TMath::Sqrt(pt2+p[2]*p[2]);
    Double_t fPt = TMath::Sqrt(pt2);
    totalP += momentum;
    meanPt += fPt;
    if(fPt > maxPt) {
      maxPt = fPt;
      phimaxPt = esdTrack->Phi();
      etamaxPt = esdTrack->Eta();
    }
    
    if(esdTrack->GetSign() > 0) {
      nPos++;
      if(fPt > fLowPtCut) nCh1GeV++;
      if(fPt > fHighPtCut) nCh3GeV++;
      if(fPt > fVeryHighPtCut) nCh10GeV++;
    }
    if(esdTrack->GetSign() < 0) {
      nNeg++;
      if(fPt > fLowPtCut) nCh1GeV++;
      if(fPt > fHighPtCut) nCh3GeV++;
      if(fPt > fVeryHighPtCut) nCh10GeV++;
    }
    if(esdTrack->GetSign() == 0) nNeutr++;
    
    //PID
    Double_t prob[5];
    esdTrack->GetESDpid(prob);
    
    Double_t rcc = 0.0;
    for(Int_t i = 0; i < AliPID::kSPECIES; i++) rcc += prob[i]*partFrac[i];
    if(rcc == 0.0) continue;
    //Bayes' formula
    Double_t w[5];
    for(Int_t i = 0; i < AliPID::kSPECIES; i++) w[i] = prob[i]*partFrac[i]/rcc;
    
    //protons
    if ((w[4]>w[3])&&(w[4]>w[2])&&(w[4]>w[1])&&(w[4]>w[0])) nProtons++;
    //kaons
    if ((w[3]>w[4])&&(w[3]>w[2])&&(w[3]>w[1])&&(w[3]>w[0])) nKaons++;
    //pions
    if ((w[2]>w[4])&&(w[2]>w[3])&&(w[2]>w[1])&&(w[2]>w[0])) nPions++; 
    //electrons
    if ((w[0]>w[4])&&(w[0]>w[3])&&(w[0]>w[2])&&(w[0]>w[1])) {
      nElectrons++;
      if(fPt > fLowPtCut) nEl1GeV++;
      if(fPt > fHighPtCut) nEl3GeV++;
      if(fPt > fVeryHighPtCut) nEl10GeV++;
    }	  
    ntrack++;
  }
  //esd track loop
  
  /* muon code */
  Int_t nMuonTracks = esd->GetNumberOfMuonTracks();
  // loop over all reconstructed tracks (also first track of combination)
  for (Int_t iTrack = 0; iTrack <  nMuonTracks;  iTrack++) {
    AliESDMuonTrack* muonTrack = esd->GetMuonTrack(iTrack);
    if (muonTrack == 0x0) continue;
    
    // Coordinates at vertex
    fZ = muonTrack->GetZ(); 
    fY = muonTrack->GetBendingCoor();
    fX = muonTrack->GetNonBendingCoor(); 
    
    fThetaX = muonTrack->GetThetaX();
    fThetaY = muonTrack->GetThetaY();
    
    fPyz = 1./TMath::Abs(muonTrack->GetInverseBendingMomentum());
    fPzRec = - fPyz / TMath::Sqrt(1.0 + TMath::Tan(fThetaY)*TMath::Tan(fThetaY));
    fPxRec = fPzRec * TMath::Tan(fThetaX);
    fPyRec = fPzRec * TMath::Tan(fThetaY);
    fCharge = Int_t(TMath::Sign(1.,muonTrack->GetInverseBendingMomentum()));
    
    //ChiSquare of the track if needed
    fChisquare = muonTrack->GetChi2()/(2.0 * muonTrack->GetNHit() - 5);
    fEnergy = TMath::Sqrt(fMUONMASS * fMUONMASS + fPxRec * fPxRec + fPyRec * fPyRec + fPzRec * fPzRec);
    fEPvector.SetPxPyPzE(fPxRec, fPyRec, fPzRec, fEnergy);
    
    if (muonTrack->GetMatchTrigger()>0) nFWMatchedMuons++;
    
    nMuons++;
    nFWMuons++;
    if(fEPvector.Pt() > fLowPtCut) {
      nMu1GeV++; 
      if(fEPvector.Pt() > fHighPtCut) {
	nMu3GeV++; 
	if (fEPvector.Pt() > fVeryHighPtCut) {
	  nMu10GeV++;
	}
      }
    }
  }//muon track loop
  
  // Fill the event tags 
  if(ntrack != 0) meanPt = meanPt/ntrack;
  
  //AliInfo(Form("====================================="));
  //AliInfo(Form("URL: %s - GUID: %s",fturl.Data(),fguid.Data()));
  //AliInfo(Form("====================================="));
  
  //First physics data
  const AliMultiplicity *spdMult = esd->GetMultiplicity();
  evTag->SetNumberOfFiredChipsLayer1(spdMult->GetNumberOfFiredChips(0));
  evTag->SetNumberOfFiredChipsLayer2(spdMult->GetNumberOfFiredChips(1));
  evTag->SetNumberOfSPDTracklets(spdMult->GetNumberOfTracklets());
  
  AliESDVZERO *vzeroData = esd->GetVZEROData();
  evTag->SetMTotV0A(vzeroData->GetMTotV0A());
  evTag->SetMTotV0C(vzeroData->GetMTotV0C());
  evTag->SetNbPMV0A(vzeroData->GetNbPMV0A());
  evTag->SetNbPMV0C(vzeroData->GetNbPMV0C());
  
  //evTag->SetEventId(iEventNumber+1);
  evTag->SetPeriodNumber(esd->GetPeriodNumber());
  evTag->SetOrbitNumber(esd->GetOrbitNumber());
  evTag->SetBunchCrossNumber(esd->GetBunchCrossNumber());
  //  evTag->SetGUID(fguid);
//   if(fSession == "grid") {
//     evTag->SetMD5("");
//     evTag->SetTURL(fturl);
//     evTag->SetSize(0);
//   }
//   else evTag->SetPath(fturl);
  
  evTag->SetVertexX(vertexIn->GetX());
  evTag->SetVertexY(vertexIn->GetY());
  evTag->SetVertexZ(vertexIn->GetZ());
  evTag->SetVertexZError(vertexIn->GetZRes());
  evTag->SetVertexFlag(fVertexflag);
  
  evTag->SetT0VertexZ(esd->GetT0zVertex());
  
  evTag->SetTriggerMask(esd->GetTriggerMask());
  evTag->SetTriggerCluster(esd->GetTriggerCluster());
  
  evTag->SetEventType(esd->GetEventType());
  //*T*  evTag->SetFiredTriggerClasses(esd->GetFiredTriggerClasses());
  
  evTag->SetZDCNeutron1Energy(esd->GetZDCN1Energy());
  evTag->SetZDCProton1Energy(esd->GetZDCP1Energy());
  evTag->SetZDCEMEnergy(esd->GetZDCEMEnergy(0),esd->GetZDCEMEnergy(1));
  evTag->SetZDCNeutron2Energy(esd->GetZDCN2Energy());
  evTag->SetZDCProton2Energy(esd->GetZDCP2Energy());
  evTag->SetNumOfParticipants(esd->GetZDCParticipants());
  
  evTag->SetNumOfTracks(esd->GetNumberOfTracks());
  evTag->SetNumOfPosTracks(nPos);
  evTag->SetNumOfNegTracks(nNeg);
  evTag->SetNumOfNeutrTracks(nNeutr);
  
  evTag->SetNumOfV0s(esd->GetNumberOfV0s());
  evTag->SetNumOfCascades(esd->GetNumberOfCascades());
  evTag->SetNumOfKinks(esd->GetNumberOfKinks());
  evTag->SetNumOfPMDTracks(esd->GetNumberOfPmdTracks());
  
  evTag->SetNumOfProtons(nProtons);
  evTag->SetNumOfKaons(nKaons);
  evTag->SetNumOfPions(nPions);
  evTag->SetNumOfMuons(nMuons);
  evTag->SetNumOfFWMuons(nFWMuons);
  evTag->SetNumOfFWMatchedMuons(nFWMatchedMuons);
  evTag->SetNumOfElectrons(nElectrons);
  evTag->SetNumOfPhotons(nGamas);
  evTag->SetNumOfPi0s(nPi0s);
  evTag->SetNumOfNeutrons(nNeutrons);
  evTag->SetNumOfKaon0s(nK0s);
  evTag->SetNumOfLambdas(nLambdas);
  
  evTag->SetNumOfChargedAbove1GeV(nCh1GeV);
  evTag->SetNumOfChargedAbove3GeV(nCh3GeV);
  evTag->SetNumOfChargedAbove10GeV(nCh10GeV);
  evTag->SetNumOfMuonsAbove1GeV(nMu1GeV);
  evTag->SetNumOfMuonsAbove3GeV(nMu3GeV);
  evTag->SetNumOfMuonsAbove10GeV(nMu10GeV);
  evTag->SetNumOfElectronsAbove1GeV(nEl1GeV);
  evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
  evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);

  tmp.Clear();
  evTag->SetNumOfPHOSClusters(esd->GetPHOSClusters(&tmp));
  tmp.Clear();
  evTag->SetNumOfEMCALClusters(esd->GetEMCALClusters(&tmp));
    
  evTag->SetTotalMomentum(totalP);
  evTag->SetMeanPt(meanPt);
  evTag->SetMaxPt(maxPt);
  evTag->SetEtaMaxPt(etamaxPt);
  evTag->SetPhiMaxPt(phimaxPt);

  evTag->SetPhysicsFlag(kTRUE);
  evTag->SetBackgroungFlag(kFALSE);
}

void AliESDTagCreator::CreateESDRunTagSummary(TTree *chain)
{
  // Merge all tags from a run into a single RunTag
  // with only the File tags
  AliRunTag *rtag;
  chain->SetBranchAddress("AliTAG", &rtag);

  TFile* ftag = TFile::Open("RunTagSummary.tag.root", "recreate");

  AliRunTag *tag = new AliRunTag();
  TTree * ttag = new TTree("T","A Tree with event tags");
  TBranch * btag = ttag->Branch("AliTAG", &tag);
  btag->SetCompressionLevel(9);
  
  for (int itag=0; itag<chain->GetEntries(); itag++) {
    chain->GetEntry(itag);
    tag->CopyStandardContent(rtag);
    
    ttag->Fill();
    tag->Clear();
  }

  ftag->cd();
  ttag->Write();
  ftag->Close();
  
}
 AliESDTagCreator.cxx:1
 AliESDTagCreator.cxx:2
 AliESDTagCreator.cxx:3
 AliESDTagCreator.cxx:4
 AliESDTagCreator.cxx:5
 AliESDTagCreator.cxx:6
 AliESDTagCreator.cxx:7
 AliESDTagCreator.cxx:8
 AliESDTagCreator.cxx:9
 AliESDTagCreator.cxx:10
 AliESDTagCreator.cxx:11
 AliESDTagCreator.cxx:12
 AliESDTagCreator.cxx:13
 AliESDTagCreator.cxx:14
 AliESDTagCreator.cxx:15
 AliESDTagCreator.cxx:16
 AliESDTagCreator.cxx:17
 AliESDTagCreator.cxx:18
 AliESDTagCreator.cxx:19
 AliESDTagCreator.cxx:20
 AliESDTagCreator.cxx:21
 AliESDTagCreator.cxx:22
 AliESDTagCreator.cxx:23
 AliESDTagCreator.cxx:24
 AliESDTagCreator.cxx:25
 AliESDTagCreator.cxx:26
 AliESDTagCreator.cxx:27
 AliESDTagCreator.cxx:28
 AliESDTagCreator.cxx:29
 AliESDTagCreator.cxx:30
 AliESDTagCreator.cxx:31
 AliESDTagCreator.cxx:32
 AliESDTagCreator.cxx:33
 AliESDTagCreator.cxx:34
 AliESDTagCreator.cxx:35
 AliESDTagCreator.cxx:36
 AliESDTagCreator.cxx:37
 AliESDTagCreator.cxx:38
 AliESDTagCreator.cxx:39
 AliESDTagCreator.cxx:40
 AliESDTagCreator.cxx:41
 AliESDTagCreator.cxx:42
 AliESDTagCreator.cxx:43
 AliESDTagCreator.cxx:44
 AliESDTagCreator.cxx:45
 AliESDTagCreator.cxx:46
 AliESDTagCreator.cxx:47
 AliESDTagCreator.cxx:48
 AliESDTagCreator.cxx:49
 AliESDTagCreator.cxx:50
 AliESDTagCreator.cxx:51
 AliESDTagCreator.cxx:52
 AliESDTagCreator.cxx:53
 AliESDTagCreator.cxx:54
 AliESDTagCreator.cxx:55
 AliESDTagCreator.cxx:56
 AliESDTagCreator.cxx:57
 AliESDTagCreator.cxx:58
 AliESDTagCreator.cxx:59
 AliESDTagCreator.cxx:60
 AliESDTagCreator.cxx:61
 AliESDTagCreator.cxx:62
 AliESDTagCreator.cxx:63
 AliESDTagCreator.cxx:64
 AliESDTagCreator.cxx:65
 AliESDTagCreator.cxx:66
 AliESDTagCreator.cxx:67
 AliESDTagCreator.cxx:68
 AliESDTagCreator.cxx:69
 AliESDTagCreator.cxx:70
 AliESDTagCreator.cxx:71
 AliESDTagCreator.cxx:72
 AliESDTagCreator.cxx:73
 AliESDTagCreator.cxx:74
 AliESDTagCreator.cxx:75
 AliESDTagCreator.cxx:76
 AliESDTagCreator.cxx:77
 AliESDTagCreator.cxx:78
 AliESDTagCreator.cxx:79
 AliESDTagCreator.cxx:80
 AliESDTagCreator.cxx:81
 AliESDTagCreator.cxx:82
 AliESDTagCreator.cxx:83
 AliESDTagCreator.cxx:84
 AliESDTagCreator.cxx:85
 AliESDTagCreator.cxx:86
 AliESDTagCreator.cxx:87
 AliESDTagCreator.cxx:88
 AliESDTagCreator.cxx:89
 AliESDTagCreator.cxx:90
 AliESDTagCreator.cxx:91
 AliESDTagCreator.cxx:92
 AliESDTagCreator.cxx:93
 AliESDTagCreator.cxx:94
 AliESDTagCreator.cxx:95
 AliESDTagCreator.cxx:96
 AliESDTagCreator.cxx:97
 AliESDTagCreator.cxx:98
 AliESDTagCreator.cxx:99
 AliESDTagCreator.cxx:100
 AliESDTagCreator.cxx:101
 AliESDTagCreator.cxx:102
 AliESDTagCreator.cxx:103
 AliESDTagCreator.cxx:104
 AliESDTagCreator.cxx:105
 AliESDTagCreator.cxx:106
 AliESDTagCreator.cxx:107
 AliESDTagCreator.cxx:108
 AliESDTagCreator.cxx:109
 AliESDTagCreator.cxx:110
 AliESDTagCreator.cxx:111
 AliESDTagCreator.cxx:112
 AliESDTagCreator.cxx:113
 AliESDTagCreator.cxx:114
 AliESDTagCreator.cxx:115
 AliESDTagCreator.cxx:116
 AliESDTagCreator.cxx:117
 AliESDTagCreator.cxx:118
 AliESDTagCreator.cxx:119
 AliESDTagCreator.cxx:120
 AliESDTagCreator.cxx:121
 AliESDTagCreator.cxx:122
 AliESDTagCreator.cxx:123
 AliESDTagCreator.cxx:124
 AliESDTagCreator.cxx:125
 AliESDTagCreator.cxx:126
 AliESDTagCreator.cxx:127
 AliESDTagCreator.cxx:128
 AliESDTagCreator.cxx:129
 AliESDTagCreator.cxx:130
 AliESDTagCreator.cxx:131
 AliESDTagCreator.cxx:132
 AliESDTagCreator.cxx:133
 AliESDTagCreator.cxx:134
 AliESDTagCreator.cxx:135
 AliESDTagCreator.cxx:136
 AliESDTagCreator.cxx:137
 AliESDTagCreator.cxx:138
 AliESDTagCreator.cxx:139
 AliESDTagCreator.cxx:140
 AliESDTagCreator.cxx:141
 AliESDTagCreator.cxx:142
 AliESDTagCreator.cxx:143
 AliESDTagCreator.cxx:144
 AliESDTagCreator.cxx:145
 AliESDTagCreator.cxx:146
 AliESDTagCreator.cxx:147
 AliESDTagCreator.cxx:148
 AliESDTagCreator.cxx:149
 AliESDTagCreator.cxx:150
 AliESDTagCreator.cxx:151
 AliESDTagCreator.cxx:152
 AliESDTagCreator.cxx:153
 AliESDTagCreator.cxx:154
 AliESDTagCreator.cxx:155
 AliESDTagCreator.cxx:156
 AliESDTagCreator.cxx:157
 AliESDTagCreator.cxx:158
 AliESDTagCreator.cxx:159
 AliESDTagCreator.cxx:160
 AliESDTagCreator.cxx:161
 AliESDTagCreator.cxx:162
 AliESDTagCreator.cxx:163
 AliESDTagCreator.cxx:164
 AliESDTagCreator.cxx:165
 AliESDTagCreator.cxx:166
 AliESDTagCreator.cxx:167
 AliESDTagCreator.cxx:168
 AliESDTagCreator.cxx:169
 AliESDTagCreator.cxx:170
 AliESDTagCreator.cxx:171
 AliESDTagCreator.cxx:172
 AliESDTagCreator.cxx:173
 AliESDTagCreator.cxx:174
 AliESDTagCreator.cxx:175
 AliESDTagCreator.cxx:176
 AliESDTagCreator.cxx:177
 AliESDTagCreator.cxx:178
 AliESDTagCreator.cxx:179
 AliESDTagCreator.cxx:180
 AliESDTagCreator.cxx:181
 AliESDTagCreator.cxx:182
 AliESDTagCreator.cxx:183
 AliESDTagCreator.cxx:184
 AliESDTagCreator.cxx:185
 AliESDTagCreator.cxx:186
 AliESDTagCreator.cxx:187
 AliESDTagCreator.cxx:188
 AliESDTagCreator.cxx:189
 AliESDTagCreator.cxx:190
 AliESDTagCreator.cxx:191
 AliESDTagCreator.cxx:192
 AliESDTagCreator.cxx:193
 AliESDTagCreator.cxx:194
 AliESDTagCreator.cxx:195
 AliESDTagCreator.cxx:196
 AliESDTagCreator.cxx:197
 AliESDTagCreator.cxx:198
 AliESDTagCreator.cxx:199
 AliESDTagCreator.cxx:200
 AliESDTagCreator.cxx:201
 AliESDTagCreator.cxx:202
 AliESDTagCreator.cxx:203
 AliESDTagCreator.cxx:204
 AliESDTagCreator.cxx:205
 AliESDTagCreator.cxx:206
 AliESDTagCreator.cxx:207
 AliESDTagCreator.cxx:208
 AliESDTagCreator.cxx:209
 AliESDTagCreator.cxx:210
 AliESDTagCreator.cxx:211
 AliESDTagCreator.cxx:212
 AliESDTagCreator.cxx:213
 AliESDTagCreator.cxx:214
 AliESDTagCreator.cxx:215
 AliESDTagCreator.cxx:216
 AliESDTagCreator.cxx:217
 AliESDTagCreator.cxx:218
 AliESDTagCreator.cxx:219
 AliESDTagCreator.cxx:220
 AliESDTagCreator.cxx:221
 AliESDTagCreator.cxx:222
 AliESDTagCreator.cxx:223
 AliESDTagCreator.cxx:224
 AliESDTagCreator.cxx:225
 AliESDTagCreator.cxx:226
 AliESDTagCreator.cxx:227
 AliESDTagCreator.cxx:228
 AliESDTagCreator.cxx:229
 AliESDTagCreator.cxx:230
 AliESDTagCreator.cxx:231
 AliESDTagCreator.cxx:232
 AliESDTagCreator.cxx:233
 AliESDTagCreator.cxx:234
 AliESDTagCreator.cxx:235
 AliESDTagCreator.cxx:236
 AliESDTagCreator.cxx:237
 AliESDTagCreator.cxx:238
 AliESDTagCreator.cxx:239
 AliESDTagCreator.cxx:240
 AliESDTagCreator.cxx:241
 AliESDTagCreator.cxx:242
 AliESDTagCreator.cxx:243
 AliESDTagCreator.cxx:244
 AliESDTagCreator.cxx:245
 AliESDTagCreator.cxx:246
 AliESDTagCreator.cxx:247
 AliESDTagCreator.cxx:248
 AliESDTagCreator.cxx:249
 AliESDTagCreator.cxx:250
 AliESDTagCreator.cxx:251
 AliESDTagCreator.cxx:252
 AliESDTagCreator.cxx:253
 AliESDTagCreator.cxx:254
 AliESDTagCreator.cxx:255
 AliESDTagCreator.cxx:256
 AliESDTagCreator.cxx:257
 AliESDTagCreator.cxx:258
 AliESDTagCreator.cxx:259
 AliESDTagCreator.cxx:260
 AliESDTagCreator.cxx:261
 AliESDTagCreator.cxx:262
 AliESDTagCreator.cxx:263
 AliESDTagCreator.cxx:264
 AliESDTagCreator.cxx:265
 AliESDTagCreator.cxx:266
 AliESDTagCreator.cxx:267
 AliESDTagCreator.cxx:268
 AliESDTagCreator.cxx:269
 AliESDTagCreator.cxx:270
 AliESDTagCreator.cxx:271
 AliESDTagCreator.cxx:272
 AliESDTagCreator.cxx:273
 AliESDTagCreator.cxx:274
 AliESDTagCreator.cxx:275
 AliESDTagCreator.cxx:276
 AliESDTagCreator.cxx:277
 AliESDTagCreator.cxx:278
 AliESDTagCreator.cxx:279
 AliESDTagCreator.cxx:280
 AliESDTagCreator.cxx:281
 AliESDTagCreator.cxx:282
 AliESDTagCreator.cxx:283
 AliESDTagCreator.cxx:284
 AliESDTagCreator.cxx:285
 AliESDTagCreator.cxx:286
 AliESDTagCreator.cxx:287
 AliESDTagCreator.cxx:288
 AliESDTagCreator.cxx:289
 AliESDTagCreator.cxx:290
 AliESDTagCreator.cxx:291
 AliESDTagCreator.cxx:292
 AliESDTagCreator.cxx:293
 AliESDTagCreator.cxx:294
 AliESDTagCreator.cxx:295
 AliESDTagCreator.cxx:296
 AliESDTagCreator.cxx:297
 AliESDTagCreator.cxx:298
 AliESDTagCreator.cxx:299
 AliESDTagCreator.cxx:300
 AliESDTagCreator.cxx:301
 AliESDTagCreator.cxx:302
 AliESDTagCreator.cxx:303
 AliESDTagCreator.cxx:304
 AliESDTagCreator.cxx:305
 AliESDTagCreator.cxx:306
 AliESDTagCreator.cxx:307
 AliESDTagCreator.cxx:308
 AliESDTagCreator.cxx:309
 AliESDTagCreator.cxx:310
 AliESDTagCreator.cxx:311
 AliESDTagCreator.cxx:312
 AliESDTagCreator.cxx:313
 AliESDTagCreator.cxx:314
 AliESDTagCreator.cxx:315
 AliESDTagCreator.cxx:316
 AliESDTagCreator.cxx:317
 AliESDTagCreator.cxx:318
 AliESDTagCreator.cxx:319
 AliESDTagCreator.cxx:320
 AliESDTagCreator.cxx:321
 AliESDTagCreator.cxx:322
 AliESDTagCreator.cxx:323
 AliESDTagCreator.cxx:324
 AliESDTagCreator.cxx:325
 AliESDTagCreator.cxx:326
 AliESDTagCreator.cxx:327
 AliESDTagCreator.cxx:328
 AliESDTagCreator.cxx:329
 AliESDTagCreator.cxx:330
 AliESDTagCreator.cxx:331
 AliESDTagCreator.cxx:332
 AliESDTagCreator.cxx:333
 AliESDTagCreator.cxx:334
 AliESDTagCreator.cxx:335
 AliESDTagCreator.cxx:336
 AliESDTagCreator.cxx:337
 AliESDTagCreator.cxx:338
 AliESDTagCreator.cxx:339
 AliESDTagCreator.cxx:340
 AliESDTagCreator.cxx:341
 AliESDTagCreator.cxx:342
 AliESDTagCreator.cxx:343
 AliESDTagCreator.cxx:344
 AliESDTagCreator.cxx:345
 AliESDTagCreator.cxx:346
 AliESDTagCreator.cxx:347
 AliESDTagCreator.cxx:348
 AliESDTagCreator.cxx:349
 AliESDTagCreator.cxx:350
 AliESDTagCreator.cxx:351
 AliESDTagCreator.cxx:352
 AliESDTagCreator.cxx:353
 AliESDTagCreator.cxx:354
 AliESDTagCreator.cxx:355
 AliESDTagCreator.cxx:356
 AliESDTagCreator.cxx:357
 AliESDTagCreator.cxx:358
 AliESDTagCreator.cxx:359
 AliESDTagCreator.cxx:360
 AliESDTagCreator.cxx:361
 AliESDTagCreator.cxx:362
 AliESDTagCreator.cxx:363
 AliESDTagCreator.cxx:364
 AliESDTagCreator.cxx:365
 AliESDTagCreator.cxx:366
 AliESDTagCreator.cxx:367
 AliESDTagCreator.cxx:368
 AliESDTagCreator.cxx:369
 AliESDTagCreator.cxx:370
 AliESDTagCreator.cxx:371
 AliESDTagCreator.cxx:372
 AliESDTagCreator.cxx:373
 AliESDTagCreator.cxx:374
 AliESDTagCreator.cxx:375
 AliESDTagCreator.cxx:376
 AliESDTagCreator.cxx:377
 AliESDTagCreator.cxx:378
 AliESDTagCreator.cxx:379
 AliESDTagCreator.cxx:380
 AliESDTagCreator.cxx:381
 AliESDTagCreator.cxx:382
 AliESDTagCreator.cxx:383
 AliESDTagCreator.cxx:384
 AliESDTagCreator.cxx:385
 AliESDTagCreator.cxx:386
 AliESDTagCreator.cxx:387
 AliESDTagCreator.cxx:388
 AliESDTagCreator.cxx:389
 AliESDTagCreator.cxx:390
 AliESDTagCreator.cxx:391
 AliESDTagCreator.cxx:392
 AliESDTagCreator.cxx:393
 AliESDTagCreator.cxx:394
 AliESDTagCreator.cxx:395
 AliESDTagCreator.cxx:396
 AliESDTagCreator.cxx:397
 AliESDTagCreator.cxx:398
 AliESDTagCreator.cxx:399
 AliESDTagCreator.cxx:400
 AliESDTagCreator.cxx:401
 AliESDTagCreator.cxx:402
 AliESDTagCreator.cxx:403
 AliESDTagCreator.cxx:404
 AliESDTagCreator.cxx:405
 AliESDTagCreator.cxx:406
 AliESDTagCreator.cxx:407
 AliESDTagCreator.cxx:408
 AliESDTagCreator.cxx:409
 AliESDTagCreator.cxx:410
 AliESDTagCreator.cxx:411
 AliESDTagCreator.cxx:412
 AliESDTagCreator.cxx:413
 AliESDTagCreator.cxx:414
 AliESDTagCreator.cxx:415
 AliESDTagCreator.cxx:416
 AliESDTagCreator.cxx:417
 AliESDTagCreator.cxx:418
 AliESDTagCreator.cxx:419
 AliESDTagCreator.cxx:420
 AliESDTagCreator.cxx:421
 AliESDTagCreator.cxx:422
 AliESDTagCreator.cxx:423
 AliESDTagCreator.cxx:424
 AliESDTagCreator.cxx:425
 AliESDTagCreator.cxx:426
 AliESDTagCreator.cxx:427
 AliESDTagCreator.cxx:428
 AliESDTagCreator.cxx:429
 AliESDTagCreator.cxx:430
 AliESDTagCreator.cxx:431
 AliESDTagCreator.cxx:432
 AliESDTagCreator.cxx:433
 AliESDTagCreator.cxx:434
 AliESDTagCreator.cxx:435
 AliESDTagCreator.cxx:436
 AliESDTagCreator.cxx:437
 AliESDTagCreator.cxx:438
 AliESDTagCreator.cxx:439
 AliESDTagCreator.cxx:440
 AliESDTagCreator.cxx:441
 AliESDTagCreator.cxx:442
 AliESDTagCreator.cxx:443
 AliESDTagCreator.cxx:444
 AliESDTagCreator.cxx:445
 AliESDTagCreator.cxx:446
 AliESDTagCreator.cxx:447
 AliESDTagCreator.cxx:448
 AliESDTagCreator.cxx:449
 AliESDTagCreator.cxx:450
 AliESDTagCreator.cxx:451
 AliESDTagCreator.cxx:452
 AliESDTagCreator.cxx:453
 AliESDTagCreator.cxx:454
 AliESDTagCreator.cxx:455
 AliESDTagCreator.cxx:456
 AliESDTagCreator.cxx:457
 AliESDTagCreator.cxx:458
 AliESDTagCreator.cxx:459
 AliESDTagCreator.cxx:460
 AliESDTagCreator.cxx:461
 AliESDTagCreator.cxx:462
 AliESDTagCreator.cxx:463
 AliESDTagCreator.cxx:464
 AliESDTagCreator.cxx:465
 AliESDTagCreator.cxx:466
 AliESDTagCreator.cxx:467
 AliESDTagCreator.cxx:468
 AliESDTagCreator.cxx:469
 AliESDTagCreator.cxx:470
 AliESDTagCreator.cxx:471
 AliESDTagCreator.cxx:472
 AliESDTagCreator.cxx:473
 AliESDTagCreator.cxx:474
 AliESDTagCreator.cxx:475
 AliESDTagCreator.cxx:476
 AliESDTagCreator.cxx:477
 AliESDTagCreator.cxx:478
 AliESDTagCreator.cxx:479
 AliESDTagCreator.cxx:480
 AliESDTagCreator.cxx:481
 AliESDTagCreator.cxx:482
 AliESDTagCreator.cxx:483
 AliESDTagCreator.cxx:484
 AliESDTagCreator.cxx:485
 AliESDTagCreator.cxx:486
 AliESDTagCreator.cxx:487
 AliESDTagCreator.cxx:488
 AliESDTagCreator.cxx:489
 AliESDTagCreator.cxx:490
 AliESDTagCreator.cxx:491
 AliESDTagCreator.cxx:492
 AliESDTagCreator.cxx:493
 AliESDTagCreator.cxx:494
 AliESDTagCreator.cxx:495
 AliESDTagCreator.cxx:496
 AliESDTagCreator.cxx:497
 AliESDTagCreator.cxx:498
 AliESDTagCreator.cxx:499
 AliESDTagCreator.cxx:500
 AliESDTagCreator.cxx:501
 AliESDTagCreator.cxx:502
 AliESDTagCreator.cxx:503
 AliESDTagCreator.cxx:504
 AliESDTagCreator.cxx:505
 AliESDTagCreator.cxx:506
 AliESDTagCreator.cxx:507
 AliESDTagCreator.cxx:508
 AliESDTagCreator.cxx:509
 AliESDTagCreator.cxx:510
 AliESDTagCreator.cxx:511
 AliESDTagCreator.cxx:512
 AliESDTagCreator.cxx:513
 AliESDTagCreator.cxx:514
 AliESDTagCreator.cxx:515
 AliESDTagCreator.cxx:516
 AliESDTagCreator.cxx:517
 AliESDTagCreator.cxx:518
 AliESDTagCreator.cxx:519
 AliESDTagCreator.cxx:520
 AliESDTagCreator.cxx:521
 AliESDTagCreator.cxx:522
 AliESDTagCreator.cxx:523
 AliESDTagCreator.cxx:524
 AliESDTagCreator.cxx:525
 AliESDTagCreator.cxx:526
 AliESDTagCreator.cxx:527
 AliESDTagCreator.cxx:528
 AliESDTagCreator.cxx:529
 AliESDTagCreator.cxx:530
 AliESDTagCreator.cxx:531
 AliESDTagCreator.cxx:532
 AliESDTagCreator.cxx:533
 AliESDTagCreator.cxx:534
 AliESDTagCreator.cxx:535
 AliESDTagCreator.cxx:536
 AliESDTagCreator.cxx:537
 AliESDTagCreator.cxx:538
 AliESDTagCreator.cxx:539
 AliESDTagCreator.cxx:540
 AliESDTagCreator.cxx:541
 AliESDTagCreator.cxx:542
 AliESDTagCreator.cxx:543
 AliESDTagCreator.cxx:544
 AliESDTagCreator.cxx:545
 AliESDTagCreator.cxx:546
 AliESDTagCreator.cxx:547
 AliESDTagCreator.cxx:548
 AliESDTagCreator.cxx:549
 AliESDTagCreator.cxx:550
 AliESDTagCreator.cxx:551
 AliESDTagCreator.cxx:552
 AliESDTagCreator.cxx:553
 AliESDTagCreator.cxx:554
 AliESDTagCreator.cxx:555
 AliESDTagCreator.cxx:556
 AliESDTagCreator.cxx:557
 AliESDTagCreator.cxx:558
 AliESDTagCreator.cxx:559
 AliESDTagCreator.cxx:560
 AliESDTagCreator.cxx:561
 AliESDTagCreator.cxx:562
 AliESDTagCreator.cxx:563
 AliESDTagCreator.cxx:564
 AliESDTagCreator.cxx:565
 AliESDTagCreator.cxx:566
 AliESDTagCreator.cxx:567
 AliESDTagCreator.cxx:568
 AliESDTagCreator.cxx:569
 AliESDTagCreator.cxx:570
 AliESDTagCreator.cxx:571
 AliESDTagCreator.cxx:572
 AliESDTagCreator.cxx:573
 AliESDTagCreator.cxx:574
 AliESDTagCreator.cxx:575
 AliESDTagCreator.cxx:576
 AliESDTagCreator.cxx:577
 AliESDTagCreator.cxx:578
 AliESDTagCreator.cxx:579
 AliESDTagCreator.cxx:580
 AliESDTagCreator.cxx:581
 AliESDTagCreator.cxx:582
 AliESDTagCreator.cxx:583
 AliESDTagCreator.cxx:584
 AliESDTagCreator.cxx:585
 AliESDTagCreator.cxx:586
 AliESDTagCreator.cxx:587
 AliESDTagCreator.cxx:588
 AliESDTagCreator.cxx:589
 AliESDTagCreator.cxx:590
 AliESDTagCreator.cxx:591
 AliESDTagCreator.cxx:592
 AliESDTagCreator.cxx:593
 AliESDTagCreator.cxx:594
 AliESDTagCreator.cxx:595
 AliESDTagCreator.cxx:596
 AliESDTagCreator.cxx:597
 AliESDTagCreator.cxx:598
 AliESDTagCreator.cxx:599
 AliESDTagCreator.cxx:600
 AliESDTagCreator.cxx:601
 AliESDTagCreator.cxx:602
 AliESDTagCreator.cxx:603
 AliESDTagCreator.cxx:604
 AliESDTagCreator.cxx:605
 AliESDTagCreator.cxx:606
 AliESDTagCreator.cxx:607
 AliESDTagCreator.cxx:608
 AliESDTagCreator.cxx:609
 AliESDTagCreator.cxx:610
 AliESDTagCreator.cxx:611
 AliESDTagCreator.cxx:612
 AliESDTagCreator.cxx:613
 AliESDTagCreator.cxx:614
 AliESDTagCreator.cxx:615
 AliESDTagCreator.cxx:616
 AliESDTagCreator.cxx:617
 AliESDTagCreator.cxx:618
 AliESDTagCreator.cxx:619
 AliESDTagCreator.cxx:620
 AliESDTagCreator.cxx:621
 AliESDTagCreator.cxx:622
 AliESDTagCreator.cxx:623
 AliESDTagCreator.cxx:624
 AliESDTagCreator.cxx:625
 AliESDTagCreator.cxx:626
 AliESDTagCreator.cxx:627
 AliESDTagCreator.cxx:628
 AliESDTagCreator.cxx:629
 AliESDTagCreator.cxx:630
 AliESDTagCreator.cxx:631
 AliESDTagCreator.cxx:632
 AliESDTagCreator.cxx:633
 AliESDTagCreator.cxx:634
 AliESDTagCreator.cxx:635
 AliESDTagCreator.cxx:636
 AliESDTagCreator.cxx:637
 AliESDTagCreator.cxx:638
 AliESDTagCreator.cxx:639
 AliESDTagCreator.cxx:640
 AliESDTagCreator.cxx:641
 AliESDTagCreator.cxx:642
 AliESDTagCreator.cxx:643
 AliESDTagCreator.cxx:644
 AliESDTagCreator.cxx:645
 AliESDTagCreator.cxx:646
 AliESDTagCreator.cxx:647
 AliESDTagCreator.cxx:648
 AliESDTagCreator.cxx:649
 AliESDTagCreator.cxx:650
 AliESDTagCreator.cxx:651
 AliESDTagCreator.cxx:652
 AliESDTagCreator.cxx:653
 AliESDTagCreator.cxx:654
 AliESDTagCreator.cxx:655
 AliESDTagCreator.cxx:656
 AliESDTagCreator.cxx:657
 AliESDTagCreator.cxx:658
 AliESDTagCreator.cxx:659
 AliESDTagCreator.cxx:660
 AliESDTagCreator.cxx:661
 AliESDTagCreator.cxx:662
 AliESDTagCreator.cxx:663
 AliESDTagCreator.cxx:664
 AliESDTagCreator.cxx:665
 AliESDTagCreator.cxx:666
 AliESDTagCreator.cxx:667
 AliESDTagCreator.cxx:668
 AliESDTagCreator.cxx:669
 AliESDTagCreator.cxx:670
 AliESDTagCreator.cxx:671
 AliESDTagCreator.cxx:672
 AliESDTagCreator.cxx:673
 AliESDTagCreator.cxx:674
 AliESDTagCreator.cxx:675
 AliESDTagCreator.cxx:676
 AliESDTagCreator.cxx:677
 AliESDTagCreator.cxx:678
 AliESDTagCreator.cxx:679
 AliESDTagCreator.cxx:680
 AliESDTagCreator.cxx:681
 AliESDTagCreator.cxx:682
 AliESDTagCreator.cxx:683
 AliESDTagCreator.cxx:684
 AliESDTagCreator.cxx:685
 AliESDTagCreator.cxx:686
 AliESDTagCreator.cxx:687
 AliESDTagCreator.cxx:688
 AliESDTagCreator.cxx:689
 AliESDTagCreator.cxx:690
 AliESDTagCreator.cxx:691
 AliESDTagCreator.cxx:692
 AliESDTagCreator.cxx:693
 AliESDTagCreator.cxx:694
 AliESDTagCreator.cxx:695
 AliESDTagCreator.cxx:696
 AliESDTagCreator.cxx:697
 AliESDTagCreator.cxx:698
 AliESDTagCreator.cxx:699
 AliESDTagCreator.cxx:700
 AliESDTagCreator.cxx:701
 AliESDTagCreator.cxx:702
 AliESDTagCreator.cxx:703
 AliESDTagCreator.cxx:704
 AliESDTagCreator.cxx:705
 AliESDTagCreator.cxx:706
 AliESDTagCreator.cxx:707
 AliESDTagCreator.cxx:708
 AliESDTagCreator.cxx:709
 AliESDTagCreator.cxx:710
 AliESDTagCreator.cxx:711
 AliESDTagCreator.cxx:712
 AliESDTagCreator.cxx:713
 AliESDTagCreator.cxx:714
 AliESDTagCreator.cxx:715
 AliESDTagCreator.cxx:716
 AliESDTagCreator.cxx:717
 AliESDTagCreator.cxx:718
 AliESDTagCreator.cxx:719
 AliESDTagCreator.cxx:720
 AliESDTagCreator.cxx:721
 AliESDTagCreator.cxx:722
 AliESDTagCreator.cxx:723
 AliESDTagCreator.cxx:724
 AliESDTagCreator.cxx:725
 AliESDTagCreator.cxx:726
 AliESDTagCreator.cxx:727
 AliESDTagCreator.cxx:728
 AliESDTagCreator.cxx:729
 AliESDTagCreator.cxx:730
 AliESDTagCreator.cxx:731
 AliESDTagCreator.cxx:732
 AliESDTagCreator.cxx:733
 AliESDTagCreator.cxx:734
 AliESDTagCreator.cxx:735
 AliESDTagCreator.cxx:736
 AliESDTagCreator.cxx:737
 AliESDTagCreator.cxx:738
 AliESDTagCreator.cxx:739
 AliESDTagCreator.cxx:740
 AliESDTagCreator.cxx:741
 AliESDTagCreator.cxx:742
 AliESDTagCreator.cxx:743
 AliESDTagCreator.cxx:744
 AliESDTagCreator.cxx:745
 AliESDTagCreator.cxx:746
 AliESDTagCreator.cxx:747
 AliESDTagCreator.cxx:748
 AliESDTagCreator.cxx:749
 AliESDTagCreator.cxx:750
 AliESDTagCreator.cxx:751
 AliESDTagCreator.cxx:752
 AliESDTagCreator.cxx:753
 AliESDTagCreator.cxx:754
 AliESDTagCreator.cxx:755
 AliESDTagCreator.cxx:756
 AliESDTagCreator.cxx:757
 AliESDTagCreator.cxx:758
 AliESDTagCreator.cxx:759
 AliESDTagCreator.cxx:760
 AliESDTagCreator.cxx:761
 AliESDTagCreator.cxx:762
 AliESDTagCreator.cxx:763
 AliESDTagCreator.cxx:764
 AliESDTagCreator.cxx:765
 AliESDTagCreator.cxx:766
 AliESDTagCreator.cxx:767
 AliESDTagCreator.cxx:768
 AliESDTagCreator.cxx:769
 AliESDTagCreator.cxx:770
 AliESDTagCreator.cxx:771
 AliESDTagCreator.cxx:772
 AliESDTagCreator.cxx:773
 AliESDTagCreator.cxx:774
 AliESDTagCreator.cxx:775
 AliESDTagCreator.cxx:776
 AliESDTagCreator.cxx:777
 AliESDTagCreator.cxx:778
 AliESDTagCreator.cxx:779
 AliESDTagCreator.cxx:780
 AliESDTagCreator.cxx:781
 AliESDTagCreator.cxx:782
 AliESDTagCreator.cxx:783
 AliESDTagCreator.cxx:784
 AliESDTagCreator.cxx:785
 AliESDTagCreator.cxx:786
 AliESDTagCreator.cxx:787
 AliESDTagCreator.cxx:788
 AliESDTagCreator.cxx:789
 AliESDTagCreator.cxx:790
 AliESDTagCreator.cxx:791
 AliESDTagCreator.cxx:792
 AliESDTagCreator.cxx:793
 AliESDTagCreator.cxx:794
 AliESDTagCreator.cxx:795
 AliESDTagCreator.cxx:796
 AliESDTagCreator.cxx:797
 AliESDTagCreator.cxx:798
 AliESDTagCreator.cxx:799
 AliESDTagCreator.cxx:800
 AliESDTagCreator.cxx:801
 AliESDTagCreator.cxx:802
 AliESDTagCreator.cxx:803
 AliESDTagCreator.cxx:804
 AliESDTagCreator.cxx:805
 AliESDTagCreator.cxx:806
 AliESDTagCreator.cxx:807
 AliESDTagCreator.cxx:808
 AliESDTagCreator.cxx:809
 AliESDTagCreator.cxx:810
 AliESDTagCreator.cxx:811
 AliESDTagCreator.cxx:812
 AliESDTagCreator.cxx:813
 AliESDTagCreator.cxx:814
 AliESDTagCreator.cxx:815
 AliESDTagCreator.cxx:816
 AliESDTagCreator.cxx:817
 AliESDTagCreator.cxx:818
 AliESDTagCreator.cxx:819
 AliESDTagCreator.cxx:820
 AliESDTagCreator.cxx:821
 AliESDTagCreator.cxx:822
 AliESDTagCreator.cxx:823
 AliESDTagCreator.cxx:824
 AliESDTagCreator.cxx:825
 AliESDTagCreator.cxx:826
 AliESDTagCreator.cxx:827
 AliESDTagCreator.cxx:828
 AliESDTagCreator.cxx:829
 AliESDTagCreator.cxx:830
 AliESDTagCreator.cxx:831
 AliESDTagCreator.cxx:832
 AliESDTagCreator.cxx:833
 AliESDTagCreator.cxx:834
 AliESDTagCreator.cxx:835
 AliESDTagCreator.cxx:836
 AliESDTagCreator.cxx:837
 AliESDTagCreator.cxx:838
 AliESDTagCreator.cxx:839
 AliESDTagCreator.cxx:840
 AliESDTagCreator.cxx:841
 AliESDTagCreator.cxx:842
 AliESDTagCreator.cxx:843
 AliESDTagCreator.cxx:844
 AliESDTagCreator.cxx:845
 AliESDTagCreator.cxx:846
 AliESDTagCreator.cxx:847
 AliESDTagCreator.cxx:848
 AliESDTagCreator.cxx:849
 AliESDTagCreator.cxx:850
 AliESDTagCreator.cxx:851
 AliESDTagCreator.cxx:852
 AliESDTagCreator.cxx:853
 AliESDTagCreator.cxx:854
 AliESDTagCreator.cxx:855
 AliESDTagCreator.cxx:856
 AliESDTagCreator.cxx:857
 AliESDTagCreator.cxx:858
 AliESDTagCreator.cxx:859
 AliESDTagCreator.cxx:860
 AliESDTagCreator.cxx:861
 AliESDTagCreator.cxx:862
 AliESDTagCreator.cxx:863
 AliESDTagCreator.cxx:864
 AliESDTagCreator.cxx:865
 AliESDTagCreator.cxx:866
 AliESDTagCreator.cxx:867
 AliESDTagCreator.cxx:868
 AliESDTagCreator.cxx:869
 AliESDTagCreator.cxx:870
 AliESDTagCreator.cxx:871
 AliESDTagCreator.cxx:872
 AliESDTagCreator.cxx:873
 AliESDTagCreator.cxx:874
 AliESDTagCreator.cxx:875
 AliESDTagCreator.cxx:876
 AliESDTagCreator.cxx:877
 AliESDTagCreator.cxx:878
 AliESDTagCreator.cxx:879
 AliESDTagCreator.cxx:880
 AliESDTagCreator.cxx:881
 AliESDTagCreator.cxx:882
 AliESDTagCreator.cxx:883
 AliESDTagCreator.cxx:884
 AliESDTagCreator.cxx:885
 AliESDTagCreator.cxx:886
 AliESDTagCreator.cxx:887
 AliESDTagCreator.cxx:888
 AliESDTagCreator.cxx:889
 AliESDTagCreator.cxx:890
 AliESDTagCreator.cxx:891
 AliESDTagCreator.cxx:892
 AliESDTagCreator.cxx:893
 AliESDTagCreator.cxx:894
 AliESDTagCreator.cxx:895
 AliESDTagCreator.cxx:896
 AliESDTagCreator.cxx:897
 AliESDTagCreator.cxx:898
 AliESDTagCreator.cxx:899
 AliESDTagCreator.cxx:900
 AliESDTagCreator.cxx:901
 AliESDTagCreator.cxx:902
 AliESDTagCreator.cxx:903
 AliESDTagCreator.cxx:904
 AliESDTagCreator.cxx:905
 AliESDTagCreator.cxx:906
 AliESDTagCreator.cxx:907
 AliESDTagCreator.cxx:908
 AliESDTagCreator.cxx:909
 AliESDTagCreator.cxx:910
 AliESDTagCreator.cxx:911
 AliESDTagCreator.cxx:912
 AliESDTagCreator.cxx:913
 AliESDTagCreator.cxx:914
 AliESDTagCreator.cxx:915
 AliESDTagCreator.cxx:916
 AliESDTagCreator.cxx:917
 AliESDTagCreator.cxx:918
 AliESDTagCreator.cxx:919
 AliESDTagCreator.cxx:920
 AliESDTagCreator.cxx:921
 AliESDTagCreator.cxx:922
 AliESDTagCreator.cxx:923
 AliESDTagCreator.cxx:924
 AliESDTagCreator.cxx:925
 AliESDTagCreator.cxx:926
 AliESDTagCreator.cxx:927
 AliESDTagCreator.cxx:928
 AliESDTagCreator.cxx:929
 AliESDTagCreator.cxx:930
 AliESDTagCreator.cxx:931
 AliESDTagCreator.cxx:932
 AliESDTagCreator.cxx:933
 AliESDTagCreator.cxx:934
 AliESDTagCreator.cxx:935
 AliESDTagCreator.cxx:936
 AliESDTagCreator.cxx:937
 AliESDTagCreator.cxx:938
 AliESDTagCreator.cxx:939
 AliESDTagCreator.cxx:940
 AliESDTagCreator.cxx:941
 AliESDTagCreator.cxx:942
 AliESDTagCreator.cxx:943
 AliESDTagCreator.cxx:944
 AliESDTagCreator.cxx:945
 AliESDTagCreator.cxx:946
 AliESDTagCreator.cxx:947
 AliESDTagCreator.cxx:948
 AliESDTagCreator.cxx:949
 AliESDTagCreator.cxx:950
 AliESDTagCreator.cxx:951
 AliESDTagCreator.cxx:952
 AliESDTagCreator.cxx:953
 AliESDTagCreator.cxx:954
 AliESDTagCreator.cxx:955
 AliESDTagCreator.cxx:956
 AliESDTagCreator.cxx:957
 AliESDTagCreator.cxx:958
 AliESDTagCreator.cxx:959
 AliESDTagCreator.cxx:960
 AliESDTagCreator.cxx:961
 AliESDTagCreator.cxx:962
 AliESDTagCreator.cxx:963
 AliESDTagCreator.cxx:964
 AliESDTagCreator.cxx:965
 AliESDTagCreator.cxx:966
 AliESDTagCreator.cxx:967
 AliESDTagCreator.cxx:968
 AliESDTagCreator.cxx:969
 AliESDTagCreator.cxx:970
 AliESDTagCreator.cxx:971
 AliESDTagCreator.cxx:972
 AliESDTagCreator.cxx:973
 AliESDTagCreator.cxx:974
 AliESDTagCreator.cxx:975
 AliESDTagCreator.cxx:976
 AliESDTagCreator.cxx:977
 AliESDTagCreator.cxx:978
 AliESDTagCreator.cxx:979
 AliESDTagCreator.cxx:980
 AliESDTagCreator.cxx:981
 AliESDTagCreator.cxx:982
 AliESDTagCreator.cxx:983
 AliESDTagCreator.cxx:984
 AliESDTagCreator.cxx:985
 AliESDTagCreator.cxx:986
 AliESDTagCreator.cxx:987
 AliESDTagCreator.cxx:988
 AliESDTagCreator.cxx:989
 AliESDTagCreator.cxx:990
 AliESDTagCreator.cxx:991
 AliESDTagCreator.cxx:992
 AliESDTagCreator.cxx:993
 AliESDTagCreator.cxx:994
 AliESDTagCreator.cxx:995
 AliESDTagCreator.cxx:996
 AliESDTagCreator.cxx:997
 AliESDTagCreator.cxx:998
 AliESDTagCreator.cxx:999
 AliESDTagCreator.cxx:1000
 AliESDTagCreator.cxx:1001
 AliESDTagCreator.cxx:1002
 AliESDTagCreator.cxx:1003
 AliESDTagCreator.cxx:1004
 AliESDTagCreator.cxx:1005
 AliESDTagCreator.cxx:1006
 AliESDTagCreator.cxx:1007
 AliESDTagCreator.cxx:1008
 AliESDTagCreator.cxx:1009
 AliESDTagCreator.cxx:1010
 AliESDTagCreator.cxx:1011
 AliESDTagCreator.cxx:1012
 AliESDTagCreator.cxx:1013
 AliESDTagCreator.cxx:1014
 AliESDTagCreator.cxx:1015
 AliESDTagCreator.cxx:1016
 AliESDTagCreator.cxx:1017
 AliESDTagCreator.cxx:1018
 AliESDTagCreator.cxx:1019
 AliESDTagCreator.cxx:1020
 AliESDTagCreator.cxx:1021
 AliESDTagCreator.cxx:1022
 AliESDTagCreator.cxx:1023
 AliESDTagCreator.cxx:1024
 AliESDTagCreator.cxx:1025
 AliESDTagCreator.cxx:1026
 AliESDTagCreator.cxx:1027
 AliESDTagCreator.cxx:1028
 AliESDTagCreator.cxx:1029
 AliESDTagCreator.cxx:1030
 AliESDTagCreator.cxx:1031
 AliESDTagCreator.cxx:1032
 AliESDTagCreator.cxx:1033
 AliESDTagCreator.cxx:1034
 AliESDTagCreator.cxx:1035
 AliESDTagCreator.cxx:1036
 AliESDTagCreator.cxx:1037
 AliESDTagCreator.cxx:1038
 AliESDTagCreator.cxx:1039
 AliESDTagCreator.cxx:1040
 AliESDTagCreator.cxx:1041
 AliESDTagCreator.cxx:1042
 AliESDTagCreator.cxx:1043
 AliESDTagCreator.cxx:1044
 AliESDTagCreator.cxx:1045
 AliESDTagCreator.cxx:1046
 AliESDTagCreator.cxx:1047
 AliESDTagCreator.cxx:1048
 AliESDTagCreator.cxx:1049
 AliESDTagCreator.cxx:1050
 AliESDTagCreator.cxx:1051
 AliESDTagCreator.cxx:1052
 AliESDTagCreator.cxx:1053
 AliESDTagCreator.cxx:1054
 AliESDTagCreator.cxx:1055
 AliESDTagCreator.cxx:1056
 AliESDTagCreator.cxx:1057
 AliESDTagCreator.cxx:1058
 AliESDTagCreator.cxx:1059
 AliESDTagCreator.cxx:1060
 AliESDTagCreator.cxx:1061
 AliESDTagCreator.cxx:1062
 AliESDTagCreator.cxx:1063
 AliESDTagCreator.cxx:1064
 AliESDTagCreator.cxx:1065
 AliESDTagCreator.cxx:1066
 AliESDTagCreator.cxx:1067
 AliESDTagCreator.cxx:1068
 AliESDTagCreator.cxx:1069
 AliESDTagCreator.cxx:1070
 AliESDTagCreator.cxx:1071
 AliESDTagCreator.cxx:1072
 AliESDTagCreator.cxx:1073
 AliESDTagCreator.cxx:1074
 AliESDTagCreator.cxx:1075
 AliESDTagCreator.cxx:1076
 AliESDTagCreator.cxx:1077
 AliESDTagCreator.cxx:1078
 AliESDTagCreator.cxx:1079
 AliESDTagCreator.cxx:1080
 AliESDTagCreator.cxx:1081
 AliESDTagCreator.cxx:1082
 AliESDTagCreator.cxx:1083
 AliESDTagCreator.cxx:1084
 AliESDTagCreator.cxx:1085
 AliESDTagCreator.cxx:1086
 AliESDTagCreator.cxx:1087
 AliESDTagCreator.cxx:1088
 AliESDTagCreator.cxx:1089
 AliESDTagCreator.cxx:1090
 AliESDTagCreator.cxx:1091
 AliESDTagCreator.cxx:1092
 AliESDTagCreator.cxx:1093
 AliESDTagCreator.cxx:1094
 AliESDTagCreator.cxx:1095
 AliESDTagCreator.cxx:1096
 AliESDTagCreator.cxx:1097
 AliESDTagCreator.cxx:1098
 AliESDTagCreator.cxx:1099
 AliESDTagCreator.cxx:1100
 AliESDTagCreator.cxx:1101
 AliESDTagCreator.cxx:1102
 AliESDTagCreator.cxx:1103
 AliESDTagCreator.cxx:1104
 AliESDTagCreator.cxx:1105
 AliESDTagCreator.cxx:1106
 AliESDTagCreator.cxx:1107
 AliESDTagCreator.cxx:1108
 AliESDTagCreator.cxx:1109
 AliESDTagCreator.cxx:1110
 AliESDTagCreator.cxx:1111
 AliESDTagCreator.cxx:1112
 AliESDTagCreator.cxx:1113
 AliESDTagCreator.cxx:1114
 AliESDTagCreator.cxx:1115
 AliESDTagCreator.cxx:1116
 AliESDTagCreator.cxx:1117
 AliESDTagCreator.cxx:1118
 AliESDTagCreator.cxx:1119
 AliESDTagCreator.cxx:1120
 AliESDTagCreator.cxx:1121
 AliESDTagCreator.cxx:1122
 AliESDTagCreator.cxx:1123
 AliESDTagCreator.cxx:1124
 AliESDTagCreator.cxx:1125
 AliESDTagCreator.cxx:1126
 AliESDTagCreator.cxx:1127
 AliESDTagCreator.cxx:1128
 AliESDTagCreator.cxx:1129
 AliESDTagCreator.cxx:1130
 AliESDTagCreator.cxx:1131
 AliESDTagCreator.cxx:1132
 AliESDTagCreator.cxx:1133
 AliESDTagCreator.cxx:1134
 AliESDTagCreator.cxx:1135
 AliESDTagCreator.cxx:1136
 AliESDTagCreator.cxx:1137
 AliESDTagCreator.cxx:1138
 AliESDTagCreator.cxx:1139
 AliESDTagCreator.cxx:1140
 AliESDTagCreator.cxx:1141
 AliESDTagCreator.cxx:1142
 AliESDTagCreator.cxx:1143
 AliESDTagCreator.cxx:1144
 AliESDTagCreator.cxx:1145
 AliESDTagCreator.cxx:1146
 AliESDTagCreator.cxx:1147
 AliESDTagCreator.cxx:1148
 AliESDTagCreator.cxx:1149
 AliESDTagCreator.cxx:1150
 AliESDTagCreator.cxx:1151
 AliESDTagCreator.cxx:1152
 AliESDTagCreator.cxx:1153
 AliESDTagCreator.cxx:1154
 AliESDTagCreator.cxx:1155
 AliESDTagCreator.cxx:1156
 AliESDTagCreator.cxx:1157
 AliESDTagCreator.cxx:1158
 AliESDTagCreator.cxx:1159
 AliESDTagCreator.cxx:1160
 AliESDTagCreator.cxx:1161
 AliESDTagCreator.cxx:1162
 AliESDTagCreator.cxx:1163
 AliESDTagCreator.cxx:1164
 AliESDTagCreator.cxx:1165
 AliESDTagCreator.cxx:1166
 AliESDTagCreator.cxx:1167
 AliESDTagCreator.cxx:1168
 AliESDTagCreator.cxx:1169
 AliESDTagCreator.cxx:1170
 AliESDTagCreator.cxx:1171
 AliESDTagCreator.cxx:1172
 AliESDTagCreator.cxx:1173
 AliESDTagCreator.cxx:1174
 AliESDTagCreator.cxx:1175
 AliESDTagCreator.cxx:1176
 AliESDTagCreator.cxx:1177
 AliESDTagCreator.cxx:1178
 AliESDTagCreator.cxx:1179
 AliESDTagCreator.cxx:1180
 AliESDTagCreator.cxx:1181
 AliESDTagCreator.cxx:1182
 AliESDTagCreator.cxx:1183
 AliESDTagCreator.cxx:1184
 AliESDTagCreator.cxx:1185
 AliESDTagCreator.cxx:1186
 AliESDTagCreator.cxx:1187
 AliESDTagCreator.cxx:1188
 AliESDTagCreator.cxx:1189
 AliESDTagCreator.cxx:1190
 AliESDTagCreator.cxx:1191
 AliESDTagCreator.cxx:1192
 AliESDTagCreator.cxx:1193
 AliESDTagCreator.cxx:1194
 AliESDTagCreator.cxx:1195
 AliESDTagCreator.cxx:1196
 AliESDTagCreator.cxx:1197
 AliESDTagCreator.cxx:1198
 AliESDTagCreator.cxx:1199
 AliESDTagCreator.cxx:1200
 AliESDTagCreator.cxx:1201
 AliESDTagCreator.cxx:1202
 AliESDTagCreator.cxx:1203
 AliESDTagCreator.cxx:1204
 AliESDTagCreator.cxx:1205
 AliESDTagCreator.cxx:1206
 AliESDTagCreator.cxx:1207
 AliESDTagCreator.cxx:1208
 AliESDTagCreator.cxx:1209
 AliESDTagCreator.cxx:1210
 AliESDTagCreator.cxx:1211
 AliESDTagCreator.cxx:1212
 AliESDTagCreator.cxx:1213
 AliESDTagCreator.cxx:1214
 AliESDTagCreator.cxx:1215
 AliESDTagCreator.cxx:1216
 AliESDTagCreator.cxx:1217
 AliESDTagCreator.cxx:1218
 AliESDTagCreator.cxx:1219
 AliESDTagCreator.cxx:1220
 AliESDTagCreator.cxx:1221
 AliESDTagCreator.cxx:1222
 AliESDTagCreator.cxx:1223
 AliESDTagCreator.cxx:1224
 AliESDTagCreator.cxx:1225
 AliESDTagCreator.cxx:1226
 AliESDTagCreator.cxx:1227
 AliESDTagCreator.cxx:1228
 AliESDTagCreator.cxx:1229
 AliESDTagCreator.cxx:1230
 AliESDTagCreator.cxx:1231
 AliESDTagCreator.cxx:1232
 AliESDTagCreator.cxx:1233
 AliESDTagCreator.cxx:1234
 AliESDTagCreator.cxx:1235
 AliESDTagCreator.cxx:1236
 AliESDTagCreator.cxx:1237
 AliESDTagCreator.cxx:1238
 AliESDTagCreator.cxx:1239
 AliESDTagCreator.cxx:1240
 AliESDTagCreator.cxx:1241
 AliESDTagCreator.cxx:1242
 AliESDTagCreator.cxx:1243
 AliESDTagCreator.cxx:1244
 AliESDTagCreator.cxx:1245
 AliESDTagCreator.cxx:1246
 AliESDTagCreator.cxx:1247
 AliESDTagCreator.cxx:1248
 AliESDTagCreator.cxx:1249
 AliESDTagCreator.cxx:1250
 AliESDTagCreator.cxx:1251
 AliESDTagCreator.cxx:1252
 AliESDTagCreator.cxx:1253
 AliESDTagCreator.cxx:1254
 AliESDTagCreator.cxx:1255
 AliESDTagCreator.cxx:1256
 AliESDTagCreator.cxx:1257
 AliESDTagCreator.cxx:1258
 AliESDTagCreator.cxx:1259
 AliESDTagCreator.cxx:1260
 AliESDTagCreator.cxx:1261
 AliESDTagCreator.cxx:1262
 AliESDTagCreator.cxx:1263
 AliESDTagCreator.cxx:1264
 AliESDTagCreator.cxx:1265
 AliESDTagCreator.cxx:1266
 AliESDTagCreator.cxx:1267
 AliESDTagCreator.cxx:1268
 AliESDTagCreator.cxx:1269
 AliESDTagCreator.cxx:1270
 AliESDTagCreator.cxx:1271
 AliESDTagCreator.cxx:1272
 AliESDTagCreator.cxx:1273
 AliESDTagCreator.cxx:1274
 AliESDTagCreator.cxx:1275
 AliESDTagCreator.cxx:1276
 AliESDTagCreator.cxx:1277
 AliESDTagCreator.cxx:1278
 AliESDTagCreator.cxx:1279
 AliESDTagCreator.cxx:1280
 AliESDTagCreator.cxx:1281
 AliESDTagCreator.cxx:1282
 AliESDTagCreator.cxx:1283
 AliESDTagCreator.cxx:1284
 AliESDTagCreator.cxx:1285
 AliESDTagCreator.cxx:1286
 AliESDTagCreator.cxx:1287