2 // $MpId: testDE.C,v 1.1 2006/03/14 09:06:54 ivana Exp $
4 // Test AliMpDEIterator & AliMpSegFactory classes
8 AliMpSegFactory factory;
11 for ( it.First(); ! it.IsDone(); it.Next() ) {
12 cout << "In detection element: " << it.CurrentDE() << endl;
14 // Create/get segmentation via factory
15 AliMpVSegmentation* segmentation
16 = factory.CreateMpSegmentation(it.CurrentDE(), 0);
18 // Print number of pads
19 cout << " number of pads: " << segmentation->NofPads() << endl;
21 // Find pad by indices in this DE
22 AliMpIntPair indices(segmentation->MaxPadIndexX()/2 ,
23 segmentation->MaxPadIndexY()/2);
24 AliMpPad pad = segmentation->PadByIndices(indices, false);
26 cout << " found pad: " << pad << endl << endl;
29 // Delete all created segmentations
30 factory.DeleteSegmentations();