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 );
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 )
};
//______________________________________________________________________________
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
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;