/** @file tsaCrcChecker
** @author Pierre-Alain Loizeau
** @date 02.02.2019
**
** ROOT macro to read tsa files, loop on the timeslices and microslices,
** check the CRC of each microslice and dump the ones with corrupt data
** to the standard output.
*/
Bool_t tsaCrcChecker(TString inFile, Int_t iStartFile = -1, Int_t iStopFile = -1 )
{
CbmMcbm2018MsCrcCheck * msChecker = new CbmMcbm2018MsCrcCheck();
if( "" != inFile )
{
if( 0 <= iStartFile && iStartFile < iStopFile )
{
for( Int_t iFileIdx = iStartFile; iFileIdx < iStopFile; ++iFileIdx )
{
TString sFilePath = Form( "%s_%04u.tsa", inFile.Data(), iFileIdx );
msChecker->AddFile( sFilePath );
std::cout << "Added " << sFilePath <SetFileName(inFile);
} // if( "" != inFile )
else std::cout << "This macro needs to be provided with an input file full path!!"
<< std::endl;
msChecker->Run();
delete msChecker;
return kTRUE;
}