From 4f8b40266d8e0a16741b2fc189c8498b34ff38a3 Mon Sep 17 00:00:00 2001 From: quark Date: Fri, 27 Jan 2012 08:13:59 +0000 Subject: [PATCH] Make macros compilable with ACLiC --- EVE/alice-macros/acorde_esd.C | 15 +++- EVE/alice-macros/acorde_hits.C | 12 ++- EVE/alice-macros/acorde_raw.C | 15 ++++ EVE/alice-macros/alieve_set_cuts.C | 105 ++++++++++++++++++------- EVE/alice-macros/ana_list.C | 5 ++ EVE/alice-macros/ana_list_load_kinks.C | 29 ++++--- EVE/alice-macros/its_clusters.C | 24 +++--- EVE/alice-macros/its_common_foos.C | 10 +++ EVE/alice-macros/its_digits.C | 16 +++- EVE/alice-macros/its_raw.C | 13 ++- 10 files changed, 187 insertions(+), 57 deletions(-) diff --git a/EVE/alice-macros/acorde_esd.C b/EVE/alice-macros/acorde_esd.C index 226356cf6cc..0d5d58fa1fa 100644 --- a/EVE/alice-macros/acorde_esd.C +++ b/EVE/alice-macros/acorde_esd.C @@ -4,6 +4,19 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#endif TString acorde_module_path(Int_t module); @@ -19,7 +32,7 @@ void acorde_esd() // From Mario RC: AliEveEventManager::AssertGeometry(); - AliESDEvent* fESD = new AliESDEvent(); + //AliESDEvent* fESD = new AliESDEvent(); AliESDACORDE *acordeESD = AliEveEventManager::AssertESD()->GetACORDEData(); diff --git a/EVE/alice-macros/acorde_hits.C b/EVE/alice-macros/acorde_hits.C index f437fbfa7c3..9dffd52b2b5 100644 --- a/EVE/alice-macros/acorde_hits.C +++ b/EVE/alice-macros/acorde_hits.C @@ -6,6 +6,16 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#include +#include + +#include +#include +#endif TEvePointSet* acorde_hits(const char *varexp = "ACORDE.fX:ACORDE.fY:ACORDE.fZ", @@ -24,7 +34,7 @@ acorde_hits(const char *varexp = "ACORDE.fX:ACORDE.fY:ACORDE.fZ", if(points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) { - Warning("acorde_hits", Form("No hits match '%s'", selection)); + Warning("acorde_hits", "No hits match '%s'", selection); delete points; return 0; } diff --git a/EVE/alice-macros/acorde_raw.C b/EVE/alice-macros/acorde_raw.C index 374d6eb2df0..1bc5eb7f2c6 100644 --- a/EVE/alice-macros/acorde_raw.C +++ b/EVE/alice-macros/acorde_raw.C @@ -6,6 +6,21 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#endif TString acorde_module_path(Int_t module); diff --git a/EVE/alice-macros/alieve_set_cuts.C b/EVE/alice-macros/alieve_set_cuts.C index 14b78840039..39a878b39aa 100644 --- a/EVE/alice-macros/alieve_set_cuts.C +++ b/EVE/alice-macros/alieve_set_cuts.C @@ -6,6 +6,38 @@ // Author: Pawel Debski 2010 +#if !defined(__CINT__) || defined(__MAKECINT__) +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#endif + #include #include #include @@ -17,7 +49,7 @@ #include #include #include -#include "TGDoubleSlider.h" +#include #include class SetCutsWindow : public TGMainFrame { @@ -63,6 +95,7 @@ protected: TGLOverlayButton *gOverlayButtonRPhi; TGLOverlayButton *gOverlayButtonRhoZ; Bool_t gDrawHistograms[12]; + TGHorizontal3DLine *separator; public: SetCutsWindow(); @@ -83,6 +116,7 @@ public: void SaveAllViews(); void Save3DView(); void SaveRPhiView(); + void SaveRhoZView(); void DrawPtHisto(); void DrawEtaHisto(); void DrawPhiHisto(); @@ -102,6 +136,9 @@ public: void SetStandardCuts(); void AddMomentumVectors(); void SetCuts(); + void SetValues(); + void SaveMacro(); + void LoadMacro(); void CloseTab(); void Macro1(); void Macro2(); @@ -142,10 +179,7 @@ SetCutsWindow::SetCutsWindow() : TGMainFrame(gClient->GetRoot(), 10, 10, kHorizo TGLabel *label = 0; TGHorizontalFrame *hframe = 0; TGHorizontalFrame *hframeMerge = 0; - TGHorizontalFrame *hframe1 = 0; - TGHorizontalFrame *hframe2 = 0; - TGVerticalFrame *vframe = 0; - + gOverlayButton3D = 0; gOverlayButtonRPhi = 0; gOverlayButtonRhoZ = 0; @@ -153,8 +187,6 @@ SetCutsWindow::SetCutsWindow() : TGMainFrame(gClient->GetRoot(), 10, 10, kHorizo for(Int_t i = 0; i < 12; i++) gDrawHistograms[i] = kFALSE; - TEveBrowser *browser = gEve->GetBrowser(); - TGShutter *mainShutter = new TGShutter(this, kSunkenFrame); TGShutterItem *item1 = new TGShutterItem(mainShutter, new TGHotString("Draw Objects"), 1); @@ -1282,7 +1314,7 @@ void SetCutsWindow::MultSliderCallBack() void SetCutsWindow::ClsNECallBack() { -M + Double_t entry; entry = gClsRangeNE->GetNumber(); @@ -2170,41 +2202,48 @@ void SetCutsWindow::DrawHistos() TCanvas* pad1 = 0; TCanvas* pad2 = 0; + + TH1D* histPt = 0; + TH1D* histEta = 0; + TH1D* histPhi = 0; + TH2D* histPhiPt= 0; + TH2D* histPtY = 0; + TH2D* histEtaPhi=0; if(gDrawHistograms[0]) { nHistos1++; - TH1D* histPt = new TH1D("Pt\nSingle Event", "AliEve Pt histogram", 100, 0.0, 5.0); + histPt = new TH1D("Pt\nSingle Event", "AliEve Pt histogram", 100, 0.0, 5.0); } if(gDrawHistograms[1]) { nHistos1++; - TH1D* histEta = new TH1D("#eta\nSingle Event", "AliEve #eta histogram", 100, -1.5, 1.5); + histEta = new TH1D("#eta\nSingle Event", "AliEve #eta histogram", 100, -1.5, 1.5); } if(gDrawHistograms[2]) { nHistos1++; - TH1D* histPhi = new TH1D("#phi\nSingle Event", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi()); + histPhi = new TH1D("#phi\nSingle Event", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi()); } if(gDrawHistograms[3]) { nHistos2++; - TH2D* histPhiPt = new TH2D("#phi-Pt\nSingle Event", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0); + histPhiPt = new TH2D("#phi-Pt\nSingle Event", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0); } if(gDrawHistograms[4]) { nHistos2++; - TH2D* histPtY = new TH2D("Pt-Y\nSingle Event", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5); + histPtY = new TH2D("Pt-Y\nSingle Event", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5); } if(gDrawHistograms[5]) { nHistos2++; - TH2D* histEtaPhi = new TH2D("#eta-#phi\nSingle Event", "AliEve #eta-#phi histogram", 100, -1.5, 1.5, 100, 0.0, 2*TMath::Pi()); + histEtaPhi = new TH2D("#eta-#phi\nSingle Event", "AliEve #eta-#phi histogram", 100, -1.5, 1.5, 100, 0.0, 2*TMath::Pi()); } AliESDEvent* esd = AliEveEventManager::AssertESD(); @@ -2354,6 +2393,14 @@ void SetCutsWindow::DrawHistosAll() TCanvas* pad1 = 0; TCanvas* pad2 = 0; + + TH1D* histPt = 0; + TH1D* histEta = 0; + TH1D* histPhi = 0; + TH2D* histPhiPt= 0; + TH2D* histPtY = 0; + TH2D* histEtaPhi=0; + // TCanvas* pad3 = 0; // TH1D* histMult = new TH1D("Multiplicity\n", "AliEve Multiplicity histogram", 1000, 0.0, 1000.0); @@ -2362,37 +2409,37 @@ void SetCutsWindow::DrawHistosAll() if(gDrawHistograms[6]) { nHistos1++; - TH1D* histPt = new TH1D("Pt\n", "AliEve Pt histogram", 1000, 0.0, 1000.0); + histPt = new TH1D("Pt\n", "AliEve Pt histogram", 1000, 0.0, 1000.0); } if(gDrawHistograms[7]) { nHistos1++; - TH1D* histEta = new TH1D("#eta\nAll Events", "AliEve #eta histogram", 100, -1.5, 1.5); + histEta = new TH1D("#eta\nAll Events", "AliEve #eta histogram", 100, -1.5, 1.5); } if(gDrawHistograms[8]) { nHistos1++; - TH1D* histPhi = new TH1D("#phi\nAll Events", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi()); + histPhi = new TH1D("#phi\nAll Events", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi()); } if(gDrawHistograms[9]) { nHistos2++; - TH2D* histPhiPt = new TH2D("#phi-Pt\nAll Events", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0); + histPhiPt = new TH2D("#phi-Pt\nAll Events", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0); } if(gDrawHistograms[10]) { nHistos2++; - TH2D* histPtY = new TH2D("Pt-Y\nAll Events", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5); + histPtY = new TH2D("Pt-Y\nAll Events", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5); } if(gDrawHistograms[11]) { nHistos2++; - TH2D* histEtaPhi = new TH2D("#eta-#phi\nAll Events", "AliEve #eta-#phi histogram", 100, 1.5, 1.5, 100, 0.0, 2*TMath::Pi()); + histEtaPhi = new TH2D("#eta-#phi\nAll Events", "AliEve #eta-#phi histogram", 100, 1.5, 1.5, 100, 0.0, 2*TMath::Pi()); } Int_t nEvents = AliEveEventManager::GetMaster()->GetMaxEventId(); @@ -2583,8 +2630,9 @@ Int_t SetCutsWindow::GetTrackColorByMomentum(Double_t momentum, Int_t size) Double_t step = 1.0/size; + Int_t i=0; - for(Int_t i = 0; i < size; i++) + for(i = 0; i < size; i++) { switch(gTrackColorScale->GetSelected()) @@ -2613,7 +2661,7 @@ Int_t SetCutsWindow::GetTrackColorByMomentum(Double_t momentum, Int_t size) } - return i-1; + return (i-1); } @@ -2698,8 +2746,8 @@ kSpring+7, kSpring+8, kYellow, kOrange, kOrange-3, kOrange+7, kOrange+4, kRed, k if(gEve->GetEventScene()->FirstChild()->FindChild("Momentum Vectors")) gEve->GetEventScene()->FirstChild()->FindChild("Momentum Vectors")->Destroy(); - TString str1 = 0; - TString str2 = 0; + TString str1; + TString str2; TEveElement::List_i i = gEve->GetEventScene()->FirstChild()->BeginChildren(); TEveElement::List_i j = gEve->GetEventScene()->FirstChild()->EndChildren(); @@ -3269,9 +3317,10 @@ kSpring+7, kSpring+8, kYellow, kOrange, kOrange-3, kOrange+7, kOrange+4, kRed, k void SetCutsWindow::SetCuts() { - - TString str1 = 0; - TString str2 = 0; + TEvePointSet *pointset=0; + + TString str1; + TString str2; Int_t posTrackColor= gPosColorList->GetSelected(); Int_t negTrackColor= gNegColorList->GetSelected(); @@ -3280,7 +3329,7 @@ void SetCutsWindow::SetCuts() TEveElement::List_i j = gEve->GetEventScene()->FirstChild()->EndChildren(); TEveElement::List_i k; - Double_t x1, y1, z1, x2, y2, z2; + Double_t x1, y1, z1; for(k = i; k != j; k++) { diff --git a/EVE/alice-macros/ana_list.C b/EVE/alice-macros/ana_list.C index 919db811681..4f22920df72 100755 --- a/EVE/alice-macros/ana_list.C +++ b/EVE/alice-macros/ana_list.C @@ -25,7 +25,12 @@ // - When you have finished adding the desired objects, click the button "stop" // Use the list analyser "as usual" (see class documentation) +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#endif void ana_list(TEveElement *cont = 0) { diff --git a/EVE/alice-macros/ana_list_load_kinks.C b/EVE/alice-macros/ana_list_load_kinks.C index fd69762dcab..c370142bb99 100755 --- a/EVE/alice-macros/ana_list_load_kinks.C +++ b/EVE/alice-macros/ana_list_load_kinks.C @@ -5,21 +5,24 @@ // For more information please see "ana_list.C" or have a look at the class documentation. -#ifndef __CINT__ +#if !defined(__CINT__) || defined(__MAKECINT__) #include #include -#include -#include "TRD/AliTRDarrayADC.h" -#include - -#include "AliESDEvent.h" -#include "AliESDfriend.h" -#include "TRD/AliTRDReconstructor.h" -#include "TRD/AliTRDtrackV1.h" -#include "EVE/EveBase/AliEveKink.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif -void esd_kink_init_rectrackMother(TEveRecTrack& rt, AliExternalTrackParam* tp) +void esd_kink_init_rectrackMother(TEveRecTrack& rt, const AliExternalTrackParam* tp) { Double_t pbuf[3], vbuf[3]; @@ -30,7 +33,7 @@ void esd_kink_init_rectrackMother(TEveRecTrack& rt, AliExternalTrackParam* tp) rt.fBeta = 1; // ep/TMath::Sqrt(ep*ep + mc*mc); } -void esd_kink_init_rectrackDaughter(TEveRecTrack& rt, AliExternalTrackParam* tp, TEveVector* svt,TEveVector* spt) +void esd_kink_init_rectrackDaughter(TEveRecTrack& rt, const AliExternalTrackParam* tp, TEveVector* svt,TEveVector* spt) { rt.fSign = tp->GetSign(); rt.fV.Set(*svt); @@ -53,7 +56,7 @@ AliEveKink* esd_make_kink(TEveTrackPropagator* rnrStyleMoth,TEveTrackPropagator* const TVector3 r1(kink->GetPosition()); rcKink.fVKink.Set(r1); - for (Int_t j=0; j<3; ++j) rckink.fKinkAngle[j]=kink->GetAngle(j); + for (Int_t j=0; j<3; ++j) rcKink.fKinkAngle[j]=kink->GetAngle(j); Double_t r[3], r2[3]; diff --git a/EVE/alice-macros/its_clusters.C b/EVE/alice-macros/its_clusters.C index 2b5f968912a..2016364b139 100644 --- a/EVE/alice-macros/its_clusters.C +++ b/EVE/alice-macros/its_clusters.C @@ -6,24 +6,24 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ -#ifdef __CINT__ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else class TEveElement; class TEvePointSet; +#endif -#else - -#include -#include -#include -#include -#include -#include -#include -#include -#endif TEvePointSet* its_clusters(TEveElement* cont=0, Float_t maxR=50) { diff --git a/EVE/alice-macros/its_common_foos.C b/EVE/alice-macros/its_common_foos.C index 36e03b93d55..0e0c399ea5d 100644 --- a/EVE/alice-macros/its_common_foos.C +++ b/EVE/alice-macros/its_common_foos.C @@ -6,6 +6,16 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include + +#include +#include +#include +#endif + void its_common_foos() {} diff --git a/EVE/alice-macros/its_digits.C b/EVE/alice-macros/its_digits.C index 74a38e1cc6a..dc31073686f 100644 --- a/EVE/alice-macros/its_digits.C +++ b/EVE/alice-macros/its_digits.C @@ -7,7 +7,21 @@ * full copyright notice. * **************************************************************************/ -#include // bypass a cint problem in root-5.20 +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include + +#include +#include +#include + + +void its_display_raw_digits(AliEveITSDigitsInfo* di, Int_t mode, + Bool_t check_empty = kTRUE, + Bool_t scaled_modules = kFALSE); + +#endif // Load ITS digits. // Argument mode is a bitwise or determining which layers to import: diff --git a/EVE/alice-macros/its_raw.C b/EVE/alice-macros/its_raw.C index 75dc1cca06e..f68d6591d23 100644 --- a/EVE/alice-macros/its_raw.C +++ b/EVE/alice-macros/its_raw.C @@ -6,8 +6,19 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include -#include // bypass a cint problem in root-5.20 +#include +#include +#include + +void its_display_raw_digits(AliEveITSDigitsInfo* di, Int_t mode, + Bool_t check_empty = kTRUE, + Bool_t scaled_modules = kFALSE); + +#endif // Load ITS raw-data. // Argument mode is a bitwise or determining which layers to import: -- 2.39.3