]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSTrigger.cxx
runs to 99999
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrigger.cxx
index ea8b1738b73f83d53d568432c9d83e0ba163adbb..85487564ef5e4e06e8bcdb6125dc0c788d306034 100644 (file)
@@ -121,6 +121,17 @@ AliPHOSTrigger::AliPHOSTrigger(const AliPHOSTrigger & trig) :
   // cpy ctor
 }
 
+AliPHOSTrigger::~AliPHOSTrigger() 
+{
+  // dtor
+  
+  if(fADCValuesHighnxn)delete [] fADCValuesHighnxn;
+  if(fADCValuesLownxn)delete [] fADCValuesLownxn;
+  if(fADCValuesHigh2x2)delete []  fADCValuesHigh2x2;
+  if(fADCValuesLow2x2)delete [] fADCValuesLow2x2;
+  // fDigitsList is now ours...
+}
+
 //_________________________________________________________________________
 AliPHOSTrigger & AliPHOSTrigger::operator = (const AliPHOSTrigger &)
 {
@@ -134,11 +145,13 @@ void AliPHOSTrigger::CreateInputs()
    
    // Do not create inputs again!!
    if( fInputs.GetEntriesFast() > 0 ) return;
+
+   TString name = GetName();
    
-   fInputs.AddLast( new AliTriggerInput( "PHOS_L0",       "PHOS L0", 0x02 ) );
-   fInputs.AddLast( new AliTriggerInput( "PHOS_JetHPt_L1","PHOS Jet High Pt L1", 0x04 ) );
-   fInputs.AddLast( new AliTriggerInput( "PHOS_JetMPt_L1","PHOS Jet Medium Pt L1", 0x08 ) );
-   fInputs.AddLast( new AliTriggerInput( "PHOS_JetLPt_L1","PHOS Jet Low Pt L1", 0x016 ) );
+   fInputs.AddLast( new AliTriggerInput( "PHOS_L0",       name, 0 ) );
+   fInputs.AddLast( new AliTriggerInput( "PHOS_JetHPt_L1",name, 1 ) );
+   fInputs.AddLast( new AliTriggerInput( "PHOS_JetMPt_L1",name, 1 ) );
+   fInputs.AddLast( new AliTriggerInput( "PHOS_JetLPt_L1",name, 1 ) );
  
 }
 
@@ -555,8 +568,9 @@ void AliPHOSTrigger::SetTriggers(const TClonesArray * ampmatrix, const Int_t iMo
     //Transform digit amplitude in Raw Samples
     if (fADCValuesLow2x2 == 0) {
       fADCValuesLow2x2  = new Int_t[nTimeBins];
-      fADCValuesHigh2x2 = new Int_t[nTimeBins];
     }
+    if(!fADCValuesHigh2x2) fADCValuesHigh2x2 = new Int_t[nTimeBins];
+
     
     pulse.SetAmplitude(f2x2MaxAmp);
     pulse.SetTZero(maxtimeR2);
@@ -595,8 +609,8 @@ void AliPHOSTrigger::SetTriggers(const TClonesArray * ampmatrix, const Int_t iMo
       fADCValuesLownxn  = new Int_t[nTimeBins];
     }
 
-    pulse.SetAmplitude(maxtimeRn);
-    pulse.SetTZero(fnxnMaxAmp);
+    pulse.SetAmplitude(fnxnMaxAmp);
+    pulse.SetTZero(maxtimeRn);
     pulse.MakeSamples();
     pulse.GetSamples(fADCValuesHighnxn, fADCValuesLownxn) ;