From 11ca64ac8632406737f07aa49cfd839e111f3ee7 Mon Sep 17 00:00:00 2001 From: martinez Date: Tue, 11 May 2004 15:36:32 +0000 Subject: [PATCH] Added protected copy constructors and assignment operators. (I. Hrivnacova) --- MUON/AliMUONDataInterface.cxx | 19 +++++++++++++++++ MUON/AliMUONDataInterface.h | 3 +++ MUON/AliMUONDigitizer.cxx | 22 +++++++++++++++++++ MUON/AliMUONDigitizer.h | 3 +++ MUON/AliMUONFactory.cxx | 21 +++++++++++++++++++ MUON/AliMUONFactory.h | 10 ++++++--- MUON/AliMUONLoader.cxx | 22 +++++++++++++++++++ MUON/AliMUONLoader.h | 3 +++ MUON/AliMUONMerger.cxx | 22 ++++++++++++++++++- MUON/AliMUONMerger.h | 6 +++++- MUON/AliMUONRecoDisplay.cxx | 23 ++++++++++++++++++++ MUON/AliMUONRecoDisplay.h | 4 ++++ MUON/AliMUONRecoEvent.cxx | 23 ++++++++++++++++++++ MUON/AliMUONRecoEvent.h | 6 +++++- MUON/AliMUONSegmentationSlat.cxx | 25 ++++++++++++++++++++++ MUON/AliMUONSegmentationSlat.h | 2 ++ MUON/AliMUONSegmentationSlatModule.cxx | 29 +++++++++++++++++++++++++- MUON/AliMUONSegmentationSlatModule.h | 3 +++ 18 files changed, 239 insertions(+), 7 deletions(-) diff --git a/MUON/AliMUONDataInterface.cxx b/MUON/AliMUONDataInterface.cxx index 1224affc9b4..7acd680dd49 100644 --- a/MUON/AliMUONDataInterface.cxx +++ b/MUON/AliMUONDataInterface.cxx @@ -22,6 +22,13 @@ AliMUONDataInterface::AliMUONDataInterface() Reset(); }; +AliMUONDataInterface::AliMUONDataInterface(const AliMUONDataInterface& rhs) + : TObject(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONDataInterface", "Not implemented."); +} AliMUONDataInterface::~AliMUONDataInterface() { @@ -33,6 +40,18 @@ AliMUONDataInterface::~AliMUONDataInterface() delete fRunloader; }; +AliMUONDataInterface& +AliMUONDataInterface::operator=(const AliMUONDataInterface& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + void AliMUONDataInterface::Reset() { diff --git a/MUON/AliMUONDataInterface.h b/MUON/AliMUONDataInterface.h index 0578216f870..b795e4da0d8 100644 --- a/MUON/AliMUONDataInterface.h +++ b/MUON/AliMUONDataInterface.h @@ -103,6 +103,9 @@ public: // Returns the currently selected cathode in TreeD. Int_t CurrentDCathode() { return fCathode; }; +protected: + AliMUONDataInterface(const AliMUONDataInterface& rhs); + AliMUONDataInterface& operator=(const AliMUONDataInterface& rhs); private: Bool_t LoadLoaders(TString filename, TString foldername); diff --git a/MUON/AliMUONDigitizer.cxx b/MUON/AliMUONDigitizer.cxx index f4d1247bfba..ace38608435 100644 --- a/MUON/AliMUONDigitizer.cxx +++ b/MUON/AliMUONDigitizer.cxx @@ -89,12 +89,34 @@ AliMUONDigitizer::AliMUONDigitizer(AliRunDigitizer* manager) : muondata = NULL; }; +//___________________________________________ +AliMUONDigitizer::AliMUONDigitizer(const AliMUONDigitizer& rhs) + : AliDigitizer(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONDigitizer", "Not implemented."); +} + //___________________________________________ AliMUONDigitizer::~AliMUONDigitizer() { // Destructor } +//------------------------------------------------------------------- +AliMUONDigitizer& +AliMUONDigitizer::operator=(const AliMUONDigitizer& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //------------------------------------------------------------------------ Bool_t AliMUONDigitizer::Init() { diff --git a/MUON/AliMUONDigitizer.h b/MUON/AliMUONDigitizer.h index 16a816d57d0..32458513baf 100644 --- a/MUON/AliMUONDigitizer.h +++ b/MUON/AliMUONDigitizer.h @@ -42,6 +42,9 @@ public: void SetDebug(Int_t level){fDebug = level;} // Set debug level. protected: + AliMUONDigitizer(const AliMUONDigitizer& rhs); + AliMUONDigitizer& operator=(const AliMUONDigitizer& rhs); + // Parses the option string given to the Exec method. virtual void ParseOptions(Option_t* options); diff --git a/MUON/AliMUONFactory.cxx b/MUON/AliMUONFactory.cxx index 268bec1444b..ba79a686daa 100644 --- a/MUON/AliMUONFactory.cxx +++ b/MUON/AliMUONFactory.cxx @@ -46,12 +46,33 @@ AliMUONFactory::AliMUONFactory() // } +//__________________________________________________________________________ +AliMUONFactory::AliMUONFactory(const AliMUONFactory& rhs) + : TObject(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONFactoryModule", "Not implemented."); +} + //__________________________________________________________________________ AliMUONFactory::~AliMUONFactory() { // } +//__________________________________________________________________________ +AliMUONFactory& AliMUONFactory::operator=(const AliMUONFactory& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //__________________________________________________________________________ void AliMUONFactory::BuildCommon() { diff --git a/MUON/AliMUONFactory.h b/MUON/AliMUONFactory.h index fdca42e72ae..2fc81523de4 100644 --- a/MUON/AliMUONFactory.h +++ b/MUON/AliMUONFactory.h @@ -16,14 +16,18 @@ class AliMUONResponseV0; class AliMUONFactory : public TObject { - public: + public: AliMUONFactory(); virtual ~AliMUONFactory(); void Build(AliMUON* where, const char* what); void BuildStation(AliMUON* where, Int_t stationNumber); - private: + protected: + AliMUONFactory(const AliMUONFactory& rhs); + AliMUONFactory& operator=(const AliMUONFactory& rhs); + + private: void BuildCommon(); void BuildStation1(); void BuildStation2(); @@ -36,7 +40,7 @@ class AliMUONFactory : public TObject { AliMUON* fMUON; // MUON detector AliMUONResponseV0* fResponse0; // default response - ClassDef(AliMUONFactory,0) // MUON Factory for Chambers and Segmentation + ClassDef(AliMUONFactory,0) // MUON Factory for Chambers and Segmentation }; #endif diff --git a/MUON/AliMUONLoader.cxx b/MUON/AliMUONLoader.cxx index f0d86ba98b5..bd2c00ccd76 100644 --- a/MUON/AliMUONLoader.cxx +++ b/MUON/AliMUONLoader.cxx @@ -43,11 +43,33 @@ AliMUONLoader::AliMUONLoader(const Char_t * detname,TFolder* eventfolder) { //constructor } +//___________________________________________ +AliMUONLoader::AliMUONLoader(const AliMUONLoader& rhs) + : AliLoader(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONLoader", "Not implemented."); +} + //_______________________________________________________________________________ AliMUONLoader::~AliMUONLoader() { //detructor } +//------------------------------------------------------------------- +AliMUONLoader& +AliMUONLoader::operator=(const AliMUONLoader& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //_______________________________________________________________________________ void AliMUONLoader::SetMUONData(AliMUONData * MUONData) { diff --git a/MUON/AliMUONLoader.h b/MUON/AliMUONLoader.h index 9ebbbc44250..bbea2603169 100644 --- a/MUON/AliMUONLoader.h +++ b/MUON/AliMUONLoader.h @@ -42,6 +42,9 @@ class AliMUONLoader : public AliLoader AliMUONData * GetMUONData(); protected: + AliMUONLoader(const AliMUONLoader& rhs); + AliMUONLoader& operator=(const AliMUONLoader& rhs); + AliMUONData * fMUONData; // data for MUON subsystem private: diff --git a/MUON/AliMUONMerger.cxx b/MUON/AliMUONMerger.cxx index ea8c15719ae..01601f60073 100644 --- a/MUON/AliMUONMerger.cxx +++ b/MUON/AliMUONMerger.cxx @@ -36,7 +36,7 @@ ClassImp(AliMUONMerger) -//___________________________________________ +//---------------------------------------------------------------------- AliMUONMerger::AliMUONMerger() { // Default constructor @@ -55,6 +55,14 @@ AliMUONMerger::AliMUONMerger() fDebug = 0; } +//---------------------------------------------------------------------- +AliMUONMerger::AliMUONMerger(const AliMUONMerger&) +{ +// Protected copy constructor + + Fatal("AliMUONMergerModule", "Not implemented."); +} + //------------------------------------------------------------------------ AliMUONMerger::~AliMUONMerger() { @@ -67,6 +75,18 @@ AliMUONMerger::~AliMUONMerger() if (fBgrFile) delete fBgrFile; } +//---------------------------------------------------------------------- +AliMUONMerger& AliMUONMerger::operator=(const AliMUONMerger& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //------------------------------------------------------------------------ Bool_t AliMUONMerger::Exists(const AliMUONPadHit *padhit) const { diff --git a/MUON/AliMUONMerger.h b/MUON/AliMUONMerger.h index 0356cc02bf6..e15551d7939 100644 --- a/MUON/AliMUONMerger.h +++ b/MUON/AliMUONMerger.h @@ -40,7 +40,11 @@ class AliMUONMerger { void SetDebug(Int_t debug) {fDebug = debug;} enum {kBgTag = -1}; - + + protected: + AliMUONMerger(const AliMUONMerger& rhs); + AliMUONMerger& operator=(const AliMUONMerger& rhs); + private: // Open the bgr file TFile *InitBgr(); diff --git a/MUON/AliMUONRecoDisplay.cxx b/MUON/AliMUONRecoDisplay.cxx index ce2cef54980..b0f2bd84c69 100644 --- a/MUON/AliMUONRecoDisplay.cxx +++ b/MUON/AliMUONRecoDisplay.cxx @@ -110,6 +110,15 @@ AliMUONRecoDisplay::AliMUONRecoDisplay(Int_t nevent) MapEvent(nevent); } +//------------------------------------------------------------------- +AliMUONRecoDisplay::AliMUONRecoDisplay(const AliMUONRecoDisplay& rhs) + : AliDisplay(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONRecoDisplay", "Not implemented."); +} + //------------------------------------------------------------------- AliMUONRecoDisplay::~AliMUONRecoDisplay() { @@ -124,6 +133,20 @@ AliMUONRecoDisplay::~AliMUONRecoDisplay() } delete fEvGen; } + +//------------------------------------------------------------------- +AliMUONRecoDisplay& +AliMUONRecoDisplay::operator=(const AliMUONRecoDisplay& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //------------------------------------------------------------------- Bool_t AliMUONRecoDisplay::Event(Int_t nevent) { diff --git a/MUON/AliMUONRecoDisplay.h b/MUON/AliMUONRecoDisplay.h index 2fafd12dc30..f4904135d0a 100644 --- a/MUON/AliMUONRecoDisplay.h +++ b/MUON/AliMUONRecoDisplay.h @@ -41,6 +41,10 @@ class AliMUONRecoDisplay:public AliDisplay void RecoEfficiency(Int_t first=0, Int_t last=10000); // *MENU* void XYPlot(); // *MENU* + protected: + AliMUONRecoDisplay(const AliMUONRecoDisplay& rhs); + AliMUONRecoDisplay& operator=(const AliMUONRecoDisplay& rhs); + private: //methods Int_t GetBestMatch(Int_t indr, Float_t tolerance=3.0); diff --git a/MUON/AliMUONRecoEvent.cxx b/MUON/AliMUONRecoEvent.cxx index 4fef931718f..5a9125df65d 100644 --- a/MUON/AliMUONRecoEvent.cxx +++ b/MUON/AliMUONRecoEvent.cxx @@ -63,6 +63,7 @@ ClassImp(AliMUONRecoEvent) //------------------------------------------------------------------- AliMUONRecoEvent::AliMUONRecoEvent(Int_t eventNo) + : TObject() { // Reconstructed event constructor fTracks = new TClonesArray("AliMUONRecoTrack",200); @@ -70,6 +71,15 @@ AliMUONRecoEvent::AliMUONRecoEvent(Int_t eventNo) fNtracks = 0; } +//------------------------------------------------------------------- +AliMUONRecoEvent::AliMUONRecoEvent(const AliMUONRecoEvent& rhs) + : TObject(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONRecoEventModule", "Not implemented."); +} + //------------------------------------------------------------------- AliMUONRecoEvent::~AliMUONRecoEvent() { @@ -79,6 +89,19 @@ AliMUONRecoEvent::~AliMUONRecoEvent() fTracks = 0; } +//------------------------------------------------------------------- +AliMUONRecoEvent& +AliMUONRecoEvent::operator=(const AliMUONRecoEvent& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //------------------------------------------------------------------- AliMUONRecoTrack* AliMUONRecoEvent::AddEmptyTrack() { diff --git a/MUON/AliMUONRecoEvent.h b/MUON/AliMUONRecoEvent.h index d8c138a386f..cdfba1a08f9 100644 --- a/MUON/AliMUONRecoEvent.h +++ b/MUON/AliMUONRecoEvent.h @@ -31,7 +31,7 @@ class AliMUONRecoTrack; // // ///////////////////////////////////////////////////////////////////// -class AliMUONRecoEvent:public TObject +class AliMUONRecoEvent : public TObject { public: AliMUONRecoEvent(Int_t eventNo = 0); @@ -50,6 +50,10 @@ class AliMUONRecoEvent:public TObject TClonesArray* TracksPtr() {return fTracks;} + protected: + AliMUONRecoEvent(const AliMUONRecoEvent& rhs); + AliMUONRecoEvent& operator=(const AliMUONRecoEvent& rhs); + private: Int_t fNevr; // event number Int_t fNtracks; // number of tracks diff --git a/MUON/AliMUONSegmentationSlat.cxx b/MUON/AliMUONSegmentationSlat.cxx index 9e819681592..6986364bb94 100644 --- a/MUON/AliMUONSegmentationSlat.cxx +++ b/MUON/AliMUONSegmentationSlat.cxx @@ -32,6 +32,7 @@ ClassImp(AliMUONSegmentationSlat) AliMUONSegmentationSlat::AliMUONSegmentationSlat() + : AliSegmentation() { // Default constructor fChamber = 0; @@ -41,6 +42,7 @@ AliMUONSegmentationSlat::AliMUONSegmentationSlat() } AliMUONSegmentationSlat::AliMUONSegmentationSlat(Int_t /*nsec*/) + : AliSegmentation() { // Non default constructor fSlats=0; @@ -49,6 +51,14 @@ AliMUONSegmentationSlat::AliMUONSegmentationSlat(Int_t /*nsec*/) fCurrentSlat = 0; } +AliMUONSegmentationSlat::AliMUONSegmentationSlat(const AliMUONSegmentationSlat& rhs) + : AliSegmentation(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONSegmentationSlatModule", "Not implemented."); +} + AliMUONSegmentationSlat::~AliMUONSegmentationSlat(){ //PH Delete TObjArrays if (fSlats) { @@ -61,6 +71,21 @@ AliMUONSegmentationSlat::~AliMUONSegmentationSlat(){ } } + +//---------------------------------------------------------------------- +AliMUONSegmentationSlat& +AliMUONSegmentationSlat::operator=(const AliMUONSegmentationSlat& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + + //----------------------------------------------------------- void AliMUONSegmentationSlat::SetPadSize(Float_t p1, Float_t p2) { diff --git a/MUON/AliMUONSegmentationSlat.h b/MUON/AliMUONSegmentationSlat.h index ab60b4954b5..a12dbe6c11c 100644 --- a/MUON/AliMUONSegmentationSlat.h +++ b/MUON/AliMUONSegmentationSlat.h @@ -127,6 +127,8 @@ public AliSegmentation { // Get the correction Function virtual TF1* CorrFunc(Int_t) const {return NULL;} protected: + AliMUONSegmentationSlat(const AliMUONSegmentationSlat& rhs); + AliMUONSegmentationSlat& operator=(const AliMUONSegmentationSlat& rhs); virtual void GlobalToLocal( Float_t x, Float_t y, Float_t z, Int_t &islat, Float_t &xlocal, Float_t &ylocal); diff --git a/MUON/AliMUONSegmentationSlatModule.cxx b/MUON/AliMUONSegmentationSlatModule.cxx index 8039a74eaec..195e50a48bb 100644 --- a/MUON/AliMUONSegmentationSlatModule.cxx +++ b/MUON/AliMUONSegmentationSlatModule.cxx @@ -32,7 +32,8 @@ //___________________________________________ ClassImp(AliMUONSegmentationSlatModule) -AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule() +AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule() + : AliMUONSegmentationV0() { // Default constructor fNDiv = 0; @@ -40,6 +41,7 @@ AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule() } AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule(Int_t nsec) + : AliMUONSegmentationV0() { // Non default constructor fNsec = nsec; @@ -49,6 +51,17 @@ AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule(Int_t nsec) (*fDpxD)[0]=(*fDpxD)[1]=(*fDpxD)[2]=(*fDpxD)[3]=0; } +//---------------------------------------------------------------------- +AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule( + const AliMUONSegmentationSlatModule& rhs) + : AliMUONSegmentationV0(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONSegmentationSlatModule", "Not implemented."); +} + + AliMUONSegmentationSlatModule::~AliMUONSegmentationSlatModule() { // Destructor @@ -56,6 +69,20 @@ AliMUONSegmentationSlatModule::~AliMUONSegmentationSlatModule() if (fDpxD) delete fDpxD; } +//---------------------------------------------------------------------- +AliMUONSegmentationSlatModule& +AliMUONSegmentationSlatModule::operator=( + const AliMUONSegmentationSlatModule& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + void AliMUONSegmentationSlatModule::SetPcbBoards(Int_t n[4]) { // diff --git a/MUON/AliMUONSegmentationSlatModule.h b/MUON/AliMUONSegmentationSlatModule.h index 05ccd967982..5e78b5e3b08 100644 --- a/MUON/AliMUONSegmentationSlatModule.h +++ b/MUON/AliMUONSegmentationSlatModule.h @@ -76,6 +76,9 @@ public AliMUONSegmentationV0 { virtual void SetId(Int_t id) {fId=id;} protected: + AliMUONSegmentationSlatModule(const AliMUONSegmentationSlatModule& rhs); + AliMUONSegmentationSlatModule& operator=(const AliMUONSegmentationSlatModule& rhs); + // // Geometry // -- 2.43.0