Fixes for object target dependencies
[u/mrichter/AliRoot.git] / T0 / AliT0Calc.cxx
CommitLineData
dc7ca31d 1#include <iostream>
2#include <fstream>
3#include <iomanip>
4#include <string>
5#include <TCanvas.h>
6
7#include "AliT0Calc.h"
8#include "TObjArray.h"
9#include "TGraph.h"
10#include "TFile.h"
11#include "AliLog.h"
12#include "TObjString.h"
13
14#include "TAxis.h"
15#include "TH2F.h"
16
17
18ClassImp(AliT0Calc)
19
20AliT0Calc::AliT0Calc()
21{
22 //
23 // fGraphs.SetOwner(1);
24}
25
26AliT0Calc::AliT0Calc(const char* name)
27{
28 TString namst = "Calib_";
29 namst += name;
30 SetName(namst.Data());
31 SetTitle(namst.Data());
32// fGraphs.SetOwner(1);
33 Reset();
34
35}
36
37//________________________________________________________________
38AliT0Calc::AliT0Calc(const AliT0Calc& calibdata) : TNamed(calibdata)
39
40{
41// copy constructor
42 SetName(calibdata.GetName());
43 SetTitle(calibdata.GetName());
44
45
46}
47
48//________________________________________________________________
49AliT0Calc &AliT0Calc::operator =(const AliT0Calc& calibdata)
50{
51// assignment operator
52 SetName(calibdata.GetName());
53 SetTitle(calibdata.GetName());
54
55 return *this;
56}
57
58//________________________________________________________________
59AliT0Calc::~AliT0Calc()
60{
61//
62}
63
64void AliT0Calc::Reset()
65{
66 memset(fTime,1,24*sizeof(Float_t));
67
68}
69
70void AliT0Calc::SetTime(Float_t* daqtime, Float_t* time_shift)
71{
72 for(Int_t i=0;i<24;i++){
73 if (time_shift[i] != 0.)
74 fTime[i] = daqtime[i]-time_shift[i];
75 else
76 fTime[i] = daqtime[i];
77 }
78}
79
80
81void AliT0Calc::Print(const Option_t*) const
82{
83 for(Int_t i=0;i<24;i++){
84 printf("Total time %d = %.2f\n",i,fTime[i]);
85 }
86}
87
88
89