Skip to content

Commit 870e1df

Browse files
committed
fix(find_vertex.C): include relevant header files
1 parent 24cade0 commit 870e1df

File tree

2 files changed

+64
-53
lines changed

2 files changed

+64
-53
lines changed

StRoot/macros/analysis/doEvents.C

Lines changed: 60 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,54 @@
6060
// for Grid Collector.
6161
//
6262
/////////////////////////////////////////////////////////////////////////////
63-
#include <iostream>
6463

65-
class StChain;
64+
#pragma cling load("StarRoot")
65+
#pragma cling load("St_base")
66+
#pragma cling load("StChain")
67+
#pragma cling load("StUtilities")
68+
#pragma cling load("StBFChain")
69+
70+
#pragma cling load("St_Tables")
71+
#pragma cling load("StTreeMaker")
72+
#pragma cling load("StIOMaker")
73+
#pragma cling load("StarClassLibrary")
74+
#pragma cling load("StTriggerDataMaker")
75+
#pragma cling load("StBichsel")
76+
#pragma cling load("StEvent")
77+
#pragma cling load("StTpcDb")
78+
#pragma cling load("StEventUtilities")
79+
#pragma cling load("StEmcUtil")
80+
#pragma cling load("StTofUtil")
81+
#pragma cling load("StPmdUtil")
82+
#pragma cling load("StPreEclMaker")
83+
#pragma cling load("StStrangeMuDstMaker")
84+
#pragma cling load("StMuDSTMaker")
85+
#pragma cling load("StarMagField")
86+
#pragma cling load("StMagF")
87+
#pragma cling load("StAnalysisMaker")
88+
#pragma cling load("StMuAnalysisMaker")
89+
90+
#pragma cling load("St_g2t")
91+
#pragma cling load("geometry")
92+
#pragma cling load("St_geant_Maker")
93+
#pragma cling load("StTableUtilities")
94+
95+
#pragma cling load("StDbLib.so")
96+
#pragma cling load("StDbBroker.so")
97+
#pragma cling load("libStDb_Tables.so")
98+
#pragma cling load("St_db_Maker.so")
99+
#pragma cling load("StTpcDb")
100+
#pragma cling load("StDetectorDbMaker")
101+
102+
#pragma cling load("libStMagF")
103+
#pragma cling load("StDetectorDbMaker")
104+
#pragma cling load("StTpcDb")
105+
#pragma cling load("StEventMaker")
106+
107+
#pragma cling load("StGridCollector")
108+
66109
StChain *chain=0;
67-
class St_db_Maker;
68110
St_db_Maker *dbMk =0;
69-
class StFileI;
70111
StFileI *setFiles =0;
71112
TString mainBranch;
72113

@@ -177,7 +218,7 @@ void doEvents(Int_t startEvent, Int_t nEventsQQ, const char **fileList, const ch
177218
mainBranch = line;
178219
// printf("fileList[0] %s %s\n",line,mainBranch.Data());
179220
mainBranch.ReplaceAll(".root","");
180-
int idot = strrchr((char*)mainBranch,'.') - mainBranch.Data();
221+
int idot = strrchr((char*)&mainBranch[0],'.') - mainBranch.Data();
181222
mainBranch.Replace(0,idot+1,"");
182223
mainBranch += "Branch";
183224
}
@@ -249,36 +290,11 @@ void doEvents(Int_t startEvent, Int_t nEventsQQ, const char **fileList, const ch
249290
IOMk->SetNotify("OpenFile" ,outMk);
250291
}
251292

252-
253-
// StEventDisplayMaker
254-
if (eventDisplay) {
255-
256-
StEventDisplayMaker *displayMk = new StEventDisplayMaker();
257-
displayMk->SetEventIdToRender(eventNumber2Display);
258-
if (eventNumber2Display)
259-
printf("\n\n\n Display the Event %d only\n", eventNumber2Display);
260-
// Set the default to display all StEvent tracks
261-
displayMk->AddName("StEvent(Primary Tracks)");
262-
// displayMk->AddName("StEvent(Kink Tracks)");
263-
// displayMk->AddName("StEvent(V0 Tracks)");
264-
// displayMk->AddName("StEvent(Xi Tracks)");
265-
// displayMk->AddName("StEvent(All Tracks)");
266-
// Set the default StEvent events filter
267-
displayMk->AddFilter(new StFilterDef("MainFilter"));
268-
displayMk->AddFilter(new StMuDstFilterHelper("MuL3Filter",kFALSE));
269-
displayMk->AddFilter(new StColorFilterHelper("Color schema",kFALSE));
270-
// Check whether any Custom filter is present
271-
if (!gSystem->Load("StCustomFilter")) {
272-
displayMk->AddFilter(new StCustomFilter("Custom filter",kFALSE));
273-
}
274-
275-
}
276-
277293
// Initialize chain
278294
cout << "----------------------------------------------------------" << endl;
279295
cout << " doEvents - Initializing and Printing chain information " << endl;
280296
Int_t iInit = chain->Init();
281-
if (iInit) chain->Fatal(iInit,"on init");
297+
if (iInit) chain->Fatal((char*)&iInit,"on init");
282298
chain->PrintInfo();
283299
cout << "----------------------------------------------------------" << endl << endl;
284300

