36 #include "TObjString.h"
38 #include "Riostream.h"
53 fMotifs.SetOwner(kTRUE);
54 fMotifTypes.SetOwner(kTRUE);
78 AliDebug(1,Form(
"Adding motif %s",motif->
GetID().Data()));
82 if (warn && found == motif)
84 AliWarning(Form(
"The motif %s is already in map",motif->
GetID().Data()));
86 if (warn && found != motif)
88 AliError(Form(
"Another motif with the same ID=%s is already in map",
89 motif->
GetID().Data()));
104 AliDebug(1,Form(
"Adding motifType %s",motifType->
GetID().Data()));
108 if (warn && found == motifType)
110 AliWarning(Form(
"The motifType %s is already in map",
111 motifType->
GetID().Data()));
113 if (warn && found != motifType)
115 AliError(Form(
"Another motifType with the same ID=%s is already in map",
116 motifType->
GetID().Data()));
132 AliDebug(1,Form(
"Looking for motif %s",
id.Data()));
134 TObject*
object =
fMotifs.GetValue(
id.Data());
139 AliDebug(1,Form(
"Found : %p id=%s",motif,motif->
GetID().Data()));
142 AliDebug(1,
"Not found");
151 AliDebug(1,Form(
"Looking for motifType %s",
id.Data()));
158 AliDebug(1,Form(
"Found : %p id=%s",motifType,motifType->
GetID().Data()));
161 AliDebug(1,
"Not found");
171 cout <<
"Motifs=" << endl;
174 while ( ( key = next() ) )
177 if (motif) cout << motif->
GetID() << endl;
180 cout <<
"MotifTypes=" << endl;
182 while ( ( key = tnext() ) )
185 if (motifType) cout << motifType->
GetID() << endl;
Bool_t AddMotifType(AliMpMotifType *motifType, Bool_t warn=kTRUE)
TMap fMotifs
collection of motifs
A container to keep track of allocated motifs and motifTypes for slats (both St345 and trigger ones)...
virtual ~AliMpSlatMotifMap()
TString GetID() const
Return the motif identifier.
void Print(Option_t *opt="") const
AliMpVMotif * FindMotif(const TString &id) const
Abstract base class for a motif with its unique ID and the motif type.
TString GetID() const
Return unique motif ID.
AliMpMotifType * FindMotifType(const TString &id) const
Bool_t AddMotif(AliMpVMotif *motif, Bool_t warn=kTRUE)
TMap fMotifTypes
collection of motifTypes
Class that defines the motif properties.