27 #include <THashList.h>
28 #include <TObjArray.h>
30 #include <Riostream.h>
55 fPainterMatrices->SetOwner(kTRUE);
108 if ( i >= 0 && i <= fPainterMatrices->GetLast() )
114 AliError(Form(
"Index out of bounds : %d / %d",i,
fPainterMatrices->GetLast()+1));
124 Long_t param[] = { (Long_t)group };
126 Emit(
"PainterMatrixWantToShow(AliMUONPainterMatrix*)",param);
138 TGPopupMenu* before = 0x0;
143 "AliMUONPainterRegistry",
this,
144 "HistoryMenuActivated(Int_t)");
152 while ( ( e = static_cast<TGMenuEntry*>(next()) ) )
154 if ( e->GetUserData() == group )
161 e =
static_cast<TGMenuEntry*
>(
fHistoryMenu->GetListOfEntries()->First());
167 AliError(
"fHistoryMenu is null. We probably did not find the relevant menu entry ?");
176 Long_t param[] = { (Long_t)group };
178 Emit(
"PainterMatrixWasRegistered(AliMUONPainterMatrix*)",param);
186 Long_t param[] = { (Long_t)group };
188 Emit(
"PainterMatrixWasUnregistered(AliMUONPainterMatrix*)",param);
201 if ( sopt.Contains(
"FULL") || sopt.Contains(
"MATRIX") )
206 while ( ( matrix = static_cast<AliMUONPainterMatrix*>(next()) ) )
240 if (!group)
return kFALSE;
251 AliError(Form(
"Could not unregister group named %s",group->
GetName()));
void HistoryMenuActivated(Int_t i)
virtual const char * GetName() const
Get matrix name.
void Print(Option_t *opt) const
TObjArray * fPainterMatrices
painter matrices
virtual ~AliMUONPainterRegistry()
AliMUONPainterRegistry()
Not implemented.
Int_t Register(AliMUONPainterMatrix *group)
void PainterMatrixWasUnregistered(const AliMUONPainterMatrix *group)
Int_t NumberOfPainterMatrices() const
static AliMUONPainterRegistry * Instance()
static AliMUONPainterRegistry * fgInstance
unique instance
void PainterMatrixWantToShow(const AliMUONPainterMatrix *group)
Int_t FindIndexOf(AliMUONPainterMatrix *group) const
Int_t fHistoryCounter
index to get back history menu items
TGMenuBar * fMenuBar
Menu bar where to put the history menu.
Registry for a bunch of AliMUONVPainter related stuff.
TGPopupMenu * fHistoryMenu
history menu
void PainterMatrixWasRegistered(const AliMUONPainterMatrix *group)
void AddToHistory(AliMUONPainterMatrix *group)
AliMUONPainterMatrix * PainterMatrix(Int_t i) const
A matrix of AliMUONVPainter.
void Print(Option_t *opt="") const
Printout.
Bool_t Unregister(AliMUONPainterMatrix *group)