Exemple #1
0
void fileopen()
{
   TBrowser *b = new TBrowser;
   // or, to only browse the file:
   // new TBrowser(_file0);

   // Quit ROOT when the browser gets closed:
   b->GetBrowserImp()->GetMainFrame()->Connect("CloseWindow()", 0, 0, "onBrowserClose()");
}
void
DisplayApplicationBallotMaster()
	{
	TProfile * pProfile = NavigationTree_PGetSelectedTreeItemMatchingInterfaceTProfile();
	if (pProfile == NULL)
		return;
	/*
	TApplicationBallotmaster * pApplication = pProfile->PGetApplicationBallotmaster_NZ();
	pApplication->TreeItemW_SelectWithinNavigationTree();
	*/

	CStr strPathApplication = "file:///" + pProfile->m_pConfigurationParent->SGetPathOfFileName("Apps/Ballotmaster/default.htm");
	TBrowser * pBrowser = new TBrowser(pProfile);
	pProfile->m_arraypaBrowsers.Add(PA_CHILD pBrowser);
	pBrowser->SetIconNameAndUrl(eMenuAction_DisplayBallotMaster, "Ballots", strPathApplication);
	pBrowser->TreeItemBrowser_DisplayWithinNavigationTree();
	pBrowser->TreeItemW_SelectWithinNavigationTree();
	}
void
TProfile::TreeItemProfile_DisplayApplicationsWithinNavigationTree()
	{
	if (!m_arraypaAccountsXmpp.FIsEmpty())
		new TMyRecommendations(this);	// Dislay the recommendations if there is at least one account
	//	new TTreeItemDemo(this, "My Reputation", eMenuIconReputation, "Display my reputation according to other organizations", "Search Reputation Feedback Comments");

	IApplication ** ppApplicationStop;
	IApplication ** ppApplication = m_arraypaApplications.PrgpGetApplicationsStop(OUT &ppApplicationStop);
	while (ppApplication != ppApplicationStop)
		{
		IApplication * pApplication = *ppApplication++;
		pApplication->TreeItemApplication_DisplayWithinNavigationTree();
		}

	TBrowser ** ppBrowserStop;
	TBrowser ** ppBrowser = m_arraypaBrowsers.PrgpGetBrowsersStop(OUT &ppBrowserStop);
	while (ppBrowser != ppBrowserStop)
		{
		TBrowser * pBrowser = *ppBrowser++;
		Assert(pBrowser->EGetRuntimeClass() == RTI(TBrowser));
		pBrowser->TreeItemBrowser_DisplayWithinNavigationTree();
		}

	TBrowserTabs ** ppBrowserTabsStop;
	TBrowserTabs ** ppBrowserTabs = m_arraypaBrowsersTabbed.PrgpGetBrowsersStop(&ppBrowserTabsStop);
	while(ppBrowserTabs != ppBrowserTabsStop)
		{
		TBrowserTabs * pBrowserTabs = *ppBrowserTabs++;
		Assert(pBrowserTabs->EGetRuntimeClass() == RTI(TBrowserTabs));
		pBrowserTabs->TreeItemBrowser_DisplayWithinNavigationTree();
		}


	TreeItemW_ExpandAccordingToSavedState();
	}
