CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/EventFilter/ESDigiToRaw/interface/ESDigiToRaw.h

Go to the documentation of this file.
00001 #ifndef ESDIGITORAW_H
00002 #define ESDIGITORAW_H
00003 
00004 #include <memory>
00005 #include <iostream>
00006 #include <string>
00007 #include <fstream>
00008 
00009 #include "DataFormats/Common/interface/Handle.h"
00010 #include "FWCore/Framework/interface/Event.h"
00011 #include "FWCore/Framework/interface/EDProducer.h"
00012 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "FWCore/Framework/interface/EventSetup.h"
00015 #include "FWCore/ParameterSet/interface/FileInPath.h"
00016 
00017 #include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h"
00018 
00019 class ESDigiToRaw : public edm::EDProducer {
00020   
00021  public:
00022   
00023   ESDigiToRaw(const edm::ParameterSet& ps);
00024   virtual ~ESDigiToRaw();
00025   
00026   void beginJob() ;
00027   void produce(edm::Event& e, const edm::EventSetup& es);
00028   void endJob() ;
00029 
00030   typedef uint32_t Word32;
00031   typedef uint64_t Word64;
00032   
00033   int* GetCounter() {return &counter_ ;}
00034   int* GetOrbit() {return &orbit_number_ ;}
00035   int* GetBX() {return &bx_ ;}
00036   int* GetLV1() {return &lv1_ ;}
00037   int* GetRunNumber() {return &run_number_ ;}
00038   
00039   static const int BXMAX = 2808;
00040   static const int LHC_BX_RANGE = 3564;
00041   static const int KCHIP_BC_RANGE = 4096;
00042   static const int KCHIP_EC_RANGE = 256;
00043   
00044  private:
00045   
00046   int counter_;
00047   int orbit_number_;
00048   int run_number_;
00049   int bx_;
00050   int lv1_;
00051   int kchip_ec_; 
00052   int kchip_bc_; 
00053   int fedId_[2][2][40][40];
00054     
00055   std::string label_;
00056   std::string instanceName_;
00057   edm::FileInPath lookup_;
00058   bool   debug_;
00059   int formatMajor_; 
00060   int formatMinor_; 
00061 
00062   ESDataFormatter* ESDataFormatter_;
00063   
00064 };
00065 
00066 #endif