CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/IORawData/CaloPatterns/interface/HcalFiberPattern.h

Go to the documentation of this file.
00001 #ifndef IORAWDATA_CALOPATTERNS_HCALFIBERPATTERN_H
00002 #define IORAWDATA_CALOPATTERNS_HCALFIBERPATTERN_H 1
00003 
00004 #include "DataFormats/HcalDigi/interface/HcalQIESample.h"
00005 #include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
00006 #include <string>
00007 #include <map>
00008 #include <vector>
00009 
00016 class HcalFiberPattern {
00017 public:
00018   HcalFiberPattern(const std::map<std::string, std::string>& params, const std::vector<uint32_t>& data);
00019   std::vector<HcalQIESample> getSamples(int bunch, int npresamples, int nsamples, int fiberChan);
00020   HcalElectronicsId getId(int fiberChan);
00021   int crate() const { return crate_; }
00022   int slot() const { return slot_; }
00023   int fiber() const { return fiber_; }
00024 private:
00025   HcalQIESample unpack(int bc, int fc);
00026   int crate_, slot_, tb_, fiber_, spigot_, dcc_;
00027   std::vector<uint32_t> pattern_;
00028 };
00029 
00030 #endif