CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/IORawData/SiPixelInputSources/interface/PixelSLinkDataInputSource.h

Go to the documentation of this file.
00001 #ifndef IORawDataSiPixelInputSources_PixelSLinkDataInputSource_h
00002 #define IORawDataSiPixelInputSources_PixelSLinkDataInputSource_h
00003 // -*- C++ -*-
00004 //
00005 // Package:    SiPixelInputSources
00006 // Class:      PixelSLinkDataInputSource
00007 // 
00015 //
00016 // Original Author:  Freya Blekman
00017 //         Created:  Fri Sep  7 15:46:34 CEST 2007
00018 // $Id: PixelSLinkDataInputSource.h,v 1.9 2008/02/25 21:12:09 fblekman Exp $
00019 //
00020 //
00021 
00022 #include "FWCore/Framework/interface/Frameworkfwd.h"
00023 #include "FWCore/Sources/interface/ExternalInputSource.h"
00024 #include "FWCore/Framework/interface/Event.h"
00025 #include "FWCore/Framework/interface/InputSourceMacros.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 #include <iostream>
00028 #include <iomanip>
00029 #include "Utilities/StorageFactory/interface/StorageFactory.h"
00030 #include "Utilities/StorageFactory/interface/StorageAccount.h"
00031 #include "Utilities/StorageFactory/interface/Storage.h"
00032 #include "FWCore/PluginManager/interface/PluginManager.h"
00033 #include "FWCore/PluginManager/interface/standard.h"
00034 
00035 class PixelSLinkDataInputSource : public edm::ExternalInputSource {
00036 
00037 public:
00038 
00039   explicit PixelSLinkDataInputSource(const edm::ParameterSet& pset, 
00040                                      const edm::InputSourceDescription& desc);
00041 
00042   virtual ~PixelSLinkDataInputSource();
00043 
00044   bool produce(edm::Event& event);
00045 
00046 
00047 private:
00048 
00049   int m_fedid;
00050   uint32_t m_fileindex;
00051   std::auto_ptr<Storage> storage;
00052   int m_runnumber;
00053   uint64_t m_data;
00054   uint32_t m_currenteventnumber;
00055   uint32_t m_currenttriggernumber;
00056   uint32_t m_globaleventnumber;
00057   int32_t m_eventnumber_shift;
00058   int getEventNumberFromFillWords(std::vector<uint64_t> data, uint32_t &totword);
00059   uint32_t synchronizeEvents();
00060 };
00061 #endif