35 class StPadDisplayMaker;
38 StPadDisplayMaker *padMonitor;
42 gSystem->Load(
"St_base");
43 gSystem->Load(
"StChain");
44 gSystem->Load(
"StarClassLibrary");
45 gSystem->Load(
"St_geom_Maker");
46 gSystem->Load(
"StIOMaker");
47 gSystem->Load(
"StPadDisplayMaker");
48 gSystem->Load(
"StEventDisplayMaker");
49 gROOT->LoadMacro(
"PadControlPanel.C");
55 StPadDisplayMaker *fMaker;
59 static TControlBar *PadBrowserPanel(TControlBar *bar=0)
62 bar =
new TControlBar(
"vertical",
"Pad Browser Control Panel");
65 bar->AddButton(
"Add Axice",
"St_PolyLine3D::Axis();",
"Add 3D axice to the cuurent TPad view");
66 bar->AddButton(
"Next Event",
"StPadBrowserPanel::Make();",
"Make one step");
67 bar->AddButton(
"Draw Next Histogram",
"StPadBrowserPanel::MakeHists(+1);",
"Make one step");
68 bar->AddButton(
"Draw Prev Histogram",
"StPadBrowserPanel::MakeHists(-1);",
"Make one step");
69 bar->AddButton(
"Finish",
"StPadBrowserPanel::Finish();",
"Finish job");
78 if (chain->
Make()>=
kStEOF) printf(
"End of file\n");
82 static void MakeHists(Int_t direction=1,Int_t hId=0){
84 static TCanvas *histCanvas = 0;
85 static Int_t histCounter = 0;
86 if (!histCanvas) histCanvas =
new TCanvas(
"Pads");
88 histCounter += direction;
89 if (histCounter > 24) histCounter = 1;
90 if (histCounter < 1) histCounter = 24;
91 padMonitor->GetHists(hId+histCounter)->Draw(
"cont");
101 void PadBrowser(
const Int_t Nevents=1,Char_t *infile=0)
103 Int_t NoEvents = Nevents;
104 Char_t *iNfile = infile;
108 iNfile =
"/scr20/fine/datapool/st_physics_0003455_raw_0001.daq";
112 if (gClassTable->GetID(
"StPadDisplayMaker") < 0) Load();
115 chain =
new StChain(
"PadBrowser");
116 inpMk =
new StIOMaker(
"inputStream",
"r",iNfile);
117 chain->SetInput(
"StDAQReader",
".make/inputStream/.make/inputStream_DAQ/.const/StDAQReader");
118 geomMaker =
new St_geom_Maker();
119 padMonitor =
new StPadDisplayMaker(
"PadMonitor");
125 int iInit = chain->Init();
126 if (iInit) chain->Fatal(iInit,
"on init");
128 for (Int_t i =1; i <= NoEvents; i++){
132 printf (
"=========================================== Done with Event no. %d\n",i);
134 gSystem->Exec(
"date");
virtual void Clear(Option_t *option="")
User defined functions.