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 **************************************************************************/
16 /* $Id: AliT0TriggerParameters.cxx 28275 2008-08-28 06:09:21Z alla $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // class for T0 calibration TM-AC-AM_6-02-2006
21 // equalize time shift for each time CFD channel
23 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliT0TriggerParameters.h"
28 #include "Riostream.h"
30 ClassImp(AliT0TriggerParameters)
32 //________________________________________________________________
33 AliT0TriggerParameters::AliT0TriggerParameters():TObject(),
44 //_____________________________________________________________________________
46 AliT0TriggerParameters::AliT0TriggerParameters(const AliT0TriggerParameters &r):
56 ((AliT0TriggerParameters &) r).Copy(*this);
60 //_____________________________________________________________________________
62 AliT0TriggerParameters& AliT0TriggerParameters:: operator=(const AliT0TriggerParameters &p)
70 AliT0TriggerParameters:: operator=(p);
72 fAmpCentr = p.fAmpCentr;
73 fAmpSemiCentr = p.fAmpSemiCentr;
74 fTimeWindowLow = p.fTimeWindowLow;
75 fTimeWindowHigh = p.fTimeWindowHigh;
80 //________________________________________________________________
81 AliT0TriggerParameters::~AliT0TriggerParameters()
86 //________________________________________________________________
87 void AliT0TriggerParameters::Reset()
91 memset(fThreshold,0,24*sizeof(Int_t));
96 //________________________________________________________________
97 void AliT0TriggerParameters::Print(Option_t*) const
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));
106 AliInfo(Form(" Time window around vertex : %f %f",fTimeWindowLow, fTimeWindowHigh ));
107 AliInfo(Form(" Amplitude threshold: central %i semi-central %i", fAmpCentr,fAmpSemiCentr));
112 //________________________________________________________________
113 void AliT0TriggerParameters::SetPMTstatus(Int_t i, Int_t val)
115 if(val)fSwtPmt |= 1<<i;
116 else fSwtPmt &= ~(1<<i);
119 //________________________________________________________________
120 Int_t AliT0TriggerParameters::GetPMTstatus(Int_t i) const
123 return (1<<i)&fSwtPmt;