// $Id$
///
/// Tries to read all motif types for stations 3, 4, 5
///
///
#if !defined(__CINT__) || defined(__MAKECINT__)
#include "AliMpStation12Type.h"
#include "AliMpPlaneType.h"
#include "AliMpDataProcessor.h"
#include "AliMpDataMap.h"
#include "AliMpDataStreams.h"
#include "AliMpMotifReader.h"
#include "AliMpMotifType.h"
#include <Riostream.h>
#endif
Int_t test(AliMpMotifReader& r, const char letter, Int_t from, Int_t to)
{
char m[256];
Int_t n = 0;
for ( Int_t i = from; i <= to; ++i )
{
sprintf(m,"%c%d",letter,i);
AliMpMotifType* motifType = r.BuildMotifType(m);
if ( motifType )
{
motifType->Print("G");
++n;
}
else
{
cout << "Cannot read motifType " << m << endl;
}
}
return n;
}
void testSt345ReadMotifType()
{
AliMpDataProcessor mp;
AliMpDataMap* dataMap = mp.CreateDataMap("data");
AliMpDataStreams dataStreams(dataMap);
AliMpMotifReader r(dataStreams, AliMp::kStation345, AliMq::kNotSt12, AliMp::kNonBendingPlane);
// note that second parameter is not used for station345.
Int_t n = 0;
n += test(r,'I',1,1);
n += test(r,'L',1,25);
n += test(r,'O',1,20);
n += test(r,'P',1,4);
n += test(r,'Q',1,4);
n += test(r,'R',1,45);
n += test(r,'Z',1,8);
cout << "Successfully read in " << n << " motifTypes" << endl;
}
testSt345ReadMotifType.C:1 testSt345ReadMotifType.C:2 testSt345ReadMotifType.C:3 testSt345ReadMotifType.C:4 testSt345ReadMotifType.C:5 testSt345ReadMotifType.C:6 testSt345ReadMotifType.C:7 testSt345ReadMotifType.C:8 testSt345ReadMotifType.C:9 testSt345ReadMotifType.C:10 testSt345ReadMotifType.C:11 testSt345ReadMotifType.C:12 testSt345ReadMotifType.C:13 testSt345ReadMotifType.C:14 testSt345ReadMotifType.C:15 testSt345ReadMotifType.C:16 testSt345ReadMotifType.C:17 testSt345ReadMotifType.C:18 testSt345ReadMotifType.C:19 testSt345ReadMotifType.C:20 testSt345ReadMotifType.C:21 testSt345ReadMotifType.C:22 testSt345ReadMotifType.C:23 testSt345ReadMotifType.C:24 testSt345ReadMotifType.C:25 testSt345ReadMotifType.C:26 testSt345ReadMotifType.C:27 testSt345ReadMotifType.C:28 testSt345ReadMotifType.C:29 testSt345ReadMotifType.C:30 testSt345ReadMotifType.C:31 testSt345ReadMotifType.C:32 testSt345ReadMotifType.C:33 testSt345ReadMotifType.C:34 testSt345ReadMotifType.C:35 testSt345ReadMotifType.C:36 testSt345ReadMotifType.C:37 testSt345ReadMotifType.C:38 testSt345ReadMotifType.C:39 testSt345ReadMotifType.C:40 testSt345ReadMotifType.C:41 testSt345ReadMotifType.C:42 testSt345ReadMotifType.C:43 testSt345ReadMotifType.C:44 testSt345ReadMotifType.C:45 testSt345ReadMotifType.C:46 testSt345ReadMotifType.C:47 testSt345ReadMotifType.C:48 testSt345ReadMotifType.C:49 testSt345ReadMotifType.C:50 testSt345ReadMotifType.C:51 testSt345ReadMotifType.C:52 testSt345ReadMotifType.C:53 testSt345ReadMotifType.C:54 testSt345ReadMotifType.C:55 testSt345ReadMotifType.C:56 testSt345ReadMotifType.C:57 testSt345ReadMotifType.C:58 testSt345ReadMotifType.C:59 testSt345ReadMotifType.C:60 testSt345ReadMotifType.C:61 testSt345ReadMotifType.C:62 testSt345ReadMotifType.C:63 testSt345ReadMotifType.C:64 testSt345ReadMotifType.C:65