CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/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/ExternalInputSource.h"
00012 
00013 class TFile;
00014 class TTree;
00015 class CDFChunk;
00016 class CDFEventInfo;
00017 
00018 
00027 class HcalTBSource : public edm::ExternalInputSource {
00028 public:
00029 explicit HcalTBSource(const edm::ParameterSet & pset, edm::InputSourceDescription const& desc);
00030 virtual ~HcalTBSource();
00031 protected:
00032     virtual void setRunAndEventInfo();
00033     virtual bool produce(edm::Event & e);
00034 private:
00035   void unpackSetup(const std::vector<std::string>& params);
00036   void openFile(const std::string& filename);
00037   TTree* m_tree;
00038   TFile* m_file;
00039   int m_i, m_fileCounter;
00040   bool m_quiet, m_onlyRemapped;
00041   int n_chunks;
00042   static const int CHUNK_COUNT=64; // MAX Chunks
00043   CDFChunk* m_chunks[CHUNK_COUNT];
00044   int m_chunkIds[CHUNK_COUNT];
00045   std::map<std::string,int> m_sourceIdRemap;
00046   CDFEventInfo* m_eventInfo;
00047   int m_eventNumberOffset;
00048 };
00049 
00050 
00051 
00052 #endif // HcalTBSource_h_included