ROOT logo
// $Id$
// $MpId: testUpdateGlobalIndices.C,v 1.7 2005/08/24 08:53:27 ivana Exp $
//
// Tests updating global indices of motif positions from file.

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

#include "AliMpStation12Type.h"
#include "AliMpPlaneType.h"
#include "AliMpDataProcessor.h"
#include "AliMpDataMap.h"
#include "AliMpDataStreams.h"
#include "AliMpSector.h"
#include "AliMpSectorReader.h"
#include "AliMpMotifMap.h"
#include "AliMpVPainter.h"

#include <Riostream.h>
#include <TCanvas.h>

#endif

void testUpdateGlobalIndices()
{
  AliMpDataProcessor mp;
  AliMpDataMap* dataMap = mp.CreateDataMap("data");
  AliMpDataStreams dataStreams(dataMap);

  AliMpSectorReader r(dataStreams, AliMq::kStation1, AliMp::kNonBendingPlane);
  AliMpSector* sector = r.BuildSector();

  sector->GetMotifMap()->UpdateGlobalIndices("motif_map.dat");  
  
  AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
  TCanvas* canvas = new TCanvas();
  canvas->cd();
  painter->Draw("ZSSMI");
}          
 
 testUpdateGlobalIndices.C:1
 testUpdateGlobalIndices.C:2
 testUpdateGlobalIndices.C:3
 testUpdateGlobalIndices.C:4
 testUpdateGlobalIndices.C:5
 testUpdateGlobalIndices.C:6
 testUpdateGlobalIndices.C:7
 testUpdateGlobalIndices.C:8
 testUpdateGlobalIndices.C:9
 testUpdateGlobalIndices.C:10
 testUpdateGlobalIndices.C:11
 testUpdateGlobalIndices.C:12
 testUpdateGlobalIndices.C:13
 testUpdateGlobalIndices.C:14
 testUpdateGlobalIndices.C:15
 testUpdateGlobalIndices.C:16
 testUpdateGlobalIndices.C:17
 testUpdateGlobalIndices.C:18
 testUpdateGlobalIndices.C:19
 testUpdateGlobalIndices.C:20
 testUpdateGlobalIndices.C:21
 testUpdateGlobalIndices.C:22
 testUpdateGlobalIndices.C:23
 testUpdateGlobalIndices.C:24
 testUpdateGlobalIndices.C:25
 testUpdateGlobalIndices.C:26
 testUpdateGlobalIndices.C:27
 testUpdateGlobalIndices.C:28
 testUpdateGlobalIndices.C:29
 testUpdateGlobalIndices.C:30
 testUpdateGlobalIndices.C:31
 testUpdateGlobalIndices.C:32
 testUpdateGlobalIndices.C:33
 testUpdateGlobalIndices.C:34
 testUpdateGlobalIndices.C:35
 testUpdateGlobalIndices.C:36
 testUpdateGlobalIndices.C:37
 testUpdateGlobalIndices.C:38
 testUpdateGlobalIndices.C:39
 testUpdateGlobalIndices.C:40