StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SvtDataViewer.C
1 //======================================================================
2 //
3 // Macro to generate the SVT Data Viewer
4 //
5 // author: Marcelo Munhoz
6 //
7 //======================================================================
8 //
9 {
10  // Input initial Default file (can be edit)
11  const char *MainFile="/dev/null";
12 
13  // Load libraries
14  gSystem->Load("St_base");
15  gSystem->Load("StUtilities");
16  gSystem->Load("St_Tables");
17  gSystem->Load("StChain");
18  gSystem->Load("StBFChain");
19  gSystem->Load("StIOMaker");
20  gSystem->Load("St_geom_Maker");
21  gSystem->Load("StarClassLibrary");
22  //gSystem->Load("StTrackFilter");
23  gSystem->Load("StDbLib");
24  gSystem->Load("StDbUtilities");
25  gSystem->Load("StTpcDb");
26  gSystem->Load("StEvent");
27  gSystem->Load("StEventMaker");
28  //gSystem->Load("StEventDisplayMaker");
29  gSystem->Load("StDaqLib");
30  gSystem->Load("StDAQMaker");
31  gSystem->Load("StSvtClassLibrary");
32  gSystem->Load("StSvtDaqMaker");
33  gSystem->Load("StSvtCalibMaker");
34  gSystem->Load("StSvtQAMaker");
35  gSystem->Load("StSvtSeqAdjMaker");
36  gSystem->Load("StSvtClusterMaker");
37 
38  gStyle->SetPalette(1);
39 
40  // Define chain to run BFC
41  StChain *chain=0;
42  if (chain) delete chain;
43  chain = new StChain("main"); // Create the main chain object
44 
45  // Define SVT chain
46  chain->cd();
47  StChain *chainSvt;
48  chainSvt = new StChain("svt");
49  chainSvt->SetDebug();
50  chainSvt->cd();
51 
52  //Instantiate Makers for SVT chain
53  StDAQMaker *DAQMk = new StDAQMaker("DAQInput",MainFile);
54  StSvtDaqMaker *SvtDaqMk = new StSvtDaqMaker("SvtDaq","FULL","ZS");
55  StSvtPedMaker *SvtPedMk = new StSvtPedMaker("SvtPed");
56  StSvtBadAnodesMaker *SvtBadAnMk = new StSvtBadAnodesMaker("SvtBadAn");
57  StSvtQAMaker *SvtQAMk = new StSvtQAMaker("SvtQA");
58  StSvtSeqAdjMaker *SvtSeqAdjMk = new StSvtSeqAdjMaker("SvtSeqAdj");
59  SvtSeqAdjMk->SetMinAdcLevels(3,2,5,0,10);
60  SvtSeqAdjMk->SetLowInvProd(0);
61 
62  StSvtClusterMaker *SvtCluMk = new StSvtClusterMaker("SvtClu");
63  StSvtClusterAnalysisMaker *SvtCluAnaMk = new StSvtClusterAnalysisMaker("SvtCluAna");
64 
65  //Setup graphical viewer
66  StSvtGuiMonitor* main = new StSvtGuiMonitor("FULL", chainSvt, chain, gClient->GetRoot(),1,1);
67  StSvtView* aGraphicMonitor = main->GetSvtView();
68  StSvtMonitor* aMonitor = main->GetSvtMonitor();
69  StSvtMenuBar* menuBar = main->GetSvtMenuBar();
70  SvtQAMk->SetMonitor(aMonitor);
71 
72  aGraphicMonitor->DrawLadder(1,1);
73  aGraphicMonitor->UpdateBarrelButtons(1,1);
74  aGraphicMonitor->UpdateLadderButtons(1,1,1,1);
75  aGraphicMonitor->SetInfoFile(MainFile);
76 
77  // Initialize Makers
78  DAQMk->Init();
79  SvtDaqMk->Init();
80  //SvtDaqMk->SetSvtData();
81  SvtPedMk->Init();
82  SvtBadAnMk->Init();
83  //SvtQAMk->SetSvtData();
84  SvtQAMk->Init();
85  SvtSeqAdjMk->Init();
86  SvtCluMk->Init();
87  SvtCluAnaMk->Init();
88 }
89 
90 
91