Skip to content
Snippets Groups Projects
Commit b6bfc499 authored by Mark K Jones's avatar Mark K Jones Committed by GitHub
Browse files

Merge pull request #41 from MarkKJones/gui-2d

Update onlineGUI to output pdf file instead of ps file
parents e421cde1 deea93ac
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,7 @@ OnlineConfig::OnlineConfig(TString anatype) ...@@ -62,6 +62,7 @@ OnlineConfig::OnlineConfig(TString anatype)
// Loads up the configuration file, and stores it's contents for access. // Loads up the configuration file, and stores it's contents for access.
confFileName = anatype; confFileName = anatype;
configfilestart=anatype;
if(!confFileName.Contains(".cfg")) if(!confFileName.Contains(".cfg"))
confFileName += ".cfg"; confFileName += ".cfg";
fMonitor = kFALSE; fMonitor = kFALSE;
...@@ -1830,7 +1831,12 @@ void OnlineGUI::PrintPages() { ...@@ -1830,7 +1831,12 @@ void OnlineGUI::PrintPages() {
Bool_t useJPG = kFALSE; Bool_t useJPG = kFALSE;
if(!plotsdir.IsNull()) useJPG = kTRUE; if(!plotsdir.IsNull()) useJPG = kTRUE;
TString filename = "summaryplots"; // TString filename = "summaryplots";
TString ConfigStartAll=fConfig->GetConfigStart();
TObjArray *tx= ConfigStartAll.Tokenize("/");
TString temp=((TObjString *)(tx->At(tx->GetEntries()-1)))->String();
Ssiz_t pos=temp.Index(".cfg");
TString filename=temp(0,pos);
if(runNumber!=0) { if(runNumber!=0) {
filename += "_"; filename += "_";
filename += runNumber; filename += runNumber;
...@@ -1839,7 +1845,7 @@ void OnlineGUI::PrintPages() { ...@@ -1839,7 +1845,7 @@ void OnlineGUI::PrintPages() {
filename.Prepend(plotsdir+"/"); filename.Prepend(plotsdir+"/");
filename += "_pageXXXX.jpg"; filename += "_pageXXXX.jpg";
} }
else filename += ".ps"; else filename += ".pdf";
TString pagehead = "Summary Plots"; TString pagehead = "Summary Plots";
if(runNumber!=0) { if(runNumber!=0) {
...@@ -1855,6 +1861,7 @@ void OnlineGUI::PrintPages() { ...@@ -1855,6 +1861,7 @@ void OnlineGUI::PrintPages() {
gStyle->SetPadBorderMode(0); gStyle->SetPadBorderMode(0);
gStyle->SetHistLineColor(1); gStyle->SetHistLineColor(1);
gStyle->SetHistFillColor(1); gStyle->SetHistFillColor(1);
cout << filename << endl;
if(!useJPG) fCanvas->Print(filename+"["); if(!useJPG) fCanvas->Print(filename+"[");
TString origFilename = filename; TString origFilename = filename;
for(UInt_t i=0; i<fConfig->GetPageCount(); i++) { for(UInt_t i=0; i<fConfig->GetPageCount(); i++) {
......
...@@ -76,6 +76,7 @@ private: ...@@ -76,6 +76,7 @@ private:
TString rootfilename; // Just the name TString rootfilename; // Just the name
TString goldenrootfilename; // Golden rootfile for comparisons TString goldenrootfilename; // Golden rootfile for comparisons
TString protorootfile; // Prototype for getting the rootfilename TString protorootfile; // Prototype for getting the rootfilename
TString configfilestart; //
TString guicolor; // User's choice of background color TString guicolor; // User's choice of background color
TString plotsdir; // Where to store sample plots.. automatically stored as .jpg's). TString plotsdir; // Where to store sample plots.. automatically stored as .jpg's).
UInt_t canvaswidth; // Width of histogram canvas UInt_t canvaswidth; // Width of histogram canvas
...@@ -111,6 +112,7 @@ public: ...@@ -111,6 +112,7 @@ public:
Bool_t IsMonitor() { return fMonitor; }; Bool_t IsMonitor() { return fMonitor; };
UInt_t GetCanvasWidth() { return canvaswidth; }; UInt_t GetCanvasWidth() { return canvaswidth; };
UInt_t GetCanvasHeight() { return canvasheight; }; UInt_t GetCanvasHeight() { return canvasheight; };
TString GetConfigStart() {return configfilestart;}; //
}; };
class OnlineGUI { class OnlineGUI {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment