G4DCIOcatalog.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // File: G4DCIOcatalog.hh
00027 //
00028 // History:
00029 //   '01.09.12  Youhei Morita  Initial creation
00030 
00031 #ifndef DCIO_CATALOG_HH
00032 #define DCIO_CATALOG_HH 1
00033 
00034 #include <map>
00035 #include "G4Types.hh"
00036 #include "G4VPDigitsCollectionIO.hh"
00037 
00038 class G4VDCIOentry;
00039 
00040 typedef std::map<std::string, G4VDCIOentry*, std::less<std::string> > DCIOmap;
00041 
00042 typedef std::map<std::string, G4VPDigitsCollectionIO*, std::less<std::string> > DCIOstore;
00043 
00044 // Class Description:
00045 //   Catalog for the I/O manager of digits collection for each detector.
00046 
00047 class G4DCIOcatalog
00048 {
00049     public: // With description
00050       G4DCIOcatalog();
00051       // Constructor
00052 
00053       virtual ~G4DCIOcatalog() {};
00054       // Destructor
00055 
00056     public: // With description
00057       static G4DCIOcatalog* GetDCIOcatalog();
00058       // Construct G4DCIOcatalog and returns the pointer
00059 
00060       void SetVerboseLevel(int v) { m_verbose = v; };
00061       // Set verbose level.
00062 
00063       void RegisterEntry(G4VDCIOentry* d);
00064       // Register I/O manager entry
00065 
00066       void RegisterDCIOmanager(G4VPDigitsCollectionIO* d);
00067       // Register I/O manager
00068 
00069       G4VDCIOentry* GetEntry(std::string name);
00070       // Returns the I/O manager entry
00071 
00072       G4VPDigitsCollectionIO* GetDCIOmanager(std::string name);
00073       // Returns the registered I/O manager entry
00074 
00075       void PrintEntries();
00076       // Prints the list of I/O manager entries
00077 
00078       std::string CurrentDCIOmanager();
00079       // Returns the list of I/O managers
00080 
00081       void PrintDCIOmanager();
00082       // Prints the list of I/O managers
00083 
00084       size_t NumberOfDCIOmanager() { return theStore.size(); };
00085       // Returns the number of registered I/O managers.
00086 
00087       G4VPDigitsCollectionIO* GetDCIOmanager(int n);
00088       // Returns the n-th registered I/O manager entry
00089 
00090     private:
00091       int m_verbose;
00092       static G4DCIOcatalog* f_thePointer;
00093       DCIOmap theCatalog;
00094       DCIOstore theStore;
00095 
00096 }; // End of class G4DCIOcatalog
00097 
00098 #endif
00099 

Generated on Mon May 27 17:47:59 2013 for Geant4 by  doxygen 1.4.7