From 17c3cc9e66acc9f4edb6af123aeb2045c2b5bd78 Mon Sep 17 00:00:00 2001 From: hristov Date: Mon, 18 Sep 2006 12:27:09 +0000 Subject: [PATCH] Effective C++ changes --- MONITOR/AliMonitor.cxx | 19 +---- MONITOR/AliMonitor.h | 6 +- MONITOR/AliMonitorClient.cxx | 133 +++++++++++++++++---------------- MONITOR/AliMonitorClient.h | 22 ++---- MONITOR/AliMonitorControl.cxx | 122 +++++++++++++----------------- MONITOR/AliMonitorControl.h | 27 +++---- MONITOR/AliMonitorDataTPC.cxx | 37 ++++----- MONITOR/AliMonitorDataTPC.h | 5 +- MONITOR/AliMonitorDialog.cxx | 40 +++------- MONITOR/AliMonitorDialog.h | 6 +- MONITOR/AliMonitorHLT.cxx | 36 ++++----- MONITOR/AliMonitorHLT.h | 5 +- MONITOR/AliMonitorHLTHough.cxx | 33 ++++---- MONITOR/AliMonitorHLTHough.h | 5 +- MONITOR/AliMonitorHisto.cxx | 51 +++++++------ MONITOR/AliMonitorITS.cxx | 34 +++++---- MONITOR/AliMonitorITS.h | 5 +- MONITOR/AliMonitorPlot.cxx | 16 ++-- MONITOR/AliMonitorTPC.cxx | 34 ++++----- MONITOR/AliMonitorTPC.h | 5 +- MONITOR/AliMonitorTrend.cxx | 52 +++++++------ MONITOR/AliMonitorV0s.cxx | 22 ++---- MONITOR/AliMonitorV0s.h | 5 +- 23 files changed, 329 insertions(+), 391 deletions(-) diff --git a/MONITOR/AliMonitor.cxx b/MONITOR/AliMonitor.cxx index 95d5ddafba3..2c8f2a2b7d7 100644 --- a/MONITOR/AliMonitor.cxx +++ b/MONITOR/AliMonitor.cxx @@ -42,23 +42,10 @@ ClassImp(AliMonitor) //_____________________________________________________________________________ -AliMonitor::AliMonitor() +AliMonitor::AliMonitor(): + TObject(), + fFolder(NULL) { - fFolder = NULL; -} - -//_____________________________________________________________________________ -AliMonitor::AliMonitor(const AliMonitor& monitor) : - TObject(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitor& AliMonitor::operator = (const AliMonitor& /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; } //_____________________________________________________________________________ diff --git a/MONITOR/AliMonitor.h b/MONITOR/AliMonitor.h index 50cd0229ec2..02618c8f165 100644 --- a/MONITOR/AliMonitor.h +++ b/MONITOR/AliMonitor.h @@ -19,8 +19,6 @@ class AliMonitorTrend; class AliMonitor : public TObject { public: AliMonitor(); - AliMonitor(const AliMonitor& monitor); - AliMonitor& operator = (const AliMonitor& monitor); virtual ~AliMonitor() {}; virtual void CreateHistos(TFolder* folder) = 0; @@ -46,6 +44,10 @@ protected: const char* label, Double_t min = 0, Double_t max = 0); + private: + AliMonitor(const AliMonitor& monitor); + AliMonitor& operator = (const AliMonitor& monitor); + ClassDef(AliMonitor, 0) // base class for the creation and filling of monitor histograms }; diff --git a/MONITOR/AliMonitorClient.cxx b/MONITOR/AliMonitorClient.cxx index 9d8882c12da..37fa1f88455 100644 --- a/MONITOR/AliMonitorClient.cxx +++ b/MONITOR/AliMonitorClient.cxx @@ -63,14 +63,15 @@ AliMonitorClient::AliMonitorStringDlg::AliMonitorStringDlg(TString& string, TGFrame* main, const char* title, const char* label) : - AliMonitorDialog(main, 300, 80), fString(string) + AliMonitorDialog(main, 300, 80), + fStringLayout(new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)), + fStringLabel(new TGLabel(fFrame, label)), + fStringEntry(new TGTextEntry(fFrame, string.Data())), + fString(string) { // create a dialog for connecting to a monitor process - fStringLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2); - fStringLabel = new TGLabel(fFrame, label); fFrame->AddFrame(fStringLabel, fStringLayout); - fStringEntry = new TGTextEntry(fFrame, string.Data()); fStringEntry->Resize(100, fStringEntry->GetDefaultHeight()); fFrame->AddFrame(fStringEntry, fStringLayout); @@ -105,15 +106,15 @@ AliMonitorClient::AliMonitorNumberDlg::AliMonitorNumberDlg(Float_t& value, const char* title, const char* label, Float_t min) : - AliMonitorDialog(main, 250, 80), fNumber(value) + AliMonitorDialog(main, 250, 80), + fNumberLayout(new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)), + fNumberLabel(new TGLabel(fFrame, label)), + fNumberEntry(new TGNumberEntry(fFrame, value, 4, -1, TGNumberFormat::kNESRealOne)), + fNumber(value) { // create a dialog for getting a number - fNumberLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2); - fNumberLabel = new TGLabel(fFrame, label); fFrame->AddFrame(fNumberLabel, fNumberLayout); - fNumberEntry = new TGNumberEntry(fFrame, value, 4, -1, - TGNumberFormat::kNESRealOne); fNumberEntry->SetLimits(TGNumberFormat::kNELLimitMin, min, 0); fFrame->AddFrame(fNumberEntry, fNumberLayout); @@ -158,18 +159,68 @@ enum {kMenuFileConnect, kMenuFileDisconnect, kMenuFileOpen, kMenuFileExit, //_____________________________________________________________________________ AliMonitorClient::AliMonitorClient(): - TGMainFrame(gClient->GetRoot(), 500, 300) + TGMainFrame(gClient->GetRoot(), 500, 300), + fQObject(), + fMenuBarLayout(new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 1, 1)), + fMenuBarItemLayout(new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)), + fMenuBarHelpLayout(new TGLayoutHints(kLHintsTop | kLHintsRight)), + fMenuFile(new TGPopupMenu(gClient->GetRoot())), + fMenuView(new TGPopupMenu(gClient->GetRoot())), + fMenuFavorites(new TGPopupMenu(gClient->GetRoot())), + fMenuReference(new TGPopupMenu(gClient->GetRoot())), + fMenuOptions(new TGPopupMenu(gClient->GetRoot())), + fMenuHelp(new TGPopupMenu(gClient->GetRoot())), + fMenuBar(new TGMenuBar(this, 1, 1, kHorizontalFrame)), + fToolBarLayout(new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2)), + fToolBarSep(new TGHorizontal3DLine(this)), + fToolBar(new TGToolBar(this, 60, 20, kHorizontalFrame)), + fEventNumberLayout(new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 10, 2, 10, 5)), + fEventNumber(new TGNumberEntry(fToolBar, 1, 4, 10, TGNumberFormat::kNESInteger)), + fEventButton(NULL), + fSumButton(NULL), + fRunButton(NULL), + fLoopButton(NULL), + fLoopOnPicture(NULL), + fLoopOffPicture(NULL), + fPreviousButton(NULL), + fNextButton(NULL), + fCopyButton(NULL), + fSaveButton(NULL), + fPrintButton(NULL), + fBottomLayout(new TGLayoutHints(kLHintsExpandX | kLHintsBottom)), + fLeftLayout(new TGLayoutHints(kLHintsLeft | kLHintsExpandY)), + fExpandLayout(new TGLayoutHints(kLHintsExpandX | kLHintsExpandY)), + fVerticalFrame(new TGVerticalFrame(this, 10, 10)), + fHorizontalFrame(new TGHorizontalFrame(fVerticalFrame, 10, 10)), + fTreeFrame(new TGCompositeFrame(fHorizontalFrame, 10, 10, kSunkenFrame | kFixedWidth)), + fTreeCanvas(new TGCanvas(fTreeFrame, 10, 10)), + fTree(new TGListTree(fTreeCanvas, kHorizontalFrame)), + fHistoPicture(fClient->GetPicture("h1_t.xpm")), + fAllItem(fTree->AddItem(NULL, "All")), + fFavoritesItem(fTree->AddItem(NULL, "Favorites")), + fComparisonItem(fTree->AddItem(NULL, "Comparison")), + fTreeSplitter(new TGVSplitter(fHorizontalFrame, 4)), + fDrawFrame(new TGCompositeFrame(fHorizontalFrame, 10, 10, kSunkenFrame)), + fDrawCanvas(new TRootEmbeddedCanvas("current monitor histogram", fDrawFrame, 10, 10)), + fDescriptionSplitter(new TGHSplitter(fVerticalFrame, 4, 4)), + fDescriptionFrame(new TGCompositeFrame(fVerticalFrame, 10, 60, kSunkenFrame | kFixedHeight)), + fDescription(new TGTextView(fDescriptionFrame, 10, 60, "")), + fServerName("localhost"), + fSocket(NULL), + fSocketHandler(NULL), + fFolder(CreateTopFolder()), + fCurrentItem(NULL), + fBaseItem(NULL), + fLoopTimer(NULL), + fLoopInterval(1000), + fFavoritesFileName(""), + fReferenceFileName(""), + fReference(CreateTopFolder()), + fPrintCommand("gv") { // initialize the monitoring client window - // *** menu bar *** - fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, - 0, 0, 1, 1); - fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0); - fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight); - // File menu - fMenuFile = new TGPopupMenu(gClient->GetRoot()); fMenuFile->AddEntry("&Connect...", kMenuFileConnect); fMenuFile->AddEntry("&Disconnect...", kMenuFileDisconnect); fMenuFile->HideEntry(kMenuFileDisconnect); @@ -180,7 +231,6 @@ AliMonitorClient::AliMonitorClient(): "OnMenuActivated(Int_t)"); // View menu - fMenuView = new TGPopupMenu(gClient->GetRoot()); fMenuView->AddEntry("Tool&bar", kMenuViewToolBar); fMenuView->CheckEntry(kMenuViewToolBar); fMenuView->AddEntry("&Tree", kMenuViewTree); @@ -198,7 +248,6 @@ AliMonitorClient::AliMonitorClient(): "OnMenuActivated(Int_t)"); // Favorites menu - fMenuFavorites = new TGPopupMenu(gClient->GetRoot()); fMenuFavorites->AddEntry("&Add", kMenuFavAdd); fMenuFavorites->DisableEntry(kMenuFavAdd); fMenuFavorites->AddEntry("&Delete", kMenuFavDelete); @@ -215,7 +264,6 @@ AliMonitorClient::AliMonitorClient(): "OnMenuActivated(Int_t)"); // Reference menu - fMenuReference = new TGPopupMenu(gClient->GetRoot()); fMenuReference->AddEntry("&Load...", kMenuRefLoad); fMenuReference->AddEntry("&Threshold...", kMenuRefThreshold); fMenuReference->AddSeparator(); @@ -229,7 +277,6 @@ AliMonitorClient::AliMonitorClient(): "OnMenuActivated(Int_t)"); // Options menu - fMenuOptions = new TGPopupMenu(gClient->GetRoot()); fMenuOptions->AddEntry("&Loop Interval...", kMenuOptLoop); fMenuOptions->AddEntry("&Print Command...", kMenuOptPrint); fMenuOptions->AddSeparator(); @@ -240,14 +287,12 @@ AliMonitorClient::AliMonitorClient(): "OnMenuActivated(Int_t)"); // Help menu - fMenuHelp = new TGPopupMenu(gClient->GetRoot()); fMenuHelp->AddEntry("&Documentation...", kMenuHelpDoc); fMenuHelp->AddEntry("A&bout...", kMenuHelpAbout); fMenuHelp->Connect("Activated(Int_t)", "AliMonitorClient", this, "OnMenuActivated(Int_t)"); // menu bar - fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame); fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout); fMenuBar->AddPopup("&View", fMenuView, fMenuBarItemLayout); fMenuBar->AddPopup("F&avorites", fMenuFavorites, fMenuBarItemLayout); @@ -259,17 +304,10 @@ AliMonitorClient::AliMonitorClient(): // *** tool bar *** - fToolBarLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2); - fToolBarSep = new TGHorizontal3DLine(this); AddFrame(fToolBarSep, fToolBarLayout); - fToolBar = new TGToolBar(this, 60, 20, kHorizontalFrame); AddFrame(fToolBar, fToolBarLayout); // event number field - fEventNumberLayout = new TGLayoutHints(kLHintsCenterY | kLHintsLeft, - 10, 2, 10, 5); - fEventNumber = new TGNumberEntry(fToolBar, 1, 4, 10, - TGNumberFormat::kNESInteger); fEventNumber->SetLimits(TGNumberFormat::kNELLimitMin, 1, 0); fToolBar->AddFrame(fEventNumber, fEventNumberLayout); fEventNumber->GetNumberEntry()->Connect("ReturnPressed()", @@ -367,23 +405,13 @@ AliMonitorClient::AliMonitorClient(): "OnPrintButtonClicked()"); // *** frames *** - fBottomLayout = new TGLayoutHints(kLHintsExpandX | kLHintsBottom); - fLeftLayout = new TGLayoutHints(kLHintsLeft | kLHintsExpandY); - fExpandLayout = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY); - - fVerticalFrame = new TGVerticalFrame(this, 10, 10); AddFrame(fVerticalFrame, fExpandLayout); - fHorizontalFrame = new TGHorizontalFrame(fVerticalFrame, 10, 10); fVerticalFrame->AddFrame(fHorizontalFrame, fExpandLayout); // tree frame - fTreeFrame = new TGCompositeFrame(fHorizontalFrame, 10, 10, - kSunkenFrame | kFixedWidth); fHorizontalFrame->AddFrame(fTreeFrame, fLeftLayout); - fTreeCanvas = new TGCanvas(fTreeFrame, 10, 10); fTreeFrame->AddFrame(fTreeCanvas, fExpandLayout); - fTree = new TGListTree(fTreeCanvas, kHorizontalFrame); fTreeCanvas->AddFrame(fTree, fExpandLayout); fTree->Connect("Clicked(TGListTreeItem*,Int_t)", "AliMonitorClient", this, "OnTreeClicked(TGListTreeItem*,Int_t)"); @@ -391,33 +419,21 @@ AliMonitorClient::AliMonitorClient(): this, "OnTreeReturnPressed(TGListTreeItem*)"); // tree items - fAllItem = fTree->AddItem(NULL, "All"); - fFavoritesItem = fTree->AddItem(NULL, "Favorites"); - fComparisonItem = fTree->AddItem(NULL, "Comparison"); - fHistoPicture = fClient->GetPicture("h1_t.xpm"); fTreeFrame->Resize(100, fTreeFrame->GetDefaultHeight()); // tree / histogram splitter - fTreeSplitter = new TGVSplitter(fHorizontalFrame, 4); fTreeSplitter->SetFrame(fTreeFrame, kTRUE); fHorizontalFrame->AddFrame(fTreeSplitter, fLeftLayout); // histogram frame - fDrawFrame = new TGCompositeFrame(fHorizontalFrame, 10, 10, kSunkenFrame); fHorizontalFrame->AddFrame(fDrawFrame, fExpandLayout); - fDrawCanvas = new TRootEmbeddedCanvas("current monitor histogram", - fDrawFrame, 10, 10); fDrawFrame->AddFrame(fDrawCanvas, fExpandLayout); // description frame - fDescriptionFrame = new TGCompositeFrame(fVerticalFrame, 10, 60, - kSunkenFrame | kFixedHeight); fVerticalFrame->AddFrame(fDescriptionFrame, fBottomLayout); - fDescription = new TGTextView(fDescriptionFrame, 10, 60, ""); fDescriptionFrame->AddFrame(fDescription, fExpandLayout); // histogram / description splitter - fDescriptionSplitter = new TGHSplitter(fVerticalFrame, 4, 4); fVerticalFrame->AddFrame(fDescriptionSplitter, fBottomLayout); fDescriptionSplitter->SetFrame(fDescriptionFrame, kFALSE); @@ -433,25 +449,12 @@ AliMonitorClient::AliMonitorClient(): // default data members - fServerName = "localhost"; - fSocket = NULL; - fSocketHandler = NULL; fFolder = CreateTopFolder(); - fCurrentItem = NULL; - fBaseItem = NULL; - fLoopTimer = NULL; - fLoopInterval = 1000; - - fFavoritesFileName = ""; - - fReferenceFileName = ""; fReference = CreateTopFolder(); AliMonitorHisto::SetThreshold(5.0); - fPrintCommand = "gv"; - // load saved settings LoadSettings(); } diff --git a/MONITOR/AliMonitorClient.h b/MONITOR/AliMonitorClient.h index c52c9638e7e..673f95b811f 100644 --- a/MONITOR/AliMonitorClient.h +++ b/MONITOR/AliMonitorClient.h @@ -195,19 +195,14 @@ private: public: AliMonitorStringDlg(TString& string, TGFrame* main, const char* title, const char* label); - AliMonitorStringDlg(const AliMonitorStringDlg& dlg) : - AliMonitorDialog(dlg), fString(dlg.fString) { - Fatal("AliMonitorStringDlg", "copy constructor not implemented"); - } - AliMonitorStringDlg& operator = (const AliMonitorStringDlg& /*dlg*/) { - Fatal("operator =", "assignment operator not implemented"); - return *this; - } virtual ~AliMonitorStringDlg(); virtual void OnOkClicked(); private: + AliMonitorStringDlg(const AliMonitorStringDlg& dlg); + AliMonitorStringDlg& operator = (const AliMonitorStringDlg& /*dlg*/); + TGLayoutHints* fStringLayout; // layout of the text entry TGLabel* fStringLabel; // label for the text entry TGTextEntry* fStringEntry; // the text enty @@ -221,19 +216,14 @@ private: public: AliMonitorNumberDlg(Float_t& value, TGFrame* main, const char* title, const char* label, Float_t min); - AliMonitorNumberDlg(const AliMonitorNumberDlg& dlg) : - AliMonitorDialog(dlg), fNumber(dlg.fNumber) { - Fatal("AliMonitorNumberDlg", "copy constructor not implemented"); - } - AliMonitorNumberDlg& operator = (const AliMonitorNumberDlg& /*dlg*/) { - Fatal("operator =", "assignment operator not implemented"); - return *this; - } virtual ~AliMonitorNumberDlg(); virtual void OnOkClicked(); private: + AliMonitorNumberDlg(const AliMonitorNumberDlg& dlg); + AliMonitorNumberDlg& operator = (const AliMonitorNumberDlg& /*dlg*/); + TGLayoutHints* fNumberLayout; // layout of the number entry TGLabel* fNumberLabel; // label for the number entry TGNumberEntry* fNumberEntry; // the number entry diff --git a/MONITOR/AliMonitorControl.cxx b/MONITOR/AliMonitorControl.cxx index ead3bc8de7f..2295588678b 100644 --- a/MONITOR/AliMonitorControl.cxx +++ b/MONITOR/AliMonitorControl.cxx @@ -47,15 +47,16 @@ ClassImp(AliMonitorControl) //_____________________________________________________________________________ AliMonitorControl::AliMonitorBufferDlg::AliMonitorBufferDlg(Int_t& size, TGFrame* main) : - AliMonitorDialog(main, 250, 80), fSize(size) + AliMonitorDialog(main, 250, 80), + fBufferLayout(new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)), + fBufferLabel(new TGLabel(fFrame, "size of histogram buffer:")), + fBufferEntry(new TGNumberEntry(fFrame, size, 2, -1, + TGNumberFormat::kNESInteger)), + fSize(size) { // create a dialog for setting the size of the buffer for monitor histos - fBufferLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2); - fBufferLabel = new TGLabel(fFrame, "size of histogram buffer:"); fFrame->AddFrame(fBufferLabel, fBufferLayout); - fBufferEntry = new TGNumberEntry(fFrame, size, 2, -1, - TGNumberFormat::kNESInteger); fBufferEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, 1, 99); fFrame->AddFrame(fBufferEntry, fBufferLayout); @@ -87,7 +88,10 @@ void AliMonitorControl::AliMonitorBufferDlg::OnOkClicked() //_____________________________________________________________________________ AliMonitorControl::AliMonitorClientsDlg::AliMonitorClientsDlg(TObjArray* clients, TGFrame* main) : - AliMonitorDialog(main, 450, 300, kFALSE) + AliMonitorDialog(main, 450, 300, kFALSE), + fClientsLayout(new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, + 0, 0, 0, 0)), + fClients(new TGTextView(fFrame, 420, 230)) { // create a dialog to display the list of clients @@ -95,9 +99,6 @@ AliMonitorControl::AliMonitorClientsDlg::AliMonitorClientsDlg(TObjArray* clients fFrameLayout = new TGLayoutHints(kLHintsCenterX | kLHintsTop, 10, 10, 15, 15); ((TGFrameElement*)(fMain->GetList()->First()))->fLayout = fFrameLayout; - fClientsLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, - 0, 0, 0, 0); - fClients = new TGTextView(fFrame, 420, 230); fFrame->AddFrame(fClients, fClientsLayout); char line[256]; @@ -141,11 +142,50 @@ enum {kMenuFileExit, kMenuFileAbort, //_____________________________________________________________________________ -AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) +AliMonitorControl::AliMonitorControl(AliMonitorProcess* process): + TObject(), + fQObject(), + fMonitorProcess(process), + fColorStatus(0), + fColorStart(0), + fColorStop(0), + fMain(new TGMainFrame(gClient->GetRoot(), 380, 200)), + fMenuBarLayout(new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 1, 1)), + fMenuBarItemLayout(new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)), + fMenuBarHelpLayout(new TGLayoutHints(kLHintsTop | kLHintsRight)), + fMenuFile(new TGPopupMenu(gClient->GetRoot())), + fMenuOptions(new TGPopupMenu(gClient->GetRoot())), + fMenuHelp(new TGPopupMenu(gClient->GetRoot())), + fMenuBar(new TGMenuBar(fMain, 1, 1, kHorizontalFrame)), + fFrameLayout(new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2)), + fFrame(new TGVerticalFrame(fMain, 0, 0, kChildFrame | kSunkenFrame)), + fStatusLayout(new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 2, 2, 2)), + fStatusFrameLayout(new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2)), + fStatus1Frame(new TGHorizontalFrame(fFrame, 0, 0)), + fRunNumberLabel(new TGLabel(fStatus1Frame, "current run:")), + fRunNumber(new TGTextEntry(fStatus1Frame, "-")), + fEventNumberLabel(new TGLabel(fStatus1Frame," event:")), + fEventNumber(new TGTextEntry(fStatus1Frame, "-/-/-")), + fStatus2Frame(new TGHorizontalFrame(fFrame, 0, 0)), + fStatusLabel(new TGLabel(fStatus2Frame, "current status:")), + fStatus(new TGTextEntry(fStatus2Frame, "stopped")), + fStatus3Frame(new TGHorizontalFrame(fFrame, 0, 0)), + fEventsLabel(new TGLabel(fStatus3Frame, "monitored events:")), + fEvents(new TGTextEntry(fStatus3Frame, "-")), + fClientsLabel(new TGLabel(fStatus3Frame, " number of clients:")), + fClients(new TGTextEntry(fStatus3Frame, "-")), + fButtonFrameLayout(new TGLayoutHints(kLHintsExpandX | kLHintsBottom, 50, 50, 10, 10)), + fButtonFrame(new TGHorizontalFrame(fMain, 0, 0)), + fButtonLayout(new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 2, 2, 2, 2)), + fResetButton(new TGTextButton(fButtonFrame, " &Reset ", 1)), + fStartStopButton(new TGTextButton(fButtonFrame, " &Start ", 2)), + fStartButtonStatus(kTRUE), + fTerminating(kFALSE), + fTimer(new TTimer(this, 10, kTRUE)) + { // initialize the monitoring control window - fMonitorProcess = process; // colors @@ -153,35 +193,22 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) gClient->GetColorByName("green", fColorStart); gClient->GetColorByName("red", fColorStop); - // main window - fMain = new TGMainFrame(gClient->GetRoot(), 380, 200); - - // menu bar - fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, - 0, 0, 1, 1); - fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0); - fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight); - - fMenuFile = new TGPopupMenu(gClient->GetRoot()); fMenuFile->AddEntry("E&xit", kMenuFileExit); fMenuFile->AddEntry("&Abort", kMenuFileAbort); fMenuFile->DisableEntry(kMenuFileAbort); fMenuFile->Connect("Activated(Int_t)", "AliMonitorControl", this, "HandleMenu(Int_t)"); - fMenuOptions = new TGPopupMenu(gClient->GetRoot()); fMenuOptions->AddEntry("&Histogram buffer...", kMenuOptBuffer); fMenuOptions->AddEntry("List of &Clients...", kMenuOptClients); fMenuOptions->Connect("Activated(Int_t)", "AliMonitorControl", this, "HandleMenu(Int_t)"); - fMenuHelp = new TGPopupMenu(gClient->GetRoot()); fMenuHelp->AddEntry("&Documentation...", kMenuHelpDoc); fMenuHelp->AddEntry("A&bout...", kMenuHelpAbout); fMenuHelp->Connect("Activated(Int_t)", "AliMonitorControl", this, "HandleMenu(Int_t)"); - fMenuBar = new TGMenuBar(fMain, 1, 1, kHorizontalFrame); fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout); fMenuBar->AddPopup("&Options", fMenuOptions, fMenuBarItemLayout); fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout); @@ -190,32 +217,19 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) // status frame - fFrameLayout = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, - 2, 2, 2, 2); - fFrame = new TGVerticalFrame(fMain, 0, 0, kChildFrame | kSunkenFrame); fMain->AddFrame(fFrame, fFrameLayout); - fStatusLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 2, 2, 2); - fStatusFrameLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2); - - // run and event number - fStatus1Frame = new TGHorizontalFrame(fFrame, 0, 0); fFrame->AddFrame(fStatus1Frame, fStatusFrameLayout); - fRunNumberLabel = new TGLabel(fStatus1Frame, "current run:"); fStatus1Frame->AddFrame(fRunNumberLabel, fStatusLayout); - fRunNumber = new TGTextEntry(fStatus1Frame, "-"); fRunNumber->Resize(60, fRunNumber->GetDefaultHeight()); fRunNumber->SetAlignment(kTextRight); fRunNumber->SetEnabled(kFALSE); fRunNumber->SetBackgroundColor(fColorStatus); fStatus1Frame->AddFrame(fRunNumber, fStatusLayout); - fEventNumberLabel = new TGLabel(fStatus1Frame, - " event:"); fStatus1Frame->AddFrame(fEventNumberLabel, fStatusLayout); - fEventNumber = new TGTextEntry(fStatus1Frame, "-/-/-"); fEventNumber->Resize(100, fEventNumber->GetDefaultHeight()); fEventNumber->SetAlignment(kTextRight); fEventNumber->SetEnabled(kFALSE); @@ -224,12 +238,9 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) // process status - fStatus2Frame = new TGHorizontalFrame(fFrame, 0, 0); fFrame->AddFrame(fStatus2Frame, fStatusFrameLayout); - fStatusLabel = new TGLabel(fStatus2Frame, "current status:"); fStatus2Frame->AddFrame(fStatusLabel, fStatusLayout); - fStatus = new TGTextEntry(fStatus2Frame, "stopped"); fStatus->Resize(250, fStatus->GetDefaultHeight()); fStatus->SetAlignment(kTextLeft); fStatus->SetEnabled(kFALSE); @@ -238,21 +249,16 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) // process status - fStatus3Frame = new TGHorizontalFrame(fFrame, 0, 0); fFrame->AddFrame(fStatus3Frame, fStatusFrameLayout); - fEventsLabel = new TGLabel(fStatus3Frame, "monitored events:"); fStatus3Frame->AddFrame(fEventsLabel, fStatusLayout); - fEvents = new TGTextEntry(fStatus3Frame, "-"); fEvents->Resize(60, fEvents->GetDefaultHeight()); fEvents->SetAlignment(kTextRight); fEvents->SetEnabled(kFALSE); fEvents->SetBackgroundColor(fColorStatus); fStatus3Frame->AddFrame(fEvents, fStatusLayout); - fClientsLabel = new TGLabel(fStatus3Frame, " number of clients:"); fStatus3Frame->AddFrame(fClientsLabel, fStatusLayout); - fClients = new TGTextEntry(fStatus3Frame, "-"); fClients->Resize(40, fClients->GetDefaultHeight()); fClients->SetAlignment(kTextRight); fClients->SetEnabled(kFALSE); @@ -261,23 +267,15 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) // buttons - fButtonFrameLayout = new TGLayoutHints(kLHintsExpandX | kLHintsBottom, - 50, 50, 10, 10); - fButtonFrame = new TGHorizontalFrame(fMain, 0, 0); fMain->AddFrame(fButtonFrame, fButtonFrameLayout); - fButtonLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, - 2, 2, 2, 2); - fResetButton = new TGTextButton(fButtonFrame, " &Reset ", 1); fResetButton->Connect("Clicked()", "AliMonitorControl", this, "DoReset()"); fButtonFrame->AddFrame(fResetButton, fButtonLayout); - fStartStopButton = new TGTextButton(fButtonFrame, " &Start ", 2); fStartStopButton->SetBackgroundColor(0x00FF00); fStartStopButton->Connect("Clicked()", "AliMonitorControl", this, "DoStartStop()"); fButtonFrame->AddFrame(fStartStopButton, fButtonLayout); - fStartButtonStatus = kTRUE; // main window @@ -292,27 +290,9 @@ AliMonitorControl::AliMonitorControl(AliMonitorProcess* process) fMain->MapWindow(); - fTerminating = kFALSE; - - fTimer = new TTimer(this, 10, kTRUE); fTimer->TurnOn(); } -//_____________________________________________________________________________ -AliMonitorControl::AliMonitorControl(const AliMonitorControl& control) : - TObject(control) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorControl& AliMonitorControl::operator = (const AliMonitorControl& - /*control*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - //_____________________________________________________________________________ AliMonitorControl::~AliMonitorControl() { diff --git a/MONITOR/AliMonitorControl.h b/MONITOR/AliMonitorControl.h index c30898d4ff3..a384c141dd0 100644 --- a/MONITOR/AliMonitorControl.h +++ b/MONITOR/AliMonitorControl.h @@ -30,8 +30,6 @@ RQ_OBJECT("AliMonitorControl") public: AliMonitorControl(AliMonitorProcess* process); - AliMonitorControl(const AliMonitorControl& control); - AliMonitorControl& operator = (const AliMonitorControl& control); virtual ~AliMonitorControl(); void HandleMenu(Int_t id); @@ -39,6 +37,9 @@ public: void DoStartStop(); private: + AliMonitorControl(const AliMonitorControl& control); + AliMonitorControl& operator = (const AliMonitorControl& control); + virtual Bool_t HandleTimer(TTimer* timer); void UpdateStatus(); @@ -96,19 +97,14 @@ private: public: AliMonitorBufferDlg(Int_t& size, TGFrame* main); - AliMonitorBufferDlg(const AliMonitorBufferDlg& dlg) : - AliMonitorDialog(dlg), fSize(dlg.fSize) { - Fatal("AliMonitorBufferDlg", "copy constructor not implemented"); - } - AliMonitorBufferDlg& operator = (const AliMonitorBufferDlg& /*dlg*/) { - Fatal("operator =", "assignment operator not implemented"); - return *this; - } virtual ~AliMonitorBufferDlg(); virtual void OnOkClicked(); private: + AliMonitorBufferDlg(const AliMonitorBufferDlg& dlg); + AliMonitorBufferDlg& operator = (const AliMonitorBufferDlg& dlg); + TGLayoutHints* fBufferLayout; // layout of buffer entry TGLabel* fBufferLabel; // label for buffer entry TGNumberEntry* fBufferEntry; // buffer number entry @@ -121,17 +117,12 @@ private: public: AliMonitorClientsDlg(TObjArray* clients, TGFrame* main); - AliMonitorClientsDlg(const AliMonitorClientsDlg& dlg) : - AliMonitorDialog(dlg) { - Fatal("AliMonitorClientsDlg", "copy constructor not implemented"); - } - AliMonitorClientsDlg& operator = (const AliMonitorClientsDlg& /*dlg*/) { - Fatal("operator =", "assignment operator not implemented"); - return *this; - } virtual ~AliMonitorClientsDlg(); private: + AliMonitorClientsDlg(const AliMonitorClientsDlg& dlg); + AliMonitorClientsDlg& operator = (const AliMonitorClientsDlg& dlg); + TGLayoutHints* fClientsLayout; // layout of clients list TGTextView* fClients; // list of clients }; diff --git a/MONITOR/AliMonitorDataTPC.cxx b/MONITOR/AliMonitorDataTPC.cxx index 8c720ca7589..c9e6e5d99b9 100644 --- a/MONITOR/AliMonitorDataTPC.cxx +++ b/MONITOR/AliMonitorDataTPC.cxx @@ -30,38 +30,29 @@ ClassImp(AliMonitorDataTPC) //_____________________________________________________________________________ -AliMonitorDataTPC::AliMonitorDataTPC() +AliMonitorDataTPC::AliMonitorDataTPC(): + TObject(), + fNTracks(0), + fPt(NULL), + fEta(NULL), + fPhi(NULL), + fSize(0) { // default constructor - fPt = fEta = fPhi = NULL; - fSize = 0; } //_____________________________________________________________________________ -AliMonitorDataTPC::AliMonitorDataTPC(const AliMonitorDataTPC& data) : - TObject(data) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorDataTPC& AliMonitorDataTPC::operator = (const AliMonitorDataTPC& - /*data*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - -//_____________________________________________________________________________ -AliMonitorDataTPC::AliMonitorDataTPC(Int_t size) +AliMonitorDataTPC::AliMonitorDataTPC(Int_t size): + TObject(), + fNTracks(0), + fPt(new Float_t[size]), + fEta(new Float_t[size]), + fPhi(new Float_t[size]), + fSize(size) { // constructor with given size - fPt = new Float_t[size]; - fEta = new Float_t[size]; - fPhi = new Float_t[size]; - fSize = size; } //_____________________________________________________________________________ diff --git a/MONITOR/AliMonitorDataTPC.h b/MONITOR/AliMonitorDataTPC.h index fdda9ebac12..d8e0e79a176 100644 --- a/MONITOR/AliMonitorDataTPC.h +++ b/MONITOR/AliMonitorDataTPC.h @@ -11,8 +11,6 @@ class AliMonitorDataTPC : public TObject { public: AliMonitorDataTPC(); - AliMonitorDataTPC(const AliMonitorDataTPC& data); - AliMonitorDataTPC& operator = (const AliMonitorDataTPC& data); AliMonitorDataTPC(Int_t size); virtual ~AliMonitorDataTPC(); void SetSize(Int_t size); @@ -20,6 +18,9 @@ public: void SetData(Int_t i, Float_t pt, Float_t eta, Float_t phi); private: + AliMonitorDataTPC(const AliMonitorDataTPC& data); + AliMonitorDataTPC& operator = (const AliMonitorDataTPC& data); + Int_t fNTracks; // number of TPC tracks Float_t* fPt; //[fNTracks] Float_t* fEta; //[fNTracks] diff --git a/MONITOR/AliMonitorDialog.cxx b/MONITOR/AliMonitorDialog.cxx index 22afcd3abb3..3ea25d5b023 100644 --- a/MONITOR/AliMonitorDialog.cxx +++ b/MONITOR/AliMonitorDialog.cxx @@ -33,25 +33,24 @@ ClassImp(AliMonitorDialog) //_____________________________________________________________________________ AliMonitorDialog::AliMonitorDialog(TGFrame* main, Int_t width, Int_t height, - Bool_t cancelBtn) + Bool_t cancelBtn) : + TObject(), + fQObject(), + fMain(new TGTransientFrame(gClient->GetRoot(), main, width, height)), + fFrameLayout(new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 2, 2, 2, 2)), + fFrame(new TGHorizontalFrame(fMain, 0, 0)), + fButtonFrameLayout(new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 2, 2, 2, 2)), + fButtonFrame(new TGHorizontalFrame(fMain, 0, 0)), + fButtonLayout(new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 15, 15, 2, 2)), + fOkButton(new TGTextButton(fButtonFrame, " &Ok ", 1)), + fCancelButton(NULL) { // create a dialog with an ok and a cancel button - fMain = new TGTransientFrame(gClient->GetRoot(), main, width, height); - - fFrameLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, - 2, 2, 2, 2); - fFrame = new TGHorizontalFrame(fMain, 0, 0); fMain->AddFrame(fFrame, fFrameLayout); - fButtonFrameLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, - 2, 2, 2, 2); - fButtonFrame = new TGHorizontalFrame(fMain, 0, 0); fMain->AddFrame(fButtonFrame, fButtonFrameLayout); - fButtonLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, - 15, 15, 2, 2); - fOkButton = new TGTextButton(fButtonFrame, " &Ok ", 1); fButtonFrame->AddFrame(fOkButton, fButtonLayout); fOkButton->Connect("Clicked()", "AliMonitorDialog", this, "DoOk()"); if (cancelBtn) { @@ -59,8 +58,6 @@ AliMonitorDialog::AliMonitorDialog(TGFrame* main, Int_t width, Int_t height, fButtonFrame->AddFrame(fCancelButton, fButtonLayout); fCancelButton->Connect("Clicked()", "AliMonitorDialog", this, "DoCancel()"); - } else { - fCancelButton = NULL; } fMain->Connect("CloseWindow()", "AliMonitorDialog", this, "CloseWindow()"); @@ -82,21 +79,6 @@ AliMonitorDialog::AliMonitorDialog(TGFrame* main, Int_t width, Int_t height, fMain->MapWindow(); } -//_____________________________________________________________________________ -AliMonitorDialog::AliMonitorDialog(const AliMonitorDialog& dlg) : - TObject(dlg) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorDialog& AliMonitorDialog::operator = (const AliMonitorDialog& - /*dlg*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - //_____________________________________________________________________________ AliMonitorDialog::~AliMonitorDialog() { diff --git a/MONITOR/AliMonitorDialog.h b/MONITOR/AliMonitorDialog.h index 9d7e5b4c2fc..8a10c80663a 100644 --- a/MONITOR/AliMonitorDialog.h +++ b/MONITOR/AliMonitorDialog.h @@ -21,8 +21,6 @@ RQ_OBJECT("AliMonitorDialog") public: AliMonitorDialog(TGFrame* main, Int_t width = 300, Int_t height = 80, Bool_t cancelBtn = kTRUE); - AliMonitorDialog(const AliMonitorDialog& dlg); - AliMonitorDialog& operator = (const AliMonitorDialog& dlg); virtual ~AliMonitorDialog(); void CloseWindow() const; @@ -41,6 +39,10 @@ protected: TGTextButton* fOkButton; // the Ok button TGTextButton* fCancelButton; // the cancel button + private: + AliMonitorDialog(const AliMonitorDialog& dlg); + AliMonitorDialog& operator = (const AliMonitorDialog& dlg); + ClassDef(AliMonitorDialog, 0) // base class for dialogs with ok and cancel button }; diff --git a/MONITOR/AliMonitorHLT.cxx b/MONITOR/AliMonitorHLT.cxx index c546ee6813e..a58bf2b4b35 100644 --- a/MONITOR/AliMonitorHLT.cxx +++ b/MONITOR/AliMonitorHLT.cxx @@ -36,28 +36,30 @@ #include "AliL3Vertex.h" //_____________________________________________________________________________ -AliMonitorHLT::AliMonitorHLT(AliTPCParam* param) +AliMonitorHLT::AliMonitorHLT(AliTPCParam* param): + AliMonitor(), + fParam(param), + fClustersCharge(NULL), + fNClustersVsRow(NULL), + fNClustersVsSector(NULL), + fNTracks(NULL), + fTrackPt(NULL), + fTrackEta(NULL), + fTrackPhi(NULL), + fTrackNHits(NULL), + fTrackDEdxVsP(NULL), + fTrackDEdx(NULL), + fTrackDz0(NULL), + fTrackDr0(NULL), + fTrackEtaVsPhi(NULL), + fPtEtaVsPhi(NULL), + fTrackZvsNHits(NULL), + fTrackXYvsNHits(NULL) { // create a HLT monitor object with the given parameters - fParam = param; } -//_____________________________________________________________________________ -AliMonitorHLT::AliMonitorHLT(const AliMonitorHLT& monitor) : - AliMonitor(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorHLT& AliMonitorHLT::operator = (const AliMonitorHLT& /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - - //_____________________________________________________________________________ void AliMonitorHLT::CreateHistos(TFolder* folder) { diff --git a/MONITOR/AliMonitorHLT.h b/MONITOR/AliMonitorHLT.h index bef927b212c..85414f7f2c4 100644 --- a/MONITOR/AliMonitorHLT.h +++ b/MONITOR/AliMonitorHLT.h @@ -13,8 +13,6 @@ class AliTPCParam; class AliMonitorHLT : public AliMonitor { public: AliMonitorHLT(AliTPCParam* param); - AliMonitorHLT(const AliMonitorHLT& monitor); - AliMonitorHLT& operator = (const AliMonitorHLT& monitor); virtual ~AliMonitorHLT() {}; virtual void CreateHistos(TFolder* folder); @@ -22,6 +20,9 @@ public: AliRawReader* rawReader, AliESD* esd); private: + AliMonitorHLT(const AliMonitorHLT& monitor); + AliMonitorHLT& operator = (const AliMonitorHLT& monitor); + AliTPCParam* fParam; // TPC parameters AliMonitorHisto* fClustersCharge; // charge distribution of HLT clusters diff --git a/MONITOR/AliMonitorHLTHough.cxx b/MONITOR/AliMonitorHLTHough.cxx index 7571deef60b..fc669bc35d1 100644 --- a/MONITOR/AliMonitorHLTHough.cxx +++ b/MONITOR/AliMonitorHLTHough.cxx @@ -35,29 +35,26 @@ #include //_____________________________________________________________________________ -AliMonitorHLTHough::AliMonitorHLTHough(AliTPCParam* param) +AliMonitorHLTHough::AliMonitorHLTHough(AliTPCParam* param): + AliMonitor(), + fParam(param), + fClustersCharge(NULL), + fNClustersVsRow(NULL), + fNClustersVsSector(NULL), + fNTracks(NULL), + fTrackPt(NULL), + fTrackEta(NULL), + fTrackPhi(NULL), + fTrackNHits(NULL), + fTrackDEdxVsP(NULL), + fTrackDEdx(NULL), + fTrackEtaVsPhi(NULL), + fPtEtaVsPhi(NULL) { // create a HLT monitor object with the given parameters - fParam = param; } -//_____________________________________________________________________________ -AliMonitorHLTHough::AliMonitorHLTHough(const AliMonitorHLTHough& monitor) : - AliMonitor(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorHLTHough& AliMonitorHLTHough::operator = (const AliMonitorHLTHough& - /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - - //_____________________________________________________________________________ void AliMonitorHLTHough::CreateHistos(TFolder* folder) { diff --git a/MONITOR/AliMonitorHLTHough.h b/MONITOR/AliMonitorHLTHough.h index bf73bcf0c10..7d65e5b1222 100644 --- a/MONITOR/AliMonitorHLTHough.h +++ b/MONITOR/AliMonitorHLTHough.h @@ -11,8 +11,6 @@ class AliTPCParam; class AliMonitorHLTHough : public AliMonitor { public: AliMonitorHLTHough(AliTPCParam* param); - AliMonitorHLTHough(const AliMonitorHLTHough& monitor); - AliMonitorHLTHough& operator = (const AliMonitorHLTHough& monitor); virtual ~AliMonitorHLTHough() {}; virtual void CreateHistos(TFolder* folder); @@ -20,6 +18,9 @@ public: AliRawReader* rawReader, AliESD* esd); private: + AliMonitorHLTHough(const AliMonitorHLTHough& monitor); + AliMonitorHLTHough& operator = (const AliMonitorHLTHough& monitor); + AliTPCParam* fParam; // TPC parameters AliMonitorHisto* fClustersCharge; // charge distribution of HLT clusters diff --git a/MONITOR/AliMonitorHisto.cxx b/MONITOR/AliMonitorHisto.cxx index f2545c2d752..d34e4001e8e 100644 --- a/MONITOR/AliMonitorHisto.cxx +++ b/MONITOR/AliMonitorHisto.cxx @@ -43,42 +43,45 @@ Int_t AliMonitorHisto::fgNHistosMax = 10; //_____________________________________________________________________________ -AliMonitorHisto::AliMonitorHisto() +AliMonitorHisto::AliMonitorHisto() : + AliMonitorPlot(), + fHisto(NULL), + fHistoList(), + fNHistos(0), + fHistoRun(NULL), + fHistoDraw(NULL), + fHistoRef(NULL), + fHistoCompare(NULL), + fNorm(kNormNone) { // default contructor - fHisto = NULL; - fNHistos = 0; - fHistoRun = NULL; - fHistoDraw = NULL; - fHistoRef = NULL; - fHistoCompare = NULL; - fNorm = kNormNone; } //_____________________________________________________________________________ AliMonitorHisto::AliMonitorHisto(const AliMonitorHisto& histo) : - AliMonitorPlot(histo) + AliMonitorPlot(histo), + fHisto(NULL), + fHistoList(), + fNHistos(histo.fNHistos), + fHistoRun(NULL), + fHistoDraw(NULL), + fHistoRef(NULL), + fHistoCompare(NULL), + fNorm(histo.fNorm) { // copy constructor Bool_t addStatus = TH1::AddDirectoryStatus(); TH1::AddDirectory(kFALSE); - fHisto = NULL; if (histo.fHisto) fHisto = (TH1*) histo.fHisto->Clone(); - fNHistos = histo.fNHistos; TObjLink* link = histo.fHistoList.FirstLink(); for (Int_t i = 0; i < fNHistos; i++) { fHistoList.Add(link->GetObject()->Clone()); link = link->Next(); } - fHistoRun = NULL; if (histo.fHistoRun) fHistoRun = (TH1*) histo.fHistoRun->Clone(); - fHistoDraw = NULL; - fHistoRef = NULL; if (histo.fHistoRef) fHistoRef = (TH1*) histo.fHistoRef->Clone(); - fHistoCompare = NULL; - fNorm = histo.fNorm; TH1::AddDirectory(addStatus); } @@ -113,7 +116,15 @@ AliMonitorHisto& AliMonitorHisto::operator =(const AliMonitorHisto& histo) //_____________________________________________________________________________ AliMonitorHisto::AliMonitorHisto(TH1* histo, ENorm norm) : - AliMonitorPlot(histo->GetName(), histo->GetTitle()) + AliMonitorPlot(histo->GetName(), histo->GetTitle()), + fHisto(histo), + fHistoList(), + fNHistos(0), + fHistoRun(NULL), + fHistoDraw(NULL), + fHistoRef(NULL), + fHistoCompare(NULL), + fNorm(norm) { // create a monitor histogram from the given histogram @@ -123,17 +134,11 @@ AliMonitorHisto::AliMonitorHisto(TH1* histo, ENorm norm) : histo->SetDirectory(NULL); histo->Reset(); - fHisto = histo; fHisto->Sumw2(); - fNHistos = 0; Bool_t addStatus = TH1::AddDirectoryStatus(); TH1::AddDirectory(kFALSE); fHistoRun = (TH1*) histo->Clone(); TH1::AddDirectory(addStatus); - fHistoDraw = NULL; - fHistoRef = NULL; - fHistoCompare = NULL; - fNorm = norm; } //_____________________________________________________________________________ diff --git a/MONITOR/AliMonitorITS.cxx b/MONITOR/AliMonitorITS.cxx index c98d898b077..21344bd7b0d 100644 --- a/MONITOR/AliMonitorITS.cxx +++ b/MONITOR/AliMonitorITS.cxx @@ -40,28 +40,30 @@ ClassImp(AliMonitorITS) //_____________________________________________________________________________ -AliMonitorITS::AliMonitorITS(AliITSgeom* geom) +AliMonitorITS::AliMonitorITS(AliITSgeom* geom): + AliMonitor(), + fGeom(geom), + fSDDDigitsCharge(NULL), + fSSDDigitsCharge(NULL), + fSDDClustersCharge(NULL), + fSSDClustersCharge(NULL), + fSPDNClustersVsModule(NULL), + fSDDNClustersVsModule(NULL), + fSSDNClustersVsModule(NULL), + fNClustersVsLayer(NULL), + fNTracks(NULL), + fNTracksITSTPC(NULL), + fTrackPt(NULL), + fTrackEta(NULL), + fTrackPhi(NULL), + fTrackDEdxVsP(NULL) + { // create a ITS monitor object with the given geometry - fGeom = geom; } -//_____________________________________________________________________________ -AliMonitorITS::AliMonitorITS(const AliMonitorITS& monitor) : - AliMonitor(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorITS& AliMonitorITS::operator = (const AliMonitorITS& /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - //_____________________________________________________________________________ void AliMonitorITS::CreateHistos(TFolder* folder) { diff --git a/MONITOR/AliMonitorITS.h b/MONITOR/AliMonitorITS.h index 413533874af..6f7aa67a37f 100644 --- a/MONITOR/AliMonitorITS.h +++ b/MONITOR/AliMonitorITS.h @@ -13,8 +13,6 @@ class AliITSgeom; class AliMonitorITS : public AliMonitor { public: AliMonitorITS(AliITSgeom* param); - AliMonitorITS(const AliMonitorITS& monitor); - AliMonitorITS& operator = (const AliMonitorITS& monitor); virtual ~AliMonitorITS() {}; virtual void CreateHistos(TFolder* folder); @@ -22,6 +20,9 @@ public: AliRawReader* rawReader, AliESD* esd); private: + AliMonitorITS(const AliMonitorITS& monitor); + AliMonitorITS& operator = (const AliMonitorITS& monitor); + AliITSgeom* fGeom; // ITS geometry AliMonitorHisto* fSDDDigitsCharge; // charge distribution of ITS-SDD digits diff --git a/MONITOR/AliMonitorPlot.cxx b/MONITOR/AliMonitorPlot.cxx index 30d2f8d2c4e..a8a1e0bb022 100644 --- a/MONITOR/AliMonitorPlot.cxx +++ b/MONITOR/AliMonitorPlot.cxx @@ -38,20 +38,23 @@ Color_t AliMonitorPlot::fgColorCompare = kRed; //_____________________________________________________________________________ -AliMonitorPlot::AliMonitorPlot() : TNamed() +AliMonitorPlot::AliMonitorPlot() : + TNamed(), + fDescription(), + fNumberOfEvents(0) { // default contructor - fNumberOfEvents = 0; } //_____________________________________________________________________________ AliMonitorPlot::AliMonitorPlot(const AliMonitorPlot& plot) : - TNamed(plot) + TNamed(plot), + fDescription(plot.fDescription), + fNumberOfEvents(plot.fNumberOfEvents) { // copy constructor - fNumberOfEvents = plot.fNumberOfEvents; } //_____________________________________________________________________________ @@ -66,11 +69,12 @@ AliMonitorPlot& AliMonitorPlot::operator =(const AliMonitorPlot& plot) //_____________________________________________________________________________ AliMonitorPlot::AliMonitorPlot(const char* name, const char* title) : - TNamed(name, title) + TNamed(name, title), + fDescription(), + fNumberOfEvents(0) { // constructor setting name and title - fNumberOfEvents = 0; } diff --git a/MONITOR/AliMonitorTPC.cxx b/MONITOR/AliMonitorTPC.cxx index 14a1260420c..c1063cc886e 100644 --- a/MONITOR/AliMonitorTPC.cxx +++ b/MONITOR/AliMonitorTPC.cxx @@ -42,26 +42,26 @@ ClassImp(AliMonitorTPC) //_____________________________________________________________________________ -AliMonitorTPC::AliMonitorTPC(AliTPCParam* param) +AliMonitorTPC::AliMonitorTPC(AliTPCParam* param): + AliMonitor(), + fParam(param), + fPadsCharge(NULL), + fClustersCharge(NULL), + fNClustersVsRow(NULL), + fNClustersVsSector(NULL), + fNTracks(NULL), + fTrackPt(NULL), + fTrackEta(NULL), + fTrackPhi(NULL), + fTrackNCl(NULL), + fTrackDEdxVsP(NULL), + fTrackDEdx(NULL), + fTrackEtaVsPhi(NULL), + fPtEtaVsPhi(NULL), + fData(new AliMonitorDataTPC(10000)) { // create a TPC monitor object with the given parameters - fParam = param; - fData = new AliMonitorDataTPC(10000); -} - -//_____________________________________________________________________________ -AliMonitorTPC::AliMonitorTPC(const AliMonitorTPC& monitor) : - AliMonitor(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorTPC& AliMonitorTPC::operator = (const AliMonitorTPC& /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; } //_____________________________________________________________________________ diff --git a/MONITOR/AliMonitorTPC.h b/MONITOR/AliMonitorTPC.h index 84fd9fca830..8a2072772de 100644 --- a/MONITOR/AliMonitorTPC.h +++ b/MONITOR/AliMonitorTPC.h @@ -14,8 +14,6 @@ class AliMonitorDataTPC; class AliMonitorTPC : public AliMonitor { public: AliMonitorTPC(AliTPCParam* param); - AliMonitorTPC(const AliMonitorTPC& monitor); - AliMonitorTPC& operator = (const AliMonitorTPC& monitor); virtual ~AliMonitorTPC(); virtual void CreateHistos(TFolder* folder); @@ -24,6 +22,9 @@ public: AliRawReader* rawReader, AliESD* esd); private: + AliMonitorTPC(const AliMonitorTPC& monitor); + AliMonitorTPC& operator = (const AliMonitorTPC& monitor); + AliTPCParam* fParam; // TPC parameters AliMonitorHisto* fPadsCharge; // charge distribution of TPC pads diff --git a/MONITOR/AliMonitorTrend.cxx b/MONITOR/AliMonitorTrend.cxx index 49a8dedc462..aa514b5303a 100644 --- a/MONITOR/AliMonitorTrend.cxx +++ b/MONITOR/AliMonitorTrend.cxx @@ -43,32 +43,35 @@ Int_t AliMonitorTrend::fgIncSize = 10; //_____________________________________________________________________________ -AliMonitorTrend::AliMonitorTrend() +AliMonitorTrend::AliMonitorTrend(): + AliMonitorPlot(), + fLabel(), + fMin(0), + fMax(0), + fData(), + fHistoDraw(NULL), + fRefMean(0), + fRefSigma(-1), + fHistoCompare(NULL) { // default contructor - fMin = fMax = 0; - fHistoDraw = NULL; - fRefMean = 0; - fRefSigma = -1; - fHistoCompare = NULL; } //_____________________________________________________________________________ AliMonitorTrend::AliMonitorTrend(const AliMonitorTrend& trend) : - AliMonitorPlot(trend) + AliMonitorPlot(trend), + fLabel(trend.fLabel), + fMin(trend.fMin), + fMax(trend.fMax), + fData(trend.fData), + fHistoDraw(NULL), + fRefMean(trend.fRefMean), + fRefSigma(trend.fRefSigma), + fHistoCompare(NULL) { // copy constructor - fLabel = trend.fLabel; - fMin = trend.fMin; - fMax = trend.fMax; - trend.fData.Copy(fData); - - fHistoDraw = NULL; - fRefMean = trend.fRefMean; - fRefSigma = trend.fRefSigma; - fHistoCompare = NULL; } //_____________________________________________________________________________ @@ -94,17 +97,18 @@ AliMonitorTrend& AliMonitorTrend::operator =(const AliMonitorTrend& trend) //_____________________________________________________________________________ AliMonitorTrend::AliMonitorTrend(const char* name, const char* title, const char* label, Double_t min, Double_t max) : - AliMonitorPlot(name, title) + AliMonitorPlot(name, title), + fLabel(label), + fMin(min), + fMax(max), + fData(), + fHistoDraw(NULL), + fRefMean(0), + fRefSigma(0), + fHistoCompare(NULL) { // create a monitor trend - fLabel = label; - fMin = min; - fMax = max; - - fHistoDraw = NULL; - fRefMean = fRefSigma = 0; - fHistoCompare = NULL; } //_____________________________________________________________________________ diff --git a/MONITOR/AliMonitorV0s.cxx b/MONITOR/AliMonitorV0s.cxx index 84bcaa6bc7b..e89455707d1 100644 --- a/MONITOR/AliMonitorV0s.cxx +++ b/MONITOR/AliMonitorV0s.cxx @@ -34,27 +34,17 @@ ClassImp(AliMonitorV0s) //_____________________________________________________________________________ -AliMonitorV0s::AliMonitorV0s() +AliMonitorV0s::AliMonitorV0s(): + AliMonitor(), + fRadius(NULL), + fMassK0(NULL), + fMassLambda(NULL), + fMassAntiLambda(NULL) { // create a monitor object for V0s } -//_____________________________________________________________________________ -AliMonitorV0s::AliMonitorV0s(const AliMonitorV0s& monitor) : - AliMonitor(monitor) -{ - AliFatal("copy constructor not implemented"); -} - -//_____________________________________________________________________________ -AliMonitorV0s& AliMonitorV0s::operator = (const AliMonitorV0s& /*monitor*/) -{ - AliFatal("assignment operator not implemented"); - return *this; -} - - //_____________________________________________________________________________ void AliMonitorV0s::CreateHistos(TFolder* folder) { diff --git a/MONITOR/AliMonitorV0s.h b/MONITOR/AliMonitorV0s.h index 83f0c5184a7..5fee83ee4dc 100644 --- a/MONITOR/AliMonitorV0s.h +++ b/MONITOR/AliMonitorV0s.h @@ -11,8 +11,6 @@ class AliMonitorV0s : public AliMonitor { public: AliMonitorV0s(); - AliMonitorV0s(const AliMonitorV0s& monitor); - AliMonitorV0s& operator = (const AliMonitorV0s& monitor); virtual ~AliMonitorV0s() {}; virtual void CreateHistos(TFolder* folder); @@ -20,6 +18,9 @@ public: AliRawReader* rawReader, AliESD* esd); private: + AliMonitorV0s(const AliMonitorV0s& monitor); + AliMonitorV0s& operator = (const AliMonitorV0s& monitor); + AliMonitorHisto* fRadius; // radius of V0 vertices AliMonitorHisto* fMassK0; // invariant mass distribution of V0s for pi+ pi- hypothesis AliMonitorHisto* fMassLambda; // invariant mass distribution of V0s for p pi- hypothesis -- 2.43.0