CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/IORawData/HcalTBInputService/interface/HcalTBSource.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 #ifndef HcalTBSource_h_included
00003 #define HcalTBSource_h_included 1
00004 
00005 #include <map>
00006 #include <string>
00007 #include <vector>
00008 
00009 #include "FWCore/Framework/interface/Event.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 #include "FWCore/Sources/interface/ProducerSourceFromFiles.h"
00012 
00013 class TFile;
00014 class TTree;
00015 class CDFChunk;
00016 class CDFEventInfo;
00017 
00018 
00027 class HcalTBSource : public edm::ProducerSourceFromFiles {
00028 public:
00029 explicit HcalTBSource(const edm::ParameterSet & pset, edm::InputSourceDescription const& desc);
00030 virtual ~HcalTBSource();
00031 private:
00032   virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
00033   virtual void produce(edm::Event & e);
00034   void unpackSetup(const std::vector<std::string>& params);
00035   void openFile(const std::string& filename);
00036   TTree* m_tree;
00037   TFile* m_file;
00038   int m_i, m_fileCounter;
00039   bool m_quiet, m_onlyRemapped;
00040   int n_chunks;
00041   static const int CHUNK_COUNT=64; // MAX Chunks
00042   CDFChunk* m_chunks[CHUNK_COUNT];
00043   int m_chunkIds[CHUNK_COUNT];
00044   std::map<std::string,int> m_sourceIdRemap;
00045   CDFEventInfo* m_eventInfo;
00046   int m_eventNumberOffset;
00047 };
00048 
00049 
00050 
00051 #endif // HcalTBSource_h_included