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

MJOutputLANLCloverInNaIBarrel.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: MJOutputLANLCloverInNaIBarrel.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MJOutputLANLCloverInNaIBarrel.cc
00026 //
00027 //---------------------------------------------------------------------------//
00031 // 
00032 //---------------------------------------------------------------------------//
00042 //---------------------------------------------------------------------------//
00043 //
00044 
00045 #include "globals.hh"
00046 
00047 #include "io/MJOutputLANLClover.hh"
00048 #include "io/MJOutputNaIBarrel.hh"
00049 #include "io/MJOutputRoot.hh"
00050 
00051 //---------------------------------------------------------------------------//
00052 
00053 #include "io/MJOutputLANLCloverInNaIBarrel.hh"
00054 
00055 //---------------------------------------------------------------------------//
00056 
00057 MJOutputLANLCloverInNaIBarrel::MJOutputLANLCloverInNaIBarrel(G4String serNum,
00058                                                              G4bool isMother):
00059   MJOutputRoot(isMother)
00060 {
00061   SetSchemaDefined(false);
00062   fOutputLANLClover = new MJOutputLANLClover("LANL1", false);
00063   fOutputNaIBarrel = new MJOutputNaIBarrel("Barrel", false);
00064 }
00065 
00066 //---------------------------------------------------------------------------//
00067 
00068 MJOutputLANLCloverInNaIBarrel::~MJOutputLANLCloverInNaIBarrel()
00069 {
00070   delete fOutputNaIBarrel;
00071   delete fOutputLANLClover;
00072 }
00073 
00074 //---------------------------------------------------------------------------//
00075 
00076 void MJOutputLANLCloverInNaIBarrel::DefineSchema()
00077 {
00078   if(!SchemaDefined()){
00079     if(!fTree)
00080       fTree = new TTree("fTree", "LANL Clover in NaI Barrel");
00081     fOutputNaIBarrel->DefineSchema();
00082     fOutputLANLClover->DefineSchema();
00083     SetSchemaDefined(true);
00084   }
00085 }
00086 
00087 //---------------------------------------------------------------------------//
00088 
00089 void MJOutputLANLCloverInNaIBarrel::BeginOfEventAction(const G4Event *event)
00090 {
00091   fOutputNaIBarrel->BeginOfEventAction(event);
00092   fOutputLANLClover->BeginOfEventAction(event);
00093 }
00094 
00095 //---------------------------------------------------------------------------//
00096 
00097 void MJOutputLANLCloverInNaIBarrel::BeginOfRunAction()
00098 {
00099   DefineSchema();
00100   fOutputNaIBarrel->BeginOfRunAction();
00101   fOutputLANLClover->BeginOfRunAction();
00102   if(IsMother())
00103     OpenRootFile(GetFileName());
00104 }
00105 
00106 //---------------------------------------------------------------------------//
00107 
00108 void MJOutputLANLCloverInNaIBarrel::EndOfEventAction(const G4Event *event)
00109 {
00110   fOutputNaIBarrel->EndOfEventAction(event);
00111   fOutputLANLClover->EndOfEventAction(event);
00112   if(IsMother())
00113     FillTree();
00114 }
00115 
00116 //---------------------------------------------------------------------------//
00117 
00118 void MJOutputLANLCloverInNaIBarrel::EndOfRunAction()
00119 {
00120   fOutputNaIBarrel->EndOfRunAction();
00121   fOutputLANLClover->EndOfRunAction();
00122   if(IsMother())
00123     CloseRootFile();
00124 }
00125 
00126 //---------------------------------------------------------------------------//
00127 
00128 void MJOutputLANLCloverInNaIBarrel::RootSteppingAction(const G4Step *step)
00129 {
00130   fOutputNaIBarrel->RootSteppingAction(step);
00131   fOutputLANLClover->RootSteppingAction(step);
00132 }
00133 
00134 //---------------------------------------------------------------------------//
00135 //---------------------------------------------------------------------------//

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