## ROOT ##############################
* install ROOT with cocoa +--------------------------------------------------------------+ | $ git clone http://root.cern.ch/git/root.git /usr/local/ROOT | | $ cd /usr/local/ROOT | | $ ./configure --prefix=/usr/local --enable-cocoa --all | | $ make && make install | +--------------------------------------------------------------+ modify ROOT/graf2d/cocoa/src/MenuLoader.mm for %W Close +--------------------------------------------------------------------------------------+ | NSMenuItem *menuItem = [aMenu addItemWithTitle : NSLocalizedString(@"Minimize", nil) | | action : @selector(performMinimize:) keyEquivalent : @"m"]; | | menuItem = [aMenu addItemWithTitle : NSLocalizedString(@"Zoom", nil) | | action : @selector(performZoom:) keyEquivalent : @""]; | |^menuItem = [aMenu addItemWithTitle : NSLocalizedString(@"Close", nil)^ | | ^action : @selector(windowShouldClose:) keyEquivalent : @"w"];^ | | [aMenu addItem : [NSMenuItem separatorItem]]; | | menuItem = [aMenu addItemWithTitle : NSLocalizedString(@"Bring All to Front", nil) | | action : @selector(arrangeInFront:) keyEquivalent : @""]; | +--------------------------------------------------------------------------------------+ * change default setting make ~/.rootrc and ~/.rootmacros/rootlogon.C .rootrc +---------------------------------------------------+ | Unix.*.Root.MacroPath: .:~/.rootmacros:@macrodir@ | +---------------------------------------------------+ rootlogon.C +-------------+ | { | | <setting> | | } | +-------------+ * install ROOT with cocoa by homebrew in order to use %W shortcut and change icon, modify /usr/local/Library/Formula/root.rb +---------------------------------------------------------------------------------------------------+ | ^system 'vim -u NONE -N -c "call search(\"performZoom\")" -c "normal omenuItem = ^\ | | ^[aMenu addItemWithTitle : NSLocalizedString(@\"Close\", nil)" -c "normal oaction :^\ | | ^@selector(windowShouldClose:) keyEquivalent : @\"w\"];" -c "wq" graf2d/cocoa/src/MenuLoader.mm'^ | | ^system 'vim -u NONE -N -c "%s/iconDirectoryPath,/\"\$(HOME)\/Downloads\/GoogleDrive\/icon\","^ \ | | ^-c "wq" graf2d/cocoa/src/TGCocoa.mm'^ | | system "./configure", | +---------------------------------------------------------------------------------------------------+ +----------------------------------+ | $ brew tap homebrew/science | | $ brew install --with-cocoa root | +----------------------------------+ % change ROOT icon directly +-------------------------------------------+ | $ cd /usr/local/Cellar/root/<version>/bin | | $ sudo chmod 777 root.exe | +-------------------------------------------+ change icon from "情報を見る" +---------------------------+ | $ sudo chmod 555 root.exe | +---------------------------+ * upgrade error on homebrew check https://github.com/Homebrew/homebrew-science/issues/1219 +--------------------------------------------------------------------------+ | ==> make | | 2 errors generated. | | 2 errors generated. | | make: *** [math/vc/src/avx_sorthelper.cpp.o] Error 1 | | 2 errors generated. | | 2 errors generated. | | /usr/local/Library/Homebrew/debrew.rb:10:in `raise' | | BuildError: Failed executing: make | | 1. raise | | 2. ignore | | 3. backtrace | | 4. irb | | 5. shell | | Choose an action: | | Choose 5 to open a shell. | | | | You will be in the build directory now. | | Run make to continue the compilation. | | | | The compilation will successfully finish this time. | | Exit the shell (don't run make install). | | | | In the menu, choose 2. | | This will continue the brew install process and ROOT will get installed. | +--------------------------------------------------------------------------+ * change print size gStyle->SetPaperSize(100,100) for *.pdf this does not work ? * change X range of TGrap g->GetXaxis()->SetLimits(); * TText TLatex TText *t = new TText(<x in hist> , <y in hist>, "text"); TLatex *t = new TLatex(<x in hist>, <y in hist>, "latex text"); t->Draw(); t->DrawText(<x>, <y>, "text"); NOTE : set position in pad coordinate (0 -- 1) t->SetNDC(1); or t->DrawTextNDC(<x>, <y>, "text"); % latex text exsample - x^{2} - {}^{40}_{20}Ca - #Lambda * change TStyle for some part +---------------------+ | <Canvas>->Update(); | | gStyle-><function> | | <obj>->Draw(); | | <Canvas>->Update(); | | gStyle-><function> | +---------------------+ NOTE : TCanvas::Update is trigger to adapt TStyle * set file name for output in macro string str = f->GetName(); string file = str.substr(0,str.find('.',0)); c->Print(Form("print/%s_***.pdf",file.c_str()));