00001
00002 #ifndef MICROROCSLOWCONTROL_HH
00003 #define MICROROCSLOWCONTROL_HH
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <string>
00013 #include <vector>
00014 #include <iostream>
00015 #include <sstream>
00016 #include <bitset>
00017 #include <vector>
00018 #include "mTypes.h"
00019
00020
00021 class Run;
00022 class IlcConfDb;
00023 class MicrorocSCReader {
00024
00025
00026 public:
00027
00028 MicrorocSCReader(Run& aRun, std::string &data, ui16 difId);
00029 MicrorocSCReader(Run& aRun);
00030
00031 MicrorocSCReader(Run& aRun, std::vector<int>, ui16 difId);
00032 ~MicrorocSCReader();
00033 ui16 getBit(ui16 bitNum) const;
00034 ui16 getChannelDac(ui16 channelId ) const;
00035 ui16 getLowShaper( ) const;
00036 ui16 getHighShaper( ) const;
00037 ui32 getChipDac( ui16 dac ) const;
00038
00039 ui16 getChipId() const;
00040 void parseSC(ui16 difId);
00041 void parseSCFromDb(IlcConfDb& ilcconf);
00042
00043 private:
00044 std::vector<bool> convertCTEST(std::string chaine);
00045 unsigned int bitsSize;
00046 unsigned int bitsIndex;
00047
00048
00049
00050 private:
00051 Run& run;
00052
00053 void init(std::string);
00054 void init(std::vector<int>);
00055
00056 bool initialised ;
00057
00058 typedef enum{
00059 low_shaper_bit_1 = 69,
00060 low_shaper_bit_0 = 70 ,
00061
00062 high_shaper_bit_1 = 73,
00063 high_shaper_bit_0 = 74 ,
00064
00065 dac_channel_pos = 75,
00066 chip_id = 530,
00067 chip_dac0 = 542,
00068 chip_dac1 = 552,
00069 chip_dac2 = 562,
00070 dac_chip_nbits = 10,
00071 dac_channel_nbits = 4
00072 } index_t;
00073
00074
00075 std::vector<std::bitset<592> > bits;
00076
00077
00078
00079
00080 };
00081
00082 #endif
00083
00084