Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-01 22:40:45

0001 #ifndef IORawDataSiPixelInputSources_PixelSLinkDataInputSource_h
0002 #define IORawDataSiPixelInputSources_PixelSLinkDataInputSource_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelInputSources
0006 // Class:      PixelSLinkDataInputSource
0007 //
0008 /**\class PixelSLinkDataInputSource PixelSLinkDataInputSource.h
0009  IORawData/SiPixelInputSources/interface/PixelSLinkDataInputSource.h
0010 
0011  Description: <one line class summary>
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Freya Blekman
0018 //         Created:  Fri Sep  7 15:46:34 CEST 2007
0019 //
0020 //
0021 
0022 #include <iomanip>
0023 #include <iostream>
0024 #include <vector>
0025 
0026 #include "FWCore/Framework/interface/Event.h"
0027 #include "FWCore/Framework/interface/Frameworkfwd.h"
0028 #include "FWCore/Framework/interface/InputSourceMacros.h"
0029 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0030 #include "FWCore/PluginManager/interface/PluginManager.h"
0031 #include "FWCore/PluginManager/interface/standard.h"
0032 #include "FWCore/Sources/interface/ProducerSourceFromFiles.h"
0033 #include "Utilities/StorageFactory/interface/Storage.h"
0034 #include "Utilities/StorageFactory/interface/StorageAccount.h"
0035 #include "Utilities/StorageFactory/interface/StorageFactory.h"
0036 
0037 class FEDRawDataCollection;
0038 
0039 class PixelSLinkDataInputSource : public edm::ProducerSourceFromFiles {
0040 public:
0041   explicit PixelSLinkDataInputSource(const edm::ParameterSet &pset, const edm::InputSourceDescription &desc);
0042 
0043   ~PixelSLinkDataInputSource() override;
0044 
0045 private:
0046   bool setRunAndEventInfo(edm::EventID &id, edm::TimeValue_t &time, edm::EventAuxiliary::ExperimentType &) override;
0047   void produce(edm::Event &event) override;
0048   uint32_t synchronizeEvents();
0049 
0050   int m_fedid;
0051   uint32_t m_fileindex;
0052   std::unique_ptr<edm::storage::Storage> storage;
0053   int m_runnumber;
0054   uint64_t m_data;
0055   uint32_t m_currenteventnumber;
0056   uint32_t m_currenttriggernumber;
0057   uint32_t m_globaleventnumber;
0058   int32_t m_eventnumber_shift;
0059   int getEventNumberFromFillWords(const std::vector<uint64_t> &data, uint32_t &totword);
0060   std::unique_ptr<FEDRawDataCollection> buffers;
0061 };
0062 #endif