]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFMerger.cxx
Cast to avoid problems on Alpha
[u/mrichter/AliRoot.git] / TOF / AliTOFMerger.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16
17 #include <TTree.h> 
18 #include <TVector.h>
19 #include <TObjArray.h>
20 #include <TFile.h>
21 #include <TDirectory.h>
22
23
24 #include "AliTOFMerger.h"
25 #include "AliTOF.h"
26 #include "AliTOFSDigitizer.h"
27 #include "AliTOFhit.h"
28 #include "AliTOFdigit.h"
29
30 #include "AliRun.h"
31 #include "AliPDG.h"
32
33 #include <stdlib.h>
34 #include <iostream.h>
35 #include <fstream.h>
36
37 ClassImp(AliTOFMerger)
38
39 //___________________________________________
40   AliTOFMerger::AliTOFMerger() 
41 {
42 // Default constructor    
43     fEvNrSig = 0;
44     fEvNrBgr = 0;
45     fMerge =kDigitize;
46     fFnBgr   = 0;
47 }
48
49 //------------------------------------------------------------------------
50 AliTOFMerger::~AliTOFMerger()
51 {
52 // Destructor
53   if(fSDigits)  {
54     fSDigits->Delete();
55     delete fSDigits ;
56     fSDigits = 0;
57   }
58 }
59
60
61 //------------------------------------------------------------------------
62 void AliTOFMerger::Init()
63 {
64 // Initialisation
65     if (fMerge) fBgrFile = InitBgr();
66     
67 }
68
69
70
71 //------------------------------------------------------------------------
72 TFile* AliTOFMerger::InitBgr()
73 {
74 // Initialise background event
75     TFile *file = new TFile(fFnBgr);
76 // add error checking later
77     printf("\n AliTOFMerger has opened %s file with background event \n", fFnBgr);
78     return file;
79 }
80
81 //------------------------------------------------------------------------
82 void AliTOFMerger::Digitise()
83 {
84
85 #ifdef DEBUG
86   cout<<"ALiTOFMerger::>SDigits2Digits start...\n";
87 #endif
88 }