2 #include "/home/alice/guernane/date/tmp/ionlx/event.h"
3 #include "/home/alice/guernane/date/tmp/ionlx/monitor.h"
5 //=======================================================================
7 // The following macro is used to read raw data from run#.raw files
8 // generated by DATE acquisition package. It was written using
9 // Guy Jacquet (IPN Lyon) monitoring code.
11 // 1-Feb-2000 Rachid GUERNANE, IPN Lyon, France
15 void MUONRawDigit (Int_t evNumber1 = 0, Int_t evNumber2 = 0, char* dataSource="/home/alice/guernane/test/run3403_Linux.raw")
18 // Dynamically link some shared libs
20 if (gClassTable->GetID("AliRun") < 0) {
21 gROOT->LoadMacro("loadlibs.C");
25 // Connect the Root Galice file containing Geometry, Kine and Hits
27 TFile* file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
28 if (file) file->Close();
29 file = new TFile("galice.root", "UPDATE");
31 // Get AliRun object from file or create it if not on file
34 gAlice = (AliRun*)file->Get("gAlice");
35 if (gAlice) printf("AliRun object found on file\n");
36 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
39 AliMUONv2* MUON = (AliMUONv2*)gAlice->GetModule("MUON");
49 status = monitorSetDataSource(dataSource);
53 "Error in monitorSetDataSource: %s\n",
54 monitorSetDataSource(status));
57 status = monitorDeclareMp("Retrieve Raw Data");
61 "Error in monitorDeclareMp: %s\n",
62 monitorSetDataSource(status));
68 for (; iev <= evNumber2 && nev < evNumber2*20; nev++) {
75 struct eventStruct *rawevent;
77 status = monitorGetEventDynamic(&ptr);
81 "Error in monitorGetEventDynamic: %s\n",
82 monitorDecodeError(status));
86 rawevent = (struct eventStruct*)ptr;
88 ilen = (rawevent->eventHeader.size - rawevent->eventHeader.headLen)/4;
90 if (rawevent->eventHeader.type == PHYSICS_EVENT) {
91 iev = rawevent->eventHeader.nbInRun;
92 gAlice->GetEvent(iev-1);
93 printf("\nEvent No.: %d\n", iev);
94 printf("--------------------------------------------\n");
96 int* lptr = (int*)&rawevent->rawData[0];
98 MUON->GetRawDigits(iev-1, lptr, ilen);