File indexing completed on 2024-04-06 12:30:49
0001 #ifndef AsciiNeutronReader_h
0002 #define AsciiNeutronReader_h
0003
0004 #include <iostream>
0005 #include <string>
0006 #include <vector>
0007 #include <fstream>
0008 #include "SimMuon/Neutron/src/NeutronReader.h"
0009
0010
0011
0012
0013
0014
0015
0016
0017 class AsciiNeutronReader : public NeutronReader {
0018 public:
0019 AsciiNeutronReader(std::string fileNameBase);
0020
0021 void readNextEvent(int chamberType, edm::PSimHitContainer& result) override;
0022
0023 private:
0024 int read_nhits(std::ifstream& fin, int chamberType);
0025 void resetStreampos(std::ifstream& fin, int chamberType);
0026
0027 std::string theFileNameBase;
0028 std::vector<std::streampos> theStreamPos;
0029 };
0030
0031 #endif