| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RunDataSvc.h

Go to the documentation of this file.
00001 #ifndef RUNDATASVC_RUNDATASVC_H
00002 #define RUNDATASVC_RUNDATASVC_H 1
00003 
00004 #include "DataSvc/IRunDataSvc.h"
00005 
00006 #include "GaudiKernel/Service.h"
00007 
00008 #include <string>
00009 #include <vector>
00010 #include <map>
00011 
00012 class RunDataSvc :
00013   public Service,
00014   virtual public IRunDataSvc {
00015 
00016   public:
00018     RunDataSvc(const std::string& name,
00019                ISvcLocator* svc);
00020 
00021     virtual StatusCode initialize();
00022     virtual StatusCode finalize();
00023 
00025     virtual const DayaBay::RunData* runData(const ServiceMode& svcMode);
00026     virtual StatusCode setRunData(const DayaBay::RunData& runData);
00027     virtual const std::vector<DayaBay::RunData*>& cachedRunData();
00028 
00030     virtual StatusCode queryInterface(const InterfaceID& id,
00031                                       void** interface );
00032 
00033   private:
00034     StatusCode readDataFromDatabase(const ServiceMode& svcMode);
00035     StatusCode readDataFromFile();
00036     const DayaBay::RunData* simRunData();
00037 
00038     // Property: Load run data from the current input file?
00039     bool m_readFromFile;
00040 
00041     // Property: Load run data from the DBI Database?
00042     bool m_readFromDatabase;
00043 
00044     // Property: Path for run data if reading from file?
00045     std::string m_runDataLocation;
00046 
00047     // Internal cached list of run data objects
00048     std::vector<DayaBay::RunData*> m_runDataList;
00049 
00050     // Keep tack of whether run data has been loaded from file
00051     bool m_fileIsInitialized;
00052 
00053     // Property SimRunNumber: Specify the run number for a new simulation
00054     int m_simRunNumber;
00055 
00056     // Property SimRunType: Specify the run type for a new simulation
00057     std::string m_simRunType;
00058 
00059     // Property SimStartTime: Specify the start time for a new simulation
00060     int m_simStartTime;
00061 
00062     // Property SimCalibSources: Specify the active calibration sources
00063     std::vector<std::string> m_simCalibSources;
00064 
00065     // Property SimCalibZPosition: Specify the calibration source AD Z position
00066     std::map<std::string, double> m_simCalibZPosition;
00067 
00068     // Property SimLedFrequency: Specify the calibration LED frequency
00069     std::map<std::string, double> m_simLedFrequency;
00070 
00071   };
00072 
00073 #endif /* RUNDATASVC_RUNDATASVC_H */
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:22:43 2011 for RunDataSvc by doxygen 1.4.7