4 ReadRaw(Int_t det=2, bool verbose=false, Int_t event=0)
6 TString file(Form("raw%d/FMD_%d.ddl", event, AliFMD::kBaseDDL + det - 1));
8 std::cout << "Reading raw data file " << file << std::endl;
10 TH1* h = new TH1F("rawData", "Raw Data", 90, 0, 90);
13 // This method creates a text file containing the same information
14 // stored in an Altro file. The information in the text file is
15 // organized pad by pad and and for each pad it consists in a
16 // sequence of bunches (Bunch length +2, Time bin of the last
17 // amplitude sample in the bunch, amplitude values) It is used
18 // mainly //for debugging
20 AliAltroBuffer buff(file.Data(),0);
21 Int_t numWords,padNum,rowNum,secNum=0;
24 // if (!buff.ReadDataHeader()) {
25 // std::cout<< file << " isn't a valid data file!" << std::endl;
28 while(buff.ReadTrailerBackward(numWords,padNum,rowNum,secNum)){
30 std::cout << "Ring: " << (secNum == 0 ? 'I' : 'O')
31 << " Sector: " << std::setw(2) << rowNum
32 << " Strip: " << std::setw(3) << padNum
33 << " Words: " << std::setw(4) << numWords << std::endl;
34 if (numWords == 0) zero++;
37 std::cout << "Skipping trailer of "
38 << (4 - numWords % 4) << " words" << std::endl;
39 for(Int_t j = 0; j < (4 - numWords % 4); j++)
40 value=buff.GetNextBackWord();
42 for(Int_t i = 0; i <numWords; i++) {
43 value=buff.GetNextBackWord();
45 std::cout << std::setw(5) << value << std::flush;
46 if (i % 16 == 15) std::cout << std::endl;
51 std::cout << std::endl;
53 std::cout << "Error: Read zero channels - should not happen"