]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
DdlData inputs corrected
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 13:57:24 +0000 (13:57 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 13:57:24 +0000 (13:57 +0000)
PMD/AliPMDRawDataRead.C
PMD/AliPMDRootDataRead.C
PMD/AliPMDesdanal.C

index ded883d19bbfb8e987f1219eadf11a5ce6806af6..dfe11ded43ed74fc135f258b7fd5bc255cee20e9 100644 (file)
@@ -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<<sig<<endl;
+             
+           }
+         pmdddlcont.Clear();
+         
        }
-      pmdddlcont.Clear();
 
     }
-
-
-}
+}
\ No newline at end of file
index 2205a600323efe90fd7a0a088464d3691cecf57e..ae37a8d344503395fb24d74a28e9293b348f196a 100644 (file)
@@ -1,39 +1,31 @@
-//
+// To read PMD raw root data and fetch the adc value for each cell
 void AliPMDRootDataRead()
 {
-  // To read PMD raw root data and fetch the adc value for each cell
-
   TObjArray pmdddlcont;
-
+  
   Int_t ievt = 2;
-
+  
   Bool_t junk;
-
-  AliRawReaderRoot reader("raw_6b_61.root",ievt);
-  //reader.NextEvent();
-  //reader.NextEvent();
-
-
-
+  
+  AliRawReaderRoot reader("raw.root",ievt);
+  // reader.NextEvent();
+  cout<<" Processing Event No  : "<<ievt<<endl;
   /*
-  reader.ReadHeader();
-  cout << "LDC ID =       " << reader.GetLDCId()       << endl;
-  cout << "Equipment ID = " << reader.GetEquipmentId() << endl;
-  cout << "Data Size =    " << reader.GetDataSize()    << endl;
+    reader.ReadHeader();
+    cout << "LDC ID =       " << reader.GetLDCId()       << endl;
+    cout << "Equipment ID = " << reader.GetEquipmentId() << endl;
+    cout << "Data Size =    " << reader.GetDataSize()    << endl;
   */
 
   AliPMDRawStream stream(&reader);
-
+  
   Int_t indexDDL = 0;
-
-
+  
   for (Int_t iddl = 0; iddl < 6; iddl++)
     {
-      
       reader.Select("PMD", iddl, iddl);
-
-      junk = stream.DdlData(&pmdddlcont);
-
+      junk = stream.DdlData(iddl,&pmdddlcont);
+      
       Int_t ientries = pmdddlcont.GetEntries();
       for (Int_t ient = 0; ient < ientries; ient++)
        {
@@ -46,13 +38,9 @@ void AliPMDRootDataRead()
          Int_t row = pmdddl->GetRow();
          Int_t col = pmdddl->GetColumn();
          Int_t sig = pmdddl->GetSignal();
-
-         // cout << row << " " << col << " " << sig << endl;
-
+         
+         //cout << iddl<<"  "<<row << " " << col << " " << sig << endl;
        }
       pmdddlcont.Clear();
-
     }
-
-
-}
+}
\ No newline at end of file
index 2a040262b5e637004091c09f4c0184a66fe9e216..4c520290f07bf7c6915ef48a23c784926afb2db5 100644 (file)
@@ -26,13 +26,12 @@ Int_t AliPMDesdanal() {
    gStyle->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