]> git.uio.no Git - u/mrichter/AliRoot.git/blob - T0/AliT0TriggerParameters.cxx
Keep track of missing DCS points in DDL maps (flagged by 'x')
[u/mrichter/AliRoot.git] / T0 / AliT0TriggerParameters.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, 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 /* $Id: AliT0TriggerParameters.cxx 28275 2008-08-28 06:09:21Z alla $ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 // class for T0 calibration                       TM-AC-AM_6-02-2006  
21 // equalize time shift for each time CFD channel
22 //                                                                           //
23 ///////////////////////////////////////////////////////////////////////////////
24
25 #include "AliT0TriggerParameters.h"
26 #include "AliLog.h"
27
28 #include "Riostream.h"
29
30 ClassImp(AliT0TriggerParameters)
31
32 //________________________________________________________________
33   AliT0TriggerParameters::AliT0TriggerParameters():TObject(),
34   fSwtPmt(0),        
35   fAmpCentr(5), 
36   fAmpSemiCentr(1), 
37   fTimeWindowLow(0),
38   fTimeWindowHigh(1)
39
40 {
41   //
42
43 }
44 //_____________________________________________________________________________
45
46 AliT0TriggerParameters::AliT0TriggerParameters(const AliT0TriggerParameters &r):
47   TObject(),       
48   fSwtPmt(0),        
49   fAmpCentr(5), 
50   fAmpSemiCentr(1), 
51   fTimeWindowLow(0),
52   fTimeWindowHigh(1)
53 {
54  
55  //copy constructor
56   ((AliT0TriggerParameters &) r).Copy(*this);
57  
58 }
59
60 //_____________________________________________________________________________
61
62 AliT0TriggerParameters& AliT0TriggerParameters:: operator=(const AliT0TriggerParameters &p)
63 {
64   //
65   // assign. operator
66   //
67
68   if (this == &p)
69     return *this;
70   AliT0TriggerParameters:: operator=(p);
71   fSwtPmt = p.fSwtPmt;
72   fAmpCentr = p.fAmpCentr;
73   fAmpSemiCentr = p.fAmpSemiCentr;
74   fTimeWindowLow = p.fTimeWindowLow;
75   fTimeWindowHigh = p.fTimeWindowHigh;
76   return *this;
77  
78 }
79
80 //________________________________________________________________
81 AliT0TriggerParameters::~AliT0TriggerParameters()
82 {
83   //
84   // destrictor
85 }
86 //________________________________________________________________
87 void AliT0TriggerParameters::Reset()
88 {
89   //reset values
90
91   memset(fThreshold,0,24*sizeof(Int_t));
92  
93 }
94
95
96 //________________________________________________________________
97 void  AliT0TriggerParameters::Print(Option_t*) const
98 {
99   // print time values
100
101   printf("\n    ----    Threshold       ----\n\n");
102   printf(" Switched on/off\n");
103   for (Int_t i=0; i<24; i++) {
104     printf(" Threshold  %i status %i ", fThreshold[i], GetPMTstatus(i));
105   }
106   AliInfo(Form(" Time window around vertex : %f %f",fTimeWindowLow, fTimeWindowHigh ));
107   AliInfo(Form(" Amplitude threshold: central  %i semi-central %i", fAmpCentr,fAmpSemiCentr));
108
109
110
111
112 //________________________________________________________________
113 void AliT0TriggerParameters::SetPMTstatus(Int_t i, Int_t val)
114 {
115   if(val)fSwtPmt |= 1<<i;
116   else fSwtPmt &= ~(1<<i);
117
118 }
119 //________________________________________________________________
120 Int_t AliT0TriggerParameters::GetPMTstatus(Int_t i) const
121 {
122
123   return (1<<i)&fSwtPmt;
124
125 }
126
127