File indexing completed on 2024-04-06 12:30:49
0001 #ifndef SimMuon_Neutron_RootNeutronWriter_h
0002 #define SimMuon_Neutron_RootNeutronWriter_h
0003
0004 #include "SimMuon/Neutron/src/NeutronWriter.h"
0005 #include "SimMuon/Neutron/src/RootChamberWriter.h"
0006 #include <TFile.h>
0007 #include <vector>
0008
0009
0010
0011
0012
0013 class RootNeutronWriter : public NeutronWriter {
0014 public:
0015 RootNeutronWriter(const std::string& fileName);
0016 ~RootNeutronWriter() override;
0017
0018
0019
0020 void initialize(int detType) override;
0021
0022 RootChamberWriter& chamberWriter(int chamberType);
0023
0024 void writeCluster(int chamberType, const edm::PSimHitContainer& hits) override;
0025
0026 private:
0027 std::map<int, RootChamberWriter> theChamberWriters;
0028 TFile* theFile;
0029 };
0030
0031 #endif