// $Id$ /************************************************************************** * This file is property of and copyright by the ALICE HLT Project * * ALICE Experiment at CERN, All rights reserved. * * * * Primary Authors: Matthias Richter * * for The ALICE HLT Project. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /** @file testAliHLTTPCMapping.C @author Matthias Richter @date @brief Test macro/program for the AliHLTTPCMapping class */ #ifndef __CINT__ #include "TSystem.h" #include "AliHLTTPCMapping.h" #include "AliHLTTPCTransform.h" #include #include #endif //__CINT__ ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// // // configuration of the test program // // printouts or not const bool bVerbose=true; ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// class AliHLTTPCMapping; bool compareMapping(int patch, AliHLTTPCMapping* mapper); int testAliHLTTPCMapping() { int iResult=0; #ifdef __CINT__ gSystem->Load("libAliHLTUtil.so"); gSystem->Load("libAliHLTRCU.so"); gSystem->Load("libAliHLTTPC.so"); #endif //AliHLTSystem gHLT; const int nofMappers=6; AliHLTTPCMapping* mappers[nofMappers]; AliHLTTPCMapping* mappers2[nofMappers]; for (int i=0; i> nHWAdd && inFile >> maxHWAdd) { while(result && inFile>>hwAdd && inFile>>row && inFile>>pad){ row-=rowOffset; if (row!=mapper->GetRow(hwAdd) || pad!=mapper->GetPad(hwAdd)) { cout << "mismatch at channel " << hwAdd << ": expected " << row << "/" << pad << " got " << mapper->GetRow(hwAdd) << "/" << mapper->GetPad(hwAdd) << endl; result=false; break; } } } inFile.close(); return result; } int main(int /*argc*/, const char** /*argv*/) { return testAliHLTTPCMapping(); }