]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0Parameters.cxx
Bring PIPEupgrade naming conventions in acc. with ITSU expectations
[u/mrichter/AliRoot.git] / T0 / AliT0Parameters.cxx
index 05f15f61230780701734a71c75a158bd94d3d14d..766ef6374b4c101a4b43cf9c23fb30335da81c4e 100644 (file)
@@ -49,6 +49,7 @@ AliT0CalibData* AliT0Parameters::fgLookUp = 0;
 AliT0CalibWalk* AliT0Parameters::fgSlewCorr =0;
 AliT0CalibLatency *AliT0Parameters::fgLatency=0;
 //====================================================================
+using std::cout;
 ClassImp(AliT0Parameters)
 #if 0
   ; // This is here to keep Emacs for indenting the next line
@@ -82,10 +83,16 @@ AliT0Parameters::AliT0Parameters()
    fTimeDelayTVD(0),
    fMeanT0(512),
    fMeanVertex(0),
+   fLatencyHPTDC(0),
+   fLatencyL1(0),
+   fLatencyL1A(0),
+   fLatencyL1C(0),
    fLookUp(0),
    fNumberOfTRMs(2),
-   fCalibentry(), fLookUpentry(),fSlewCorr()
-
+   fCalibentry(), 
+   fLookUpentry(),
+   fSlewCorr(),
+   fLatency()
   
 {
   // Default constructor 
@@ -165,33 +172,46 @@ void AliT0Parameters::InitIfOnline()
 // for switching to this one should write
   // AliT0RawReader myrawreader(rawReader);
 //     myrawreader.SetOnlineMode(kTRUE);
-
+  
   if (fIsInit) return;
-   //standart configuration (used for simulation)
-   //Int_t trm=0; Int_t tdc=0; Int_t chain=0; Int_t channel=0;
+  //standart configuration (used for simulation)
+  //Int_t trm=0; Int_t tdc=0; Int_t chain=0; Int_t channel=0;
   // configuration for test Jun07.
-   fgLookUp = new AliT0CalibData("T0");
-
+  fgLookUp = new AliT0CalibData("T0");
+  
   fNumberOfTRMs = 1;
- fgLookUp-> SetNumberOfTRMs(fNumberOfTRMs);
 fgLookUp-> SetNumberOfTRMs(fNumberOfTRMs);
   Int_t trm=7; Int_t tdc=0; Int_t chain=0; Int_t channel=0;
   for (Int_t ik=0; ik<105; ik++)
-        {
-         AliT0LookUpKey * lookkey= new AliT0LookUpKey();
-         AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
-
-
-          lookvalue->SetTRM(trm);
-          lookvalue->SetTDC(tdc);
-          lookvalue->SetChain(chain);
-          lookvalue->SetChannel(channel);
-          lookkey->SetKey(ik);
-         fgLookUp->GetMapLookup()->Add((TObject*)lookvalue,(TObject*)lookkey); 
-         if (channel<6) channel +=2;
-         else {channel = 0; tdc++;}
-         if(ik==56) { tdc=0; channel=0; chain = 1;}
-
-       }
+    {
+      AliT0LookUpKey * lookkey= new AliT0LookUpKey();
+      AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
+      lookvalue->SetTRM(trm);
+      lookvalue->SetTDC(tdc);
+      lookvalue->SetChain(chain);
+      lookvalue->SetChannel(channel);
+      lookkey->SetKey(ik);
+      fgLookUp->GetMapLookup()->Add((TObject*)lookvalue,(TObject*)lookkey);    
+      if (channel<6) channel +=2;
+      else {channel = 0; tdc++;}
+      if(ik==56) { tdc=0; channel=0; chain = 1;}
+    }
+  //2 recent open channels
+  trm=7; tdc=14; channel=2; chain=0; 
+  for (Int_t ik=105; ik<107; ik++)
+    {
+      AliT0LookUpKey * lookkey= new AliT0LookUpKey();
+      AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
+      
+      lookvalue->SetTRM(trm);
+      lookvalue->SetTDC(tdc);
+      lookvalue->SetChain(chain);
+      lookvalue->SetChannel(channel);
+      lookkey->SetKey(ik);
+      fgLookUp->GetMapLookup()->Add((TObject*)lookvalue,(TObject*)lookkey);    
+      if (channel<6) channel +=2;
+      else {channel = 0; tdc++;}
+    }
   
   fIsInit=kTRUE;
 }
@@ -209,6 +229,14 @@ AliT0Parameters::GetTimeDelayCFD(Int_t ipmt)
    
   return fgCalibData->GetTimeEq(ipmt);
 }
+//__________________________________________________________________
+Float_t
+AliT0Parameters::GetCFD(Int_t ipmt) 
+  {
+  // return  CFD channel
+   
+    return fgCalibData->GetCFDvalue(ipmt,0);
+}
 
 //__________________________________________________________________
 Float_t