Go to the documentation of this file.00001 #ifndef ESUNPACKER_H
00002 #define ESUNPCAKER_H
00003
00004 #include <iostream>
00005 #include <vector>
00006 #include <bitset>
00007 #include <sstream>
00008 #include <map>
00009
00010 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00011 #include "DataFormats/EcalDigi/interface/ESDataFrame.h"
00012 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00013 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/ParameterSet/interface/FileInPath.h"
00016 #include "DataFormats/EcalRawData/interface/ESDCCHeaderBlock.h"
00017 #include "DataFormats/EcalRawData/interface/ESKCHIPBlock.h"
00018 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
00019
00020
00021
00022
00023 class ESDigiToRaw;
00024
00025 class ESUnpacker {
00026
00027 public :
00028
00029 typedef unsigned int Word32;
00030 typedef long long Word64;
00031
00032 ESUnpacker(const edm::ParameterSet& ps);
00033 ~ESUnpacker();
00034
00035 void interpretRawData(int fedId, const FEDRawData & rawData, ESRawDataCollection & dccs, ESLocalRawDataCollection & kchips, ESDigiCollection & digis);
00036 void word2digi(int kchip, int kPACE[4], const Word64 & word, ESDigiCollection & digis);
00037
00038 void setRunNumber(int i) {run_number_ = i;};
00039 void setOrbitNumber(int i) {orbit_number_ = i;};
00040 void setBX(int i) {bx_ = i;};
00041 void setLV1(int i) {lv1_ = i;};
00042 void setTriggerType(int i) {trgtype_ = i;};
00043
00044 private :
00045
00046 const edm::ParameterSet pset_;
00047
00048 int fedId_;
00049 int run_number_;
00050 int orbit_number_;
00051 int bx_;
00052 int lv1_;
00053 int dac_;
00054 int gain_;
00055 int precision_;
00056 int runtype_;
00057 int seqtype_;
00058 int trgtype_;
00059 int vminor_;
00060 int vmajor_;
00061 int optoRX0_;
00062 int optoRX1_;
00063 int optoRX2_;
00064 int FEch_[36];
00065
00066 bool debug_;
00067 edm::FileInPath lookup_;
00068
00069 std::string print(const Word64 & word) const;
00070
00071 protected :
00072
00073 Word64 m1, m2, m4, m5, m6, m8, m12, m16, m32;
00074
00075 int zside_[4288][4], pl_[4288][4], x_[4288][4], y_[4288][4];
00076
00077 };
00078
00079 #endif