StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RecoQA.C
1 //
3 // RecoQA.C
4 // Macro for providing a basic set of histograms for
5 // the purpose of QA on reconstruction
6 //
7 // Author: G. Van Buren, BNL
8 // Jul. 16, 2008
9 //
10 // Input: Any STAR reconstruction hist.root file
11 // containing QA histograms. Also tries to determine
12 // histogram file name if something close is given.
13 //
14 // Output: CINT files to reconstruct canvases of QA files
15 // Example output: st_physics_8120054_raw_1010030.hist_1.CC
16 // st_physics_8120054_raw_1010030.hist_2.CC
17 // which can be viewed by executing:
18 // root st_physics_8120054_raw_1010030.hist_1.CC
19 //
20 
21 void RecoQA(const char* inFile) {
22  gROOT->LoadMacro("bfcread_hist_prefixes_add_to_ps.C");
23 
24  TString baseName = inFile;
25  if (baseName.EndsWith(".daq"))
26  baseName.ReplaceAll(".daq",".hist.root");
27  else if (baseName.EndsWith(".event.root"))
28  baseName.ReplaceAll(".event.root",".hist.root");
29  else if (baseName.EndsWith(".MuDst.root"))
30  baseName.ReplaceAll(".MuDst.root",".hist.root");
31 
32  TString histFile = baseName;
33 
34  baseName.Remove(0,baseName.Last('/')+1);
35 
36  TString outputName = baseName;
37  outputName.ReplaceAll(".root",".CC");
38 
39  TString histList = "StRoot/St_QA_Maker/QAhlist_Reco.h";
40  if (! gSystem->Which(".",histList.Data()))
41  histList.Prepend(gSystem->ExpandPathName("$STAR/"));
42 
43  bfcread_hist_prefixes_add_to_ps(histFile.Data(),"EventQA",
44  "bfcTree",outputName.Data(),baseName.Data(),histList.Data());
45 }
46 
47 
49 // $Id: RecoQA.C,v 1.1 2008/07/16 22:40:05 genevb Exp $
50 // $Log: RecoQA.C,v $
51 // Revision 1.1 2008/07/16 22:40:05 genevb
52 // Introduce RecoQA.C macro
53 //
54