//_____________________________________________________________________________
const char* AliTriggerDescriptor::fgkDetectorName[AliTriggerDescriptor::fgkNDetectors] =
- { "ITS", "TRD", "PHOS", "EMCAL", "MUON", "ZDC", "START", "VZERO", "CRT" };
+ { "ITS", "TRD", "PHOS", "EMCAL", "MUON", "ZDC", "T0", "VZERO", "ACORDE", "TOF" };
const TString AliTriggerDescriptor::fgkDescriptorFileName("/data/triggerDescriptors.root");
//_____________________________________________________________________________
AliTriggerDescriptor::AliTriggerDescriptor():
-TNamed(), fDetectorCluster("")
+ TNamed(),
+ fDetectorCluster(""),
+ fConditions()
{
}
//_____________________________________________________________________________
AliTriggerDescriptor::AliTriggerDescriptor( TString & name, TString & description ):
-TNamed( name, description ), fDetectorCluster("")
+ TNamed( name, description ),
+ fDetectorCluster(""),
+ fConditions()
{
}
//_____________________________________________________________________________
AliTriggerDescriptor::AliTriggerDescriptor( const AliTriggerDescriptor& des ):
-TNamed( des ), fDetectorCluster( des.fDetectorCluster )
+ TNamed( des ),
+ fDetectorCluster( des.fDetectorCluster ),
+ fConditions()
{
// Copy constructor
Int_t ncond = des.fConditions.GetEntriesFast();
}
//_____________________________________________________________________________
-void AliTriggerDescriptor::AddCondition( TString & cond, TString & name, TString & description, Long_t mask )
+void AliTriggerDescriptor::AddCondition( TString & cond, TString & name, TString & description, ULong64_t mask )
{
// Add a new condition
AliTriggerCondition* acond = new AliTriggerCondition( cond, name, description, mask );
// check if the condition is compatible with the triggers inputs
Int_t ncond = fConditions.GetEntriesFast();
+ Bool_t check = kTRUE;
+ ULong64_t mask = 0L;
for( Int_t j=0; j<ncond; j++ ) {
AliTriggerCondition* cond = (AliTriggerCondition*)(fConditions.At( j ));
- if( !(cond->CheckInputs( inputs )) ) return kFALSE;
+ if( !(cond->CheckInputs( inputs )) ) check = kFALSE;
+ else AliInfo( Form( "Condition (%s) inputs names OK, class mask (0x%Lx)",
+ cond->GetName(), cond->GetMask( ) ) );
+ // check if condition mask is duplicated
+ if( mask & cond->GetMask() ) {
+ AliError( Form("Condition (%s). The class mask (0x%Lx) is ambiguous. It was previous defined",
+ cond->GetName(), cond->GetMask() ) );
+ check = kFALSE;
+ }
+ mask |= cond->GetMask();
}
- return kTRUE;
+ return check;
}