AliESD *esd = 0;
fESDChain->SetBranchAddress("ESD",&esd);
+ AliESDfriend *esdf = 0;
+ fESDChain->SetBranchStatus("ESDfriend*",1);
+ fESDChain->SetBranchAddress("ESDfriend.",&esdf);
// Open the output file
if (fPointsFilename.Data() == "") {
Int_t ievent = 0;
while (fESDChain->GetEntry(ievent++)) {
if (!esd) break;
+
+ esd->SetESDfriend(esdf); //Attach the friend to the ESD
+
Int_t ntracks = esd->GetNumberOfTracks();
for (Int_t itrack=0; itrack < ntracks; itrack++) {
AliESDtrack * track = esd->GetTrack(itrack);
// to initialize the volume paths
AliAlignObjAngles alobj;
- TFile *fPointsFile = TFile::Open(fPointsFilename);
+ fPointsFile = TFile::Open(fPointsFilename);
if (!fPointsFile || !fPointsFile->IsOpen()) {
AliWarning(Form("Can't open %s !",fPointsFilename.Data()));
return;
}
fPointsTree->SetBranchAddress("SP", &array);
- Int_t nArrays = fPointsTree->GetEntries();
+ Int_t nArrays = (Int_t)fPointsTree->GetEntries();
for (Int_t iArray = 0; iArray < nArrays; iArray++)
{
fPointsTree->GetEvent(iArray);
for (Int_t ipoint = 0; ipoint < array->GetNPoints(); ipoint++) {
UShort_t volId = array->GetVolumeID()[ipoint];
// check if the volId is valid
- if (!AliAlignObj::GetVolPath(volId)) {
- AliError(Form("The volume id %d has no default volume path !",
+ if (!AliAlignObj::SymName(volId)) {
+ AliError(Form("The volume id %d has no default volume name !",
volId));
continue;
}
fAlignObjs[iLayer] = new AliAlignObj*[AliAlignObj::LayerSize(iLayer + AliAlignObj::kFirstLayer)];
for (Int_t iModule = 0; iModule < AliAlignObj::LayerSize(iLayer + AliAlignObj::kFirstLayer); iModule++) {
UShort_t volid = AliAlignObj::LayerToVolUID(iLayer+ AliAlignObj::kFirstLayer,iModule);
- fAlignObjs[iLayer][iModule] = new AliAlignObjAngles("",volid,0,0,0,0,0,0);
+ fAlignObjs[iLayer][iModule] = new AliAlignObjAngles(AliAlignObj::SymName(volid),volid,0,0,0,0,0,0,kTRUE);
}
}
}
for (Int_t i = 0; i < nArrays; i++) points[i] = 0x0;
// Init the array used to flag already loaded tree entries
- Bool_t *indexUsed = new Bool_t[fPointsTree->GetEntries()];
+ Bool_t *indexUsed = new Bool_t[(UInt_t)fPointsTree->GetEntries()];
for (Int_t i = 0; i < fPointsTree->GetEntries(); i++)
indexUsed[i] = kFALSE;