00001 #ifndef ESDIGITORAWTB_H 00002 #define ESDIGITORAWTB_H 00003 00004 #include <memory> 00005 #include <iostream> 00006 #include <string> 00007 00008 #include "DataFormats/Common/interface/Handle.h" 00009 #include "FWCore/Framework/interface/Event.h" 00010 #include "FWCore/Framework/interface/EDProducer.h" 00011 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00012 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00013 #include "FWCore/Framework/interface/EventSetup.h" 00014 00015 #include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h" 00016 00017 using namespace std; 00018 using namespace edm; 00019 00020 class ESDigiToRawTB : public EDProducer { 00021 00022 public: 00023 00024 ESDigiToRawTB(const ParameterSet& ps); 00025 virtual ~ESDigiToRawTB(); 00026 00027 void beginJob(const EventSetup& es) ; 00028 void produce(Event& e, const EventSetup& es); 00029 void endJob() ; 00030 00031 typedef long long Word64; 00032 typedef unsigned int Word32; 00033 00034 int* GetCounter() {return &counter_ ;} 00035 int* GetOrbit() {return &orbit_number_ ;} 00036 int* GetBX() {return &bx_ ;} 00037 int* GetLV1() {return &lv1_ ;} 00038 int* GetRunNumber() {return &run_number_ ;} 00039 00040 static const int BXMAX = 2808; 00041 00042 private: 00043 00044 int counter_; 00045 int orbit_number_; 00046 int run_number_; 00047 int bx_; 00048 int lv1_; 00049 00050 string label_; 00051 string instanceName_; 00052 bool debug_; 00053 00054 ESDataFormatter* ESDataFormatter_; 00055 00056 }; 00057 00058 #endif