CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.h

Go to the documentation of this file.
00001 #ifndef GTPSBTEXTTODIGI_H
00002 #define GTPSBTEXTTODIGI_H
00003 
00004 /*\class GtPsbTextToDigi
00005  *\description makes digis from GT PSB captured data file
00006  *\author Nuno Leonardo (CERN)
00007  *\date 08.08
00008  */
00009 
00010 /*\note on format 
00011   input file names: m_textFileName + mem# + .txt
00012   each line corresponds to one 80MHz clock (2 cycles/lines per event)
00013   input data: 16 bits: cycle (msb) + GCT em cand raw data (14:0)
00014   msb set once at cycle 0 to indicate BC0 signal, for GT synch check
00015   file/mem#:0  line/cycle:0  electron 1
00016                line/cycle:1  electron 3
00017   file/mem#:1  line/cycle:0  electron 2
00018                line/cycle:1  electron 4
00019   file/mem#:6  line/cycle:0  electron 1
00020                line/cycle:1  electron 3
00021   file/mem#:7  line/cycle:0  electron 2
00022                line/cycle:1  electron 4
00023   as specified to me by I.Mikulec, M.Jeitler, J.Brooke
00024 */
00025 
00026 #include <memory>
00027 #include <fstream>
00028 #include "FWCore/Framework/interface/Frameworkfwd.h"
00029 #include "FWCore/Framework/interface/EDProducer.h"
00030 #include "FWCore/Framework/interface/Event.h"
00031 #include "FWCore/Framework/interface/MakerMacros.h"
00032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00033 
00034 class GtPsbTextToDigi : public edm::EDProducer {
00035  public:
00036   explicit GtPsbTextToDigi(const edm::ParameterSet&);
00037   ~GtPsbTextToDigi();
00038   
00039  private:
00040   virtual void produce(edm::Event&, const edm::EventSetup&);
00041   virtual void endJob();
00042 
00043  private:
00045   void putEmptyDigi(edm::Event&);
00046 
00048   int m_fileEventOffset;
00049 
00051   std::string m_textFileName;
00052 
00054   int m_nevt;
00055 
00057   std::ifstream m_file[4];
00058 
00060   int m_bc0[4];  
00061 };
00062 
00063 #endif