]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/macros/testDE.C
- All mapping enums within namespace (AliMp).
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testDE.C
CommitLineData
19a9b7cf 1// $Id$
2// $MpId: testDE.C,v 1.1 2006/03/14 09:06:54 ivana Exp $
3//
4// Test AliMpDEIterator & AliMpSegFactory classes
5
6void testDE()
7{
19a9b7cf 8 AliMpDEIterator it;
9 for ( it.First(); ! it.IsDone(); it.Next() ) {
cddd101e 10 cout << "In detection element: " << it.CurrentDEId() << endl;
19a9b7cf 11
12 // Create/get segmentation via factory
13 AliMpVSegmentation* segmentation
cddd101e 14 = AliMpSegmentation::Instance()
15 ->GetMpSegmentation(it.CurrentDEId(), kCath0);
19a9b7cf 16
17 // Print number of pads
18 cout << " number of pads: " << segmentation->NofPads() << endl;
19
20 // Find pad by indices in this DE
21 AliMpIntPair indices(segmentation->MaxPadIndexX()/2 ,
22 segmentation->MaxPadIndexY()/2);
23 AliMpPad pad = segmentation->PadByIndices(indices, false);
24
25 cout << " found pad: " << pad << endl << endl;
26 }
19a9b7cf 27}