Picon
Picon

Random number following Landau distribution

Good afternoon,
I want to produce a random number following the Landau distribution with the the prerequisite that the nr
does not exceed a predifined cut value.

my idea so far is to produce the landau distribution and apply a cut at the value of interest.
Is this way correct or I could do it also another way round?
Thanks,
E.Chaniotakis
Attachment (land.c): application/octet-stream, 337 bytes
Erkcan Ozcan | 24 Oct 18:52 2014
Picon
Picon

Question about win64gcc

Hi,

I am aware of the statement on the download page about the root team not responding to any messages relating to cygwin+root. However, the supported architectures page still list win32gcc and win64gcc. (http://root.cern.ch/drupal/content/supported-architectures) Taking some courage from that I wanted to ask a question, with the hope that perhaps other roottalk members can help.

We are trying to install ROOT from source on a windows 7 machine. We have cygwin64, gcc-4.8.3. ./configure win64gcc works fine but compilation fails at some point with an error about reflex. (See the beginning of the error message at the end of this post.) To overcome this problem, we decided to --disable-reflex, as was suggested in the following post: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=18482

And we got the very same error in that post, the one that relates to libRIO.dll. :-( Is there a configure option to disable that part as well?

So here is my more concrete question: Given that win64gcc is a ./configure architecture, at some point in time a certain version of ROOT must have worked on it. Could we at least learn which version of ROOT was the last working version on this architecture? We can at least consider installing that version as a worst case scenario.

Thanks a lot,
e.


-----
PS: Why do we want to use cygwin? We have a large project with many makefiles+softlinks+bash scripts and everything runs smoothly on both linux and mac osx. We recently got some students who are forced to use windows and cygwin works perfectly in cases like this. If there is a makefile example that runs on msys, or cygwin, etc. but makes use of the visual studio compilers and VS version of ROOT, we would welcome this as an excellent solution as well. We are really trying to avoid reinventing everything to run through the VS gui and/or cmake, as this will mean further work in not only setting things up, but also in maintaining them.

-----
Addendum 1: Error message related to reflex:
/home/virtualme/work/root/build/unix/wingcc_ld.sh -shared -Wl,--export-all-symbols -Wl,--enable-auto-image-base -Wl,-soname=libReflexDict.dll -O2 -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -L/usr/lib/X11 -o lib/libReflexDict.dll cint/reflex/src/G__Reflex.o -Llib -lCore -lCint
/home/virtualme/work/root/cint/reflex/Module.mk:139: recipe for target 'lib/libReflexDict.dll' failed
/home/virtualme/work/root/build/unix/wingcc_ld.sh -shared -Wl,--export-all-symbols -Wl,--enable-auto-image-base -Wl,-soname=libReflexDict.dll -O2 -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -L/usr/lib/X11 -o lib/libReflexDict.dll cint/reflex/src/G__Reflex.o -Llib -lCore -lCint
cint/reflex/src/G__Reflex.o:G__Reflex.cxx:(.text+0x60ee): undefined reference to `Reflex::Instance::Instance()'
cint/reflex/src/G__Reflex.o:G__Reflex.cxx:(.text+0x60ee): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `Reflex::Instance::Instance()'



-- 

In case they are not written explicitly, please be aware that my greetings and farewell are inherently implied in this email. If you have emailed me and did not get a quick response, please accept by apologies and resend, as I parse through more than 200 non-spam emails per day.

V. Erkcan Özcan, PhD
Associate Professor
Bogazici University
Department of Physics

Marcos Fernandez Garcia | 24 Oct 15:15 2014
Picon
Picon

TH2 zoom differences (ROOT 5.32 vs 5.34) in command draw

Hi

I have a strange 2D histo drawing behavior in

ROOT 5.34/09 (v5-34-09 <at> v5-34-09, Jun 26 2013, 17:10:36 on linux)

compared to

ROOT 5.32/00 (tags/v5-32-00 <at> 42375, Dec 02 2011, 12:42:25 on linux)

The code:

TH2F *h2 = new TH2F("h2","h2",10,-1,1,10,-1,1);
h2->FillRandom("gaus",100000)
h2->Draw("colz")

When I zoom-in near the first bin in 5.32 the X axis stops at -1 (top drawing in the attachment)
When I zoom-in in version 5.34 it shows a white bin (bottom drawing) and it looks as if the histogram has been
booked and filled  differently, which is misleading

Is this behavior (5.34) something I can avoid?
Manoj Kumar Jha | 24 Oct 01:26 2014
Picon
Picon

Reading different branches using MakeSelector

Hello,
    I have  a root file which consists of a single tree ("T") and four 
different branches.  I am using the utility 
'T->MakeSelector("MyClass")'  to read the input file.  I am able to read 
one branch correctly which can be judged from the amount of data read by 
PROOFlite (~ 37 MB).  Size of each branch  is around 37 MB.   The amount 
of data read from proofserve daemon  for two branches is  same as when I 
read one branch.   It means the analysis code is not reading two 
branches separately.   My analysis code can be found in the folder

/afs/cern.ch/user/j/jha/public/CMS/Proof/SameBranches

Number of read branches can be controlled using the variable 'icase'  
(line number 41: MyClass.C)

How to run the code:
"""
cp -r  /afs/cern.ch/user/j/jha/public/CMS/Proof/SameBranches /tmp

cd /tmp/SameBranches

#Setup root
source 
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.18/x86_64-slc6-gcc48-dbg/root/bin/thisroot.sh
source /afs/cern.ch/sw/lcg/external/gcc/4.8/x86_64-slc6-gcc48-opt/setup.sh

root -b
.x Analysic.C

"""

Thanks,
Manoj

--

-- 
------------------------------------------------------------------
Manoj Kumar Jha                    Department of Physics
jha2 <at> purdue.edu                    Purdue University
(765) 494-5987                     W. Lafayette, IN 47907-2036, USA
-------------------------------------------------------------------

Manoj Kumar Jha | 21 Oct 23:56 2014
Picon
Picon

Using TDSet in ProofLite

Hello,
   I generated an input root file from $ROOTSYS/test/Event executable.  
I used MakeSelector utility to generate the analysis code so that it can 
be run using PROOF.   I am using TDSet  as input file collection.  
Somehow,  my code is crashing while reading entries from the  input file.

How to reproduce it ?

"""
cp -r /afs/cern.ch/user/j/jha/public/CMS/Proof/Try .

cd Try
[jha2 <at> hep Try]$ root -b -q Analysis.C
   *******************************************
   *                                         *
   *        W E L C O M E  to  R O O T       *
   *                                         *
   *   Version   5.34/18     14 March 2014   *
   *                                         *
   *  You are welcome to visit our Web site  *
   *          http://root.cern.ch            *
   *                                         *
   *******************************************

ROOT 5.34/18 (heads/v5-34-00-patches <at> v5-34-17-156-g60f5d99, Aug 08 2014, 
11:38:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

Welcome to my rootlogon.C
root [0]
Processing Analysis.C...
  +++ Starting PROOF-Lite with 1 workers +++
Opening connections to workers: OK (1 workers)
Setting up worker servers: OK (1 workers)
PROOF set to parallel mode (1 worker)
OBJ: TDSet    type TDSet:T    T    in TTree    elements 1
TDSetElement 
file="/home/jha2/Work/PROOF/SecondAttempt/ProofTutorial/Try/Event.root" 
dir="/" obj="T" first=0 num=-1 msd=""

Info in <TProofLite::SetQueryRunning>: starting query: 1
Info in <TProofQueryResult::SetRunning>: nwrks: 1
Looking up for exact location of files: OK (1 files)
Looking up for exact location of files: OK (1 files)
Info in <TPacketizerAdaptive::TPacketizerAdaptive>: Setting max number 
of workers per node to 1
Validating files: OK (1 files)
Info in <TPacketizerAdaptive::InitStats>: fraction of remote files 0.000000
0.0: caught exception triggered by signal '1' while processing 
dset:'TDSet:T', 
file:'/home/jha2/Work/PROOF/SecondAttempt/ProofTutorial/Try/Event.root' 
- check logs for possible stacktrace - last event: 0
Info in <TProofLite::MarkBad>:
  +++ Message from master at hep.rcac.purdue.edu : marking 
hep.rcac.purdue.edu:-1 (0.0) as bad
  +++ Reason: undefined message in TProof::CollectInputFrom(...)

  +++ Message from master at hep.rcac.purdue.edu : marking 
hep.rcac.purdue.edu:-1 (0.0) as bad
  +++ Reason: undefined message in TProof::CollectInputFrom(...)

  +++ Most likely your code crashed
  +++ Please check the session logs for error messages either using
  +++ the 'Show logs' button or executing
  +++
  +++ root [] 
TProof::Mgr("hep.rcac.purdue.edu")->GetSessionLogs()->Display("*")

entries: 400 (400)
Error in <TPacketizerAdaptive::SplitPerHost>: Error removing a missing file
Info in <TPacketizerAdaptive::InitStats>: fraction of remote files 0.000000
Lite-0: all output objects have been merged
Begin time = Tue Oct 21 17:52:27 2014
  End time = Tue Oct 21 17:52:30 2014

Time elapsed  from time_t = 3
Time elapsed  from stop watch = 3.35042
Time amount of data read from proof = 0 MB

(int)0
[jha2 <at> hep Try]$

"""

Could you please look into it ?

Thanks,
Manoj

Georg Troska | 20 Oct 15:35 2014
Picon
Picon

SaveAs with different layers?

Hi,

I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.

For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.

Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)

Is there a way?

Georg

Dag Gillberg | 18 Oct 11:11 2014
Picon
Picon

Issue compiling latest root

Hello root experts,

I'm trying to compile root v6-02-01 on my laptop, and it doesn't go far until:

*** Building interpreter/llvm/inst/lib/libclangSema.a...
make[1]: *** No rule to make target `/Users/dag/root6/root-v6-02-01/interpreter/llvm/src/Users/Dag/root6/root-v6-02-01/interpreter/llvm/obj/Makefile', needed by `Makefile'.  Stop.
make: *** [interpreter/llvm/inst/lib/libclangSema.a] Error 2

So it seems that somewhere in the makefile jungle a space has gone missing between
/Users/dag/root6/root-v6-02-01/interpreter/llvm/src
/Users/Dag/root6/root-v6-02-01/interpreter/llvm/obj/Makefile
?

I configured it simply by:
./configure --all --disable-fink
make

Any ideas how to fix this?

Thanks,
Dag

PS: I just upgraded to MacOS Yosemite

Manoj Kumar Jha | 18 Oct 03:32 2014
Picon
Picon

vtable undefined reference

Hello,
    I am getting error like "vtable undefined reference".  I defined all 
the constructor, destructor and virtual functions.   I am using root 
version 5.34/18.  The files are in my public area on lxplus. Please see 
below on  how to reproduce it.

"""
[jha <at> lxbrb2710 StandAlone2014]$ pwd
/afs/cern.ch/user/j/jha/public/CMS/Proof/StandAlone2014
[jha <at> lxbrb2710 StandAlone2014]$ which root
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_8/external/slc6_amd64_gcc481/bin/root
[jha <at> lxbrb2710 StandAlone2014]$ ./run.sh

...

...
Info in <TUnixSystem::ACLiC>: creating shared library 
/afs/cern.ch/user/j/jha/public/CMS/Proof/StandAlone2014/./AnalysisTemplate_C.so
dlopen error: 
/afs/cern.ch/user/j/jha/public/CMS/Proof/StandAlone2014/./AnalysisTemplate_C.so: 
undefined symbol: _ZTVN6purdue3JetE
Load Error: Failed to load Dynamic link library 
/afs/cern.ch/user/j/jha/public/CMS/Proof/StandAlone2014/./AnalysisTemplate_C.so
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/afs/cern.ch/user/j/jha/public/CMS/Proof/StandAlone2014/AnalysisTemplate_C_ACLiC_dict.o: 
In function `purdue::Muon::Muon()':

"""

Thanks  for your help.

-Manoj

--

-- 
------------------------------------------------------------------
Manoj Kumar Jha                    Department of Physics
jha2 <at> purdue.edu                    Purdue University
(765) 494-5987                     W. Lafayette, IN 47907-2036, USA
-------------------------------------------------------------------

Adrian Sevcenco | 17 Oct 11:29 2014
Picon
Picon

persistence of a histogram across macros

Hi! I try to do the following:
read some histograms from some root files in a macro
and then in the main macro that plot the histograms in various way
to access them ...

something like (logical structure):

setup_histos.C
void setup_histos()
{
//get histos from files
histo1 Get from file

}

analysis.C

void analysis ()
{
LoadMacro setup_histos.C
setup_histos();

histo{1..n}->Draw();
}

the thing is that even if the pointers are available
the pointed info is not .. how can access the histograms
that were setup in the first macro?

Thanks a lot!
Adrian

Attachment (smime.p7s): application/pkcs7-signature, 3074 bytes
Axel Naumann | 16 Oct 20:28 2014
Picon
Picon

root.cern.ch is down

Hi,

root.cern.ch is down. It is likely due to a series of power outages in CERN's computing center. Several machines are affected, the relevant services are informed.

Cheers, Axel

Corey Reed | 16 Oct 05:20 2014
Picon

crash inside G__memfunc_setup

Hi,

I am seeing a very strange crash when I try to instantiate particular 
objects in CINT. These objects inherit from abstract base classes.

The issue is reproducible within my full software. However, I tried to 
build a simple example by copying the relevant source code to a smaller 
package -- but the small example does not show the problem!

The small, working example with the exact same source code files is at:

http://arianna.ps.uci.edu/~cjreed/calibTest.tar.gz

cd calibTest
make
root.exe
root [0] .L libsigprocdat.so
root [1] TSnDualGainCalibSet a("x",4)
root [2]

With my full software, I instead see the error below.

Any help is greatly appreciated! I am not sure how to proceed. It seems 
to me like CINT is trying to access G__struct.memfunc[-1] and crashing.

root [0] .L lib/libsigprocdat.so
root [1] TSnDualGainCalibSet a("x",4)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5e1cf38 in G__memfunc_setup (funcname=0x7ffff4699031 
"~TSnDualGainCalibSet", hash=1951, funcp=0x7ffff46649cf 
<G__G__sigprocdat_193_0_27(G__value*, char const*, G__param*, int)>,
     type=121, tagnum=-1, typenum=-1, reftype=0, para_nu=0, ansi=1, 
accessin=1, isconst=0, paras=0x7ffff4697098 "", comment=0x0, 
truep2f=0x0, isvirtual=1) at cint/cint/src/newlink.cxx:11229
11229	  if('~'==funcname[0] && 
0==G__struct.memfunc[G__p_ifunc->tagnum]->hash[0]) {
(gdb) p funcname
$1 = 0x7ffff4699031 "~TSnDualGainCalibSet"
(gdb) p G__p_ifunc->tagnum
$2 = -1
(gdb) p G__struct.memfunc
$3 = {0x651ad0, 0x651f80, 0x65a680, 0x65ab60, 0x65aff0, 0x66dbb0, 
0x66dfc0, 0x66f680, 0x670a70, 0x670970, 0x672280, 0x672180, 0x673a90, 
0x673990, 0x683bc0, 0x6840a0, 0x6845c0, 0x684a80,
   0x684f40, 0x6853d0, 0x685850, 0x685d30, 0x6861c0, 0x686620, 0x686a80, 
0x686f90, 0x687410, 0x687b00, 0x687ef0, 0x688370, 0x688b50, 0x689040, 
0x6893a0, 0x689760, 0x689be0, 0x68a070,
   0x68a500, 0x68a960, 0x68adf0, 0x68b250, 0x68b6e0, 0x68bba0, 0x68c030, 
0x68c4c0, 0x68c920, 0x68ce00, 0x68d520, 0x68daf0, 0x68de50, 0x68e1b0, 
0x68e510, 0x68e870, 0x68ebd0, 0x68f0a0,
   0x68f550, 0x68fa00, 0x68fe80, 0x690310, 0x690820, 0x690cc0, 0x691170, 
0x691620, 0x691ab0, 0x691fa0, 0x692400, 0x692890, 0x692d20, 0x693180, 
0x693640, 0x693ad0, 0x693f90, 0x6943f0,
   0x6948b0, 0x694d30, 0x695200, 0x6956d0, 0x695ba0, 0x696050, 0x696500, 
0x6969b0, 0x696e90, 0x697330, 0x6977e0, 0x697c90, 0x698140, 0x6985f0, 
0x698ac0, 0x698f10, 0x6993d0, 0x699850,
   0x699cd0, 0x69a160, 0x69a650, 0x69aad0, 0x69afb0, 0x69b460, 0x69b8e0, 
0x69bf30, 0x69c600, 0x69c9e0, 0x69ce60, 0x69d2e0, 0x69d900, 0x69dd20, 
0x69e1c0, 0x69e640, 0x69eaa0, 0x69ef20,
   0x69f3c0, 0x69f840, 0x69fca0, 0x6a0130, 0x6a0590, 0x6a0a70, 0x6a0fb0, 
0x6a1530, 0x6a1a10, 0x6a1e70, 0x6a22d0, 0x6a2730, 0x6a2be0, 0x6a3060, 
0x6a3540, 0x6a39e0, 0x6a3eb0, 0x6a4360,
   0x6a4880, 0x6a51a0, 0x6a55a0, 0x6a5a00, 0x6a5ea0, 0x6a64d0, 0x6a6860, 
0x6a6ce0, 0x6a70a0, 0x6a74c0, 0x6a7940, 0x6a7dc0, 0x6a8240, 0x6a86a0, 
0x6a8b00, 0x6a8fc0, 0x6a9470, 0x6a9910,
   0x6a9df0, 0x6aa280, 0x6aa740, 0x6aabc0, 0x6ab090, 0x6ab560, 0x6aba10, 
0x6abea0, 0x6ac350, 0x6ac7f0, 0x6acd20, 0x6ad1a0, 0x6ad600, 0x6ada90, 
0x6adf20, 0x6ae4a0, 0x6aeaa0, 0x6ae7d0,
   0x6af1a0, 0x6af500, 0x6af860, 0x6afc50, 0x6b00d0, 0x6b0560, 0x6b09d0, 
0x6b0e50, 0x6b1280, 0x6c7a50, 0x6c7f30, 0x6c83e0, 0x6c88e0, 0x6c8d60, 
0x6c9310, 0x6c9790, 0x6c9c30, 0x6ca050,
   0x6ca530, 0x6ca9b0, 0x6cae90, 0x6cb370, 0x6cb7e0, 0x6cbcc0, 0x6cc120, 
0x6cc580, 0x6ccaa0, 0x6cd030, 0x6cd4b0, 0x6cd970, 0x6cde00, 0x6ce2b0, 
0x6ce730, 0x6cec40, 0x6cf110, 0x6cf470,
   0x6cf880, 0x6cfd50...}
(gdb) up
#1  0x00007ffff467d9d2 in G__setup_memfuncTSnDualGainCalibSet () at 
sigprocdat/G__sigprocdat.cxx:7934
7934	   G__memfunc_setup("~TSnDualGainCalibSet", 1951, 
G__G__sigprocdat_193_0_27, (int) ('y'), -1, -1, 0, 0, 1, 1, 0, "", 
(char*) NULL, (void*) NULL, 1);
(gdb)
#2  0x00007ffff5e234b2 in G__incsetup_memfunc (tagnum=582) at 
cint/cint/src/newlink.cxx:13147
13147	        if (*iter) (*iter)();
(gdb)
#3  0x00007ffff5db3fd6 in G__getfunction (item=0x65f360 
"TSnDualGainCalibSet(\"x\",4)", known3=0x7fffffffa0a4, memfunc_flag=3) 
at cint/cint/src/func.cxx:2653
2653	            G__incsetup_memfunc(G__tagnum);
(gdb)
#4  0x00007ffff5d7d7a8 in G__define_var (tagnum=582, typenum=-1) at 
cint/cint/src/decl.cxx:2232
2232	               reg = G__getfunction(temp1, &known, G__CALLCONSTRUCTOR);
(gdb)
#5  0x00007ffff5e3e379 in G__defined_type (type_name=..., len=19) at 
cint/cint/src/parse.cxx:4652
4652	   G__define_var(G__tagnum, G__typenum);
(gdb)
#6  0x00007ffff5e44dc2 in G__exec_statement (mparen=0x7fffffffaaf0) at 
cint/cint/src/parse.cxx:6672
6672	                     int processed = G__defined_type(statement, iout);
(gdb)
#7  0x00007ffff5d72e54 in G__exec_tempfile_core (file=0x0, fp=0xf605d0) 
at cint/cint/src/debug.cxx:266
266	      buf = G__exec_statement(&brace_level);
(gdb)
#8  0x00007ffff5d748c6 in G__exec_tempfile_fp (fp=0xf605d0) at 
cint/cint/src/debug.cxx:807
807	   return G__exec_tempfile_core(0, fp);
(gdb)
#9  0x00007ffff5e568cf in G__process_cmd (line=0xf25930 
"TSnDualGainCalibSet a(\"x\",4)", prompt=0x625f98 "", more=0x625f90, 
err=0x7fffffffbdcc, rslt=0x7fffffffbe00)
     at cint/cint/src/pause.cxx:3343
