CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.h

Go to the documentation of this file.
00001 #ifndef _ECALRAWTODIGIDEV_H_ 
00002 #define _ECALRAWTODIGIDEV_H_ 
00003 
00004 /*
00005  *\ Class EcalRawToDigi
00006  *
00007  * This class takes unpacks ECAL raw data 
00008  * produces digis and raw data format prolblems reports
00009  *
00010  * \file EcalRawToDigi.h
00011  *
00012  * $Date: 2010/09/15 21:51:34 $
00013  * $Revision: 1.7 $
00014  * \author N. Almeida
00015  * \author G. Franzoni
00016  *
00017 */
00018 
00019 #include <iostream>                                 
00020 
00021 #include "EventFilter/EcalRawToDigi/interface/DCCRawDataDefinitions.h"
00022 
00023 #include <DataFormats/FEDRawData/interface/FEDRawData.h>
00024 #include <DataFormats/FEDRawData/interface/FEDNumbering.h>
00025 #include <DataFormats/FEDRawData/interface/FEDRawDataCollection.h>
00026 #include <DataFormats/EcalDigi/interface/EcalDigiCollections.h>
00027 #include <DataFormats/EcalRawData/interface/EcalRawDataCollections.h>
00028 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
00029 
00030 #include <DataFormats/Common/interface/Handle.h>
00031 #include <FWCore/Framework/interface/Event.h>
00032 #include <FWCore/Framework/interface/EDProducer.h>
00033 #include <FWCore/MessageLogger/interface/MessageLogger.h>
00034 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00035 #include <FWCore/Framework/interface/ESWatcher.h>
00036 #include <sys/time.h>
00037 
00038 class EcalElectronicsMapper;
00039 class EcalElectronicsMapping;
00040 class DCCDataUnpacker;
00041 
00042 class EcalRawToDigi : public edm::EDProducer{
00043 
00044  public:
00048   explicit EcalRawToDigi(const edm::ParameterSet& ps);
00049   
00053   virtual void produce(edm::Event& e, const edm::EventSetup& c);
00054   
00055   // function called at start of each run
00056   virtual void beginRun(edm::Run& run, const edm::EventSetup& es);
00057   
00061   virtual ~EcalRawToDigi();
00062 
00063  
00064   edm::ESWatcher<EcalMappingRcd> watcher_;
00065 
00066   
00067  private:
00068 
00069   //list of FEDs to unpack
00070   std::vector<int> fedUnpackList_;
00071 
00072   std::vector<int> orderedFedUnpackList_;
00073   std::vector<int> orderedDCCIdList_;
00074   
00075   unsigned int numbXtalTSamples_;
00076   unsigned int numbTriggerTSamples_;
00077   
00078   bool headerUnpacking_;
00079   bool srpUnpacking_;
00080   bool tccUnpacking_;
00081   bool feUnpacking_;
00082   bool memUnpacking_;
00083   bool syncCheck_;
00084   bool feIdCheck_;
00085   bool forceToKeepFRdata_;
00086   bool first_;
00087   bool put_;
00088 
00089   
00090   //std::string dataLabel_ ; 
00091   edm::InputTag dataLabel_;
00092 
00093   // -- For regional unacking :
00094   bool REGIONAL_ ;
00095   edm::InputTag fedsLabel_ ;
00096 
00097   //an electronics mapper class 
00098   EcalElectronicsMapper * myMap_;
00099   
00100   //Ecal unpacker
00101   DCCDataUnpacker * theUnpacker_;
00102   
00103   unsigned int nevts_; // NA: for testing
00104   double  RUNNING_TIME_, SETUP_TIME_;
00105 };
00106 
00107 #endif