tcanvas

I need to sum up thousands of histograms from one directory

╄→尐↘猪︶ㄣ 提交于 2019-12-24 19:10:55
问题 I have a directory Processed_Data with thousands of hists*****_blinded.root files. Each hists*****_blinded.root contains around 15 graphs and histograms in it. My goal is just to overlap 1 specific histogram sc***** from each file to get the final histogram finalhists_blinded.root which will represent all of those overlapped together. I have tried the following macro: void final() { TCanvas *time = new TCanvas("c1","overlap" ,600,1000); time ->Divide(1,1); time ->cd(1); TH1F *h1 = new TH1F(

Setting the Line End Styles for Canvas.LineTo

大憨熊 提交于 2019-12-19 08:01:14
问题 Is there any way to set the style for the lineends for the TCanvas.LineTo method? It seems to default to rounded ends, which looks very bad for several lines in a row of different colours when Pen.Width is set to a large value (e.g. 9). It looks like this (rounded ends): ********........****** **********........****** **********........****** ********........****** (where * is e.g. blue and . is yellow) It is even worse if the two outer lines are drawn after the middle line: ********........*

Setting the Line End Styles for Canvas.LineTo

不问归期 提交于 2019-12-19 07:59:24
问题 Is there any way to set the style for the lineends for the TCanvas.LineTo method? It seems to default to rounded ends, which looks very bad for several lines in a row of different colours when Pen.Width is set to a large value (e.g. 9). It looks like this (rounded ends): ********........****** **********........****** **********........****** ********........****** (where * is e.g. blue and . is yellow) It is even worse if the two outer lines are drawn after the middle line: ********........*

Painting a TCanvas to the screen in a compiled ROOT (CERN) application

我的梦境 提交于 2019-12-01 06:26:18
What are the rules for painting to the screen? My end goal is to put the TCanvas into a class and paint from there, but for now I think that maybe looking at a less complicated example might help. Below is some code that compiles and paints to the screen, on my computer. # include <TApplication.h> # include <TCanvas.h> # include <TH1D.h> # include <thread> # include <chrono> //TCanvas canvas ("fCanvas", "fCanvas", 600, 400); int main ( int argc, char* argv[] ) { TApplication app ("app",&argc,argv); TCanvas canvas ("fCanvas", "fCanvas", 600, 400); //TCanvas* canvas = new TCanvas("fCanvas",

Painting a TCanvas to the screen in a compiled ROOT (CERN) application

浪子不回头ぞ 提交于 2019-12-01 04:12:20
问题 What are the rules for painting to the screen? My end goal is to put the TCanvas into a class and paint from there, but for now I think that maybe looking at a less complicated example might help. Below is some code that compiles and paints to the screen, on my computer. # include <TApplication.h> # include <TCanvas.h> # include <TH1D.h> # include <thread> # include <chrono> //TCanvas canvas ("fCanvas", "fCanvas", 600, 400); int main ( int argc, char* argv[] ) { TApplication app ("app",&argc