# include <FMD/AliFMDAltroMapping.h>
// # include <FMD/AliFMDUShortMap.h>
// # include <FMD/AliFMDBoolMap.h>
+# include <AliLog.h>
# include <TError.h>
# include <iostream>
#endif
-#define SHOW_ALL 1
+bool show_all=false;
+
//____________________________________________________________________
/** @ingroup ALTRO_test
@param ddl
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++) {
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,
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);