Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcCombinedRawDataUnpacker.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcCombinedRawDataUnpacker.h
1 // Tell emacs that this is a C++ source
2 // // -*- C++ -*-.
3 #ifndef TPC_COMBINEDRAWDATAUNPACKER_H
4 #define TPC_COMBINEDRAWDATAUNPACKER_H
5 
6 #include <trackbase/TrkrDefs.h>
7 #include <trackbase/TrkrHitSet.h>
8 
9 #include <fun4all/SubsysReco.h>
10 
13 
14 #include <TFile.h>
15 #include <memory>
16 #include <string>
17 
18 class PHCompositeNode;
19 class CDBTTree;
20 class CDBInterface;
21 class TNtuple;
22 // class TpcRawHit;
23 // class TpcRawHitContainer;
24 
26 {
27  public:
28  TpcCombinedRawDataUnpacker(std::string const &name = "TpcCombinedRawDataUnpacker", std::string const &outF = "TpcCombinedRawDataUnpackerOutput.root");
29 
30  int Init(PHCompositeNode *topNode) override;
31  int InitRun(PHCompositeNode *) override;
32  int process_event(PHCompositeNode *) override;
33  int End(PHCompositeNode *topNode) override;
34  void writeTree() { m_writeTree = true; }
35 
36  protected:
38 
39  CDBTTree *m_cdbttree = nullptr;
40  CDBInterface *m_cdb = nullptr;
41 
42  int _ievent = 0;
43 
44  private:
46 
47  TNtuple *m_ntup = nullptr;
48  TFile *m_file = nullptr;
49  bool m_writeTree = false;
50 
51  int mc_sectors[12] = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6};
52  int FEE_map[26] = {4, 5, 0, 2, 1, 11, 9, 10, 8, 7, 6, 0, 1, 3, 7, 6, 5, 4, 3, 2, 0, 2, 1, 3, 5, 4};
53  int FEE_R[26] = {2, 2, 1, 1, 1, 3, 3, 3, 3, 3, 3, 2, 2, 1, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3};
54 };
55 
56 #endif // TPC_COMBINEDRAWDATAUNPACKER_H