00001 #ifndef BUILDER_H
00002 #define BUILDER_H
00003
00004 #include <stdint.h>
00005 #include <map>
00006 #include <string>
00007
00008 #include "GaudiKernel/PropertyMgr.h"
00009 #include "GaudiKernel/StatusCode.h"
00010 #include "RawDataCnv/EventManagement/RawEvent.h"
00011
00012 using namespace std;
00013
00014 class Builder
00015 {
00016
00017 protected:
00018
00019 Builder();
00020 virtual ~Builder();
00021
00022 class DataErrException{};
00023
00024 public:
00025 typedef std::map<uint32_t, uint32_t> TE2REMAP;
00026
00027 static bool expect( ifstream &f, string msg, string fname );
00028 static bool expectInt( ifstream &f, string msg, string fname, uint32_t &val1, uint32_t &val2 );
00029 static bool expectLong( ifstream &f, string msg, string fname, uint64_t &val );
00030 static bool find( ifstream &f, string msg, string fname );
00031
00032 virtual StatusCode initialize(string &initFile) {return StatusCode::SUCCESS;};
00033 virtual uint32_t getTEID(uint32_t teid) = 0;
00034 virtual uint32_t getREID(uint32_t reid) = 0;
00035
00036
00037
00038 protected:
00039 void append2event(WriteRawEvent*& re, uint32_t source_id, uint32_t size);
00040
00041 protected:
00042
00043 PropertyMgr m_propMgr;
00044
00045
00046 uint32_t* m_buf;
00047 static string m_confFile;
00048
00049 uint32_t m_status;
00050 };
00051
00052 #endif