Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-10-15 08:26:12

0001 #ifndef TPCCONDITIONSRECO__H
0002 #define TPCCONDITIONSRECO__H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <cstdint>
0007 #include <map>
0008 #include <string>
0009 #include <vector>
0010 
0011 class PHCompositeNode;
0012 
0013 class CDBTTree;
0014 class TpcConditions;
0015 
0016 class TpcConditionsReco : public SubsysReco
0017 {
0018  public:
0019   TpcConditionsReco(const std::string &name = "TpcConditionsReco");
0020   ~TpcConditionsReco() override;
0021 
0022   int InitRun(PHCompositeNode *topNode) override;
0023   int process_event(PHCompositeNode *topNode) override;
0024 
0025  private:
0026   CDBTTree *m_tree{nullptr};
0027   TpcConditions *m_conditions{nullptr};
0028   float get_MedianCurrent(int channel, const std::vector<std::string> &channels);
0029   void fillConditions(int channel);
0030   float get_AverageMedianCurrent(const std::vector<std::string> &channels);
0031   float get_InterpolatedMedianCurrent(uint64_t bco, const std::vector<std::string> &channels);
0032 
0033   std::map<uint64_t, int> m_bco_to_channel;
0034 };
0035 
0036 #endif