X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2Fscripts%2FTestAltroMapping.C;h=08b751d711915d0262efb4c1eab224422b95a551;hb=5cf05dbbfae57642fb7488402fb5ed9983167db4;hp=23722e79ec90bfc85fa0f780d0b3c73b7fef5a66;hpb=f38b16535e46e28a81d875e6a66476b85fe80e8b;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/scripts/TestAltroMapping.C b/FMD/scripts/TestAltroMapping.C index 23722e79ec9..08b751d7119 100644 --- a/FMD/scripts/TestAltroMapping.C +++ b/FMD/scripts/TestAltroMapping.C @@ -13,10 +13,12 @@ # include // # include // # include +# include # include # include #endif -#define SHOW_ALL 1 +bool show_all=false; + //____________________________________________________________________ /** @ingroup ALTRO_test @param ddl @@ -112,25 +114,28 @@ CheckTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, ok = false; Warning("TestHWMap", "Sample # differ %d != %d", sam, osam); } -#ifndef SHOW_ALL - if (!ok) - PrintTrans(det,ring,sec,str,sam, - ddl,hwaddr,timebin, - odet,oring,osec,ostr,osam); -#endif + + if (!show_all) { + if (!ok) + PrintTrans(det,ring,sec,str,sam, + ddl,hwaddr,timebin, + odet,oring,osec,ostr,osam); + } } //____________________________________________________________________ /** @ingroup ALTRO_test */ void -TestAltroMapping(Int_t min=2, Int_t max=0) +TestAltroMapping(bool sa=false, Int_t min=1, Int_t max=3) { + show_all = sa; + // AliLog::SetModuleDebugLevel("FMD", 1); // if (min < 1 || min > 3) min = 1; if (max < min) max = min; // AliFMDParameters* param = AliFMDParameters::Instance(); AliFMDAltroMapping m; - UShort_t presamp = 0; + UShort_t presamp = 19; UShort_t oversamp = 4; for (UShort_t det = min; det <= max; det++) { @@ -141,7 +146,7 @@ TestAltroMapping(Int_t min=2, Int_t max=0) for (UShort_t sec = 0; sec < nsec; sec++) { for (Short_t str = 0; str < nstr; str ++ /*= 128*/) { for(UShort_t sam = 0; sam < oversamp; sam++) { - UInt_t ddl, hwaddr; + UShort_t ddl, hwaddr; UShort_t timebin; if (!m.Detector2Hardware(det, ring, sec, str, sam, presamp, oversamp, @@ -160,11 +165,10 @@ TestAltroMapping(Int_t min=2, Int_t max=0) Addr2Str(ddl, hwaddr, timebin)); continue; } -#ifdef SHOW_ALL - PrintTrans(det,ring,sec,str,sam, - ddl,hwaddr,timebin, - odet,oring,osec,ostr,osam); -#endif + if (show_all) + PrintTrans(det,ring,sec,str,sam, + ddl,hwaddr,timebin, + odet,oring,osec,ostr,osam); CheckTrans(det,ring,sec,str,sam, ddl,hwaddr,timebin, odet,oring,osec,ostr,osam);