@@ -306,6 +322,7 @@ void doEvents(Int_t startEvent, Int_t nEvents, const char *file, const char *qaf
306322
//____________________________________________________________________________
307323
void doEvents(Int_t nEvents, const char *file, const char *qaflag)
308324
{
325+
loadLibs("");
309326
if (!qaflag) qaflag="";
310327
cout << "Calling (1,nEvents,file,qaflag)" << endl;
311328
doEvents(1,nEvents,file,qaflag);
@@ -337,6 +354,7 @@ void doEvents(Int_t nEvents, const char **fileList, const char *qaflag)
337354
//____________________________________________________________________________
338355
void loadLibs(const char *opt)
339356
{
357+
cout << "Loading libs" << endl;
340358
// Dynamically link needed shared libs
341359

342360
if (!opt[0]) { //Default set
@@ -368,24 +386,25 @@ void loadLibs(const char *opt)
368386
gSystem->Load("StMagF");
369387
gSystem->Load("StAnalysisMaker");
370388
gSystem->Load("StMuAnalysisMaker");
371-
cout << " loading of shared libraries done" << endl;
372-
return;
373-
}
374-
if (strstr(opt,"dbon")) {// DB stuff
389+
390+
gSystem->Load("St_g2t");
391+
gSystem->Load("geometry");
392+
gSystem->Load("St_geant_Maker");
393+
gSystem->Load("StTableUtilities");
394+
375395
gSystem->Load("StDbLib.so");
376396
gSystem->Load("StDbBroker.so");
377397
gSystem->Load("libStDb_Tables.so");
378398
gSystem->Load("St_db_Maker.so");
379399
gSystem->Load("StTpcDb");
380400
gSystem->Load("StDetectorDbMaker");
401+
cout << " loading of shared libraries done" << endl;
402+
return;
403+
}
404+
if (strstr(opt,"dbon")) {// DB stuff
381405
}
382406

383407
if (strstr(opt,"disp")) {// EventDisplay stuff
384-
gSystem->Load("St_g2t"); // is a part od St_Tables
385-
gSystem->Load("geometry");
386-
gSystem->Load("St_geant_Maker");
387-
gSystem->Load("StTableUtilities");
388-
gSystem->Load("StEventDisplayMaker");
389408
}
390409
}
391410
//____________________________________________________________________________
@@ -397,7 +416,7 @@ int gcReadCommands(const char *file, TString& cmds)
397416
FILE *inp = 0;
398417
inp = fopen(file, "r");
399418
if (!inp) { // File not found
400-
printf("doEvents: ERROR. File Not Found // %s\n",req+1);
419+
printf("doEvents: ERROR. File Not Found // %s\n",file);
401420
return -1;
402421
}
403422

StRoot/macros/analysis/find_vertex.C

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@
1313
// new vertices are added after the old one.
1414
//
1515

16-
//class StEmcDetector;
17-
class StChain;
18-
//class StEmcRawData;
19-
//class EEfeeDataBlock;
20-
//class Collection;
21-
//class StSPtrVecTrackNodeIterator ;
22-
//class StTriggerIdCollection;
23-
class StMinuitVertexFinder;
24-
class StGenericVertexFinder;
25-
class StGenericVertexMaker;
26-
class StEvent;
27-
class StPrimaryVertex;
16+
#include "StChain/StChain.h"
17+
#include "StGenericVertexMaker/StGenericVertexMaker.h"
18+
#include "StEvent/StEvent.h"
19+
#include "StEvent/StPrimaryVertex.h"
2820

2921
StChain *chain=0;
3022
TH1F *dca_z_h=0;

0 commit comments

Comments
 (0)