3343	               buf = G__exec_tempfile_fp(ftemp.fp);
(gdb)
#10 0x00007ffff763ca5a in TCint::ProcessLine (this=0x625f50, 
line=0xf25930 "TSnDualGainCalibSet a(\"x\",4)", error=0x0) at 
/opt/root_v5.34.21/core/meta/src/TCint.cxx:545
545	            ret = G__process_cmd((char *)line, fPrompt, &fMore, 
&local_error, &local_res);
(gdb)
#11 0x00007ffff75a4cd6 in TApplication::ProcessLine(char const*, bool, 
int*) () from /opt/root_v5.34.21/lib/libCore.so
(gdb)
#12 0x00007ffff71e7229 in TRint::HandleTermInput() () from 
/opt/root_v5.34.21/lib/libRint.so
(gdb)
#13 0x00007ffff767fa15 in TUnixSystem::CheckDescriptors() () from 
/opt/root_v5.34.21/lib/libCore.so
(gdb)
#14 0x00007ffff768053a in TUnixSystem::DispatchOneEvent(bool) () from 
/opt/root_v5.34.21/lib/libCore.so
(gdb)
#15 0x00007ffff7600131 in TSystem::InnerLoop (this=0x61fea0) at 
/opt/root_v5.34.21/core/base/src/TSystem.cxx:410
410	   DispatchOneEvent();
(gdb)
#16 0x00007ffff75ffecc in TSystem::Run (this=0x61fea0) at 
/opt/root_v5.34.21/core/base/src/TSystem.cxx:360
360	            InnerLoop();
(gdb)
#17 0x00007ffff75a335f in TApplication::Run(bool) () from 
/opt/root_v5.34.21/lib/libCore.so
(gdb)
#18 0x00007ffff71e845e in TRint::Run(bool) () from 
/opt/root_v5.34.21/lib/libRint.so
(gdb)
#19 0x0000000000400fdc in main ()

- Corey


Gmane