2 // $MpId: testDE.C,v 1.1 2006/03/14 09:06:54 ivana Exp $
4 // Test AliMpDEIterator & AliMpSegFactory classes
6 #if !defined(__CINT__) || defined(__MAKECINT__)
8 #include "AliMpDEIterator.h"
9 #include "AliMpSegmentation.h"
10 #include "AliMpVSegmentation.h"
12 #include "AliMpIntPair.h"
15 #include <Riostream.h>
21 AliMpCDB::LoadMpSegmentation2();
24 for ( it.First(); ! it.IsDone(); it.Next() ) {
25 cout << "In detection element: " << it.CurrentDEId() << endl;
27 // Create/get segmentation via factory
28 const AliMpVSegmentation* kSegmentation
29 = AliMpSegmentation::Instance()
30 ->GetMpSegmentation(it.CurrentDEId(), AliMp::kCath0);
32 // Print number of pads
33 cout << " number of pads: " << kSegmentation->NofPads() << endl;
35 // Find pad by indices in this DE
36 Int_t ix = kSegmentation->MaxPadIndexX()/2;
37 Int_t iy = kSegmentation->MaxPadIndexY()/2;
38 AliMpPad pad = kSegmentation->PadByIndices(ix, iy, false);
40 cout << " found pad: " << pad << endl << endl;