Commit a235ea21 authored by Jeremi Niedziela's avatar Jeremi Niedziela Committed by dberzano
Browse files

Removing part of static methods from AliEveEventManager

parent 73fc716e
......@@ -239,7 +239,7 @@ AliEveTrack* AliEveESDTracks::MakeTrack(AliESDtrack *at, TEveTrackList* cont)
TEveTrackList* AliEveESDTracks::TPCtracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
AliESDfriend* esd_friend = AliEveEventManager::AssertESDfriend();
TEveTrackList* cont = new TEveTrackList("TPC Tracks");
......@@ -271,7 +271,7 @@ TEveTrackList* AliEveESDTracks::TPCtracks()
TEveTrackList* AliEveESDTracks::ITStracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
AliESDfriend* esd_friend = AliEveEventManager::AssertESDfriend();
TEveTrackList* cont = new TEveTrackList("ITS Tracks");
......@@ -305,7 +305,7 @@ TEveTrackList* AliEveESDTracks::ITStracks()
TEveTrackList* AliEveESDTracks::ITSstandaloneTracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
AliESDfriend* esd_friend = AliEveEventManager::AssertESDfriend();
TEveTrackList* cont = new TEveTrackList("ITS Standalone Tracks");
......@@ -339,7 +339,7 @@ TEveTrackList* AliEveESDTracks::ITSstandaloneTracks()
TEveTrackList* AliEveESDTracks::Tracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
TEveTrackList* cont = new TEveTrackList("ESD Tracks");
cont->SetMainColor(6);
......@@ -367,7 +367,7 @@ TEveTrackList* AliEveESDTracks::Tracks()
TEveTrackList* AliEveESDTracks::MItracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
TEveTrackList* cont = new TEveTrackList("ESD Tracks MI");
cont->SetLineColor(5);
......@@ -401,7 +401,7 @@ TEveTrackList* AliEveESDTracks::TracksFromArray(TCollection* col, AliESDEvent* e
// Retrieves AliESDTrack's from collection.
// See example usage with AliAnalysisTrackCuts in the next function.
if (esd == 0) esd = AliEveEventManager::AssertESD();
if (esd == 0) esd = AliEveEventManager::GetMaster()->AssertESD();
TEveTrackList* cont = new TEveTrackList("ESD Tracks");
cont->SetMainColor(6);
......@@ -437,7 +437,7 @@ TEveTrackList* AliEveESDTracks::TracksFromArray(TCollection* col, AliESDEvent* e
void AliEveESDTracks::AliAnalCutsDemo()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
AliESDtrackCuts atc;
atc.SetPtRange(0.1, 5);
......@@ -493,7 +493,7 @@ TEveElementList* AliEveESDTracks::ByCategory()
// Import ESD tracks, separate them into several containers
// according to primary-vertex cut and ITS&TPC refit status.
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
TEveElementList* cont = new TEveElementList("ESD Tracks by category");
gEve->AddElement(cont);
......@@ -609,7 +609,7 @@ TEveElementList* AliEveESDTracks::ByCategory()
TEveElementList* AliEveESDTracks::ByAnalCuts()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
if (fAnalCuts == 0)
{
......
......@@ -109,17 +109,17 @@ public:
static Bool_t HasRawReader();
static AliRunLoader* AssertRunLoader();
static AliESDEvent* AssertESD();
AliESDEvent* AssertESD();
static AliESDfriend* AssertESDfriend();
static AliAODEvent* AssertAOD();
static AliRawReader* AssertRawReader();
static AliMagF* AssertMagField();
static TGeoManager* AssertGeometry();
TGeoManager* AssertGeometry();
static AliRecoParam* AssertRecoParams();
static void RegisterTransient (TEveElement* element);
static void RegisterTransientList(TEveElement* element);
void RegisterTransient(TEveElement* element);
static void RegisterTransientList(TEveElement* element);
Double_t GetAutoLoadTime() const { return fAutoLoadTime; }
Bool_t GetAutoLoad() const { return fAutoLoad; }
......
......@@ -89,6 +89,9 @@ AliEveOnline::AliEveOnline(bool storageManager)
cout<<"============ Setting macro executor ============\n"<<endl;;
AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "ESD AD" , "ad_esd.C", "ad_esd", "", kTRUE));
exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "PT HISTO" , "histo2d.C", "histo2d", "", kTRUE));
// exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "ESD EMCAL", "emcal_esdclustercellsV1.C", "emcal_esdclustercellsV1", "", kTRUE)); // this macro resets 3D view's camera!!
cout<<"macros added to exec"<<endl;
......
......@@ -17,7 +17,7 @@
#include <TEnv.h>
#include <TInterpreter.h>
#include <RVersion.h>
#include <TEveViewer.h>
#include <iostream>
......@@ -378,7 +378,25 @@ void AliEveOnlineEventManager::NextEvent()
}
#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
gCINTMutex->UnLock();
#endif
//
// TEveManager::TRedrawDisabler rd(gEve);
gEve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals.
// !!! MT this is somewhat brutal; at least optionally, one could be
// a bit gentler, checking for objs owning their external refs and having
// additinal parents.
// gEve->GetViewers()->DeleteAnnotations();
// fTransients->DestroyElements();
// for (TEveElement::List_i i = fTransientLists->BeginChildren();
// i != fTransientLists->EndChildren(); ++i)
// {
// (*i)->DestroyElements();
// }
// DestroyElements();
//
// ElementChanged();
//
gSystem->ProcessEvents();
}
......
......@@ -107,7 +107,7 @@ void AliEveSaveViews::Save()
if(AliEveEventManager::HasESD())
{
fESDEvent = AliEveEventManager::AssertESD();
fESDEvent = AliEveEventManager::GetMaster()->AssertESD();
}
else
{
......@@ -273,7 +273,7 @@ void AliEveSaveViews::SaveWithDialog()
if(AliEveEventManager::HasESD())
{
fESDEvent = AliEveEventManager::AssertESD();
fESDEvent = AliEveEventManager::GetMaster()->AssertESD();
}
else
{
......@@ -451,7 +451,7 @@ void AliEveSaveViews::BuildEventInfoString()
}
else if (AliEveEventManager::HasESD())
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
if(!esd)return;
fEventInfo.Form("Colliding: %s Run: %d Event: %d (%s)",
esd->GetESDRun()->GetBeamType(),
......@@ -473,7 +473,7 @@ void AliEveSaveViews::BuildTriggerClassesStrings()
ULong64_t mask = 1;
int sw=0;
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
ULong64_t triggerMask = esd->GetTriggerMask();
ULong64_t triggerMaskNext50 = esd->GetTriggerMaskNext50();
......
......@@ -154,7 +154,7 @@ void AliEveTrackCounter::RegisterTracklets(TEveTrackList* tlist, Bool_t goodTrac
// If goodTracks is true, they are considered as primary/good
// tracks.
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDEvent *esd = AliEveEventManager::GetMaster()->AssertESD();
AliMultiplicity *mul = const_cast<AliMultiplicity*>(esd->GetMultiplicity());
tlist->IncDenyDestroy();
......@@ -270,7 +270,7 @@ void AliEveTrackCounter::DoTrackletAction(AliEveTracklet* track)
case kCA_ToggleTrack:
{
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDEvent *esd = AliEveEventManager::GetMaster()->AssertESD();
AliMultiplicity *mul = const_cast<AliMultiplicity*>(esd->GetMultiplicity());
if (track->GetLineStyle() == 1)
......@@ -311,7 +311,7 @@ void AliEveTrackCounter::OutputEventTracks()
{
TFile *f = TFile::Open("scan_results.root", "UPDATE");
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDEvent *esd = AliEveEventManager::GetMaster()->AssertESD();
TClonesArray *trk = static_cast<TClonesArray*> (esd->GetList()->FindObject("Tracks"));
AliMultiplicity *mul = const_cast <AliMultiplicity*>(esd->GetMultiplicity());
......
......@@ -277,7 +277,7 @@ void AliEveTrackCounterEditor::DoActivate()
fScanSummaryFile = new ofstream(fname);
(*fScanSummaryFile) << "Scan summary" << std::endl;
(*fScanSummaryFile) << "Scan started at " << dat.GetDate() << " " << dat.GetTime() << std::endl;
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDEvent *esd = AliEveEventManager::GetMaster()->AssertESD();
(*fScanSummaryFile) << "Run number " << esd->GetRunNumber() << std::endl;
}
......@@ -311,7 +311,7 @@ void AliEveTrackCounterEditor::DoNext()
// Slot for Next.
if (fScanSummaryFile) {
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDEvent *esd = AliEveEventManager::GetMaster()->AssertESD();
(*fScanSummaryFile) << std::hex << std::right ;
fScanSummaryFile->width(5); (*fScanSummaryFile) << esd->GetPeriodNumber() << " " ;
fScanSummaryFile->width(6); (*fScanSummaryFile) << esd->GetOrbitNumber() << " ";
......
......@@ -64,7 +64,7 @@ void AliEveVSDCreator::CreateVSD(const Text_t* vsdFile)
static const TEveException kEH("AliEveVSDCreator::CreateVSD ");
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
fRunLoader = AliEveEventManager::AssertRunLoader();
......@@ -648,7 +648,7 @@ void AliEveVSDCreator::ConvertRecTracks()
if (fTreeR != 0)
throw kEH + "tracks already converted.";
AliESDEvent* esdEvent = AliEveEventManager::AssertESD();
AliESDEvent* esdEvent = AliEveEventManager::GetMaster()->AssertESD();
fDirectory->cd();
fTreeR = new TTree("RecTracks", "Reconstructed particle trajectories.");
......@@ -685,7 +685,7 @@ void AliEveVSDCreator::ConvertV0()
if (fTreeV0 != 0)
throw kEH + "AliEveV0 already converted.";
AliESDEvent* esdEvent = AliEveEventManager::AssertESD();
AliESDEvent* esdEvent = AliEveEventManager::GetMaster()->AssertESD();
fDirectory->cd();
fTreeV0 = new TTree("AliEveV0", "AliEveV0 points");
......@@ -753,7 +753,7 @@ void AliEveVSDCreator::ConvertKinks()
throw kEH + "Currently non-supported - TEveRecKink being updated.";
/*
AliESDEvent* esdEvent = AliEveEventManager::AssertESD();
AliESDEvent* esdEvent = AliEveEventManager::GetMaster()->AssertESD();
fDirectory->cd();
fTreeKK = new TTree("Kinks", "ESD Kinks");
......
......@@ -113,7 +113,7 @@ AliEveFMDLoader::AliEveFMDLoader(const char* name, Bool_t useBoxes,
// Initialize the FMD geometry manager
TGeoManager* geoMan = AliEveEventManager::AssertGeometry();
TGeoManager* geoMan = AliEveEventManager::GetMaster()->AssertGeometry();
if (!geoMan) return;
geoMan->GetTopVolume()->cd(0);
......@@ -691,7 +691,7 @@ AliEveFMDLoader::LoadESD()
ClearDigitSets(kESD);
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
if (!esd) {
AliError("No ESD");
return;
......
......@@ -106,7 +106,7 @@ void AliEveITSDigitsInfo::InitInternals()
static const TEveException kEH("AliEveITSDigitsInfo::InitInternals ");
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
SetITSSegmentation();
......
......@@ -72,7 +72,7 @@ AliEveMUONChamberData::AliEveMUONChamberData(Int_t chamber) :
}
if (fgTransformer == 0) {
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
fgTransformer = new AliMUONGeometryTransformer();
fgTransformer->LoadGeometryData();
}
......
......@@ -346,7 +346,7 @@ void AliEveMUONTrack::PrintESDTrackInfo()
setw(8) << setprecision(4) <<
mtp->P() << " GeV/c" << endl;
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
Double_t spdVertexX = 0;
Double_t spdVertexY = 0;
......@@ -442,7 +442,7 @@ void AliEveMUONTrack::MUONTriggerInfo()
}
if (fIsESDTrack) {
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
ULong64_t triggerMask = esd->GetTriggerMask();
cout << endl;
......
......@@ -58,7 +58,7 @@ AliEveTOFSector::AliEveTOFSector(const Text_t* n, const Text_t* t) :
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
//fGeoManager = AliEveEventManager::AssertGeometry();
//fGeoManager = AliEveEventManager::GetMaster()->AssertGeometry();
if (!fGeoManager) {
printf("ERROR: no TGeo\n");
}
......
......@@ -48,7 +48,7 @@ AliEveTOFStrip::AliEveTOFStrip(const Text_t* n, const Text_t* t) :
{
// ctr
//fGeoManager = AliEveEventManager::AssertGeometry();
//fGeoManager = AliEveEventManager::GetMaster()->AssertGeometry();
if (!fGeoManager) printf("ERROR: no TGeo\n");
}
......
......@@ -319,7 +319,7 @@ AliEveTRDTracklet::AliEveTRDTracklet(AliTRDseedV1 *trklt):TEveLine()
// Constructor.
SetName("tracklet");
if(!gGeoManager) AliEveEventManager::AssertGeometry();
if(!gGeoManager) AliEveEventManager::GetMaster()->AssertGeometry();
SetUserData(trklt);
// init tracklet line
Int_t sec = AliTRDgeometry::GetSector(trklt->GetDetector());
......
......@@ -56,7 +56,7 @@ AliEveTRDLoader::AliEveTRDLoader(const Text_t* n, const Text_t* t) : TEveElement
{
// Constructor.
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
fGeo = new AliTRDgeometry();
//fGeo->CreateClusterMatrixArray();
......
......@@ -450,7 +450,7 @@ void AliEveTRDChamber::SetGeometry(AliTRDgeometry *geo)
//
// eg_shape->StampColorSelection();
if(!(gGeoManager)){
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
if(!(gGeoManager)){
AliError("Geo manager not available.");
return;
......
......@@ -155,7 +155,7 @@ void MUON_displayData(Bool_t fromRaw = kFALSE, Bool_t showTracks = kTRUE, Bool_t
//______________________________________________________________________________
void MUON_ESD_tracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
// TEveTrackList* lt = new TEveTrackList("ESD-Tracks");
AliEveMUONTrackList* lt = new AliEveMUONTrackList("ESD-Tracks");
......
......@@ -167,7 +167,7 @@ void MUON_displaySimu(Bool_t fromRaw = kFALSE, Bool_t showTracks = kTRUE, Bool_t
//______________________________________________________________________________
void MUON_ESD_tracks()
{
AliESDEvent* esd = AliEveEventManager::AssertESD();
AliESDEvent* esd = AliEveEventManager::GetMaster()->AssertESD();
TEveTrackList* lt = new TEveTrackList("ESD-Tracks");
lt->SetMainColor(6);
......
......@@ -31,9 +31,9 @@ void acorde_esd()
// From Mario RC:
AliEveEventManager::AssertGeometry();
AliEveEventManager::GetMaster()->AssertGeometry();
//AliESDEvent* fESD = new AliESDEvent();
AliESDACORDE *acordeESD = AliEveEventManager::AssertESD()->GetACORDEData();
AliESDACORDE *acordeESD = AliEveEventManager::GetMaster()->AssertESD()->GetACORDEData();
if (acorde_module_path(0).IsNull())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment