]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
deltas type modified, getdeltas added.
authorlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Oct 2009 00:18:08 +0000 (00:18 +0000)
committerlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Oct 2009 00:18:08 +0000 (00:18 +0000)
STEER/AliCTPInputTimeParams.h
STEER/AliCTPTimeParams.cxx
STEER/AliCTPTimeParams.h

index d5544f0b1d04bdfbae975d9b3523805cbc9cde62..0c0bb3f8b24e61d8d88f0db7fced5da7c71623c4 100644 (file)
@@ -22,8 +22,8 @@ public:
                UInt_t    GetLevel()     const { return fLevel; }       
                UInt_t    GetDelay() const { return fDelay; }  
               TString    GetEdge()    const { return fEdge; }      
-               UInt_t    GetDeltaMin() const { return fDeltaMin; }  
-               UInt_t    GetDeltaMax() const { return fDeltaMax; }  
+               Int_t    GetDeltaMin() const { return fDeltaMin; }  
+               Int_t    GetDeltaMax() const { return fDeltaMax; }  
      // Setters
                  void    SetCTPInputTimeParams( TString name, UInt_t level, 
                             UInt_t delay, TString edge, UInt_t deltamin, UInt_t deltamax );
@@ -36,12 +36,12 @@ protected:
               UInt_t    fLevel; 
               UInt_t    fDelay;
             TString    fEdge;
-             UInt_t    fDeltaMin;
-             UInt_t    fDeltaMax;
+             Int_t     fDeltaMin;
+             Int_t     fDeltaMax;
                          
 private:                         
 
-   ClassDef( AliCTPInputTimeParams, 2 )  
+   ClassDef( AliCTPInputTimeParams, 3 )  
 };                                                                         
 
 
index e89a4a950ed04f045cbd6991bbd474764b411272..86e0b5cc1b65ed951b91f5ce2437a53d167361e4 100644 (file)
@@ -93,15 +93,32 @@ void AliCTPTimeParams::AddDelayL0L1L2(UInt_t delayL1L0, UInt_t delayL2L0)
 //______________________________________________________________________________
 AliCTPInputTimeParams* AliCTPTimeParams::GetTimeParamsForInput( TString inputname)
 {
+ // Get AliCTPInputTimeParams for input name
 Int_t ninputs = fCTPInputTimeParams.GetEntriesFast();
 for ( Int_t i=0; i < ninputs; i++ )
  {
   AliCTPInputTimeParams* ctpinputtime = (AliCTPInputTimeParams*)fCTPInputTimeParams.At(i);
   if (inputname == ctpinputtime->GetInputName() ) return ctpinputtime;
  }
+cout << "Input: " << inputname << " not found." << endl;
 return NULL;
 }
 //______________________________________________________________________________
+Int_t AliCTPTimeParams::GetDeltasforClass(TString classname,Int_t& deltamin,Int_t& deltamax)
+{
+ // Get deltamin and deltamax for given class
+ // Assumes that descriptor = DINPU
+ // ret: 0=OK, 1= input doea not exist
+ TString input(classname(1,4)); 
+ AliCTPInputTimeParams* tprm = GetTimeParamsForInput(input);
+ if(tprm){
+  deltamin=tprm->GetDeltaMin();
+  deltamax=tprm->GetDeltaMax();
+  return 0;
+ }
+ return 1;
+}
+//______________________________________________________________________________
 AliCTPTimeParams* AliCTPTimeParams::LoadCTPTimeParams(TString filename)
 {
  // Load pre-created CTP time parameters from database/file
index d08a13b6c395a49cd75952d1a0708c29126b0861..e06d5e177f3dcc421c78f6f6bc4aefd7ac840844 100644 (file)
@@ -33,6 +33,8 @@ public:
                UInt_t  GetDelayL1L0()   const { return fDelayL1L0; }
                UInt_t  GetDelayL2L0()   const { return fDelayL2L0; }                  const TObjArray* GetInputTimeParams() const { return &fCTPInputTimeParams; }
       AliCTPInputTimeParams* GetTimeParamsForInput(TString inputname);
+      Int_t GetDeltasforClass(TString classname,Int_t& deltamin,Int_t& deltamax);
+
                 enum {kNMaxInputs = 60}; //CTP can manage up to 60 trigger detector inputs
 private:
                        UInt_t fDelayL1L0;