]>
Commit | Line | Data |
---|---|---|
0a59828d | 1 | //_____________________________________________________// |
2 | // // | |
3 | // This macro reads ACORDE DDL Raw Data and // | |
4 | // converts it into Digits // | |
5 | // // | |
6 | //____________________________________________________ // | |
7 | ||
8 | ||
9 | void ACORDERaw2Digits(Int_t nEvents = 1, char* fileName = "alien:///alice/data/2008/LHC08a_ACORDE/000016788/raw/08000016788014.20.root") | |
10 | { | |
11 | // Reads DDL data from fileName | |
12 | ||
13 | TStopwatch timer; | |
14 | timer.Start(); | |
15 | ||
16 | TGrid::Connect("alien://"); | |
17 | ||
18 | AliRawReader* rawReader = 0x0; | |
19 | // rawReader = new AliRawReaderFile(fileName); // DDL files | |
20 | rawReader = new AliRawReaderRoot(fileName); // DDL files | |
21 | ||
22 | AliACORDERawStream* rawStream = new AliACORDERawStream(rawReader); | |
23 | ||
24 | for (Int_t i=0; i<nEvents; i++) { | |
25 | printf("=========== EVENT %d ===========\n",i); | |
26 | if (!rawReader->NextEvent()) | |
27 | break; | |
28 | ||
29 | rawStream->Reset(); | |
30 | if (!rawStream->Next()) | |
31 | break; | |
32 | printf("Data size is %d\n",rawStream->DataSize()); | |
33 | for (Int_t j=0; j<4; j++) | |
34 | printf(" %x",rawStream->GetWord(j)); | |
35 | printf("\n"); | |
36 | } | |
37 | ||
38 | delete rawReader; | |
39 | delete rawStream; | |
40 | ||
41 | timer.Stop(); | |
42 | timer.Print(); | |
43 | } |