#include "trackplotter.h"
#include "TROOT.h"
#include "TApplication.h"
#include "TGTableLayout.h"
#include "TGFrame.h"
#include "TList.h"
#include "TGWindow.h"
#include "TRootEmbeddedCanvas.h"
#include "TEllipse.h"
#include "TBox.h"
#include "TArrow.h"
#include "TPolyLine.h"
#include "TGButton.h"
#include "TCanvas.h"
#include "TRandom.h"
#include "TGDoubleSlider.h"
#include "TGaxis.h"
#include "TColor.h"
#include "Riostream.h"
#include "TEnv.h"
#include "PlotValNtuple.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 569 of file trackplotter.cxx.
572 if (gROOT->IsBatch()) {
573 fprintf(
stderr,
"%s: cannot run in batch mode\n",
argv[0]);
580 TEnv* trackPlotterSetup =
new TEnv(
"trackplotter.conf");
583 const char*
filename = trackPlotterSetup->GetValue(
"TrackingNtupleFileName",
"TrkValidation.root");
586 const char* trackNtupleDir = trackPlotterSetup->GetValue(
"TrackingNtupleDirectory",
"Validation");
588 const char* trackNtupleTree = trackPlotterSetup->GetValue(
"TrackingNtupleTree",
"Tracks");
591 bool doDAFdata =
false;
592 doDAFdata = trackPlotterSetup->GetValue(
"PlotDAFdata",0);
595 bool doRIOdata =
true;
596 doRIOdata = trackPlotterSetup->GetValue(
"PlotPrepRawData", 1);
600 const char* rioNtupleDir = trackPlotterSetup->GetValue(
"PrepRawDataNtupleDirectory",
"Validation");
602 const char* rioNtupleTree = trackPlotterSetup->GetValue(
"PrepRawDataNtupleTree",
"TRT_RIOs");
612 trackPlotterSetup->Print();
614 TColor *color_301 =
new TColor(301,0.7,0.0,0.0,
"");
615 TColor *color_302 =
new TColor(302,0.0,0.7,0.0,
"");
616 TColor *color_303 =
new TColor(303,0.0,0.0,0.7,
"");
617 TColor *color_306 =
new TColor(306,0.7,0.0,0.7,
"");
618 TColor *color_310 =
new TColor(310,0.8,0.8,0.8,
"");
619 TColor *color_311 =
new TColor(311,0.55,0.0,0.0,
"");
627 std::cout<<
"usage: "<<
argv[0] <<
" <filename>"<< std::endl;
634 std::cout<<
"Using file "<<
filename << (doRIOdata ?
" including PrepRawData" :
"") << (doDAFdata ?
" with DAF information" :
"") << std::endl;
639 std::cout <<
"ERROR: could not find " <<
filename << std::endl;
643 char rootFileName[100];
644 sprintf(rootFileName,
"%s:/%s",
filename, trackNtupleDir);
650 std::cout <<
"ERROR: could not get the tree: " <<
filename <<
":/" << trackNtupleDir <<
"/" << trackNtupleTree << std::endl;
660 sprintf(rootFileName,
"%s:/%s",
filename, rioNtupleDir);
668 RIOtree = (TTree*)
gDirectory->Get(rioNtupleTree);
670 std::cout <<
"ERROR: could not get the tree: " <<
filename <<
":/" << rioNtupleDir <<
"/" << rioNtupleTree << std::endl;
680 Viewer viewer(gClient->GetRoot(), &theNtuplePlotter);
684 delete color_301;
delete color_302;
685 delete color_303;
delete color_306;
686 delete color_310;
delete color_311;