00001 #ifndef EVENTFILTER_CASTORRAWTODIGI_CASTORPACKER_H 00002 #define EVENTFILTER_CASTORRAWTODIGI_CASTORPACKER_H 1 00003 00004 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" 00005 #include "DataFormats/FEDRawData/interface/FEDRawData.h" 00006 #include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h" 00007 00014 class CastorPacker { 00015 public: 00016 struct Collections { 00017 Collections(); 00018 const CastorDigiCollection* castorCont; 00019 const HcalCalibDigiCollection* calibCont; 00020 const HcalTrigPrimDigiCollection* tpCont; 00021 }; 00022 00023 void pack(int fedid, int dccnumber, 00024 int nl1a, int orbitn, int bcn, 00025 const Collections& inputs, 00026 const CastorElectronicsMap& emap, 00027 FEDRawData& output); 00028 private: 00029 int findSamples(const DetId& did, const Collections& inputs, 00030 unsigned short* buffer, int &presamples); 00031 }; 00032 00033 #endif