]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerIO.cxx
Separating run-dependent mapping data from data, which are not
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerIO.cxx
index 9d96642f426f8157ea5dc34890948e4e0da8e03c..840189c08aca8373fa82764ef34d2030cbd5e92c 100644 (file)
@@ -209,7 +209,7 @@ AliMUONTriggerIO::ReadLocalMasks(const char* localFile, AliMUONVStore& localMask
   
   UShort_t maskBuffer[8];
   
-  Int_t nLocalBoards(0);
+  Int_t nLocalBoards(1);
     
   while ( fread ( maskBuffer, 2, 8, fp ) )
   {
@@ -395,7 +395,7 @@ AliMUONTriggerIO::ReadConfig(const char* localFile,
   }
   
   Int_t nCrates = ReadRegionalConfig(regionalFile, regionalConfig);
-  
+
   if (!nCrates) return kFALSE;
   
   if (localMasks && localFile)
@@ -789,3 +789,17 @@ AliMUONTriggerIO::LocalBoardId(Int_t index) const
 
   return fRegionalTrigger.LocalBoardId(index);
 }
+
+
+//______________________________________________________________________________
+
+Int_t AliMUONTriggerIO::LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const
+{
+    /// Return local board id from crate and local indexes.
+    
+    Int_t nofDDLs = 0;
+    TString name = AliMpTriggerCrate::GenerateName(crateId, ddlId, nofDDLs);
+
+    AliMpTriggerCrate* crate = fRegionalTrigger.FindTriggerCrate(name, false);
+    return crate->GetLocalBoardId(localId);
+}