]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/macros/St345CrocusFlatCables.C
Patch for the pointer to AOD event
[u/mrichter/AliRoot.git] / MUON / mapping / macros / St345CrocusFlatCables.C
1 ///
2 /// Macro to help the LC2 user to go from the (local) bus patch id presented
3 /// by LC2 to a "human-redeable" location in the slat stations 
4 ///
5 ///
6
7 #if !defined(__CINT__) || defined(__MAKECINT__)
8
9 #include "AliDAQ.h"
10 #include "Riostream.h"
11 #include "AliMpCDB.h"
12 #include "AliMpDDLStore.h"
13 #include "AliMpBusPatch.h"
14
15 #endif
16
17 void St345CrocusFlatCables()
18 {
19   AliMpCDB::LoadDDLStore2();
20   
21   Int_t offset(AliDAQ::DdlIDOffset("MUONTRK"));
22   
23   while (1)
24   {
25     Int_t equipmentId;
26     Int_t localBusPatchId;
27   
28     cout << Form("Equipment Id (from %d to %d, or -1 to quit) ? ",
29                  AliDAQ::DdlID("MUONTRK",0),
30                  AliDAQ::DdlID("MUONTRK",AliDAQ::NumberOfDdls("MUONTRK")-1));
31   
32     cin >> equipmentId;
33
34     if ( equipmentId < 0 ) break;
35   
36     cout << "Local bus patch Id (-1 to quit) ? ";
37   
38     cin >> localBusPatchId;
39   
40     if ( localBusPatchId < 0 ) break;
41
42     Int_t busPatchId = AliMpBusPatch::GetGlobalBusID(localBusPatchId,equipmentId-offset);
43
44     AliMpBusPatch* bp = AliMpDDLStore::Instance()->GetBusPatch(busPatchId);
45   
46     cout << endl;
47     
48     bp->Print();
49   
50     cout << endl;
51   }
52   
53 }