#include "AliRawReaderDate.h"
#include "AliRawReaderRoot.h"
#include "AliRawEventHeaderBase.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDfriend.h"
#include "AliESDVertex.h"
#include "AliMultiplicity.h"
}
// get the possibly already existing ESD file and tree
- AliESD* esd = new AliESD(); AliESD* hltesd = new AliESD();
+ AliESDEvent* esd = new AliESDEvent(); AliESDEvent* hltesd = new AliESDEvent();
TFile* fileOld = NULL;
TTree* treeOld = NULL; TTree *hlttreeOld = NULL;
if (!gSystem->AccessPathName("AliESDs.root")){
}
TTree* tree = new TTree("esdTree", "Tree with ESD objects");
- esd = new AliESD();
+ esd = new AliESDEvent();
esd->CreateStdContent();
esd->WriteToTree(tree);
TTree* hlttree = new TTree("HLTesdTree", "Tree with HLT ESD objects");
- hltesd = new AliESD();
+ hltesd = new AliESDEvent();
hltesd->CreateStdContent();
hltesd->WriteToTree(hlttree);
esd = NULL; hltesd = NULL;
*/
// create the branch with ESD additions
+
+
+
AliESDfriend *esdf = 0;
if (fWriteESDfriend) {
esdf = new AliESDfriend();
br->SetFile("AliESDfriends.root");
esd->AddObject(esdf);
}
+
// Get the diamond profile from OCDB
AliCDBEntry* entry = AliCDBManager::Instance()
if (fCheckPointLevel > 0) WriteESD(esd, "final");
esd->Reset();
hltesd->Reset();
+ if (fWriteESDfriend) {
+ new (esdf) AliESDfriend(); // Reset...
+ }
// esdf->Reset();
// delete esdf; esdf = 0;
}
+
+
tree->GetUserInfo()->Add(esd);
hlttree->GetUserInfo()->Add(hltesd);
}
gROOT->cd();
+ CleanUp(file, fileOld);
+
// Create tags for the events in the ESD tree (the ESD tree is always present)
// In case of empty events the tags will contain dummy values
- CreateTag(file);
+ CreateTag("AliESDs.root");
- CleanUp(file, fileOld);
return kTRUE;
}
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::RunVertexFinder(AliESD*& esd)
+Bool_t AliReconstruction::RunVertexFinder(AliESDEvent*& esd)
{
// run the barrel tracking
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::RunHLTTracking(AliESD*& esd)
+Bool_t AliReconstruction::RunHLTTracking(AliESDEvent*& esd)
{
// run the HLT barrel tracking
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::RunMuonTracking(AliESD*& esd)
+Bool_t AliReconstruction::RunMuonTracking(AliESDEvent*& esd)
{
// run the muon spectrometer tracking
//_____________________________________________________________________________
-Bool_t AliReconstruction::RunTracking(AliESD*& esd)
+Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
{
// run the barrel tracking
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::FillESD(AliESD*& esd, const TString& detectors)
+Bool_t AliReconstruction::FillESD(AliESDEvent*& esd, const TString& detectors)
{
// fill the event summary data
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::FillTriggerESD(AliESD*& esd)
+Bool_t AliReconstruction::FillTriggerESD(AliESDEvent*& esd)
{
// Reads the trigger decision which is
// stored in Trigger.root file and fills
//_____________________________________________________________________________
-Bool_t AliReconstruction::FillRawEventHeaderESD(AliESD*& esd)
+Bool_t AliReconstruction::FillRawEventHeaderESD(AliESDEvent*& esd)
{
//
// Filling information from RawReader Header
//_____________________________________________________________________________
-Bool_t AliReconstruction::ReadESD(AliESD*& esd, const char* recStep) const
+
+Bool_t AliReconstruction::ReadESD(AliESDEvent*& esd, const char* recStep) const
{
// read the ESD event from a file
gROOT->cd();
delete esd;
- esd = (AliESD*) file->Get("ESD");
+ esd = (AliESDEvent*) file->Get("ESD");
file->Close();
delete file;
return kTRUE;
+
}
+
+
//_____________________________________________________________________________
-void AliReconstruction::WriteESD(AliESD* esd, const char* recStep) const
+void AliReconstruction::WriteESD(AliESDEvent* esd, const char* recStep) const
{
// write the ESD event to a file
//_____________________________________________________________________________
-void AliReconstruction::CreateTag(TFile* file)
+void AliReconstruction::CreateTag(const char* fESDfilename)
{
//GRP
Float_t lhcLuminosity = 0.0;
btag->SetCompressionLevel(9);
AliInfo(Form("Creating the tags......."));
-
+
+ TFile *file = TFile::Open(fESDfilename);
if (!file || !file->IsOpen()) {
AliError(Form("opening failed"));
delete file;
}
Int_t lastEvent = 0;
TTree *b = (TTree*) file->Get("esdTree");
- AliESD *esd = new AliESD();
+ AliESDEvent *esd = new AliESDEvent();
esd->ReadFromTree(b);
b->GetEntry(fFirstEvent);
// connect to ESD
TTree *t = (TTree*) esdFile->Get("esdTree");
- AliESD *esd = new AliESD();
+ AliESDEvent *esd = new AliESDEvent();
esd->ReadFromTree(t);
Int_t nEvents = t->GetEntries();
return;
}
-void AliReconstruction::WriteAlignmentData(AliESD* esd)
+void AliReconstruction::WriteAlignmentData(AliESDEvent* esd)
{
// Write space-points which are then used in the alignment procedures
// For the moment only ITS, TRD and TPC
}
//_____________________________________________________________________________
-void AliReconstruction::FillRawDataErrorLog(Int_t iEvent, AliESD* esd)
+void AliReconstruction::FillRawDataErrorLog(Int_t iEvent, AliESDEvent* esd)
{
// The method reads the raw-data error log
// accumulated within the rawReader.