1 void MakePicoEvent(
const char* inFilePath=
"links/P02gc.central.FullField.2001.mdst/",
const char* inFileName=
"st_physics_2323002_raw_0127.himicro.root")
6 gSystem->Load(
"StHiMicroEvent");
10 strcat(pathAndFile,inFilePath);
11 strcat(pathAndFile,inFileName);
12 cout <<
"PathAndFile = " << pathAndFile << endl;
14 TFile *oldfile =
new TFile(pathAndFile);
16 TString outFileName(inFileName);
17 TString replace =
".himicro.root";
18 outFileName.ReplaceAll(replace.Data(),
".hipico.root");
19 cout <<
"OutfileName = " << outFileName.Data() << endl;
22 TTree *oldtree = (TTree*)oldfile->Get(
"StHiMicroTree");
24 oldtree->SetBranchAddress(
"StHiMicroEvent",&mHiMicroEvent);
28 oldtree->SetBranchStatus(
"mHits",0);
29 oldtree->SetBranchStatus(
"mNHit",0);
32 TFile *newfile =
new TFile(outFileName.Data(),
"recreate");
33 TTree *newtree = oldtree->CloneTree();