Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -53,12 +53,6 @@ extern "C" rret __stdcall HI(int*,int*);
extern "C" void __stdcall HXYIJ(int*,rarg*,rarg*,int*,int*);
extern "C" rret __stdcall HMIN(int*);
extern "C" rret __stdcall HMAX(int*);
extern "C" int __stdcall HISID(int*);
//extern "C" void __stdcall HGNF(int*,int*,rarg*,int*);
//extern "C" void __stdcall HIDALL(int*,int*);
//extern "C" void __stdcall HID1(int*,int*);
//extern "C" void __stdcall HID2(int*,int*);
//extern "C" int __stdcall HEXIST(int*);
#else
extern "C" void zitoh_(int*,int*,int*);
extern "C" void rzink_(int*,int*,const char *,int);
@@ -81,12 +75,6 @@ extern "C" rret hi_(int*,int*);
extern "C" void hxyij_(int*,rarg*,rarg*,int*,int*);
extern "C" rret hmin_(int*);
extern "C" rret hmax_(int*);
extern "C" int hisid_(int*);
//extern "C" void hgnf_(int*,int*,rarg*,int*);
//extern "C" void hidall_(int*,int*);
//extern "C" void hid1_(int*,int*);
//extern "C" void hid2_(int*,int*);
//extern "C" int hexist_(int*);
#endif
/////////////////////////////////////////////////////////////////
@@ -101,7 +89,6 @@ extern "C" void __stdcall HREND(DEFCHAR);
extern "C" void __stdcall HROUT(int*,int*,DEFCHAR);
extern "C" void __stdcall HGIVE(int*,DEFCHAR,int*,rarg*,rarg*,int*,rarg*,rarg*,int*,int*);
extern "C" void __stdcall HGIVEN(int*,DEFCHAR,int*,DEFCHAR,rarg*,rarg*);
extern "C" void __stdcall HNTVAR2(int*,int*,DEFCHAR,DEFCHAR,DEFCHAR,int*,int*,int*,int*);
extern "C" void __stdcall HBNT(int*,DEFCHAR,DEFCHAR);
extern "C" void __stdcall HBNAME(int*,DEFCHAR,int*,DEFCHAR);
extern "C" void __stdcall HBNAM(int*,DEFCHAR,int*,DEFCHAR,int*);
@@ -130,7 +117,6 @@ extern "C" void hrend_(DEFCHAR,int);
extern "C" void hrout_(int*,int*,DEFCHAR,int);
extern "C" void hgive_(int*,DEFCHAR,int*,rarg*,rarg*,int*,rarg*,rarg*,int*,int*,int);
extern "C" void hgiven_(int*,DEFCHAR,int*,DEFCHAR,rarg*,rarg*,int,int);
extern "C" void hntvar2_(int*,int*,DEFCHAR,DEFCHAR,DEFCHAR,int*,int*,int*,int*,int,int,int);
extern "C" void hbnt_(int*,DEFCHAR,DEFCHAR,int,int);
extern "C" void hbname_(int*,DEFCHAR,int*,DEFCHAR,int,int);
extern "C" void hbnam_(int*,DEFCHAR,int*,DEFCHAR,int*,int,int);
@@ -218,76 +204,6 @@ inline void CZITOH(int* a1,int* a2,int* a3) {
#endif
}
/*
inline std::vector<int> CHIDALL() {
// We should use first a function getting the number of ids only.
// See hids.f in this directory and hidall.F code.
int ids[100000];
int n;
#ifdef WIN32
HIDALL(ids,&n);
#else
hidall_(ids,&n);
#endif
std::vector<int> r;
r.resize(n,0);
for(int i=0;i<n;i++) r[i] = ids[i];
return r;
}
inline std::vector<int> CHID1() {
// We should use first a function getting the number of 1D ids only.
// See hids.f in this directory and hid1.F code.
int ids[100000];
int n;
#ifdef WIN32
HID1(ids,&n);
#else
hid1_(ids,&n);
#endif
std::vector<int> r;
r.resize(n,0);
for(int i=0;i<n;i++) r[i] = ids[i];
return r;
}
inline std::vector<int> CHID2() {
// We should use first a function getting the number of 2D ids only.
// See hids.f in this directory and hid1.F code.
int ids[100000];
int n;
#ifdef WIN32
HID2(ids,&n);
#else
hid2_(ids,&n);
#endif
std::vector<int> r;
r.resize(n,0);
for(int i=0;i<n;i++) r[i] = ids[i];
return r;
}
inline bool CHEXIST(int a_id) {
int id = a_id;
// What is the mapping of F77 LOGICAL to C ?
#ifdef WIN32
logical l = HEXIST(&id);
#else
logical l = hexist_(&id);
#endif
}
inline void CHCLR() {
// Clear //PAWC structure.
//CHCDIR("//PAWC"," ");
std::vector<std::string> drs;
CHDIRS(true,drs);
{std::vector<std::string>::iterator it;
for(it=drs.begin();it!=drs.end();++it){
std::string& dir = *it;
CHDDIR(dir);
}}
CHDELET(0);
}
*/
inline int* get_pawc() {
#ifdef WIN32
return PAWC;
@@ -417,14 +333,6 @@ inline void CHDDIR(const std::string& a1) {
#endif
}
inline bool CHISID(int a_id) {
#ifdef WIN32
return (HISID(&a_id)==1?true:false);
#else
return (hisid_(&a_id)==1?true:false);
#endif
}
inline void CHDIRS(bool a_PAWC,std::vector<std::string>& a_dirs){
a_dirs.clear();
@@ -805,52 +713,6 @@ inline void CHFNT(int a1) {
#endif
}
inline void CHNTVAR2(
int a1,int a2
,std::string& a3,std::string& a4,std::string& a5
,int& a6,int& a7,int& a8,int& a9) {
char name[32];
::memset(name,' ',sizeof(name));
name[sizeof(name)-1] = 0;
char block[32];
::memset(block,' ',sizeof(block));
block[sizeof(block)-1] = 0;
char fullname[64];
::memset(fullname,' ',sizeof(fullname));
fullname[sizeof(fullname)-1]=0;
int v6,v7,v8,v9;
#ifdef WIN32
HNTVAR2(&a1,&a2,PASSCHAR(name),PASSCHAR(fullname),PASSCHAR(block),&v6,&v7,&v8,&v9);
#else
hntvar2_(&a1,&a2,name,fullname,block,&v6,&v7,&v8,&v9,32,64,32);
#endif
int j;
for (j=30;j>0;j--) {
if (name[j] == ' ') name[j] = 0;
}
for (j=62;j>0;j--) {
if (fullname[j] == ' ') fullname[j] = 0;
}
for (j=30;j>0;j--) {
if (block[j] == ' ') block[j] = 0;
else break;
}
a3 = name;
a4 = fullname;
a5 = block;
a6 = v6;
a7 = v7;
a8 = v8;
a9 = v9;
}
inline int CHGIVEN(
int a_id
,std::string& a_title
@@ -915,18 +777,6 @@ inline int CHGNT(int a_id,int a_row){
return ier;
}
//inline int CHGNF(int a_id,int aRow,rarg* aBuffer){
// int id = a_id;
// int row = aRow;
// int ier = 0;
//#ifdef WIN32
// HGNF(&id,&row,aBuffer,&ier);
//#else
// hgnf_(&id,&row,aBuffer,&ier);
//#endif
// return ier;
//}
inline void CHOPERA(int a_id1,const std::string& a_opts,int a_id2,int a_id3,rarg a_c1,rarg a_c2) {
#ifdef WIN32
HOPERA(&a_id1,PASSCHAR(a_opts.c_str()),&a_id2,&a_id3,&a_c1,&a_c2);
@@ -1,72 +0,0 @@
/* To resolve some HBOOK entry points used in CLHEP ! */
void hlimit_(){}
void hnoent_(){}
void hgnpar_(){}
void hgnf_(){}
void hdelet_(){}
void hbookn_(){}
void hfn_(){}
void hbook2_(){}
void hbook1_(){}
void hfill_(){}
void hx_(){}
void hcdir_(){}
void hmdir_(){}
void hddir_(){}
void hbprof_(){}
void hbname_(){}
void hbnt_(){}
void hfnt_(){}
void hropen_(){}
void hrout_(){}
void hrend_(){}
void hstati_(){}
void rzcl_(){}
void zitoh_(){}
void uhtoc_(){}
void rndm_(){}
/*commons :*/
int hcbook_[51];
/*minuit :*/
void mninit_(){}
void mnparm_(){}
void mnexcm_(){}
/* to link BatchLabZebra plugin : */
void hexist_(){}
void hitoc_(){}
void hbug_(){}
void hndesc_(){}
void hdcofl_(){}
void hrin_(){}
void hldir_(){}
void hbookb_(){}
void hgive_(){}
void hi_(){}
void hie_(){}
void hij_(){}
void hije_(){}
void hix_(){}
void hijxy_(){}
void hxi_(){}
void hxyij_(){}
void hmin_(){}
void hmax_(){}
void hreset_(){}
void hbnam_(){}
void hgiven_(){}
void hgnt_(){}
void hopera_(){}
void lenocc_(){}
void locati_(){}
void rzink_(){}
@@ -1,44 +0,0 @@
SUBROUTINE HIDS(N)
IMPLICIT NONE
*.==========>
*.
*. Returns the number of all IDS.
*. Inspired from hidall.F.
*. G.Barrand.
*
*KEEP,HCBOOK.
INTEGER NWPAW,IXPAWC,IHDIV,IXHIGZ,IXKU, LMAIN
REAL FENC , HCV
COMMON/PAWC/NWPAW,IXPAWC,IHDIV,IXHIGZ,IXKU,FENC(5),LMAIN,HCV(9989)
INTEGER IQ ,LQ
REAL Q
DIMENSION IQ(2),Q(2),LQ(8000)
EQUIVALENCE (LQ(1),LM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F(HEXIST(ID).EQV..TRUE.) THEN
HISID = 1
ELSE
HISID = 0
ENDIF
END
@@ -1,164 +0,0 @@
*CMZ : 2.21/05 08/02/99 11.10.43 by Rene Brun
*CMZ : 0.90/10 09/12/96 17.08.32 by Rene Brun
*-- Author : Rene Brun 09/12/96
SUBROUTINE HNTVAR2(ID1,IVAR,CHTAG,CHFULL,BLOCK,NSUB,ITYPE,ISIZE
+ ,IELEM)
*.==========>
*.
*. Returns the tag, block, type, size and array length of the
*. variable with index IVAR in N-tuple ID1.
*. N-tuple must already be in memory.
*.
*. This routine is a modification of the HBOOK routine HNTVAR.
*.
*..=========> ( R.Brun, A.A.Rademakers )
*
*KEEP,HCNTPAR.
INTEGER ZBITS, ZNDIM, ZNOENT, ZNPRIM, ZNRZB, ZIFCON,
+ ZIFNAM, ZIFCHA, ZIFINT, ZIFREA, ZNWTIT, ZITIT1,
+ ZNCHRZ, ZDESC, ZLNAME, ZNAME, ZARIND, ZRANGE, ZNADDR,
+ ZIBLOK, ZNBLOK, ZLCONT, ZIFBIT, ZIBANK, ZIFTMP, ZITMP,
+ ZID, ZNTMP, ZNTMP1, ZLINK
PARAMETER(ZBITS=1, ZNDIM=2, ZNOENT=3, ZNPRIM=4, ZLCONT=6,
+ ZNRZB=5, ZIFCON=7, ZIFNAM=4, ZIFCHA=5, ZIFINT=6,
+ ZIFREA=7, ZNWTIT=8, ZITIT1=9, ZNCHRZ=13, ZIFBIT=8,
+ ZDESC=1, ZLNAME=2, ZNAME=3, ZRANGE=4, ZNADDR=12,
+ ZARIND=11, ZIBLOK=8, ZNBLOK=10, ZIBANK=9, ZIFTMP=11,
+ ZID=12, ZITMP=10, ZNTMP=6, ZNTMP1=3, ZLINK=6)
*
*KEEP,HCFLAG.
INTEGER ID ,IDBADD,LID ,IDLAST,IDHOLD,NBIT ,NBITCH,
+ NCHAR ,NRHIST,IERR ,NV
COMMON/HCFLAG/ID ,IDBADD,LID ,IDLAST,IDHOLD,NBIT ,NBITCH,
+ N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6,KMAX2=10,KSCAL2=11,
+ KTIT2=12,KNBIT=1,KNOENT=2,KSTAT1=3,KNSDIR=5,KNRH=6,
+ KCON1=9,KCON2=3,KBITS=1,KNTOT=2)
*
*KEEP,HCBITS.
INTEGER I1, I2, I3, I4, I5, I6, I7, I8,
+ I9, I10, I11, I12, I13, I14, I15, I16,
+I17, I18, I19, I20, I21, I22, I23, I24, I25, I26, I27,
+I28, I29, I30, I31, I32, I33, I34, I35, I123, I230
COMMON / HCBITS / I1, I2, I3, I4, I5, I6, I7, I8,
+ I9, I10, I11, I12, I13, I14, I15, I16,
+I17, I18, I19, I20, I21, I22, I23, I24, I25, I26, I27,
+I28, I29, I30, I31, I32, I33, I34, I35, I123, I230
*
*KEND.
*
CHARACTER*(*) CHTAG, CHFULL, BLOCK
CHARACTER*80 VAR
CHARACTER*32 NAME, SUBS
LOGICAL LDUM
*
ID = ID1
IDPOS = LOCATI(IQ(LTAB+1),IQ(LCDIR+KNRH),ID)
IF (IDPOS .LE. 0) THEN
CALL HBUG('Unknown N-tuple','HNTVAR',ID1)
RETURN
ENDIF
LCID = LQ(LTAB-IDPOS)
*
CHTAG = ' '
NAME = ' '
BLOCK = ' '
NSUB = 0
ITYPE = 0
ISIZE = 0
IELEM = 0
*
ICNT = 0
*
*
IF (IVAR .GT. IQ(LCID+ZNDIM)) RETURN
*
LBLOK = LQ(LCID-1)
LCHAR = LQ(LCID-2)
LINT = LQ(LCID-3)
LREAL = LQ(LCID-4)
*
*-- loop over all blocks
*
5 LNAME = LQ(LBLOK-1)
*
IOFF = 0
NDIM = IQ(LBLOK+ZNDIM)
*
DO 10 I = 1, NDIM
ICNT = ICNT + 1
IF (ICNT .EQ. IVAR) THEN
*
CALL HNDESC(IOFF, NSUB, ITYPE, ISIZE, NBITS, LDUM)
*
LL = IQ(LNAME+IOFF+ZLNAME)
LV = IQ(LNAME+IOFF+ZNAME)
CALL UHTOC(IQ(LCHAR+LV), 4, NAME, LL)
CALL UHTOC(IQ(LBLOK+ZIBLOK), 4, BLOCK, 8)
*
IELEM = 1
IF (NSUB .GT. 0) THEN
VAR = NAME(1:LL)//'['
DO 25 J = NSUB,1,-1
LP = IQ(LINT+IQ(LNAME+IOFF+ZARIND)+(J-1))
IF (LP .LT. 0) THEN
IE = -LP
CALL HITOC(IE, SUBS, LL, IERR)
ELSE
LL = IQ(LNAME+LP-1+ZLNAME)
LV = IQ(LNAME+LP-1+ZNAME)
CALL UHTOC(IQ(LCHAR+LV), 4, SUBS, LL)
LL1 = IQ(LNAME+LP-1+ZRANGE)
IE = IQ(LINT+LL1+1)
ENDIF
IELEM = IELEM*IE
IF (J .EQ. NSUB) THEN
VAR = VAR(1:LENOCC(VAR))//SUBS(1:LL)
ELSE
VAR = VAR(1:LENOCC(VAR))//']['//SUBS(1:LL)
ENDIF
25 CONTINUE
*
VAR = VAR(1:LENOCC(VAR))//']'
ELSE
VAR = NAME(1:LL)
ENDIF
CHTAG = NAME
CHFULL = VAR
RETURN
*
ENDIF
*
IOFF = IOFF + ZNADDR
10 CONTINUE
*
LBLOK = LQ(LBLOK)
IF (LBLOK .NE. 0) GOTO 5
*
END
@@ -260,4 +260,4 @@ private:
// CHCDIR("//PAWC/LUN<unit>"," ")
// CHCDIR("//LUN<unit>"," ")
//exlib_build_use inlib
@@ -95,24 +95,24 @@ public:
// and that a //<something> exists and is attached to a file.
tools::replace(m_path_file,"//PAWC","/");
cd_beg();
CHBNT(m_id,a_bkg.m_title," ");
CHBNT(m_id,a_bkg.title()," ");
cd_end();
const std::vector<tools::ntuple_booking::col_t>& cols = a_bkg.m_columns;
std::vector<tools::ntuple_booking::col_t>::const_iterator it;
const std::vector<tools::column_booking>& cols = a_bkg.columns();
std::vector<tools::column_booking>::const_iterator it;
for(it=cols.begin();it!=cols.end();++it){
if((*it).second==tools::_cid(int(0))) {
create_column<int>((*it).first);
} else if((*it).second==tools::_cid(float(0))) {
create_column<float>((*it).first);
} else if((*it).second==tools::_cid(double(0))) {
create_column<double>((*it).first);
if((*it).cls_id()==tools::_cid(int(0))) {
create_column<int>((*it).name());
} else if((*it).cls_id()==tools::_cid(float(0))) {
create_column<float>((*it).name());
} else if((*it).cls_id()==tools::_cid(double(0))) {
create_column<double>((*it).name());
} else {
a_out << "tools::hbook::wntuple :"
<< " for column " << tools::sout((*it).first)
<< ", type with cid " << (*it).second << " not yet handled."
<< " for column " << tools::sout((*it).name())
<< ", type with cid " << (*it).cls_id() << " not yet handled."
<< std::endl;
//throw
tools::clear<icol>(m_cols);
@@ -235,3 +235,5 @@ protected:
}}
#endif
//exlib_build_use inlib