Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:05

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4DCtable
0027 //
0028 // class description:
0029 //
0030 // This class is used by G4DigiManager for book keeping the
0031 // digitizer modules and digits collections. The order of
0032 // digi collections stored in G4DCofThisEvent is same as the
0033 // order of DClist. 
0034 // The order may vary from run to run, if the user adds/changes
0035 // some of his/her digitizer modules.
0036 // In case user wants to make G4Run object persistent, this
0037 // G4DCtable class object should be copied and stored with
0038 // G4Run object.
0039 
0040 // Author: M.Asai
0041 // --------------------------------------------------------------------
0042 #ifndef G4DCtable_hh
0043 #define G4DCtable_hh 1
0044 
0045 #include "globals.hh"
0046 #include <vector>
0047 
0048 class G4VDigitizerModule;
0049 
0050 class G4DCtable
0051 {
0052   public:
0053     G4DCtable();
0054     ~G4DCtable();
0055 
0056   public:
0057     G4int Registor(G4String SDname,G4String DCname);
0058     G4int GetCollectionID(G4String DCname) const;
0059     G4int GetCollectionID(G4VDigitizerModule* aDM) const;
0060 
0061   private:
0062     std::vector<G4String> DMlist;
0063     std::vector<G4String> DClist;
0064 
0065   public:
0066     inline G4int entries() const
0067     { return G4int(DClist.size()); }
0068     inline G4String GetDMname(G4int i) const
0069     {
0070       if(i<0||i>entries()) return "***Not Defined***";
0071       return DMlist[i];
0072     }
0073     inline G4String GetDCname(G4int i) const
0074     {
0075       if(i<0||i>entries()) return "***Not Defined***";
0076       return DClist[i];
0077     }
0078 };
0079 
0080 #endif
0081