ROOT logo
///
/// Macro to help the LC2 user to go from the (local) bus patch id presented
/// by LC2 to a "human-redeable" location in the slat stations 
///
///

#if !defined(__CINT__) || defined(__MAKECINT__)

#include "AliDAQ.h"
#include "Riostream.h"
#include "AliMpCDB.h"
#include "AliMpDDLStore.h"
#include "AliMpBusPatch.h"

#endif

void St345CrocusFlatCables()
{
  AliMpCDB::LoadDDLStore2();
  
  Int_t offset(AliDAQ::DdlIDOffset("MUONTRK"));
  
  while (1)
  {
    Int_t equipmentId;
    Int_t localBusPatchId;
  
    cout << Form("Equipment Id (from %d to %d, or -1 to quit) ? ",
                 AliDAQ::DdlID("MUONTRK",0),
                 AliDAQ::DdlID("MUONTRK",AliDAQ::NumberOfDdls("MUONTRK")-1));
  
    cin >> equipmentId;

    if ( equipmentId < 0 ) break;
  
    cout << "Local bus patch Id (-1 to quit) ? ";
  
    cin >> localBusPatchId;
  
    if ( localBusPatchId < 0 ) break;

    Int_t busPatchId = AliMpBusPatch::GetGlobalBusID(localBusPatchId,equipmentId-offset);

    AliMpBusPatch* bp = AliMpDDLStore::Instance()->GetBusPatch(busPatchId);
  
    cout << endl;
    
    bp->Print();
  
    cout << endl;
  }
  
}
 St345CrocusFlatCables.C:1
 St345CrocusFlatCables.C:2
 St345CrocusFlatCables.C:3
 St345CrocusFlatCables.C:4
 St345CrocusFlatCables.C:5
 St345CrocusFlatCables.C:6
 St345CrocusFlatCables.C:7
 St345CrocusFlatCables.C:8
 St345CrocusFlatCables.C:9
 St345CrocusFlatCables.C:10
 St345CrocusFlatCables.C:11
 St345CrocusFlatCables.C:12
 St345CrocusFlatCables.C:13
 St345CrocusFlatCables.C:14
 St345CrocusFlatCables.C:15
 St345CrocusFlatCables.C:16
 St345CrocusFlatCables.C:17
 St345CrocusFlatCables.C:18
 St345CrocusFlatCables.C:19
 St345CrocusFlatCables.C:20
 St345CrocusFlatCables.C:21
 St345CrocusFlatCables.C:22
 St345CrocusFlatCables.C:23
 St345CrocusFlatCables.C:24
 St345CrocusFlatCables.C:25
 St345CrocusFlatCables.C:26
 St345CrocusFlatCables.C:27
 St345CrocusFlatCables.C:28
 St345CrocusFlatCables.C:29
 St345CrocusFlatCables.C:30
 St345CrocusFlatCables.C:31
 St345CrocusFlatCables.C:32
 St345CrocusFlatCables.C:33
 St345CrocusFlatCables.C:34
 St345CrocusFlatCables.C:35
 St345CrocusFlatCables.C:36
 St345CrocusFlatCables.C:37
 St345CrocusFlatCables.C:38
 St345CrocusFlatCables.C:39
 St345CrocusFlatCables.C:40
 St345CrocusFlatCables.C:41
 St345CrocusFlatCables.C:42
 St345CrocusFlatCables.C:43
 St345CrocusFlatCables.C:44
 St345CrocusFlatCables.C:45
 St345CrocusFlatCables.C:46
 St345CrocusFlatCables.C:47
 St345CrocusFlatCables.C:48
 St345CrocusFlatCables.C:49
 St345CrocusFlatCables.C:50
 St345CrocusFlatCables.C:51
 St345CrocusFlatCables.C:52
 St345CrocusFlatCables.C:53
 St345CrocusFlatCables.C:54