00001 //---------------------------------------------------------------------------// 00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00003 // // 00004 // MAJORANA Simulation // 00005 // // 00006 // This code implementation is the intellectual property of the // 00007 // MAJORANA Collaboration. It is based on Geant4, an intellectual // 00008 // property of the RD44 GEANT4 collaboration. // 00009 // // 00010 // ********************* // 00011 // // 00012 // Neither the authors of this software system, nor their employing // 00013 // institutes, nor the agencies providing financial support for this // 00014 // work make any representation or warranty, express or implied, // 00015 // regarding this software system or assume any liability for its use. // 00016 // By copying, distributing or modifying the Program (or any work based // 00017 // on on the Program) you indicate your acceptance of this statement, // 00018 // and all its terms. // 00019 // // 00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00021 //---------------------------------------------------------------------------// 00022 // 00023 // $Id: MJWaveformManager.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: MJWaveformManager.cc 00026 // 00027 //---------------------------------------------------------------------------// 00033 // 00034 //---------------------------------------------------------------------------// 00045 //---------------------------------------------------------------------------// 00046 // 00047 00048 //---------------------------------------------------------------------------// 00049 00050 #include "waveform/MJWaveformManager.hh" 00051 00052 //---------------------------------------------------------------------------// 00053 00054 MJWaveformManager::MJWaveformManager(): 00055 fDetector(0), fUI(0), fOutputRoot(0) 00056 {;} 00057 00058 //---------------------------------------------------------------------------// 00059 00060 MJWaveformManager::MJWaveformManager(const MJWaveformManager & other) 00061 {;} 00062 00063 //---------------------------------------------------------------------------// 00064 00065 MJWaveformManager::~MJWaveformManager() 00066 { 00067 delete fDetector, fUI, fOutputRoot; 00068 } 00069 00070 //---------------------------------------------------------------------------// 00071 00072 void MJWaveformManager::SetDetector(MJVwaveformDetector *det) 00073 { 00074 if(fDetector) { 00075 MJLog(warning) << "Waveform detector already defined, redefining. " 00076 << "Deleting old detector.\n"; 00077 delete fDetector; 00078 fDetector = NULL; 00079 } 00080 if(!det) 00081 MJLog(warning) << "NULL pointer for waveform detector.\n"; 00082 fDetector = det; 00083 } 00084 00085 //---------------------------------------------------------------------------// 00086 00087 void MJWaveformManager::SetUI(MJWaveformUI *ui) 00088 { 00089 if(fUI) { 00090 MJLog(error) << "Waveform UI already defined, redefining. " 00091 << "Deleting previous UI.\n"; 00092 delete fUI; 00093 fUI = NULL; 00094 } 00095 if(!ui) 00096 MJLog(warning) << "NULL pointer for waveform UI.\n"; 00097 fUI = ui; 00098 } 00099 00100 //---------------------------------------------------------------------------// 00101 00102 void MJWaveformManager::SetOutputRoot(MJOutputRoot *rootout) 00103 { 00104 if(fRootOutput) { 00105 MJLog(error) << "Waveform ROOT output already defined, redefining. " 00106 << "Probable memory leak.\n"; 00107 delete fRootOutput; 00108 fRootOutput = NULL; 00109 } 00110 if(!rootout) 00111 MJLog(warning) << "NULL pointer for waveform ROOT output.\n"; 00112 fRootOutput = rootout; 00113 } 00114 00115 //---------------------------------------------------------------------------//