File indexing completed on 2025-08-06 08:18:48
0001
0002 #ifndef QA_TPC_TPCCHANQA_H
0003 #define QA_TPC_TPCCHANQA_H
0004
0005
0006 #include <fun4all/SubsysReco.h>
0007
0008 #include <string>
0009 #include <vector>
0010
0011
0012 class PHCompositeNode;
0013 class TH1;
0014 class TH2;
0015
0016
0017 class TpcChanQA : public SubsysReco
0018 {
0019
0020 public:
0021
0022 explicit TpcChanQA(const std::string &name = "TpcChanQA.root");
0023
0024 ~TpcChanQA() override = default;
0025
0026
0027
0028 int InitRun(PHCompositeNode *topNode) override;
0029
0030
0031 int process_event(PHCompositeNode *topNode) override;
0032
0033
0034 int End(PHCompositeNode *topNode) override;
0035
0036 void set_filename(const std::string &fname) { m_fname = fname; }
0037
0038 void AddPacket(int packet)
0039 {
0040 m_packets.push_back(packet);
0041 }
0042
0043
0044 private:
0045 TH1 *h_channel_hits{nullptr};
0046 TH2 *h_channel_ADCs{nullptr};
0047
0048 int side{0};
0049 int m_packet{0};
0050 int m_nWaveformInFrame{0};
0051 int m_Channel{0};
0052 int m_nSamples{0};
0053
0054 void createHistos();
0055 std::string getHistoPrefix() const;
0056
0057 std::string m_fname;
0058 std::string sectorNum;
0059
0060 std::vector<int> m_packets;
0061 std::vector<unsigned short> m_adcSamples;
0062 };
0063
0064 #endif