# Share my app -- ROOTSCOPE

**URL:** <https://root-forum.cern.ch/t/share-my-app-rootscope/24638>\
**Category:** Evolution Proposals, Apps & Ideas\
**Created:** [May 4, 2017, 12:39am UTC](https://root-forum.cern.ch/t/share-my-app-rootscope/24638 "2017-05-04T00:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xination](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/b782af/32.png) [@xination](https://root-forum.cern.ch/u/xination)\
**Post date:** [May 4, 2017, 12:39am UTC](https://root-forum.cern.ch/t/share-my-app-rootscope/24638/1 "2017-05-04T00:39:39Z")

</div>

Dear all,

I would like to share my GUI application, which I call ROOTSCOPE. Its name is inspired from gnuscope which is the software program I often used to do gamma-ray spectroscopy analysis. It is quite easy to use and I hope ROOTSCOPE can help your analysis. ROOTSCOPE comes from my learning project of root gui, and so I am also relatively new to root GUI part. Please forgive me if the code is not sophisticated enough.

Thank you very much~

The files can download here:  
[https://github.com/xination/ROOTSCOPE/blob/master/ROOTSCOPE.tar.gz](https://github.com/xination/ROOTSCOPE/blob/master/ROOTSCOPE.tar.gz)

manual:  
[https://github.com/xination/ROOTSCOPE/blob/master/ROOTSCOPE\_manual.pdf](https://github.com/xination/ROOTSCOPE/blob/master/ROOTSCOPE_manual.pdf)

short video demos:  
[youtu.be/JPai6AgUc4E](http://youtu.be/JPai6AgUc4E) (part1)  
[youtu.be/zYsBjWOEZeU](http://youtu.be/zYsBjWOEZeU) (part2)  
[youtu.be/LkU2O9L3Dlg](http://youtu.be/LkU2O9L3Dlg) (part3)  
… sorry the system only allow me to post 2 links…

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 4, 2017, 9:32am UTC](https://root-forum.cern.ch/t/share-my-app-rootscope/24638/2 "2017-05-04T09:32:00Z")

</div>

I think it might be a good idea to incorporate ROOTSCOPE into the standard [TBrowser](https://root.cern.ch/doc/master/classTBrowser.html).

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 4, 2017, 11:53am UTC](https://root-forum.cern.ch/t/share-my-app-rootscope/24638/3 "2017-05-04T11:53:40Z")

</div>

FYI, with ROOT ^there is a few errors:

```auto
$ root myROOTSCOPE.C
   ----------------------------------------------------------------
  | Welcome to ROOT 6.09/03 http://root.cern.ch |
  | (c) 1995-2017, The ROOT Team |
  | Built for macosx64 |
  | From heads/master@v6-09-02-685-ge351921, May 04 2017, 10:28:53 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ----------------------------------------------------------------

root [0] 
Processing myROOTSCOPE.C...
In file included from input_line_10:1:
In file included from /Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:6:
/Users/couet/Downloads/ROOTSCOPE/myDialog.h:1949:40: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
            *fHisto_list = Form( "%d", fHistos->size()-1 ) ;
                                  ~~^~~~~~~~~~~~~~~~~
                                  %lu
/Users/couet/Downloads/ROOTSCOPE/myDialog.h:1950:66: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
            *fMessage = Form( "\nCreate a new spectrum at %d\n", fHistos->size() );
                                                          ~~^~~~~~~~~~~~~~~
                                                          %lu
/Users/couet/Downloads/ROOTSCOPE/myDialog.h:2147:44: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                *fHisto_list = Form( "%d", fHistos->size()-1 ) ;
                                      ~~^~~~~~~~~~~~~~~~~
                                      %lu
/Users/couet/Downloads/ROOTSCOPE/myDialog.h:2148:70: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
                *fMessage = Form( "\nCreate a new spectrum at %d\n", fHistos->size() );
                                                              ~~^~~~~~~~~~~~~~~
                                                              %lu
In file included from input_line_10:1:
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2278:9: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        delete histo_xmax;
        ^
              []
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2262:29: note: allocated with 'new[]' here
        float* histo_xmax = new float [fPadTotalN];
                            ^
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2279:9: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        delete histo_xmin;
        ^
              []
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2263:29: note: allocated with 'new[]' here
        float* histo_xmin = new float [fPadTotalN];
                            ^
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2893:57: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
                addGate1, addGate2, subGate1, subGate2, histos.size() ) ;
                                                        ^ ~~~~~~~~~~~~
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2959:29: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
                xMin, xMax, histos.size() );
                            ^ ~~~~~~~~~~~~
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:2994:29: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
                yMin, yMax, histos.size() ) ;
                            ^ ~~~~~~~~~~~~
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:3052:25: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
            xMin, xMax, histos.size() );
                        ^ ~~~~~~~~~~~~
/Users/couet/Downloads/ROOTSCOPE/myROOTSCOPE.C:3064:25: warning: format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
            yMin, yMax, histos.size() );
                        ^ ~~~~~~~~~~~~
~Test~

```

---

<div class="post-metadata">

**Author:** ![xination](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/b782af/32.png) [@xination](https://root-forum.cern.ch/u/xination)\
**Post date:** [May 4, 2017, 4:59pm UTC](https://root-forum.cern.ch/t/share-my-app-rootscope/24638/4 "2017-05-04T16:59:46Z")

</div>

Dear couet,  
Thank you very much for showing me these messages.  
I didn’t see these messages when I run it.  
Probably, it is because I use 6.06/06 version.  
Fortunately, they are not too hard to fix.  
I just install root 6.09/02 and test the code, and it seems no errors now.

```auto
 root myROOTSCOPE.C 
   ------------------------------------------------------------
  | Welcome to ROOT 6.09/02 http://root.cern.ch |
  | (c) 1995-2016, The ROOT Team |
  | Built for linux |
  | From tag v6-09-02, 8 March 2017 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 
Processing myROOTSCOPE.C...
~Test~
open "just_for_test.root" 
root [1] 

```

Thank you very much again.
