: TObject(),
fId(id),
fDEIds(),
- fBusPatchIds()
+ fBusPatchIds(),
+ fTriggerCrateIds(false)
+
{
/// Standard constructor
}
: TObject(),
fId(0),
fDEIds(),
- fBusPatchIds()
+ fBusPatchIds(),
+ fTriggerCrateIds()
{
/// Root IO constructor
}
return true;
}
+//______________________________________________________________________________
+Bool_t AliMpDDL::AddTriggerCrate(Int_t crateId)
+{
+/// Add trigger crate with given crateId.
+/// Return true if the trigger crate was added
+
+ if ( HasTriggerCrateId(crateId) ) {
+ AliWarningStream()
+ << "Trigger crate Id = " << crateId << " already present."
+ << endl;
+ return false;
+ }
+
+ fTriggerCrateIds.Add(crateId);
+
+ return true;
+}
+
//______________________________________________________________________________
Int_t AliMpDDL::GetNofDEs() const
{
return fBusPatchIds.HasValue(busPatchId);;
}
+//______________________________________________________________________________
+Int_t AliMpDDL::GetNofTriggerCrates() const
+{
+/// Return the number of trigger crate connected to this DDL
+
+ return fTriggerCrateIds.GetSize();
+}
+
+//______________________________________________________________________________
+Int_t AliMpDDL::GetTriggerCrateId(Int_t index) const
+{
+/// Return the trigger crate by index (in loop)
+
+ return fTriggerCrateIds.GetValue(index);
+}
+
+//______________________________________________________________________________
+Bool_t AliMpDDL::HasTriggerCrateId(Int_t triggerCrateId) const
+{
+/// Return true if the trigger crate Id is present
+
+ return fTriggerCrateIds.HasValue(triggerCrateId);
+}
+
//____________________________________________________________________
Int_t AliMpDDL::GetMaxDsp() const
{
// methods
Bool_t AddDE(Int_t detElemId);
+ Bool_t AddTriggerCrate(Int_t crateId);
+
void FillBusPatchIds();
// get methods
Int_t GetNofBusPatches() const;
Int_t GetBusPatchId(Int_t index) const;
Bool_t HasBusPatchId(Int_t busPatchId) const;
+
+ // Trigger crates
+ Int_t GetNofTriggerCrates() const;
+ Int_t GetTriggerCrateId(Int_t index) const;
+ Bool_t HasTriggerCrateId(Int_t crateId) const;
// Dsp info
Int_t GetMaxDsp() const;
AliMpDDL& operator=(const AliMpDDL& rhs);
// data members
- Int_t fId; ///< Identifier (unique)
- AliMpArrayI fDEIds; ///< Detection element Ids connected to this DDL
- AliMpArrayI fBusPatchIds; ///< Bus patch Ids connected to this DDL
-
+ Int_t fId; ///< Identifier (unique)
+ AliMpArrayI fDEIds; ///< Detection element Ids connected to this DDL
+ AliMpArrayI fBusPatchIds; ///< Bus patch Ids connected to this DDL
+ AliMpArrayI fTriggerCrateIds; ///< Trigger crate Ids connected to this DDL
+
ClassDef(AliMpDDL,1) // The class collectiong electronics properties of DDL
};