1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 #if !defined(__CINT__) || defined(__MAKECINT__)
18 #include <TClonesArray.h>
22 #include "AliMUONData.h"
25 void MUONHit2SDigit(Int_t iEveMin, Int_t iEveMax, Text_t *FileName = "galice.root")
28 cout << "MUONSDigitTest" << endl;
29 cout << "FileName ``" << FileName << "''" << endl;
31 // Creating Run Loader and openning file containing Hits, Digits and RecPoints
32 AliRunLoader * RunLoader = AliRunLoader::Open(FileName,"Event","UPDATE");
33 if (RunLoader ==0x0) {
34 printf(">>> Error : Error Opening %s file \n",FileName);
37 // Loading AliRun master
38 RunLoader->LoadgAlice();
39 gAlice = RunLoader->GetAliRun();
41 gime = RunLoader->GetLoader("MUONLoader");
43 gime->LoadHits("READ");
44 gime->LoadSDigits("RECREATE");
46 // Loading MUON subsystem
47 AliMUON* MUON = (AliMUON *) gAlice->GetDetector("MUON");
49 Int_t nEvents = RunLoader->GetNumberOfEvents();
50 Int_t nEveMax = TMath::Min(iEveMax,nEvents-1);
51 for (Int_t iEvent = iEveMin; iEvent <= nEveMax; iEvent++){
52 RunLoader->GetEvent(iEvent);