From 9f35f7b3723e0c2eaa0e8ddf2f52ac0fb3ab8d02 Mon Sep 17 00:00:00 2001 From: bnandi Date: Tue, 9 Oct 2007 13:57:24 +0000 Subject: [PATCH] DdlData inputs corrected --- PMD/AliPMDRawDataRead.C | 61 ++++++++++++++++++++-------------------- PMD/AliPMDRootDataRead.C | 48 ++++++++++++------------------- PMD/AliPMDesdanal.C | 20 +++++++------ 3 files changed, 60 insertions(+), 69 deletions(-) diff --git a/PMD/AliPMDRawDataRead.C b/PMD/AliPMDRawDataRead.C index ded883d19bb..dfe11ded43e 100644 --- a/PMD/AliPMDRawDataRead.C +++ b/PMD/AliPMDRawDataRead.C @@ -1,40 +1,39 @@ -// -void AliPMDRawDataRead() -{ - // To read PMD raw data +// To read PMD raw data +void AliPMDRawDataRead(Int_t iEvent) +{ TObjArray pmdddlcont; - - Int_t ievt = 0; - AliRawReaderFile reader(ievt); - AliPMDRawStream stream(&reader); - - Int_t indexDDL = 0; - - - for (Int_t iddl = 0; iddl < 6; iddl++) + + for(Int_t ievt = 0; ievt < iEvent; ievt++) { + AliRawReaderFile reader(ievt); + AliPMDRawStream stream(&reader); - reader.Select("PMD", iddl, iddl); - //cout << reader.GetDataSize() << endl; - stream.DdlData(&pmdddlcont); - Int_t ientries = pmdddlcont.GetEntries(); - for (Int_t ient = 0; ient < ientries; ient++) + Int_t indexDDL = 0; + for (Int_t iddl = 0; iddl < 6; iddl++) { - AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient); - Int_t det = pmdddl->GetDetector(); - Int_t smn = pmdddl->GetSMN(); - //Int_t mcm = pmdddl->GetMCM(); - //Int_t chno = pmdddl->GetChannel(); - Int_t row = pmdddl->GetRow(); - Int_t col = pmdddl->GetColumn(); - Int_t sig = pmdddl->GetSignal(); - + reader.Select("PMD", iddl, iddl); + //cout << reader.GetDataSize() << endl; + stream.DdlData(indexDDL,&pmdddlcont); + Int_t ientries = pmdddlcont.GetEntries(); + for (Int_t ient = 0; ient < ientries; ient++) + { + AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient); + + Int_t det = pmdddl->GetDetector(); + Int_t smn = pmdddl->GetSMN(); + //Int_t mcm = pmdddl->GetMCM(); + //Int_t chno = pmdddl->GetChannel(); + Int_t row = pmdddl->GetRow(); + Int_t col = pmdddl->GetColumn(); + Int_t sig = pmdddl->GetSignal(); + cout<GetRow(); Int_t col = pmdddl->GetColumn(); Int_t sig = pmdddl->GetSignal(); - - // cout << row << " " << col << " " << sig << endl; - + + //cout << iddl<<" "<SetOptFit(1); //****** File with the ESD - TFile *ef=TFile::Open("AliESDcheck.root"); + TFile *ef=TFile::Open("AliESDs.root"); if (!ef || !ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;} - AliESD* event = new AliESD; + AliESDEvent * event = new AliESDEvent; TTree* tree = (TTree*) ef->Get("esdTree"); if (!tree) {cerr<<"no ESD tree found\n"; return 1;}; - tree->SetBranchAddress("ESD", &event); - + event->ReadFromTree(tree); Int_t n=0; //******* The loop over events @@ -47,16 +46,21 @@ Int_t AliPMDesdanal() { while (npmdcl--) { AliESDPmdTrack *pmdtr = event->GetPmdTrack(npmdcl); - Int_t det = pmdtr->GetDetector(); - Float_t theta = pmdtr->GetTheta(); - Float_t phi = pmdtr->GetPhi(); + Int_t det = pmdtr->GetDetector(); + Float_t clsX = pmdtr->GetClusterX(); + Float_t clsY = pmdtr->GetClusterY(); + Float_t clsZ = pmdtr->GetClusterZ(); + Float_t ncell = pmdtr->GetClusterCells(); Float_t adc = pmdtr->GetClusterADC(); Float_t pid = pmdtr->GetClusterPID(); } } + + delete event; + timer.Stop(); timer.Print(); return 0; -} +} \ No newline at end of file -- 2.43.0