AliTriggerClass::AliTriggerClass():
TNamed(),
fClassMask(0),
+ fClassMaskNext50(0),
fIndex(0),
fDescriptor(NULL),
fCluster(NULL),
AliTriggerPFProtection *pfp, AliTriggerBCMask *mask,
UInt_t prescaler, Bool_t allrare) :
TNamed( name, name ),
- fClassMask( 1ull << ULong64_t(index-1)),
+ fClassMask((index<51) ? (1ull << ULong64_t(index-1)): 0),
+ fClassMaskNext50((index<51) ? 0 :(1ull << ULong64_t(index-51))),
fIndex(index),
fDescriptor( desc ),
fCluster( clus ),
TString &pfp, TString &mask,
UInt_t prescaler, Bool_t allrare) :
TNamed( name, name ),
- fClassMask( 1ull << ULong64_t(index-1)),
+ fClassMask((index<51) ? (1ull << ULong64_t(index-1)): 0),
+ fClassMaskNext50((index<51) ? 0 :(1ull << ULong64_t(index-51))),
fIndex(index),
fDescriptor( NULL ),
fCluster( NULL ),
UInt_t prescaler, Bool_t allrare,
UInt_t timegroup,UInt_t timewindow) :
TNamed( name, name ),
- fClassMask( 1ull << ULong64_t(index-1)),
+ fClassMask((index<51) ? (1ull << ULong64_t(index-1)): 0),
+ fClassMaskNext50((index<51) ? 0 :(1ull << ULong64_t(index-51))),
fIndex(index),
fDescriptor( NULL ),
fCluster( NULL ),
AliTriggerClass::AliTriggerClass( const AliTriggerClass& trclass ):
TNamed( trclass ),
fClassMask(trclass.fClassMask),
+ fClassMaskNext50(trclass.fClassMaskNext50),
fIndex(trclass.fIndex),
fDescriptor(trclass.fDescriptor),
fCluster(trclass.fCluster),
if (this != &trclass) {
TNamed::operator=(trclass);
fClassMask = trclass.fClassMask;
+ fClassMaskNext50 = trclass.fClassMaskNext50;
fIndex=trclass.fIndex;
fDescriptor = trclass.fDescriptor;
fCluster = trclass.fCluster;
// Return false in case of wrong class
// definition.
- if (!fClassMask) {
+ if (!fClassMask && !fClassMaskNext50) {
AliError(Form("The class (%s) has invalid mask pattern !",GetName()));
return kFALSE;
}
- // check comsistency of index and mask
+ // check consistency of index and mask
if (!config->GetDescriptors().FindObject(fDescriptor)) {
AliError(Form("The class (%s) contains invalid descriptor !",GetName()));
// Print
cout << "Trigger Class:" << endl;
cout << " Name: " << GetName() << endl;
- cout << " ClassBit: 0x" << hex << fClassMask << dec << endl;
+ cout << " ClassBit: 1..50 0x" << hex << fClassMask << " 51..10 0x" << fClassMaskNext50 << dec << endl;
cout << " Index: " << (UInt_t)fIndex << endl;
cout << " Descriptor: " << fDescriptor->GetName() << endl;
cout << " Cluster: " << fCluster->GetName() << endl;
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;
+}
+