Thursday, 14 December 2006
|
| [ROOT] histogram display in peak search Kazuyoshi Furutaka 08:27:50 |
| | Dear rooters,
Could someone teach me
1. why the attached script (named 'peakSearchTest.C'), which try to find candidate of peaks from TH1F "hpx" in "hsimple.root" using TSpectrum::Search(), DISPLAYS the histogram when run as an unnamed script (.x peakSearchTest.C), whereas it does not when run as a named one (by invoking peakSearchTest() after loading the script (or `.x peakSearchTest.C`), of course after uncommenting the function name in the script and commenting out the first curly brace.)?
In the latter, only an empty canvas is displayed... (though a candidate is successfully found)
2. whether it is possible to seach peaks using TSpectrum::Search() without displaying any canvas/histogram (or control its display) in interactive root sessions (i.e. w/o -b option) or not?
Even though the histogram is not explicitly drawn, the attached script (when run as unnamed one) displays it.
Thanks in advance.
Yours, Kazuyoshi -- Kazuyoshi Furutaka furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp
#if !defined(__CINT__) # include "TCanvas.h" # include "TH1.h" # include "TFile.h" # include "TSpectrum.h" #endif
{ //void peakSearchTest() {
// create a canvas TCanvas *c1 = new TCanvas("c1","c1",10,10,800,500);
// read and draw a histogram from a file TFile f("hsimple.root"); TH1F *h = (TH1F*)f.Get("hpx"); //h->Draw();
// search a peak, maxpositions=1, resolution=1(default) TSpectrum *s = new TSpectrum(2); // in histogram 'h', sigma=2, options="", thresh.=0.10 Int_t npfound = s->Search(h,2,"",0.10); if ( npfound > 0 ) { Float_t *xpeaks = s->GetPosition ; for ( Int_t np=0 ; np < npfound ; np++ ) { Float_t xp = *(xpeaks+np); Int_t bin = h->GetXaxis()->FindBin(xp); printf("Found a candidate of peak at %d channel.\n", bin); } } }
|
| | Add comment |
|
| Or lawn Sadie Westbrook 06:23:03 |
| | |
| | Add comment |
Wednesday, 13 December 2006
|
| How to use BC's .lib in TC Sky 20:00:08 |
| | Hi all!
I have a device development library(dev.lib), it can be used successfully under Borland C++ 3.1 but failed under Turbo C 2.01 TC Error message: "Linker Error: Undefined symbol '_functionname' in module myfile.c" So I want to know Is there some library can compatible with BC and TC? if not, how to convert this library to TC format.
Many thanks in advance.
sky
|
| | 12 answers | Add comment |
|
| unique enter Zealand Kayaking 14:36:31 |
| | |
| | Add comment |
|
| RE: Digest Number 3583 Manoj Sahu 12:24:10 |
| | Manoj Kumar SahuOnLine The Knowledge Centre
Cell +91 93295995620
________________________________ > To: notify-dg-c-prog@yahoogroups.com [mailto:notify-dg-c-prog%40yahoogroups.com]; c-prog@yahoogroups.com [mailto:c-prog%40yahoogroups.com] > Subject: RE: [c-prog] Digest Number 3583 >
Hello > i Have seen a lot of problem regarding the graphics why dont u all try this simple eye candy graphics learn it try it to comple and see the mazik. > // Have fun > // circle.c > #include"graphics.h" > #define midx getmaxx()/2 > #define midy getmaxy()/2 > void main() > { > int gd = DETECT,gm,rad,col; > initgraph(&gd,&gm,"c:\\tc\\bgi"); // I Asssume that yoy have load turbo c in TC Dircectory > for(col=1;col<16;col++) > { > for( rad = 1;rad<250;rad++) > { > setcolor(col); > circle(midx,midy,rad); > } > } > closegraph(); > } > copy and paste this code and just compile and run it. > Manoj Kumar SahuOnLine The Knowledge Centre > Cell +91 93295995620
__________________________________________________________ Search from any Web page with powerful protection. Get the FREE Windows Live Toolbar Today! http://toolbar.live.com/?mkt=en-in [http://toolbar.live.com/?mkt=en-in]
__._,_.___ Messages in this topic [http://groups.yahoo.com/group/c-prog/message/59846;_ylc=X3oDMTM2N3ZoNnU0BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BG1zZ0lkAzU5ODQ2BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTE2NTk5OTU4NAR0cGNJZAM1OTg0Ng--] (1) Reply (via web post) [http://groups.yahoo.com/group/c-prog/post;_ylc=X3oDMTJxYnJjZmU4BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BG1zZ0lkAzU5ODQ2BHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTE2NTk5OTU4NA--?act=reply&messageNum=59846] | Start a new topic [http://groups.yahoo.com/group/c-prog/post;_ylc=X3oDMTJlZW5qajh0BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTE2NTk5OTU4NA--] Messages [http://groups.yahoo.com/group/c-prog/messages;_ylc=X3oDMTJlczRlc2NwBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTE2NTk5OTU4NA--] | Files [http://groups.yahoo.com/group/c-prog/files;_ylc=X3oDMTJmMm9uZG8wBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzExNjU5OTk1ODQ-] | Photos [http://groups.yahoo.com/group/c-prog/photos;_ylc=X3oDMTJlZmR1NDdjBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTE2NTk5OTU4NA--] | Links [http://groups.yahoo.com/group/c-prog/links;_ylc=X3oDMTJmNXNtbDgyBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzExNjU5OTk1ODQ-] | Database [http://groups.yahoo.com/group/c-prog/database;_ylc=X3oDMTJjNXNsbW1mBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2RiBHN0aW1lAzExNjU5OTk1ODQ-] | Polls [http://groups.yahoo.com/group/c-prog/polls;_ylc=X3oDMTJmZDdzaWY1BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzExNjU5OTk1ODQ-] To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups [http://groups.yahoo.com/;_ylc=X3oDMTJka3Q5MTZoBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMTY1OTk5NTg0] Change settings via the Web [http://groups.yahoo.com/group/c-prog/join;_ylc=X3oDMTJmcnJpajZpBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzExNjU5OTk1ODQ-] (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest [mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Email Delivery: Digest] | Switch format to Traditional [mailto:c-prog-traditional-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Change Delivery Format: Traditional] Visit Your Group [http://groups.yahoo.com/group/c-prog;_ylc=X3oDMTJkOGduMTlhBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMTY1OTk5NTg0] | Yahoo! Groups Terms of Use [http://docs.yahoo.com/info/terms/] | Unsubscribe [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=]Recent Activity
* 87 New Members [http://groups.yahoo.com/group/c-prog/members;_ylc=X3oDMTJmcmVhZm83BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzExNjU5OTk1ODQ-]
* 1 New Files [http://groups.yahoo.com/group/c-prog/files;_ylc=X3oDMTJnOWZzY243BF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwN2dGwEc2xrA3ZmaWxlcwRzdGltZQMxMTY1OTk5NTg0]
Visit Your Group [http://groups.yahoo.com/group/c-prog;_ylc=X3oDMTJlOHJwMmJhBF9TAzk3MzU5NzE0BGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTE2NTk5OTU4NA--]SPONSORED LINKS
* C and c++ [http://groups.yahoo.com/gads;_ylc=X3oDMTJjOW9uZXVrBF9TAzk3MzU5NzE0BF9wAzEEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjU5OTk1ODQ-?t=ms&k=C+and+c++&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=2&.sig=9yL03T42tK7BXBfk8CiaAw]
* Computer programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjcXF2a211BF9TAzk3MzU5NzE0BF9wAzIEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjU5OTk1ODQ-?t=ms&k=Computer+programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=2&.sig=34Vf-jua1cm-sWcGEjgBig]
* Java programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjZ2ZhOXYwBF9TAzk3MzU5NzE0BF9wAzMEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjU5OTk1ODQ-?t=ms&k=Java+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=2&.sig=h1FZ2hiTtE71WflSgjQ2yA]
* Basic programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjNHJwOHNxBF9TAzk3MzU5NzE0BF9wAzQEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjU5OTk1ODQ-?t=ms&k=Basic+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=2&.sig=Rhl8V4x4YWhZXvHUR0pcew]
* Programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjNnAydTE1BF9TAzk3MzU5NzE0BF9wAzUEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjU5OTk1ODQ-?t=ms&k=Programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=2&.sig=5VNXKKdPWUSiobRPcNepRA]
Y! Messenger
Instant hello [http://us.ard.yahoo.com/SIG=12hdbs6vu/M=493064.8985659.9760753.8674578/D=groups/S=1705006788:NC/Y=YAHOO/EXP=1166006784/A=3848581/R=0/SIG=11umg3fun/*http://us.rd.yahoo.com/evt=42403/*http://messenger.yahoo.com]
Chat in real-time
with your friends.
Ads on Yahoo!
Learn more now. [http://us.ard.yahoo.com/SIG=12h4esad5/M=493064.8985663.9760769.8674578/D=groups/S=1705006788:NC/Y=YAHOO/EXP=1166006784/A=3848643/R=0/SIG=131q47hek/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=US2005&cmp=Yahoo&ctv=Groups4&s=Y&s2=&s3=&b=50]
Reach customers
searching for you.
Yahoo! Groups
Start a group [http://groups.yahoo.com/start;_ylc=X3oDMTJvMWtyZWo5BF9TAzk3MzU5NzE0BF9wAzMEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA25jbW9kBHNsawNncm91cHMyBHN0aW1lAzExNjU5OTk1ODQ-]
in 3 easy steps.
Connect with others.
.[IMAGE] __,_._,___
|
| | 1 answer | Add comment |
|
| [ROOT] Integration of the oscillating function Guest 12:23:38 |
| | Dear Rooters!
I have to perform a calculation of the integral of oscillating function, namely J0(z) (Bessel J0). How should I integrate it (in this case the integration is over "z" variable) in order to obtain a proper result?
For example, in Matematica there is a method of integration which is called "Oscillatory method" which allows to integrate such oscillating functions.
*I use TF1 class with "IntegralMultiple" function -- Sincerely,
Andrey K.
************************************************************* * Andrey Kormilitsin * * * * * * Department of * * * Particle Physics * * * School of Physics * Tel: ++ 972- 3 - 640 7954 (o) * * Tel Aviv University * * * Ramat Aviv,Tel Aviv * E-mail: andreyk1@post.tau.ac.il * * 69978, ISRAEL * * * * * *************************************************************
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
|
| | 1 answer | Add comment |
|
| Error in Compile Rikhard 06:41:32 |
| | Hi, I am trying to compile OpenGL code using the glut library and I am recieving the following error.
Error E2337 c:\Borland\Bcc55\include\GL/glut.h 146: Only one of a set of overloaded functions can be "C" *** 1 errors in Compile ***
anyone know how to fix this error, or know where I can get help with compiling OpenGL code?
|
| | 1 answer | Add comment |
|
| RE: Get your Diploma {}afst and easy today! 818-7244 Adolph 05:46:37 |
| | Yo Cint!!!
A Genuine Univers1ty Degree 1n 4-6 weeks!
Have you ever thought that the only things topping you from a great job and better pay was a few letters behind you name? Well now you can get them!
BA BSc MA MSc MBA PhD
Within 4-6 weeks! No Study Required! 010% Verifiable!
These are real, genuine degrees that include Bachelors, Masters, MBA and Doctorate Degrees. They are fulyl verifiable and certified transcripts are also available.
Juts call the number below. You?ll thank me later?
Buzz Right Now! +1 (270) 818-7244 Live 7d 24 hour
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
on him to weaken back, ears, and eyes, heard the rustle in the marshescorner of his eye, he saw the signifer raise his battered Eaglepoor, his body twisted by ill-healed wounds. Not the sort of man athat a general and a proconsul of Rome could abandon his men on a lost
|
| | Add comment |
Tuesday, 12 December 2006
|
| [ROOT] rootcint gives: Error: cannot open file "TROOT.h" :0: Oliver Oberst 23:35:09 |
| | Hello,
I am working on a rootinterface for a montecarlo generator. I wrote my own "HepMCEvent" class which inherits from TObject. Now I want to fill a Tree with an HepMCEvent Branch with
tree->Branch("EventBranch","HepMCEvent",&event,32000,99);
in my Interface. the header of the Event (for now) is : ---------------------------------------------------------------- #ifndef __HepMCEvent__ #define __HepMCEvent__
#include"TObject.h"
#include "CLHEP/HepMC/GenEvent.h"
class HepMCEvent : public TObject{ public: HepMCEvent(HepMC::GenEvent *hepmc); ~HepMCEvent(); private: int event_number; int signal_process_id; double alphaQCD; double alphaQED; int vertices_size; ClassDef(HepMCEvent,1) //Event structure };
#endif ---------------------------------------------------------- if I want to generate a dictionary with rootcint:
promt>rootcint HepMCEventdict.cc -c -I ../../2.0.2.2/CLHEP/HepMC/include/ -I $ROOTSYS/include/ HepMCEvent.h
i get:
Error: cannot open file "TROOT.h" :0: !!!Removing HepMCEventdict.cc HepMCEventdict.h !!! Error: rootcint: error loading headers...
I`m using root 5.13/6. ($ROOTSYS is set correct and TROOT.h is readable and on the right place)
Thx --
------------------------------------------------------------- Oliver Oberst oberst@ekp.physik.uni-karlsruhe.de IEKP, Uni Karlsruhe Wolfgang-Gaede-Str. 1 Tel: +49-(0)721 608-7243 D-76128 Karlsruhe -------------------------------------------------------------
|
| | 2 answer | Add comment |
|
| ^í` G ^ ` G [c-prog] to run c++ in 64 bit processor Linker M Lin 18:54:27 |
| | You must config a .pif file for a dos VM.
-- Linker M Lin linkermlin-/E1597aS9LRv1O+Z8WTAqQ@public.gmane.org Á Á Á Á Á Á Á Á Á Á Á Ô Ô Ô Ô Å Á Á Á Á Á Á Á Á Á Á Á
----- Å Å È Ä ---- Å Ä Ä Î radhesh tornekar <radhesh_st-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> Ô Ä Ä Î c-prog-hHKSG33TihhbjbujkaE4pw@public.gmane.org Å Å È Î 2006/12/12(Å Ä ), Ä Å 9:52:00 Ä È Î Re: ^ ` G [c-prog] to run c++ in 64 bit processor
how can it runsssss???? ?? Linker M Lin <linkermlin@yahoo. com.cn> wrote: No! It can run! -- Linker M Lin linkermlin@yahoo. com.cn á ö á ö á ö á ö á ö á ö á ö á ö á ö á ö á ö ö ö ö á á ö ö ö ö ö á ö á ö á ö á ö á ö á ö á ö á ö á ö á ö á ö
----- ö á ö á ö ö á ö ---- á á á ö ö ö á¸á Tamas Marki <tmarki@gmail. com> ö ö á ö ö ö á¸á c-prog@yahoogroups. com ö ö á á ö ö á¸á 2006/12/12(ö ö á ö ), ö ö ö ö 12:01:28 ö ö ö ö á¸á Re: [c-prog] to run c++ in 64 bit processor
On 12/11/06, radhesh <radhesh_st@yahoo. com> wrote: hello everybody i hav a taken new laptop. which is of amd turion 64 bit processor. so TC is not working wid that processor. so tell me wat to do?????
Get a new compiler. -- Tamas Marki - http://tmarki. on.panonnet. net
ö ö á á ö ö á ö ö ö ö ö -3.5Gö ö ö á á¸á 20Má á á ö
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.
<!--
#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; } #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; } #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ float:left; white | |