Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MJManagementRunAction.cc

Go to the documentation of this file.
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: MJManagementRunAction.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MJManagementRunAction.cc
00026 //
00027 //---------------------------------------------------------------------------//
00031 // 
00032 //---------------------------------------------------------------------------//
00046 //---------------------------------------------------------------------------//
00047 //
00048 
00049 #include "generators/MJGeneratorPrimary.hh"
00050 #include "generators/MJVGenerator.hh"
00051 #include "management/MJManagementEventAction.hh"
00052 #include "management/MJManager.hh"
00053 #include "io/MJLogger.hh"
00054 
00055 //---------------------------------------------------------------------------//
00056 
00057 #include "management/MJManagementRunAction.hh"
00058 
00059 //---------------------------------------------------------------------------//
00060 
00061 MJManagementRunAction::MJManagementRunAction()
00062 {;}
00063 
00064 //---------------------------------------------------------------------------//
00065 
00066 MJManagementRunAction::MJManagementRunAction(const MJManagementRunAction & other)
00067 {;}
00068 
00069 //---------------------------------------------------------------------------//
00070 
00071 MJManagementRunAction::~MJManagementRunAction()
00072 {;}
00073 
00074 //---------------------------------------------------------------------------//
00075 
00076 void MJManagementRunAction::BeginOfRunAction(const G4Run *run)
00077 {
00078   MJManager* manager = MJManager::GetMJManager();
00079   MJLog(trace) << "Performing MJ beginning of run actions." << endlog;
00080   if(manager->GetMJGeneratorPrimary())
00081    manager->GetMJGeneratorPrimary()->GetMJGenerator()->BeginOfRunAction(run);
00082   else {
00083     MJLog(error) << "No generator specified!" << endlog;
00084     MJLog(fatal) << endlog;
00085   }
00086   if(manager->GetMJEventAction()->GetOutputManager())
00087      manager->GetMJEventAction()->GetOutputManager()->BeginOfRunAction(); 
00088   else
00089     MJLog(warning) << "No Output specified!" << endlog;
00090 }
00091 
00092 //---------------------------------------------------------------------------//
00093 
00094 void MJManagementRunAction::EndOfRunAction(const G4Run *run)
00095 {
00096   MJManager* manager = MJManager::GetMJManager();
00097   MJLog(trace) << "Performing MJ end of run actions." << endlog;
00098   manager->GetMJGeneratorPrimary()->GetMJGenerator()->EndOfRunAction(run);
00099   if(manager->GetMJEventAction()->GetOutputManager())
00100     manager->GetMJEventAction()->GetOutputManager()->EndOfRunAction();
00101 }
00102 
00103 //---------------------------------------------------------------------------//
00104 //---------------------------------------------------------------------------//

Generated on Mon Nov 29 16:58:53 2004 for Majorana Simulation by  doxygen 1.3.9.1