00001 #ifndef SimMuon_Neutron_RootNeutronWriter_h 00002 #define SimMuon_Neutron_RootNeutronWriter_h 00003 00004 #include "SimMuon/Neutron/src/NeutronWriter.h" 00005 #include "SimMuon/Neutron/src/RootChamberWriter.h" 00006 #include <TFile.h> 00007 #include <vector> 00014 class RootNeutronWriter : public NeutronWriter 00015 { 00016 public: 00017 RootNeutronWriter(const std::string & fileName); 00018 virtual ~RootNeutronWriter(); 00019 00022 virtual void initialize(int detType); 00023 00024 RootChamberWriter & chamberWriter(int chamberType); 00025 00026 virtual void writeCluster(int chamberType, const edm::PSimHitContainer & hits); 00027 00028 private: 00029 std::map<int, RootChamberWriter> theChamberWriters; 00030 TFile * theFile; 00031 }; 00032 00033 #endif 00034