CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/EventFilter/Utilities/plugins/EvffedFillerEP.h

Go to the documentation of this file.
00001 #ifndef EVENTFILTER_UTILITIES_PLUGINS_EVFFEDFILLEREP
00002 #define EVENTFILTER_UTILITIES_PLUGINS_EVFFEDFILLEREP
00003 
00004 #include <unistd.h>
00005 
00006 #include "EventFilter/FEDInterface/interface/FED1023.h"
00007 
00008 namespace evf{
00009 
00010   class EvffedFillerEP{
00011 
00012   public:
00013     EvffedFillerEP(){
00014     }
00015     void setEPTimeStamp(uint64_t ts, unsigned char *payload){
00016       *(uint64_t*) (payload + fedinterface::EVFFED_EPWCTIM_OFFSET) = ts;
00017     }
00018     void setEPProcessId(pid_t pid, unsigned char *payload){
00019       *(uint32_t*)(payload+fedinterface::EVFFED_EPIDENT_OFFSET) = 
00020         (pid & fedinterface::EVFFED_EPPCIDE_MASK) << fedinterface::EVFFED_EPPCIDE_SHIFT;
00021     }
00022     void setEPEventId(uint32_t eid, unsigned char *payload){
00023       *(uint32_t*)(payload+fedinterface::EVFFED_EPEVENT_OFFSET) =
00024         eid;
00025     }
00026     void setEPEventCount(uint32_t evc, unsigned char *payload){
00027       *(uint32_t*)(payload+fedinterface::EVFFED_EPEVTCT_OFFSET) =
00028         evc;
00029     }
00030     void setEPEventHisto(uint64_t ehi, unsigned char *payload){
00031       *(uint64_t*)(payload+fedinterface::EVFFED_EPHISTO_OFFSET) =
00032         ehi;
00033     }
00034 
00035   private:
00036     
00037   };
00038 }
00039 
00040 
00041 #endif