Commit a0f3597b authored by cvs2svn's avatar cvs2svn
Browse files

This commit was manufactured by cvs2svn to create tag

'GAUDI_v19r3-pre'.

git-svn-id: svn+ssh://svn.cern.ch/reps/gaudi/distribution/tags/GAUDI/GAUDI_v19r3-pre@3739 53ecefc3-a64d-0410-9bdf-b8581fa3287e
parent beabde14
include $(CMTROOT)/src/Makefile.header
include $(CMTROOT)/src/constituents.make
!include $(CMTROOT)\src\NMakefile.header
!include $(CMTROOT)\src\constituents.nmake
# $Id: requirements,v 1.42 2007/02/22 10:51:40 hmd Exp $
# =============================================================================
# CVS tag $Name: $, version $Revision: 1.42 $
# =============================================================================
package HbookCnv
version v14r10
branches src cmt doc
use GaudiKernel v*
use AIDA v* LCG_Interfaces -no_auto_imports
use cernlib v* LCG_Interfaces -no_auto_imports
# build a component library
library HbookCnv -import=cernlib -no_prototypes -import=AIDA \
../src/*.F \
../src/*.c \
../src/*.cpp
# =========== use standard pattern ============================================
apply_pattern component_library library=HbookCnv
macro_prepend HbookCnv_linkopts ""\
UnixStatic "-u mzstor_ -u mzchnb_ -u mzlint_ -u mzlink_ -u mzpaw_ -u mzpush_ -u mzrelb_ -u mzwork_ "
private
# get flags to build shared Component library
macro_append HbookCnv_fflags " $(cernlib_fflags)"
macro_append HbookCnv_shlibflags ""\
WIN32 "/INCLUDE:_MZSTOR /INCLUDE:_MZCHNB /INCLUDE:_MZLINT /INCLUDE:_MZLINK /INCLUDE:_MZPAW /INCLUDE:_MZPUSH /INCLUDE:_MZRELB /INCLUDE:_MZWORK "
macro_remove constituents "" \
slc3-amd64 "HbookCnv" \
Darwin "HbookCnv"
macro_remove constituents "" \
slc3-amd64 "HbookCnvRootMap" \
Darwin "HbookCnvRootMap"
macro_remove constituents "" \
slc3-amd64 "HbookCnvConf" \
Darwin "HbookCnvConf"
# =============================================================================
# $Log: requirements,v $
# Revision 1.42 2007/02/22 10:51:40 hmd
# fixed problem with the macro_remove constituents.
#
# Revision 1.41 2007/02/21 18:35:41 hmd
# fixed requirements to please getpack
#
# Revision 1.40 2007/02/21 18:01:05 hmd
# fixed requirements to please getpack
#
# Revision 1.39 2007/02/20 19:47:10 hmd
# fixed privacy of "use GaudiSvc" for the genconfig patterns. Everything is hidden in the component_library pattern.
#
# Revision 1.38 2007/02/20 14:17:12 hmd
# applied privately the do_genconf tag
#
# Revision 1.37 2007/02/16 08:18:46 ranjard
# v14r10 - commit Vanya's changes in requirements
#
# =============================================================================
# The END
# =============================================================================
Package: HbookCnv
Package manager : N.N.
!==================== HbookCnv v14r10 =================================
! 2007-02-16 - Florence RANJARD (from Vanya Belyaev)
- requirements - use component_library pattern to build HbookCnv
library
!==================== HbookCnv v14r9 ===================================
! 2006-11-30 - Pere Mato
Adpated package to the new PluginSvc
- Removed protected from constructor/destructors and fiendship of
Factory class
!==================== HbookCnv v14r8 ===================================
! 2006-03-13 - Hubert Degaudenzi
- fix for patches #691-694 by Markus Frank which allow support for
objects in Evt collections
!==================== HbookCnv v14r7 ===================================
! 2006-01-10 - Hubert Degaudenzi
- use of the DECLARE_XXX_FACTORY macros. replacement of the
corresponding code.
!==================== HbookCnv v14r6 ===================================
! 2005-11-29 - Vanya BELYAEV
Modification to allow creation of HUGE HBOOK N-TUPLES
to create a HUGE N-TUPLE one can use e.g.
ToolSvc.HbookTool.LRECL = 4096 ;
ToolSvc.HbookTool.NRECL = 512000 ;
ToolSvc.HbookTool.MODE = "PQE" ;
Here LRECL/NRECL/MODE are parameters for HROPEN call
Everything is 100% backward compatible
New files:
----------
src/getquest.F
src/setquest.F
primirive function sto set/get values of ZEBRA's IQUEST array
src/HbookTool.cpp
helper tool to propagate the parameters to HROPEN call
from job options to the converter (NB: Converters has no
properties, therefore some helper component(tool or service
is required), but the existing appropriate conversion service
could not be used due to technical liminations)
Modified files:
---------------
src/HFileCnv.cpp
src/HFileCnv.h
use helper "HbookTool" to obtain the HROPEN configuration
src/HbookDef.h
add the declarations of setquest_/getquest_ functions
src/HbookCnv_load.cpp
add the new component "HbookTool"
The behaviour is 100% backward compatible.
!==================== HbookCnv v14r5 ===================================
! 2005-08-14 - Chris Jones
- Update Histogram and NTuple converters to reassign IDs if a
non-numeric ID is found. Reassigned IDs start at 1001 and increment
each time. If subsequently, an ID is found (in the same directry)
that corresponds to one of the reassigned IDs, then that ID is also
reassigned (This only occurs if a mixture of numeric and
non-numeric IDs is used, which is probably rare). A warning is
issued for all reassignments.
!==================== HbookCnv v14r4 ===================================
! 2005-08-26 - Hubert Degaudenzi
- fix for the problem of the overflow of the 2D histograms. HbookCnv
was producing wrong numbers for overflows in N/W/S/E summing up the
whole row/column. (Stefan Roiser)
!==================== HbookCnv v14r3 ===================================
! 2005-01-21 - Pere Mato
- requirements: removed link flag -BSymbolic to fix the problem of failing dynamic cast. With that
change the PAW common bock is "shared" for all application.
!==================== HbookCnv v14r2p1 ===================================
! 2004-09-14 - Pere Mato
- mzpaw.F: changes needed for SCL3 platform. The dynamically allocated
memory is located before the /PAWC/ in this platfrom making imposible
to extent the /PAWC/ common block.
The solution has been to allocate a "reasonable" size (250000) and only try to
extern it if the requested size is bigger.
This is clearly a hack but we didn't get any help from the original
author of the code on how to handle this case.
!==================== HbookCnv v14r2 ===================================
! 2004-07-06 - Pere Mato
- requirements: changed to use new LCGCMT interface packages
!==================== HbookCnv v14r1 ===================================
! 2004-01-14 - Charles Leggett
- HNTupleCnv.cpp - deal with empty ntuples
!==================== HbookCnv v14r0 ===================================
! 2003-10-28 - Grigori Rybkine
- Adapted for use with the version of HistogramSvc using (instead of HTL)
the ROOT based AIDA histograms implementation from the LCG PI project
This includes:
- change to the new AIDA version 3.0.0
- the modified histogram converter class H1DCnv responsible now for
conversion of 1D fixed and variable bin size histograms (class
H1DVarCnv removed)
- the chages to HDirectoryCnv.cpp due to the modification of H1DCnv
- the updated histogram converter class H2DCnv, as before, is
responsible for conversion of 2D fixed bin size histograms; it also
can convert 2D variable bin size histograms into 2D fixed bin size HBOOK
histograms, producing the warning that the persistent histogram is
inaccurate as 2D variable bin size histograms are not supported in HBOOK
! 2003-08-05 - Pere Mato
- Removed warnings produced by VC7
- Adapted to new version of GaudiKernel (POOL integration)
!==================== HbookCnv v13r4 ===================================
! 2003-07-11 - Florence RANJARD
- HDileCnv.cpp - use P in mode to keep the RZfile name as it is
avoid conversion to lower case.
- init_hbook.F - use P in options of hropen to NOT convert the filename
to lower case.
!==================== HbookCnv v13r3 ==========================
! 2003-04-29 - Pere Mato
- Undo last change
! 2003-04-01 - Sebastien PONCE
- remove the -Bsymbolic option at link time. This is incompatible
with gcc 3.2. Everything seems to work without it.
!==================== HbookCnv v13r2p1 ==========================
! 2002-11-29 - Pere Mato
- Corrections to support linking applications statically
!==================== HbookCnv v13r2 ==========================
! 20021108 - Markus Frank
- Implement histogram reading for H1D, H1DVar, H2D
But be careful:
AIDA does NOT support to set bin contents/errors directly.
The best I could do is to set the content; the errors will
be sqrt(content). RMS, MEAN etc. are not correct.
- Change all factories to export only IFactory reference:
Makes GaudiSvc_load much simpler.
Specialized IXXXFactory reference is not necessary
!==================== HbookCnv v13r1p1 ==========================
! 20021020 - Markus Frank
- Pad tag names properly for row wise N-tuples to make
!==================== HbookCnv v13r1 ==========================
!==================== HbookCnv v13r0p1 ==========================
! 2002-09-23 - Florence Ranjard
- requirements - use v*
!==================== HbookCnv v13r0 ============================
! 2002-07-16 - Florence Ranjard
- requirements - use CERNLIB v2r2002p* and AIDA v3r22p*
! 2002-06-04 - Charles Leggett
- write/read CWNTuples with multiple blocks.
writing to block "LEPTON":
nt->addItem ("LEPTON/NELE", m_nele, 0, 100);
nt->addItem ("LEPTON/PXELE", m_pxele, m_nele);
if no block name is given, variables will be put in a block
called AUTO_BLK
nt->addItem ("Event", m_event);
reading:
use same format as for writing
nt->item("LEPTON/NELE", m_nele);
nt->item("LEPTON/PXELE", m_pxele);
nt->item("Event",m_event);
Block names must be at most 8 characters.
! 2002-05-15 - Paolo Calafiura
- changes to dinamically resize pawc. //Charles
======================v12r0=====================================
! 20020408 - Pere Mato
- Removed importing dependency to CERBLIB
! 20020227 - Pere Mato
- Modified to be adapted to the new AIDA interfaces (2.2)
======================v11r0=====================================
! 20011116 - Marco Cattaneo
- New job option HistogramPersistencySvc.PrintHistos to steer
printing to standard output. Defaults to false.
- Persistency service fails initialize if output file not defined.
! 20011112 - Markus Frank
- Adaptation to the new Data Store classes
! 20010807 - Markus Frank
- Allow RZ directory names up to 16 characters rather than 8.
- Delete histograms from PAW common after they were written to
disk; saves memory space, which was a problem.
! 20010720 - Pere Mato
- Fixed the bug that was eliminating the first character in the
histogram titles.
! 20010703 - Markus Frank
- Introduce new option to Hbook histogram persistency service
to steer the handling of row-wise N-tuples, because many people
complained about the additional column in the N-tuple.
The following options are possible:
Note: New DEFAULT is FLOAT_ONLY.
// Old style (uses the additional column - backwards compatible)
HistogramPersistencySvc.RowWiseNtuplePolicy = "USE_DATA_TYPES";
// Save and retrieve all variables as NTuple::Item<float> ONLY
HistogramPersistencySvc.RowWiseNtuplePolicy = "FLOAT_ONLY";
// Fortran: IMPLICIT REAL*4 A-H,O-Z
// IMPLICIT INTEGER*4 I-N
HistogramPersistencySvc.RowWiseNtuplePolicy = "FORTRAN_STYLE";
// Hungarian notation: Use variable name to determine type
// (first and possibly second char)
// Bxxx -> bool
// Cxxx -> char
// Ixxx -> int
// UIxxx-> unsigned int
// Fxxx -> float etc.
HistogramPersistencySvc.RowWiseNtuplePolicy = "HUNGARIAN_STYLE";
! 20010627 - Markus Frank
HbookDef.h Add declaration for HRESET
HConverter.h/cpp Common base class now for NTuples & Histograms.
Proper RZ directory handling for both
RZ and //PAWC objects. Histograms now
temporarily go to the //PAWC/stat/... directory
instead of being created in //PAWC, which caused
clashes.
H1DCnv.h/cpp
H1DVarCnv.h/cpp
H2DCnv.h/cpp Adjusted to make use of base class HConverter,
including proper directory handling.
DirectoryCnv.h/cpp Nearly dummy; uses base class HDirectoryCnv
PersSvc.cpp Cosmetics
! 20010626 - Pere Mato
- Changed to use the AIDA interfaces. The IAnnotation is used to obtain the histogram
title and histogram id.
! 20010508 - Pere Mato
- Using GaudiKernel v10
! 20010315 - David Quarrie
Support multiple blocks per ntuple. Fix some minor character string handling
problems.
! 20010223 - David Quarrie
Fixes to avoid having to specify a histogram output file even if only ntuples
are being created. Template specialization tweaks for Solaris.
! 20010119 - Pere Mato
Accomodate to the changes in GaudiKernel. Removed the extern declarations to access
IIDs.
! 20001108 - HbookCnv v7
! 20000603 - HbookCnv v6r1
Some bug fixes for new version of the NTuple Svc
M.Frank
! 20000720 - HbookCnv v6r1
! 20000603 - HbookCnv v6
Increased buffer size of PAWC = 1MByte; adjust buffer size of N-tuples.
Compiles on Linux without warnings using -ansi -Wall
M.Frank
! 20000530 - HbookCnv v6
The hbook file used for NTuples was not closed properly.
(wrong arguments to HREND(...) call)
M.Frank
! 20000410 - HbookCnv v6
Use CERNLIB v2000 - Marco Cattaneo 20000328
New Functionality
-----------------
- New 1D and 2D histogram convertors, supporting the AIDA interfaces
- HPRINT will be called only in DEBUG level of MessageSvc
Changes done Pavel Binko
! 19991116 - HbookCnv v5
New Funtionality
----------------
- New directory converter
- New converters for Column- and Raw-Wise Ntuples
Changes done by Markus Frank and Pavel Binko
! 19991018 - HbookCnv v4r1
New Funtionality
----------------
- The converters support now the HTL histograms
- h1D and H2D converters available
Changes done by Pavel Binko
! 19990617 - HbookCnv v3
Fix in the initialisation of HBOOK to test wether
ZEBRA was already initialized before (e.g. by Geant).
M.Frank
! 19990203 - HbookCnv v1
New package.
INTEGER FUNCTION CWNTBOOK(ID, CTITLE, COPT)
IMPLICIT NONE
INTEGER ID
CHARACTER*(*) CTITLE, COPT
LOGICAL HEXIST
IF ( .NOT.HEXIST(ID) ) THEN
CALL HBNT(ID, CTITLE, COPT)
CWNTBOOK = 1
ELSE
CWNTBOOK = 0
END IF
END
INTEGER FUNCTION CWNTINFO(NTUPLE_ID, ! n tuple ID
> VAR_NAME, ! variable names
> VAR_DIM, ! # of dimensions of var
> VAR_THEDIM, ! array with dimensions
> VAR_HASINDEX, ! flag for index column
> VAR_INDEX, ! name with index column
> VAR_TYPE, ! variable type
> VAR_SIZE, ! variable's packing size
> VAR_HASRANGE, ! range
> VAR_IRANGE, ! integer range (if int)
> VAR_FRANGE, ! floating range (if real)
> NTUPLE_TITLE, ! N tuple title
> NTUPLE_DIM, ! # of variables in tuple
> NTUPLE_NENT, ! # of entries in tuple
> NTUPLE_BLOCK) ! all ntuple block names
*.==========>
*.
*. To print statistics about a new N-tuple
*.
*..=========> ( A.A.Rademakers )
* Hacked up to retrieve information in one structure by M.Frank
*
CHARACTER*(*) VAR_NAME(*)
INTEGER VAR_DIM(*)
INTEGER VAR_THEDIM(5,*)
INTEGER VAR_HASINDEX(*)
CHARACTER*(*) VAR_INDEX(*)
CHARACTER*1 VAR_TYPE(*)
INTEGER VAR_SIZE(*)
INTEGER VAR_HASRANGE(*)
INTEGER VAR_IRANGE(2,*)
REAL*8 VAR_FRANGE(2,*)
INTEGER NTUPLE_ID
CHARACTER*(*) NTUPLE_TITLE
INTEGER NTUPLE_NENT
INTEGER NTUPLE_DIM
CHARACTER*(*) NTUPLE_BLOCK(*)
#include "hbook/hcntpar.inc"
#include "hbook/hcnt.inc"
#include "hbook/hcflag.inc"
#include "hbook/hcbook.inc"
#include "hbook/hcbits.inc"
#include "hbook/hcunit.inc"
*
CHARACTER*8 NTUPLE_BLK
CHARACTER*32 NAME, SUBS
LOGICAL VTUP, LDUM
INTEGER IENT
*
IENT = 0
ID = NTUPLE_ID
IDPOS = LOCATI(IQ(LTAB+1),IQ(LCDIR+KNRH),ID)
IF (IDPOS .LE. 0) THEN
CWNTINFO = 0
RETURN
ENDIF
LCID = LQ(LTAB-IDPOS)
I4 = JBIT(IQ(LCID+KBITS),4)
IF (I4 .EQ. 0) RETURN
IF (IQ(LCID-2) .NE. ZLINK) THEN
CWNTINFO = 0
RETURN
ENDIF
*
ICOLS = 0
VTUP = .FALSE.
*
LBLOK = LQ(LCID-1)
LCHAR = LQ(LCID-2)
LINT = LQ(LCID-3)
LREAL = LQ(LCID-4)
*
ITIT1 = IQ(LCID+ZITIT1)
NWTIT = IQ(LCID+ZNWTIT)
*
*-- loop over all blocks
*
5 LNAME = LQ(LBLOK-1)
*
IOFF = 0
NTUPLE_TITLE = ' '
NTUPLE_BLK = ' '
CALL UHTOC(IQ(LBLOK+ZIBLOK), 4, NTUPLE_BLK, 8)
CALL UHTOC(IQ(LCID+ITIT1), 4, NTUPLE_TITLE, NWTIT*4)
NTUPLE_DIM = IQ(LBLOK+ZNDIM)
NTUPLE_NENT = IQ(LCID+ZNOENT)
*
DO 10 I = 1, NTUPLE_DIM
IENT = IENT + 1
NTUPLE_BLOCK(IENT) = NTUPLE_BLK
* WRITE(*,*) 'NTUPLE_BLOCK: ',NTUPLE_BLK, NTUPLE_BLOCK(IENT)
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)
VAR_NAME(IENT)(1:LL) = NAME(1:LL)
VAR_DIM(IENT) = 0
VAR_SIZE(IENT) = NBITS
IELEM = 1
IF (NSUB .GT. 0) THEN
DO 20 J = 1, NSUB
LP = IQ(LINT+IQ(LNAME+IOFF+ZARIND)+(J-1))
IF (LP .LT. 0) THEN
IE = -LP
VAR_DIM(IENT) = VAR_DIM(IENT) + 1
VAR_THEDIM(VAR_DIM(IENT),IENT) = IE
VAR_HASINDEX(IENT) = 0
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)
VTUP = .TRUE.
VAR_HASINDEX(IENT) = 1
VAR_INDEX(IENT) = SUBS(1:LENOCC(SUBS))
ENDIF
IELEM = IELEM*IE
*
20 CONTINUE
IF ( VAR_HASINDEX(IENT).EQ.1 ) THEN
VAR_DIM(IENT) = VAR_DIM(IENT) + 1
END IF
ENDIF
*
IF (IQ(LNAME+IOFF+ZRANGE) .NE. 0) THEN
LP = IQ(LNAME+IOFF+ZRANGE)
IF (ITYPE .EQ. 1) THEN
VAR_FRANGE(1,IENT) = Q(LREAL+LP)
VAR_FRANGE(2,IENT) = Q(LREAL+LP+1)
ELSEIF (ITYPE.EQ.2 .OR. ITYPE.EQ.3) THEN
VAR_IRANGE(1,IENT) = IQ(LINT+LP)
VAR_IRANGE(2,IENT) = IQ(LINT+LP+1)
ELSEIF (ITYPE.EQ.4) THEN
VAR_IRANGE(1,IENT) = 0
VAR_IRANGE(2,IENT) = 1
ENDIF
VAR_HASRANGE(IENT) = 1
ENDIF
*
IF (ITYPE .EQ. 1) THEN
VAR_TYPE(IENT) = 'R'
ELSEIF (ITYPE .EQ. 2) THEN
VAR_TYPE(IENT) = 'I'
ELSEIF (ITYPE .EQ. 3) THEN
VAR_TYPE(IENT) = 'U'
ELSEIF (ITYPE .EQ. 4) THEN
VAR_TYPE(IENT) = 'L'
ELSEIF (ITYPE .EQ. 5) THEN
VAR_TYPE(IENT) = 'C'
ENDIF
*
ICOLS = ICOLS + IELEM
IOFF = IOFF + ZNADDR
10 CONTINUE
*
LBLOK = LQ(LBLOK)
IF (LBLOK .NE. 0) GOTO 5
*
CWNTINFO = 1
* DO 100 II = 1 , IENT
* WRITE(*,*) NTUPLE_BLOCK(II), VAR_NAME(II)
* 100 CONTINUE
NTUPLE_DIM = IENT
END
// $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/HbookCnv/src/ConvSvc.cpp,v 1.4 2006/01/10 20:11:13 hmd Exp $
#define HBOOKCNV_ConvSvc_CPP
// Include files
#include "GaudiKernel/SvcFactory.h"
#include "GaudiKernel/ConversionSvc.h"
//------------------------------------------------------------------------------
//
// Implementation of class : HbookCnv::ConvSvc
//
// Author : Pavel Binko
//
//------------------------------------------------------------------------------
namespace HbookCnv {
class ConvSvc : public ConversionSvc {
public: