]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added SetPatchModules() function to set number of manus per patch module
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 11:14:28 +0000 (11:14 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 11:14:28 +0000 (11:14 +0000)
to all bus patches.
(Christian, Ivana)

MUON/mapping/AliMpDDLStore.cxx
MUON/mapping/AliMpDDLStore.h

index b9a40b75b7b1d8c809894a78ebf1a712e7a3b69f..eaa735abafbe5f657956889f2fb33ff230e2e22d 100644 (file)
@@ -86,6 +86,7 @@ AliMpDDLStore::AliMpDDLStore()
   // Create all detection elements
   ReadDDLs();
   SetManus();
+  SetPatchModules();
 }
 
 //______________________________________________________________________________
@@ -350,6 +351,30 @@ Bool_t AliMpDDLStore::SetManus()
     return true;
 }
 
+//______________________________________________________________________________
+Bool_t AliMpDDLStore::SetPatchModules()
+{
+/// Compute the number of manu per PCB for each buspatch 
+
+  Bool_t result = true;
+
+  for (Int_t i = 0; i < fBusPatches.GetSize(); ++i) {
+    AliMpBusPatch* busPatch = (AliMpBusPatch*)fBusPatches.GetObject(i);
+    Bool_t newResult = busPatch->SetNofManusPerModule();
+    result = result && newResult;
+
+    if (AliDebugLevel() == 3) {
+      // print out for checking
+      printf("\nbus patch %d\n", busPatch->GetId());
+      for (Int_t i = 0; i < busPatch->GetNofPatchModules(); ++i) 
+        printf("manu per %dth pcb %d\n", i, busPatch->GetNofManusPerModule(i));
+    }    
+  }  
+  
+  return result;
+}
+
+
 //
 // public methods
 //
index fb5f088940eba95174146340ed3de7c6fe943fbe..68b888ae981f13adf99c46df31b28796e1f028cd 100644 (file)
@@ -64,6 +64,7 @@ class AliMpDDLStore : public  TObject {
     Int_t  GetBusPatchIndex(Int_t detElemId, Int_t manuId) const;
     Bool_t ReadDDLs();
     Bool_t SetManus();
+    Bool_t SetPatchModules();
 
     // static data members     
     static AliMpDDLStore* fgInstance; ///< Singleton instance