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: MJManagementEventAction.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 00024 // 00025 // CLASS IMPLEMENTATION: MJManagementEventAction.cc 00026 // 00027 //---------------------------------------------------------------------------// 00033 // 00034 //---------------------------------------------------------------------------// 00047 //---------------------------------------------------------------------------// 00048 // 00049 00050 #include "globals.hh" 00051 00052 #include "management/MJManagementEventActionMessenger.hh" 00053 #include "io/MJLogger.hh" 00054 #include "io/MJVOutputManager.hh" 00055 00056 //---------------------------------------------------------------------------// 00057 00058 #include "management/MJManagementEventAction.hh" 00059 00060 //---------------------------------------------------------------------------// 00061 00062 MJManagementEventAction::MJManagementEventAction(): 00063 fOutputManager(0), fReportingFrequency(100000) 00064 { 00065 fG4Messenger = new MJManagementEventActionMessenger(this); 00066 } 00067 00068 //---------------------------------------------------------------------------// 00069 00070 MJManagementEventAction::MJManagementEventAction(const MJManagementEventAction & other) 00071 {;} 00072 00073 //---------------------------------------------------------------------------// 00074 00075 MJManagementEventAction::~MJManagementEventAction() 00076 { 00077 if(fOutputManager) { 00078 fOutputManager->CloseFile(); 00079 delete fOutputManager; 00080 } 00081 delete fG4Messenger; 00082 } 00083 00084 //---------------------------------------------------------------------------// 00085 00086 void MJManagementEventAction::BeginOfEventAction(const G4Event *event) 00087 { 00088 if(event->GetEventID()%fReportingFrequency == 0) 00089 MJLog(routine) << " Processing Event # " << event->GetEventID() << endlog; 00090 if(fOutputManager) 00091 fOutputManager->BeginOfEventAction(event); 00092 } 00093 00094 //---------------------------------------------------------------------------// 00095 00096 void MJManagementEventAction::EndOfEventAction(const G4Event *event) 00097 { 00098 if(fOutputManager) 00099 fOutputManager->EndOfEventAction(event); 00100 } 00101 00102 //---------------------------------------------------------------------------// 00103 //---------------------------------------------------------------------------//