1 //____________________________________________________________________
5 // Test of AliFMDAltro{Reader,Writer}
7 /** @ingroup simple_script
12 std::ofstream ofile("foo.dat");
13 AliFMDAltroWriter w(ofile);
14 for (size_t i = 0; i < 16; i++)
15 w.AddSignal((i << 4) + i);
16 w.AddChannelTrailer(0xabe);
20 std::ifstream ifile("foo.dat");
22 ifile.read((char*)&h, sizeof(h));
23 AliFMDAltroReader r(ifile);
24 UShort_t hwaddr, last;
26 int ret = r.ReadChannel(hwaddr, last, data);
27 printf("Read returned %d, w/addr=0x%x, last=%d\n", ret, hwaddr, last);
29 for (size_t i = 0; i < last; i++)
30 std::cout << i << "\t0x" << std::hex << data[i] << std::endl;
32 //____________________________________________________________________