Getter for downscaling factor/busy time
authorlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Apr 2013 13:19:40 +0000 (13:19 +0000)
committerlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Apr 2013 13:19:40 +0000 (13:19 +0000)
STEER/ESD/AliTriggerClass.cxx
STEER/ESD/AliTriggerClass.h

index 4cf68f0..04bb4fb 100644 (file)
@@ -295,3 +295,20 @@ void AliTriggerClass::Print( const Option_t* ) const
    else
      cout << "   Class is not fired  " << endl;
 }
+//______________________________________________________________________
+ Int_t AliTriggerClass::GetDownscaleFactor(Double_t& ds) const 
+{
+ // There are 2 types of downscaling:
+ // - Random time veto downscale (option=0 <=> bit 31=0)
+ // - Class busy veto (option=1 <=> bit 31=1)
+ // 
+ Int_t option=0;
+ if(fPrescaler&(1<<31)) option=1;
+ if(option){
+   ds = (fPrescaler&0x1ffffff)/100.; // class busy in milisec
+ }else{
+   ds = 1.- fPrescaler/2097151.;     // reduction factor in %
+ }
+ return option;
+}
+
index 17d7713..8d80750 100644 (file)
@@ -58,6 +58,7 @@ public:
                   UInt_t GetTimeGroup() const { return fTimeGroup; }
                   UInt_t GetTimeWindow() const { return fTimeGroup; }
                   UInt_t GetPrescaler() const { return fPrescaler; }
+                  Int_t GetDownscaleFactor(Double_t &ds) const;
 
                   Bool_t SetMasks(AliTriggerConfiguration *config,TString &mask);
                     void  Trigger( const TObjArray& inputs , const TObjArray& functions);