00001 #ifndef RAWDATACNVSVC_RAWDATAFILEINPUTSVC_H 00002 #define RAWDATACNVSVC_RAWDATAFILEINPUTSVC_H 00003 00004 //=================================================================== 00005 // RawDataFileInputSvc.h 00006 //=================================================================== 00007 // 00008 // Description: This class implements the interface RawDataInputSvc for 00009 // event selector to read the events for Files. 00010 // 00011 //------------------------------------------------------------------- 00012 00013 00014 // Include files. 00015 #include "GaudiKernel/Service.h" 00016 #include "GaudiKernel/ISvcLocator.h" 00017 #include "IRawFile/IRawReader.h" 00018 #include "RawDataCnv/EventManagement/RAWEVENT.h" 00019 #include "RawDataCnv/IRawDataInputSvc.h" 00020 00021 static const InterfaceID IID_RawDataInputSvc("RawDataInputSvc", 1, 0); 00022 00023 class RawDataInputSvc: public Service, 00024 virtual public IRawDataInputSvc 00025 { 00026 public: 00027 00028 static const InterfaceID& interfaceID() { return IID_RawDataInputSvc; } 00029 00030 // Constructors: 00031 RawDataInputSvc(const std::string& name, ISvcLocator* svcloc); 00032 00033 // Destructor. 00034 virtual ~RawDataInputSvc(); 00035 00036 // Implementation of the RawDataInputSvc interface methods. 00037 virtual StatusCode initialize(); 00038 virtual StatusCode finalize(); 00039 00040 virtual RAWEVENT* nextEvent(); 00041 virtual RAWEVENT* currentEvent() ; 00042 virtual bool setCurrentEvent(RAWEVENT* m_onlinere);//TR 00043 00044 std::string currentFile() const { return m_reader->currentFile(); } 00045 00046 // 0-NormalNetMode, 1-OnlineMode, 2-OfflineMode, 3-DistBossMode 00047 int runMode() { return m_mode; } 00048 00049 uint32_t runNo() { return m_reader->runNo(); } 00050 00051 private: 00052 00053 RAWEVENT* m_re; 00054 IRawReader* m_reader; // used by OfflineMode and DistBossMode 00055 00056 // 0-NormalNetMode, 1-OnlineMode, 2-OfflineMode, 3-DistBossMode 00057 int m_mode; 00058 bool m_keepRdm; 00059 00060 // OfflineMode parameter 00061 std::vector<std::string> m_inputFiles; 00062 00063 // DistBossMode parameter 00064 std::string m_evtServer; 00065 00066 // SubDetectorFragments & ROBs 00067 const uint32_t** m_sds; 00068 const uint32_t** m_robs; 00069 }; 00070 00071 #endif 00072