MpdMCTracksEditor.cxx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // MpdMCTracksEditor
  2. //
  3. // Specialization of TGedEditor for proper update propagation to TEveManager.
  4. #include "MpdMCTracksEditor.h"
  5. #include "FairRootManager.h"
  6. #include "FairRunAna.h"
  7. #include "TFile.h"
  8. #include "TGLabel.h"
  9. #include "TGLayout.h"
  10. #include "TString.h"
  11. MpdMCTracksEditor::MpdMCTracksEditor(const TGWindow * p, Int_t width, Int_t height,
  12. UInt_t options, Pixel_t back)
  13. : TGedFrame(p, width, height, options | kVerticalFrame, back),
  14. fObject(NULL),
  15. fManager(MpdEventManager::Instance())
  16. {
  17. //Resize(width, height);
  18. MakeTitle("MpdEventManager Editor");
  19. TGVerticalFrame* fInfoFrame = CreateEditorTabSubFrame("Info");
  20. TGCompositeFrame* title1 = new TGCompositeFrame(fInfoFrame, 180, 10,
  21. kVerticalFrame |
  22. kLHintsExpandX |
  23. kFixedWidth |
  24. kOwnBackground);
  25. TString Infile= "Input File : ";
  26. TFile* file = FairRootManager::Instance()->GetInChain()->GetFile();
  27. Infile += file->GetName();
  28. TGLabel* TFName = new TGLabel(title1, Infile.Data());
  29. title1->AddFrame(TFName);
  30. UInt_t RunId = FairRunAna::Instance()->getRunId();
  31. TString run = "Run Id : ";
  32. run += RunId;
  33. TGLabel* TRunId = new TGLabel(title1, run.Data());
  34. title1->AddFrame(TRunId);
  35. fInfoFrame->AddFrame(title1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
  36. }
  37. ClassImp(MpdMCTracksEditor)