Exemple #4
0
//__________________________________________________________________________
Bool_t AnaESD(TString fileName) 
{
  // Analyze ESD from file fileName
  // calo track histograms ;
  
  TFile * out = new TFile("AOD.root", "RECREATE") ; 
  TH1D * hCaloEnergyA = 0 ; 
  TH1D * hCaloEnergyE = 0 ; 
  TH1D * hCaloEnergyG = 0 ; 
  TH1D * hCaloEnergyP = 0 ; 
  TH1D * heta = 0 ;
  TH1D * hphi = 0 ; 
  Double_t dist[3] ; 

  AliPHOSGetter * gime = AliPHOSGetter::Instance(fileName) ; 
  
  Int_t nEvent = gime->MaxEvent() ;  
  Int_t event ; 
  AliESD * esd = 0 ;
  for (event = 0 ; event < nEvent; event++) {
    cout << "AnaESD : Processing event # " << event << endl ; 
    esd = gime->ESD(event) ; 
    if (!esd) 
      return kFALSE ; 
    
    //esd->Print();  
    // Calorimeter tracks 
    AliESDtrack * ct ; 
    Int_t caloindex ; 
    for (caloindex = 0 ; caloindex < esd->GetNumberOfTracks() ; caloindex++) {
      // get the tracks and check if it is from PHOS 
      ct = esd->GetTrack(caloindex) ;
      if ( !ct->IsPHOS() ) 
	continue ; 
      Double_t energy = ct->GetPHOSsignal() ; 
      // check if CPV bit is set (see AliPHOSFastRecParticle) 
      Double_t type[AliESDtrack::kSPECIES+4] ;
      ct->GetPHOSpid(type) ; 
      
      if ( (type[AliESDtrack::kElectron] == 1.0) || (type[AliESDtrack::kPhoton] == 1.0) ) {
	if(!hCaloEnergyA) {
	  out->cd() ; 
	  hCaloEnergyA = new TH1D("CaloEnergyA", "Energy in calorimeter Electron/Photon like", 500, 0., 50.) ;
	}
	hCaloEnergyA->Fill(energy) ;  
      }
      
      if ( type[AliESDtrack::kElectron] == 1.0 ) {
	if(!hCaloEnergyE) {
	  out->cd() ; 
	  hCaloEnergyE = new TH1D("CaloEnergyE", "Energy in calorimeter Electron like", 500, 0., 50.) ;
	}
	hCaloEnergyE->Fill(energy) ;  
      } 
  
      if ( type[AliESDtrack::kPhoton] == 1.0 ) {
	if(!hCaloEnergyG) {
	  out->cd() ; 
	  hCaloEnergyG = new TH1D("CaloEnergyG", "Energy in calorimeter Gamma like", 500, 0., 50.) ;
	}
	hCaloEnergyG->Fill(energy) ;
      }  
     
      if ( type[AliESDtrack::kPi0] == 1.0 ) {
	if(!hCaloEnergyP) {
	  out->cd() ; 
	  hCaloEnergyP = new TH1D("CaloEnergyP", "Energy in calorimeter Pi0 like", 500, 0., 100.) ;
	}
	hCaloEnergyP->Fill(energy) ;
      }  
      
      AliESDtrack * cp ; 
      Int_t cpindex ; 
      for (cpindex = 0 ; cpindex < esd->GetNumberOfTracks() ; cpindex++) {
	// get the charged tracks from central tracking
	cp = esd->GetTrack(cpindex) ;
	if ( cp->IsPHOS() ) 
	  continue ; 
	Match(ct, cp, dist) ; 
	if (!heta && !hphi) {
	  heta = new TH1D("Correta", "neutral-charged correlation in eta" , 100, 0., 360.) ; 
	  hphi = new TH1D("Corrphi", "neutral-charged correlation in phi" , 100, 0., 360.) ; 
	}
	heta->Fill(dist[1]) ; 
	hphi->Fill(dist[2]) ;
      }
    }
  }
  TBrowser * bs = new TBrowser("Root Memory Bowser", gROOT->FindObjectAny("AOD.root") ) ;
  bs->Show() ;
  out->Write() ; 
  return kTRUE ; 
}
Exemple #5
0
int main(int argc,char **argv) {

    uLib::MuonScatter u_mu;
    ROOT::Mutom::MuonScatter mu;
    ROOT::Mutom::Vector3f v3f(0,1,0);

    TFile *file = new TFile("test_file.root","RECREATE");
    TTree *tree = getTree(file,"testing/dump","testing_tree");
    TTree *tree2 = getTree(file,"new_dump","testing_tree");

    tree->Branch("mu",&mu);
    tree->AddFriend(tree2);


    mu.in.origin = ROOT::Mutom::Vector3f(1,2,3);
    mu.in.direction = ROOT::Mutom::Vector3f(4,5,6);
    mu.p_in = 555;
    mu.p_out = 2368;

    tree->Fill();

    u_mu.LineIn().origin << 3,3,3;
    u_mu.LineIn().direction << 5,5,5;
    u_mu.LineOut().origin << 1,2,3;
    u_mu.LineOut().direction << 4,5,6;
    u_mu.SetMomentum(555);
    u_mu.SetMomentumPrime(2368);

    mu << u_mu;

    tree->Fill();

    tree2->Branch("vec",&v3f);
    tree2->Branch("p_in",&mu.p_in);
    tree2->Branch("p_out",&mu.p_out);
    mu.p_in = 1;
    mu.p_out = 2;
    tree2->Fill();

    file->cd("/testing/dump");
    tree->Write();
    file->cd("/new_dump");
    tree2->Write();

    TText text(0,0,"this file contain a muon scatter event");
    file->cd("/");
    text.Write("content");



    gApplication = new TApplication("Application", &argc, argv);
    TBrowser *tbr = new TBrowser("test");
    tbr->Show();


    gApplication->Run();



    return 0;
}