File indexing completed on 2025-08-05 08:15:34
0001 #ifndef ONCAL_ONCAL_H
0002 #define ONCAL_ONCAL_H
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <iostream>
0006 #include <string>
0007 #include <utility> // for pair
0008 #include <vector>
0009
0010 class OnCal : public SubsysReco
0011 {
0012 public:
0013 ~OnCal() override = default;
0014
0015
0016 int process_event(PHCompositeNode *topNode) override;
0017 int End(PHCompositeNode *topNode) override = 0;
0018
0019
0020 virtual void CommitToPdbCal(const int value) = 0;
0021 virtual int VerificationOK() const = 0;
0022 virtual int CommitedToPdbCalOK() const = 0;
0023
0024
0025
0026 virtual void CommitNoVerify(const int) { return; }
0027
0028
0029 virtual void identify(std::ostream &out = std::cout) const { out << Name() << std::endl; }
0030 virtual int BeginRun(const int) { return 0; }
0031 int EndRun(const int) override { return 0; }
0032 int Reset(PHCompositeNode * ) override { return 0; }
0033 int ResetEvent(PHCompositeNode * ) override { return 0; }
0034 virtual void DumpCalib() const { return; }
0035
0036 unsigned int AllDone() const { return alldone; }
0037 void AllDone(const int i) { alldone = i; }
0038 void AddComment(const std::string &adcom);
0039 const std::string &Comment() const { return m_Comment; }
0040 int GetPdbCalTables(std::vector<std::string> &vec) const
0041 {
0042 vec = pdbcaltables;
0043 return 0;
0044 }
0045 virtual int CopyTables(const int FromRun, const int ToRun, const int commit) const;
0046 virtual int CreateCalibration(const int , const std::string & , std::string & , const int ) { return -1; }
0047 virtual std::vector<std::string> GetLocalFileList() const { return localfilelist; }
0048
0049 protected:
0050 OnCal(const std::string &Name);
0051 unsigned int alldone{0};
0052 std::string m_Comment;
0053 std::vector<std::string> pdbcaltables;
0054 std::vector<std::string> pdbcalclasses;
0055 std::vector<std::pair<int, int> > bankids;
0056 std::vector<std::string> localfilelist;
0057 };
0058
0059 #endif