CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/EventFilter/HcalRawToDigi/interface/HcalPacker.h

Go to the documentation of this file.
00001 #ifndef EVENTFILTER_HCALRAWTODIGI_HCALPACKER_H
00002 #define EVENTFILTER_HCALRAWTODIGI_HCALPACKER_H 1
00003 
00004 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00005 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
00006 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00007 
00014 class HcalPacker {
00015 public:
00016   struct Collections {
00017     Collections();
00018     const HBHEDigiCollection* hbhe;
00019     const HODigiCollection* hoCont;
00020     const HFDigiCollection* hfCont;
00021     const HcalCalibDigiCollection* calibCont;
00022     const ZDCDigiCollection* zdcCont;
00023     const HcalTrigPrimDigiCollection* tpCont;
00024   };
00025 
00026   void pack(int fedid, int dccnumber,
00027             int nl1a, int orbitn, int bcn,
00028             const Collections& inputs, 
00029             const HcalElectronicsMap& emap,
00030             FEDRawData& output);
00031 private:
00032   int findSamples(const DetId& did, const Collections& inputs,
00033                   unsigned short* buffer, int &presamples, bool& zsUS, bool& zsMP);
00034 };
00035 
00036 #endif