Any.h   Any.h 
// @(#)root/reflex:$Id: Any.h 22798 2008-03-20 17:44:12Z axel $ // @(#)root/reflex:$Id: Any.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// See http://www.boost.org/libs/any for Documentation. // See http://www.boost.org/libs/any for Documentation.
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. // Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
skipping to change at line 30 skipping to change at line 30
// Ed Brey, Mark Rodgers, Peter Dimov, and James Curran // Ed Brey, Mark Rodgers, Peter Dimov, and James Curran
// when: July 2001 // when: July 2001
// where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95 // where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include <algorithm> #include <algorithm>
#include <typeinfo> #include <typeinfo>
#include <iostream> #include <iostream>
namespace Reflex { namespace Reflex {
/**
* @class Any Any.h Reflex/Any.h
* @author K. Henney
*/
class RFLX_API Any {
friend RFLX_API std::ostream& operator <<(std::ostream&,
const Any&);
public:
/** Constructor */
Any():
fContent(0) {}
/** Constructor */
template <typename ValueType> Any(const ValueType &value):
fContent(new Holder<ValueType>(value)) {}
/** Copy Constructor */
Any(const Any &other):
fContent(other.fContent ? other.fContent->Clone() : 0) {}
/** Dtor */
~Any() {
delete fContent;
}
/** /** Clear the content */
* @class Any Any.h Reflex/Any.h void
* @author K. Henney Clear() {
*/ if (!Empty()) {
class RFLX_API Any { delete fContent;
fContent = 0;
friend RFLX_API std::ostream& operator << ( std::ostream&, }
const Any& ); }
public:
/** Constructor */ /** bool operator */
Any() operator bool() {
: fContent( 0 ) {} return !Empty();
}
/** Constructor */ /** Modifier */
template< typename ValueType > Any( const ValueType & value ) Any&
: fContent( new Holder<ValueType>( value )) {} Swap(Any& rhs) {
std::swap(fContent, rhs.fContent);
return *this;
}
/** Copy Constructor */ /** Modifier */
Any(const Any & other) template <typename ValueType> Any&
: fContent( other.fContent ? other.fContent->Clone() : 0 ) {} operator =(const ValueType& rhs) {
Any(rhs).Swap(*this);
return *this;
}
/** Dtor */ /** Modifier */
~Any() { Any&
delete fContent; operator =(const Any& rhs) {
} Any(rhs).Swap(*this);
return *this;
}
/** Clear the content */ /** Query */
void Clear() { bool
if ( ! Empty() ) { Empty() const {
delete fContent; return !fContent;
fContent = 0; }
}
}
/** bool operator */ /** Query */
operator bool () { const std::type_info&
return ! Empty(); TypeInfo() const {
} return fContent ? fContent->TypeInfo() : typeid(void);
}
/** Modifier */ /** Adress */
Any & Swap( Any & rhs ) { void*
std::swap( fContent, rhs.fContent); Address() const {
return *this; return fContent ? fContent->Address() : 0;
} }
/** Modifier */ private:
template< typename ValueType > Any & operator=( const ValueType & rhs // or public: ?
) { /**
Any( rhs ).Swap( * this ); * @class Placeholder BoostAny.h Reflex/BoostAny.h
return * this; * @author K. Henney
} */
class Placeholder {
public:
/** Constructor */
Placeholder() {}
/** Modifier */ /** Destructor */
Any & operator=( const Any & rhs ) { virtual ~Placeholder() {}
Any( rhs ).Swap( * this );
return * this;
}
/** Query */ /** Query */
bool Empty() const { virtual const std::type_info& TypeInfo() const = 0;
return ! fContent;
}
/** Query */ /** Query */
const std::type_info & TypeInfo() const { virtual Placeholder* Clone() const = 0;
return fContent ? fContent->TypeInfo() : typeid( void );
}
/** Adress */
void* Address() const {
return fContent ? fContent->Address() : 0;
}
private: // or public: ? /** Query */
virtual void* Address() const = 0;
/** };
* @class Placeholder BoostAny.h Reflex/BoostAny.h
* @author K. Henney
*/
class Placeholder {
public:
/** Constructor */
Placeholder() {}
/** Destructor */
virtual ~Placeholder() {}
/** Query */
virtual const std::type_info & TypeInfo() const = 0;
/** Query */
virtual Placeholder * Clone() const = 0;
/** Query */
virtual void * Address() const = 0;
};
/**
* @class Holder BoostAny.h Reflex/BoostAny.h
* @author K. Henney
*/
template< typename ValueType > class Holder : public Placeholder {
public:
/** Constructor */
Holder( const ValueType & value )
: fHeld( value ) {}
/** Query */
virtual const std::type_info & TypeInfo() const {
return typeid( ValueType );
}
/** Clone */
virtual Placeholder * Clone() const {
return new Holder( fHeld );
}
/** Address */
virtual void * Address() const {
return (void*)(&fHeld);
}
/** representation */ /**
ValueType fHeld; * @class Holder BoostAny.h Reflex/BoostAny.h
* @author K. Henney
*/
template <typename ValueType> class Holder: public Placeholder {
public:
/** Constructor */
Holder(const ValueType& value):
fHeld(value) {}
}; /** Query */
virtual const std::type_info&
TypeInfo() const {
return typeid(ValueType);
}
/** representation */ /** Clone */
template< typename ValueType > friend ValueType * any_cast( Any * ); virtual Placeholder*
Clone() const {
return new Holder(fHeld);
}
// or public: /** Address */
virtual void*
Address() const {
return (void*) (&fHeld);
}
/** representation */ /** representation */
Placeholder * fContent; ValueType fHeld;
}; };
/** /** representation */
* @class BadAnyCast Any.h Reflex/Any.h template <typename ValueType> friend ValueType* any_cast(Any*);
* @author K. Henney
*/
class BadAnyCast : public std::bad_cast {
public:
/** Constructor */ // or public:
BadAnyCast() {}
/** Query */ /** representation */
virtual const char * what() const throw() { Placeholder* fContent;
return "BadAnyCast: failed conversion using any_cast";
}
};
/** throw */ };
template < class E > void throw_exception( const E & e ) {
throw e; /**
* @class BadAnyCast Any.h Reflex/Any.h
* @author K. Henney
*/
class BadAnyCast: public std::bad_cast {
public:
/** Constructor */
BadAnyCast() {}
/** Query */
virtual const char*
what() const throw() {
return "BadAnyCast: failed conversion using any_cast";
} }
/** value */ };
template< typename ValueType > ValueType * any_cast( Any * operand ) {
return operand && operand->TypeInfo() == typeid( ValueType )
? & static_cast< Any::Holder< ValueType > * >( operand->fContent )
->fHeld : 0;
}
/** value */ /** throw */
template< typename ValueType > const ValueType * any_cast( const Any * o template <class E> void
perand ) { throw_exception(const E& e) {
return any_cast< ValueType >( const_cast< Any * >( operand )); throw e;
} }
/** value */
template <typename ValueType> ValueType*
any_cast(Any* operand) {
return operand && operand->TypeInfo() == typeid(ValueType)
? &static_cast<Any::Holder<ValueType>*>(operand->fContent)->fHeld
: 0;
}
/** value */
template <typename ValueType> const ValueType*
any_cast(const Any* operand) {
return any_cast<ValueType>(const_cast<Any*>(operand));
}
/** value */
template <typename ValueType> ValueType
any_cast(const Any& operand) {
const ValueType* result = any_cast<ValueType>(&operand);
/** value */ if (!result) {
template< typename ValueType > ValueType any_cast( const Any & operand ) throw_exception(BadAnyCast());
{
const ValueType * result = any_cast< ValueType >( & operand );
if ( ! result ) { throw_exception( BadAnyCast()); }
return * result;
} }
return *result;
}
/** stream operator */ /** stream operator */
RFLX_API std::ostream& operator << ( std::ostream&, RFLX_API std::ostream& operator <<(std::ostream&,
const Any& ); const Any&);
} // namespace Reflex } // namespace Reflex
#endif // Reflex_Any #endif // Reflex_Any
 End of changes. 30 change blocks. 
155 lines changed or deleted 165 lines changed or added


 Base.h   Base.h 
// @(#)root/reflex:$Id: Base.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: Base.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef REFLEX_BASE_H #ifndef REFLEX_BASE_H
#define REFLEX_BASE_H 1 #define REFLEX_BASE_H 1
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Type.h" #include "Reflex/Type.h"
namespace Reflex { namespace Reflex {
// forward declarations
// forward declarations /**
* @class Base Base.h Reflex/Base.h
* @author Stefan Roiser
* @date 2004-01-28
* @ingroup Ref
*/
class RFLX_API Base {
friend class Class;
public:
/** default constructor */
Base();
/** constructor */
Base(const Type &baseType,
OffsetFunction offsetFP,
unsigned int modifiers = 0);
/** destructor */
virtual ~Base() {}
/**
* the bool operator returns true if the type of the base is resolved (i
mplemented)
* @return true if base type is implemented
*/
operator bool() const;
/**
* Name will return the string represenation of the base class
* @param typedefexp expand typedefs or not
* @return string represenation of base class
*/
std::string Name(unsigned int mod = 0) const;
/**
* IsPrivate will return true if the inheritance is private
* @return true if inheritance is private
*/
bool IsPrivate() const;
/**
* IsProtected will return true if the inheritance is protected
* @return true if inheritance is protected
*/
bool IsProtected() const;
/**
* IsPublic will return true if the inheritance is public
* @return true if inheritance is public
*/
bool IsPublic() const;
/**
* IsVirtual will return true if the inheritance is virtual
* @return true if inheritance is virtual
*/
bool IsVirtual() const;
/** /**
* @class Base Base.h Reflex/Base.h * Offset will return the Offset to the base class as int
* @author Stefan Roiser * @return Offset to base class
* @date 2004-01-28 */
* @ingroup Ref size_t Offset(void* mem = 0) const;
*/
class RFLX_API Base {
friend class Class;
public:
/** default constructor */
Base();
/** constructor */
Base( const Type & baseType,
OffsetFunction offsetFP,
unsigned int modifiers = 0 );
/** destructor */
virtual ~Base() {}
/**
* the bool operator returns true if the type of the base is resolved
(implemented)
* @return true if base type is implemented
*/
operator bool () const;
/**
* Name will return the string represenation of the base class
* @param typedefexp expand typedefs or not
* @return string represenation of base class
*/
std::string Name( unsigned int mod = 0 ) const;
/**
* IsPrivate will return true if the inheritance is private
* @return true if inheritance is private
*/
bool IsPrivate() const;
/**
* IsProtected will return true if the inheritance is protected
* @return true if inheritance is protected
*/
bool IsProtected() const;
/**
* IsPublic will return true if the inheritance is public
* @return true if inheritance is public
*/
bool IsPublic() const;
/**
* IsVirtual will return true if the inheritance is virtual
* @return true if inheritance is virtual
*/
bool IsVirtual() const;
/**
* Offset will return the Offset to the base class as int
* @return Offset to base class
*/
size_t Offset(void * mem = 0) const;
/**
* OffsetFP will return a pointer to the function which calculates the
Offset
* between the two classes
* @return pointer to Offset calculating function
*/
OffsetFunction OffsetFP() const;
/**
* ToType will return this base classes type
* @param mod accepts FINAL to go to the final type for a typedef
* @return type of base class
*/
Type ToType() const;
/**
* ToScope will return this base classes scope
* @return this base class as scope
*/
Scope ToScope() const;
private:
const Class * BaseClass() const;
private:
/** function pointer to Stubfunction for Offset calculation */
OffsetFunction fOffsetFP;
/** modifiers of inheritance relation */
unsigned int fModifiers;
/**
* pointer to base class
* @label base bype
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
Type fBaseType;
/**
* back link to the class corresponding to the base
* @label base class
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 0..1
**/
mutable
const Class * fBaseClass;
}; // class Base /**
* OffsetFP will return a pointer to the function which calculates the O
ffset
* between the two classes
* @return pointer to Offset calculating function
*/
OffsetFunction OffsetFP() const;
/**
* ToType will return this base classes type
* @param mod accepts FINAL to go to the final type for a typedef
* @return type of base class
*/
Type ToType() const;
/**
* ToScope will return this base classes scope
* @return this base class as scope
*/
Scope ToScope() const;
private:
const Class* BaseClass() const;
private:
/** function pointer to Stubfunction for Offset calculation */
OffsetFunction fOffsetFP;
/** modifiers of inheritance relation */
unsigned int fModifiers;
/**
* pointer to base class
* @label base bype
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
Type fBaseType;
/**
* back link to the class corresponding to the base
* @label base class
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 0..1
**/
mutable
const Class * fBaseClass;
}; // class Base
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base::Base() inline Reflex::Base::Base()
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fOffsetFP( 0 ), : fOffsetFP(0),
fModifiers( 0 ), fModifiers(0),
fBaseType( 0, 0 ), fBaseType(0, 0),
fBaseClass( 0 ) {} fBaseClass(0) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base::operator bool () const { inline
Reflex::Base::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fBaseType ) return true; if (fBaseType) {
return true;
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Base::IsPrivate() const { inline bool
Reflex::Base::IsPrivate() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PRIVATE); return 0 != (fModifiers & PRIVATE);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Base::IsProtected() const { inline bool
Reflex::Base::IsProtected() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PROTECTED); return 0 != (fModifiers & PROTECTED);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Base::IsPublic() const { inline bool
Reflex::Base::IsPublic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PUBLIC); return 0 != (fModifiers & PUBLIC);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Base::IsVirtual() const { inline bool
Reflex::Base::IsVirtual() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & VIRTUAL); return 0 != (fModifiers & VIRTUAL);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Base::Offset(void * mem) const { inline size_t
Reflex::Base::Offset(void* mem) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fOffsetFP( mem ); return fOffsetFP(mem);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::OffsetFunction Reflex::Base::OffsetFP() const { inline Reflex::OffsetFunction
Reflex::Base::OffsetFP() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fOffsetFP; return fOffsetFP;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Base::ToType() const { inline Reflex::Type
Reflex::Base::ToType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fBaseType; return fBaseType;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Base::ToScope() const { inline Reflex::Scope
Reflex::Base::ToScope() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// We are invoking "Type::operator Scope() const" here, // We are invoking "Type::operator Scope() const" here,
// be very careful with the cast (do not cast to a reference). // be very careful with the cast (do not cast to a reference).
return static_cast<const Scope>(fBaseType); return static_cast<const Scope>(fBaseType);
} }
#endif // Reflex_Base #endif // Reflex_Base
 End of changes. 18 change blocks. 
137 lines changed or deleted 144 lines changed or added


 BinData.h   BinData.h 
// @(#)root/mathcore:$Id: BinData.h 28946 2009-06-11 15:39:14Z moneta $ // @(#)root/mathcore:$Id: BinData.h 29513 2009-07-17 15:30:07Z moneta $
// Author: L. Moneta Wed Aug 30 11:15:23 2006 // Author: L. Moneta Wed Aug 30 11:15:23 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class BinData // Header file for class BinData
skipping to change at line 427 skipping to change at line 427
*/ */
void Resize (unsigned int npoints); void Resize (unsigned int npoints);
/** /**
return number of fit points return number of fit points
*/ */
unsigned int NPoints() const { return fNPoints; } unsigned int NPoints() const { return fNPoints; }
/** /**
return number of fit points return number of fit points
In case of integral option size is npoints -1
*/ */
unsigned int Size() const { unsigned int Size() const { return fNPoints; }
return (Opt().fIntegral && fNPoints > 0) ? fNPoints-1 : fNPoints;
}
/** /**
return coordinate data dimension return coordinate data dimension
*/ */
unsigned int NDim() const { return fDim; } unsigned int NDim() const { return fDim; }
/** /**
apply a Log transformation of the data values apply a Log transformation of the data values
can be used for example when fitting an exponential or gaussian can be used for example when fitting an exponential or gaussian
Transform the data in place need to copy if want to preserve original data Transform the data in place need to copy if want to preserve original data
The data sets must not contain negative values. IN case it does, The data sets must not contain negative values. IN case it does,
an empty data set is returned an empty data set is returned
*/ */
BinData & LogTransform(); BinData & LogTransform();
/**
return an array containing the upper edge of the bin for coordinate
i
In case of empty bin they could be merged in a single larger bin
Return a NULL pointer if the bin width is not stored
*/
const double * BinUpEdge(unsigned int icoord) const {
if (fBinEdge.size() == 0 || icoord*fDim > fBinEdge.size() ) return 0;
return &fBinEdge[ icoord * fDim];
}
/**
add the bin width data, a pointer to an array with the bin upper edg
e information.
This is needed when fitting with integral options
The information is added for the previously inserted point.
BinData::Add must be called before
*/
void AddBinUpEdge(const double * binwidth);
protected: protected:
void SetNPoints(unsigned int n) { fNPoints = n; } void SetNPoints(unsigned int n) { fNPoints = n; }
private: private:
unsigned int fDim; // coordinate dimension unsigned int fDim; // coordinate dimension
unsigned int fPointSize; // total point size including value and errors (= fDim + 2 for error in only Y ) unsigned int fPointSize; // total point size including value and errors (= fDim + 2 for error in only Y )
unsigned int fNPoints; // number of contained points in the data set ( can be different than size of vector) unsigned int fNPoints; // number of contained points in the data set ( can be different than size of vector)
DataVector * fDataVector; // pointer to the copied in data vector DataVector * fDataVector; // pointer to the copied in data vector
DataWrapper * fDataWrapper; // pointer to the external data wrapper str ucture DataWrapper * fDataWrapper; // pointer to the external data wrapper str ucture
std::vector<double> fBinEdge; // vector containing the bin upper edge (
coordinate will contain low edge)
#ifdef USE_BINPOINT_CLASS #ifdef USE_BINPOINT_CLASS
mutable BinPoint fPoint; mutable BinPoint fPoint;
#endif #endif
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
 End of changes. 5 change blocks. 
5 lines changed or deleted 25 lines changed or added


 Bytes.h   Bytes.h 
/* @(#)root/base:$Id: Bytes.h 28501 2009-05-08 15:19:47Z rdm $ */ /* @(#)root/base:$Id: Bytes.h 29788 2009-08-14 22:47:46Z pcanal $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Bytes #ifndef ROOT_Bytes
skipping to change at line 42 skipping to change at line 42
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef __CINT__ #ifndef __CINT__
#include <string.h> #include <string.h>
#endif #endif
#if (defined(__linux) || defined(__APPLE__)) && defined(__i386__) && \ #if (defined(__linux) || defined(__APPLE__)) && \
(defined(__i386__) || defined(__x86_64__)) && \
defined(__GNUC__) defined(__GNUC__)
#define R__USEASMSWAP #define R__USEASMSWAP
#endif #endif
//Big bug in inline byte swapping code with Intel's icc //Big bug in inline byte swapping code with Intel's icc
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1000 #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1000
#undef R__USEASMSWAP #undef R__USEASMSWAP
#endif #endif
#if defined(R__USEASMSWAP) && !defined(__CINT__) #if defined(R__USEASMSWAP) && !defined(__CINT__)
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 Byteswap.h   Byteswap.h 
/* @(#)root/base:$Id: Byteswap.h 20877 2007-11-19 11:17:07Z rdm $ */ /* @(#)root/base:$Id: Byteswap.h 29820 2009-08-19 14:12:40Z rdm $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Byteswap #ifndef ROOT_Byteswap
skipping to change at line 100 skipping to change at line 100
# endif # endif
#else #else
# define R__bswap_32(x) R__bswap_constant_32 (x) # define R__bswap_32(x) R__bswap_constant_32 (x)
#endif #endif
#if defined __GNUC__ && __GNUC__ >= 2 #if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */ /* Swap bytes in 64 bit value. */
# define R__bswap_64(x) \ # define R__bswap_64(x) \
(__extension__ \ (__extension__ \
({ union { __extension__ unsigned long long int __ll; \ ({ union { __extension__ unsigned long long int __ll; \
unsigned long int __l[2]; } __w, __r; \ UInt_t __l[2]; } __w, __r; \
__w.__ll = (x); \ __w.__ll = (x); \
__r.__l[0] = R__bswap_32 (__w.__l[1]); \ __r.__l[0] = R__bswap_32 (__w.__l[1]); \
__r.__l[1] = R__bswap_32 (__w.__l[0]); \ __r.__l[1] = R__bswap_32 (__w.__l[0]); \
__r.__ll; })) __r.__ll; }))
#endif /* bits/byteswap.h */ #endif /* bits/byteswap.h */
/* The following definitions must all be macros since otherwise some /* The following definitions must all be macros since otherwise some
of the possible optimizations are not possible. */ of the possible optimizations are not possible. */
/* Return a value with all bytes in the 16 bit argument swapped. */ /* Return a value with all bytes in the 16 bit argument swapped. */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Callback.h   Callback.h 
// @(#)root/reflex:$Id: Callback.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: Callback.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_Callback #ifndef Reflex_Callback
#define Reflex_Callback #define Reflex_Callback
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class Type;
class Member;
/**
* @class Callback Callback.h Reflex/Callback.h
* @author Pere Mato
* @date 12/11/2004
* @ingroup Ref
*/
class RFLX_API ICallback {
public:
/** constructor */
ICallback() {}
// forward declarations /** destructor */
class Type; virtual ~ICallback() {}
class Member;
/** /**
* @class Callback Callback.h Reflex/Callback.h * operator call (virtual)
* @author Pere Mato */
* @date 12/11/2004 virtual void operator ()(const Type&) = 0;
* @ingroup Ref virtual void operator ()(const Member&) = 0;
*/
class RFLX_API ICallback { }; // class ICallback
public: RFLX_API void InstallClassCallback(ICallback* cb);
RFLX_API void UninstallClassCallback(ICallback* cb);
/** constructor */ RFLX_API void FireClassCallback(const Type&);
ICallback() {} RFLX_API void FireFunctionCallback(const Member&);
/** destructor */
virtual ~ICallback() {}
/**
* operator call (virtual)
*/
virtual void operator () ( const Type & ) = 0;
virtual void operator () ( const Member & ) = 0;
}; // class ICallback
RFLX_API void InstallClassCallback( ICallback * cb );
RFLX_API void UninstallClassCallback( ICallback * cb );
RFLX_API void FireClassCallback( const Type & );
RFLX_API void FireFunctionCallback( const Member & );
} // namespace Reflex } // namespace Reflex
#endif // Reflex_Callback #endif // Reflex_Callback
 End of changes. 4 change blocks. 
31 lines changed or deleted 28 lines changed or added


 ClassBuilder.h   ClassBuilder.h 
// @(#)root/reflex:$Id: ClassBuilder.h 28992 2009-06-15 09:20:22Z axel $ // @(#)root/reflex:$Id: ClassBuilder.h 29355 2009-07-06 17:34:05Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ClassBuilder #ifndef Reflex_ClassBuilder
#define Reflex_ClassBuilder #define Reflex_ClassBuilder
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Tools.h" #include "Reflex/Tools.h"
#include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Member.h" #include "Reflex/Member.h"
#include "Reflex/Callback.h" #include "Reflex/Callback.h"
#include "Reflex/Builder/TypeBuilder.h"
// Forward declaration for 'friendship' purpose. // Forward declaration for 'friendship' purpose.
namespace Cint { namespace Internal {} } namespace Cint { namespace Internal {} }
namespace Reflex { namespace Reflex {
// forward declarations
class Class;
class ClassBuilder;
class OnDemandBuilderForScope;
template <typename C> class ClassBuilderT;
/**
* @class ClassBuilderImpl ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser
* @date 30/3/2004
* @ingroup RefBld
*/
class RFLX_API ClassBuilderImpl {
public:
/** constructor */
ClassBuilderImpl(const char* nam, const std::type_info & ti, size_t size
, unsigned int modifiers = 0, TYPE typ = CLASS);
ClassBuilderImpl(Class* cl);
// forward declarations /** destructor */
class Class; virtual ~ClassBuilderImpl();
class ClassBuilder;
template <typename C> class ClassBuilderT;
/**
* @class ClassBuilderImpl ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser
* @date 30/3/2004
* @ingroup RefBld
*/
class RFLX_API ClassBuilderImpl {
public:
/** constructor */
ClassBuilderImpl(const char* nam, const std::type_info& ti, size_t si
ze, unsigned int modifiers = 0, TYPE typ = CLASS);
/** destructor */
virtual ~ClassBuilderImpl();
/**
* AddBase will add the information about one BaseAt class
* @param Name of the BaseAt class
* @param OffsetFP function pointer for Offset calculation
* @param modifiers the modifiers of the class
*/
void AddBase(const Type& bas, OffsetFunction offsFP, unsigned int mod
ifiers = 0);
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param At of the data MemberAt
* @param Offset of the data MemberAt
* @param modifiers the modifiers of the data MemberAt
*/
void AddDataMember(const char* nam, const Type& typ, size_t offs, uns
igned int modifiers = 0);
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param At of the function MemberAt
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params parameter names and default values (semi-colon separ
ated)
* @param modifiers the modifiers of the function MemberAt
*/
void AddFunctionMember(const char* nam, const Type& typ, StubFunction
stubFP, void* stubCtx = 0, const char* params = 0, unsigned int modifiers
= 0);
void AddTypedef(const Type& typ, const char* def);
void AddEnum(const char* nam, const char* values, const std::type_inf
o* ti, unsigned int modifiers = 0);
// This is for anonymous union support.
//void addUnion(const char* nam, const char* values, const std::type_
info& ti, unsigned int modifiers = 0);
/** AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emtpied with the next call of a builder
* class and attached to the item built with this call
*
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
void AddProperty(const char* key, Any value);
void AddProperty(const char* key, const char* value);
/** SetSizeOf will set the SizeOf property for this class.
* It currently ignore all actual content.
* @size Size of the class
*/
void SetSizeOf(size_t size);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
protected: /**
* AddBase will add the information about one BaseAt class
* @param Name of the BaseAt class
* @param OffsetFP function pointer for Offset calculation
* @param modifiers the modifiers of the class
*/
void AddBase(const Type& bas,
OffsetFunction offsFP,
unsigned int modifiers = 0);
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param At of the data MemberAt
* @param Offset of the data MemberAt
* @param modifiers the modifiers of the data MemberAt
*/
void AddDataMember(const char* nam,
const Type& typ,
size_t offs,
unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param At of the function MemberAt
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params parameter names and default values (semi-colon separat
ed)
* @param modifiers the modifiers of the function MemberAt
*/
void AddFunctionMember(const char* nam,
const Type& typ,
StubFunction stubFP,
void* stubCtx = 0,
const char* params = 0,
unsigned int modifiers = 0);
void AddTypedef(const Type& typ,
const char* def);
void AddEnum(const char* nam,
const char* values,
const std::type_info* ti,
unsigned int modifiers = 0);
// This is for anonymous union support.
//void addUnion(const char* nam, const char* values, const std::type_inf
o& ti, unsigned int modifiers = 0);
/** AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emtpied with the next call of a builder
* class and attached to the item built with this call
*
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
void AddProperty(const char* key,
Any value);
void AddProperty(const char* key,
const char* value);
/**
* Register an on demand builder for data members with this class.
*/
void AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb);
/**
* Register an on demand builder for function members with this class.
*/
void AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb);
/** SetSizeOf will set the SizeOf property for this class.
* It currently ignore all actual content.
* @size Size of the class
*/
void SetSizeOf(size_t size);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
friend class ClassBuilder; protected:
template <class C> friend class ClassBuilderT; friend class ClassBuilder;
template <class C> friend class ClassBuilderT;
/** /**
* EnableCallback Enable or disable the callback call in the destruct * EnableCallback Enable or disable the callback call in the destructor
or * @param enable true to enable callback call, false to disable callbac
* @param enable true to enable callback call, false to disable call k call
back call */
*/ void EnableCallback(bool enable = true);
void EnableCallback(bool enable = true);
private: private:
/** current class being built */
Class* fClass;
/** current class being built */ /** last added MemberAt */
Class * fClass; Member fLastMember;
/** last added MemberAt */ /** flag, true if this is truly building a new class */
Member fLastMember; bool fNewClass;
/** flag, true if this is truly building a new class */ /** flag, fire callback in destructor */
bool fNewClass; bool fCallbackEnabled;
}; // class ClassBuilderImpl
/**
* @class ClassBuilder ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser
* @date 24/5/2004
* @ingroup RefBld
*/
class RFLX_API ClassBuilder {
public:
/** constructor */
ClassBuilder(const char* nam, const std::type_info & ti, size_t size, un
signed int modifiers = 0, TYPE typ = CLASS);
ClassBuilder(Class* cl);
/** flag, fire callback in destructor */ /** destructor */
bool fCallbackEnabled; virtual ~ClassBuilder();
}; // class ClassBuilderImpl
/**
* @class ClassBuilder ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser
* @date 24/5/2004
* @ingroup RefBld
*/
class RFLX_API ClassBuilder {
public:
/** constructor */
ClassBuilder(const char* nam, const std::type_info& ti, size_t size,
unsigned int modifiers = 0, TYPE typ = CLASS);
/** destructor */
virtual ~ClassBuilder();
/**
* AddBase will add the information about one BaseAt class
* @param Name of the BaseAt class
* @param OffsetFP function pointer for Offset calculation
* @param modifiers the modifiers of the class
*/
template <class C, class B> ClassBuilder& AddBase(unsigned int modifi
ers = 0);
ClassBuilder& AddBase(const Type& bas, OffsetFunction offsFP, unsigne
d int modifiers = 0);
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param Offset of data MemberAt
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template <class T> ClassBuilder& AddDataMember(const char* nam, size_
t offs, unsigned int modifiers = 0);
ClassBuilder& AddDataMember(const Type& typ, const char* nam, size_t
offs, unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param function templated function MemberAt to extract At informat
ion
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params pamater names and default values (semi-colon separat
ed)
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template <class F> ClassBuilder& AddFunctionMember(const char* nam, S
tubFunction stubFP, void* stubCtx = 0, const char* params = 0, unsigned int
modifiers = 0);
ClassBuilder& AddFunctionMember(const Type& typ, const char* nam, Stu
bFunction stubFP, void* stubCtx = 0, const char* params = 0, unsigned int m
odifiers = 0);
template <typename TD> ClassBuilder& AddTypedef(const char* def);
ClassBuilder& AddTypedef( const Type& typ, const char* def);
ClassBuilder& AddTypedef(const char* typ, const char* def);
template <typename E> ClassBuilder& AddEnum(const char* values, unsig
ned int modifiers = 0);
ClassBuilder& AddEnum(const char* nam, const char* values, const std:
:type_info* ti = 0, unsigned int modifiers = 0);
// This is for anonymous union support.
//ClassBuilder& addUnion(const char* nam, const char* values, unsigne
d int modifiers);
/** AddProperty will add a PropertyNth to the last defined
* data MemberAt, method or class.
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template <typename P> ClassBuilder& AddProperty(const char* key, P va
lue);
/** SetSizeOf will set the SizeOf property for this class.
* It currently ignore all actual content.
* @size Size of the class
*/
ClassBuilder & SetSizeOf(size_t size);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
protected: /**
* AddBase will add the information about one BaseAt class
* @param Name of the BaseAt class
* @param OffsetFP function pointer for Offset calculation
* @param modifiers the modifiers of the class
*/
template <class C, class B> ClassBuilder& AddBase(unsigned int modifiers
= 0);
ClassBuilder& AddBase(const Type& bas,
OffsetFunction offsFP,
unsigned int modifiers = 0);
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param Offset of data MemberAt
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template <class T> ClassBuilder& AddDataMember(const char* nam,
size_t offs,
unsigned int modifiers =
0);
ClassBuilder& AddDataMember(const Type& typ,
const char* nam,
size_t offs,
unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param function templated function MemberAt to extract At informatio
n
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params pamater names and default values (semi-colon separated
)
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template <class F> ClassBuilder& AddFunctionMember(const char* nam,
StubFunction stubFP,
void* stubCtx = 0,
const char* params =
0,
unsigned int modifier
s = 0);
ClassBuilder& AddFunctionMember(const Type& typ,
const char* nam,
StubFunction stubFP,
void* stubCtx = 0,
const char* params = 0,
unsigned int modifiers = 0);
template <typename TD> ClassBuilder& AddTypedef(const char* def);
ClassBuilder& AddTypedef(const Type& typ,
const char* def);
ClassBuilder& AddTypedef(const char* typ,
const char* def);
template <typename E> ClassBuilder& AddEnum(const char* values,
unsigned int modifiers = 0);
ClassBuilder& AddEnum(const char* nam,
const char* values,
const std::type_info* ti = 0,
unsigned int modifiers = 0);
// This is for anonymous union support.
//ClassBuilder& addUnion(const char* nam, const char* values, unsigned i
nt modifiers);
/** AddProperty will add a PropertyNth to the last defined
* data MemberAt, method or class.
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template <typename P> ClassBuilder& AddProperty(const char* key,
P value);
/**
* Register an on demand data member builder with this class.
*/
ClassBuilder& AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb)
;
/**
* Register an on demand function member builder with this class.
*/
ClassBuilder& AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope*
odb);
/** SetSizeOf will set the SizeOf property for this class.
* It currently ignore all actual content.
* @size Size of the class
*/
ClassBuilder& SetSizeOf(size_t size);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
protected:
#ifdef G__COMMON_H #ifdef G__COMMON_H
friend int ::G__search_tagname(const char*, int); friend int::G__search_tagname(const char*, int);
friend void Cint::Internal::G__set_stdio(); friend void Cint::Internal::G__set_stdio();
friend void Cint::Internal::G__create_bytecode_arena(); friend void Cint::Internal::G__create_bytecode_arena();
#endif #endif
/** /**
* EnableCallback Enable or disable the callback call in the destruct * EnableCallback Enable or disable the callback call in the destructor
or * @param enable true to enable callback call, false to disable callbac
* @param enable true to enable callback call, false to disable call k call
back call */
*/ ClassBuilder& EnableCallback(bool enable = true);
ClassBuilder& EnableCallback(bool enable = true);
private: private:
ClassBuilderImpl fClassBuilderImpl;
ClassBuilderImpl fClassBuilderImpl; }; // class ClassBuilder
}; // class ClassBuilder /**
* @class ClassBuilderT ClassBuilder.h Reflex/Builder/ClassBuilder.h
* @author Stefan Roiser
* @date 30/3/2004
* @ingroup RefBld
*/
template <class C>
class ClassBuilderT {
public:
/** constructor */
ClassBuilderT(unsigned int modifiers = 0,
TYPE typ = CLASS);
/** constructor */
ClassBuilderT(const char* nam,
unsigned int modifiers = 0,
TYPE typ = CLASS);
/** /**
* @class ClassBuilderT ClassBuilder.h Reflex/Builder/ClassBuilder.h * AddBase will add the information about one BaseAt class
* @author Stefan Roiser * @param Name of the BaseAt class
* @date 30/3/2004 * @param OffsetFP function pointer for Offset calculation
* @ingroup RefBld * @param modifiers the modifiers of the class
*/ */
template < class C > template <class B>
class ClassBuilderT { ClassBuilderT& AddBase(unsigned int modifiers = 0);
ClassBuilderT& AddBase(const Type& bas,
OffsetFunction offsFP,
unsigned int modifiers = 0);
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param Offset of data MemberAt
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilderT
*/
template <class T>
ClassBuilderT& AddDataMember(const char* nam,
size_t offs,
unsigned int modifiers = 0);
ClassBuilderT& AddDataMember(const Type& typ,
const char* nam,
size_t offs,
unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param function templated function MemberAt to extract At informatio
n
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params pamater names and default values (semi-colon separated
)
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template <class F>
ClassBuilderT& AddFunctionMember(const char* nam,
StubFunction stubFP,
void* stubCtx = 0,
const char* params = 0,
unsigned int modifiers = 0);
ClassBuilderT& AddFunctionMember(const Type& typ,
const char* nam,
StubFunction stubFP,
void* stubCtx = 0,
const char* params = 0,
unsigned int modifiers = 0);
template <typename TD>
ClassBuilderT& AddTypedef(const char* def);
ClassBuilderT& AddTypedef(const Type& typ,
const char* def);
ClassBuilderT& AddTypedef(const char* typ,
const char* def);
template <typename E>
ClassBuilderT& AddEnum(const char* values,
unsigned int modifiers = 0);
ClassBuilderT& AddEnum(const char* nam,
const char* values,
const std::type_info* ti = 0,
unsigned int modifiers = 0);
//ClassBuilderT & addUnion( const char * nam,
// const char * values,
// unsigned int modifiers );
/** AddProperty will add a PropertyNth to the last defined
* data MemberAt, method or class.
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template <typename P>
ClassBuilderT& AddProperty(const char* key,
P value);
public: /**
* Register an on demand data member builder with this class.
*/
void AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb);
/** constructor */ /**
ClassBuilderT( unsigned int modifiers = 0, * Register an on demand function member builder with this class.
TYPE typ = CLASS ); */
void AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb);
/** constructor */
ClassBuilderT( const char* nam, /** SetSizeOf will set the SizeOf property for this class.
unsigned int modifiers = 0, * It currently ignore all actual content.
TYPE typ = CLASS ); * @size Size of the class
*/
/** ClassBuilderT& SetSizeOf(size_t size);
* AddBase will add the information about one BaseAt class
* @param Name of the BaseAt class /*
* @param OffsetFP function pointer for Offset calculation * ToType will return the currently produced Type (class)
* @param modifiers the modifiers of the class * @return the type currently being built
*/ */
template < class B > Type ToType();
ClassBuilderT & AddBase( unsigned int modifiers = 0 );
ClassBuilderT & AddBase( const Type & bas,
OffsetFunction offsFP,
unsigned int modifiers = 0 );
/** AddDataMember will add the information about one data
* MemberAt of the class
*
* @param Name of the data MemberAt
* @param Offset of data MemberAt
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilderT
*/
template < class T >
ClassBuilderT & AddDataMember( const char * nam,
size_t offs,
unsigned int modifiers = 0 );
ClassBuilderT & AddDataMember( const Type & typ,
const char * nam,
size_t offs,
unsigned int modifiers = 0 );
/** AddFunctionMember will add the information about one
* function MemberAt of the class
*
* @param Name of the function MemberAt
* @param function templated function MemberAt to extract At informat
ion
* @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function
* @param params pamater names and default values (semi-colon separat
ed)
* @param modifiers the modifiers of the data MemberAt
* @return a reference to the ClassBuilder
*/
template < class F >
ClassBuilderT & AddFunctionMember( const char * nam,
StubFunction stubFP,
void * stubCtx = 0,
const char * params = 0,
unsigned int modifiers = 0 );
ClassBuilderT & AddFunctionMember( const Type & typ,
const char * nam,
StubFunction stubFP,
void * stubCtx = 0,
const char * params = 0,
unsigned int modifiers = 0 );
template < typename TD >
ClassBuilderT & AddTypedef( const char * def );
ClassBuilderT & AddTypedef( const Type & typ,
const char * def );
ClassBuilderT & AddTypedef( const char * typ,
const char * def );
template < typename E >
ClassBuilderT & AddEnum( const char * values,
unsigned int modifiers = 0 );
ClassBuilderT & AddEnum( const char * nam,
const char * values,
const std::type_info * ti = 0,
unsigned int modifiers = 0 );
//ClassBuilderT & addUnion( const char * nam,
// const char * values,
// unsigned int modifiers );
/** AddProperty will add a PropertyNth to the last defined
* data MemberAt, method or class.
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template < typename P >
ClassBuilderT & AddProperty( const char * key,
P value );
/** SetSizeOf will set the SizeOf property for this class.
* It currently ignore all actual content.
* @size Size of the class
*/
ClassBuilderT & SetSizeOf(size_t size);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
protected:
/**
* EnableCallback Enable or disable the callback call in the destruct
or
* @param enable true to enable callback call, false to disable call
back call
*/
ClassBuilderT & EnableCallback(bool enable = true );
private: protected:
/**
* EnableCallback Enable or disable the callback call in the destructor
* @param enable true to enable callback call, false to disable callbac
k call
*/
ClassBuilderT& EnableCallback(bool enable = true);
ClassBuilderImpl fClassBuilderImpl; private:
ClassBuilderImpl fClassBuilderImpl;
}; // class ClassBuilderT }; // class ClassBuilderT
} // namespace Reflex } // namespace Reflex
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template<typename C, typename B> inline Reflex::ClassBuilder& Reflex::Class template <typename C, typename B> inline Reflex::ClassBuilder&
Builder::AddBase(unsigned int modifiers) Reflex::ClassBuilder::AddBase(unsigned int modifiers) {
{ fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C, B>::Get(), modifie
fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C,B>::Get(), modifier rs);
s);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template<typename T> inline Reflex::ClassBuilder& Reflex::ClassBuilder::Add template <typename T> inline Reflex::ClassBuilder&
DataMember(const char* nam, size_t offs, unsigned int modifiers) Reflex::ClassBuilder::AddDataMember(const char* nam,
{ size_t offs,
unsigned int modifiers) {
fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers); fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename F> inline Reflex::ClassBuilder& Reflex::ClassBuilder::Ad template <typename F> inline Reflex::ClassBuilder&
dFunctionMember(const char* nam, StubFunction stubFP, void* stubCtx, const Reflex::ClassBuilder::AddFunctionMember(const char* nam,
char* params, unsigned int modifiers) StubFunction stubFP,
{ void* stubCtx,
const char* params,
unsigned int modifiers) {
fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers); fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename TD> inline Reflex::ClassBuilder& Reflex::ClassBuilder::A template <typename TD> inline Reflex::ClassBuilder&
ddTypedef(const char* def) Reflex::ClassBuilder::AddTypedef(const char* def) {
{
fClassBuilderImpl.AddTypedef(TypeDistiller<TD>::Get(), def); fClassBuilderImpl.AddTypedef(TypeDistiller<TD>::Get(), def);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename E> inline Reflex::ClassBuilder& Reflex::ClassBuilder::Ad template <typename E> inline Reflex::ClassBuilder&
dEnum(const char* values, unsigned int modifiers) Reflex::ClassBuilder::AddEnum(const char* values,
{ unsigned int modifiers) {
fClassBuilderImpl.AddEnum(Tools::Demangle(typeid(E)).c_str(), values, & fClassBuilderImpl.AddEnum(Tools::Demangle(typeid(E)).c_str(), values, &t
typeid(E), modifiers); ypeid(E), modifiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename P> inline Reflex::ClassBuilder& Reflex::ClassBuilder::Ad template <typename P> inline Reflex::ClassBuilder&
dProperty(const char* key, P value) Reflex::ClassBuilder::AddProperty(const char* key,
{ P value) {
fClassBuilderImpl.AddProperty(key , value); fClassBuilderImpl.AddProperty(key, value);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename C> inline Reflex::ClassBuilderT<C>::ClassBuilderT(unsign template <typename C> inline
ed int modifiers, TYPE typ) Reflex::ClassBuilderT<C>::ClassBuilderT(unsigned int modifiers, TYPE typ):
: fClassBuilderImpl(Tools::Demangle(typeid(C)).c_str(), typeid(C), sizeof(C fClassBuilderImpl(Tools::Demangle(typeid(C)).c_str(), typeid(C), sizeof(
), modifiers, typ) C), modifiers, typ) {
{
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <class C> inline Reflex::ClassBuilderT<C>::ClassBuilderT(const cha template <class C> inline
r* nam, unsigned int modifiers, TYPE typ) Reflex::ClassBuilderT<C>::ClassBuilderT(const char* nam, unsigned int modif
: fClassBuilderImpl(nam, typeid(C), sizeof(C), modifiers, typ) iers, TYPE typ):
{ fClassBuilderImpl(nam, typeid(C), sizeof(C), modifiers, typ) {
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename C> template<typename B> inline Reflex::ClassBuilderT<C>& template <typename C> template <typename B> inline
Reflex::ClassBuilderT<C>::AddBase(unsigned int modifiers) Reflex::ClassBuilderT<C>&
{ Reflex::ClassBuilderT<C>::AddBase(unsigned int modifiers) {
fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C,B>::Get(), modifier fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C, B>::Get(), modifie
s); rs);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <class C> inline Reflex::ClassBuilderT<C>& Reflex::ClassBuilderT<C template <class C> inline
>::AddBase(const Type& bas, OffsetFunction offsFP, unsigned int modifiers) Reflex::ClassBuilderT<C>&
{ Reflex::ClassBuilderT<C>::AddBase(const Type& bas,
OffsetFunction offsFP,
unsigned int modifiers) {
fClassBuilderImpl.AddBase(bas, offsFP, modifiers); fClassBuilderImpl.AddBase(bas, offsFP, modifiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <class C> template<class T> inline Reflex::ClassBuilderT<C>& Refle template <class C> template <class T> inline
x::ClassBuilderT<C>::AddDataMember(const char* nam, size_t offs, unsigned Reflex::ClassBuilderT<C>&
int modifiers) Reflex::ClassBuilderT<C>::AddDataMember(const char* nam,
{ size_t offs,
unsigned int modifiers) {
fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers); fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers);
return *this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template <class C> inline Reflex::ClassBuilderT<C>& Reflex::ClassBuilderT<C template <class C> inline
>::AddDataMember(const Type& typ, const char* nam, size_t offs, unsigned in Reflex::ClassBuilderT<C>&
t modifiers) Reflex::ClassBuilderT<C>::AddDataMember(const Type& typ,
{ const char* nam,
size_t offs,
unsigned int modifiers) {
fClassBuilderImpl.AddDataMember(nam, typ, offs, modifiers); fClassBuilderImpl.AddDataMember(nam, typ, offs, modifiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename C> template <typename F> inline Reflex::ClassBuilderT<C> template <typename C> template <typename F> inline
& Reflex::ClassBuilderT<C>::AddFunctionMember(const char* nam, StubFunction Reflex::ClassBuilderT<C>&
stubFP, void* stubCtx, const char* params, unsigned int modifiers) Reflex::ClassBuilderT<C>::AddFunctionMember(const char* nam,
{ StubFunction stubFP,
void* stubCtx,
const char* params,
unsigned int modifiers) {
fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers); fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers);
return *this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddFunctionMember( const Type & typ, Reflex::ClassBuilderT<C>::AddFunctionMember(const Type& typ,
const char * nam, const char* nam,
StubFunction stubFP, StubFunction stubFP,
void * stubCtx, void* stubCtx,
const char * params, const char* params,
unsigned int modifiers ) unsigned int modifiers) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
{ fClassBuilderImpl.AddFunctionMember(nam,
fClassBuilderImpl.AddFunctionMember( nam, typ,
typ, stubFP,
stubFP, stubCtx,
stubCtx, params,
params, modifiers);
modifiers ); return *this;
return * this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template < typename TD > template <class C> template <typename TD>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddTypedef( const char * def ) { Reflex::ClassBuilderT<C>::AddTypedef(const char* def) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fClassBuilderImpl.AddTypedef( TypeDistiller<TD>::Get(), fClassBuilderImpl.AddTypedef(TypeDistiller<TD>::Get(),
def ); def);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddTypedef( const char * typ, Reflex::ClassBuilderT<C>::AddTypedef(const char* typ,
const char * def ) { const char* def) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fClassBuilderImpl.AddTypedef( TypeBuilder( typ ), fClassBuilderImpl.AddTypedef(TypeBuilder(typ),
def ); def);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddTypedef( const Type & typ, Reflex::ClassBuilderT<C>::AddTypedef(const Type& typ,
const char * def ) { const char* def) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fClassBuilderImpl.AddTypedef( typ, fClassBuilderImpl.AddTypedef(typ,
def ); def);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template < typename E > template <class C> template <typename E>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddEnum( const char * values, Reflex::ClassBuilderT<C>::AddEnum(const char* values,
unsigned int modifiers ) { unsigned int modifiers) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
fClassBuilderImpl.AddEnum( Tools::Demangle(typeid(E)).c_str(), fClassBuilderImpl.AddEnum(Tools::Demangle(typeid(E)).c_str(),
values, values,
& typeid(E), &typeid(E),
modifiers ); modifiers);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddEnum( const char * nam, Reflex::ClassBuilderT<C>::AddEnum(const char* nam,
const char * values, const char* values,
const std::type_info * ti, const std::type_info* ti,
unsigned int modifiers ) { unsigned int modifiers) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
fClassBuilderImpl.AddEnum( nam, fClassBuilderImpl.AddEnum(nam,
values, values,
ti, ti,
modifiers ); modifiers);
return * this; return *this;
} }
/*/------------------------------------------------------------------------ ------- /*/------------------------------------------------------------------------ -------
template < class C > template < class C >
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C> &
Reflex::ClassBuilderT<C>::addUnion( const char * nam, Reflex::ClassBuilderT<C>::addUnion( const char * nam,
const char * values, const char * values,
unsigned int modifiers ) { unsigned int modifiers ) {
//------------------------------------------------------------------------- //----------------------------------------------------------------------
------ ---------
fClassBuilderImpl.addUnion( nam, values, modifiers ); fClassBuilderImpl.addUnion( nam, values, modifiers );
return * this;
}
*/
//-------------------------------------------------------------------------
------
template < class C > template < class P >
inline Reflex::ClassBuilderT<C> &
Reflex::ClassBuilderT<C>::AddProperty( const char * key,
P value )
//-------------------------------------------------------------------------
------
{
fClassBuilderImpl.AddProperty(key , value);
return * this; return * this;
}
*/
//-------------------------------------------------------------------------
------
template <class C> template <class P>
inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::AddProperty(const char* key,
P value) {
//-------------------------------------------------------------------------
------
fClassBuilderImpl.AddProperty(key, value);
return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::EnableCallback(bool enable /* = true */ ) Reflex::ClassBuilderT<C>::EnableCallback(bool enable /* = true */) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
{
fClassBuilderImpl.EnableCallback(enable); fClassBuilderImpl.EnableCallback(enable);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > template <class C>
inline Reflex::ClassBuilderT<C> & inline Reflex::ClassBuilderT<C>&
Reflex::ClassBuilderT<C>::SetSizeOf(size_t size) { Reflex::ClassBuilderT<C>::SetSizeOf(size_t size) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fClassBuilderImpl.SetSizeOf(size); fClassBuilderImpl.SetSizeOf(size);
return *this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class C > inline Reflex::Type template <class C> inline Reflex::Type
Reflex::ClassBuilderT<C>::ToType() { Reflex::ClassBuilderT<C>::ToType() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fClassBuilderImpl.ToType(); return fClassBuilderImpl.ToType();
} }
//-------------------------------------------------------------------------
------
template <class C> inline void
Reflex::ClassBuilderT<C>::AddOnDemandDataMemberBuilder(OnDemandBuilderForSc
ope* odb) {
//-------------------------------------------------------------------------
------
// Register an on demand builder with this class.
fClassBuilderImpl.AddOnDemandDataMemberBuilder(odb);
}
//-------------------------------------------------------------------------
------
template <class C> inline void
Reflex::ClassBuilderT<C>::AddOnDemandFunctionMemberBuilder(OnDemandBuilderF
orScope* odb) {
//-------------------------------------------------------------------------
------
// Register an on demand builder with this class.
fClassBuilderImpl.AddOnDemandFunctionMemberBuilder(odb);
}
#endif // Reflex_ClassBuilder #endif // Reflex_ClassBuilder
 End of changes. 56 change blocks. 
488 lines changed or deleted 562 lines changed or added


 CollectionProxy.h   CollectionProxy.h 
// @(#)root/reflex:$Id: CollectionProxy.h 28800 2009-06-03 20:14:03Z pcanal $ // @(#)root/reflex:$Id: CollectionProxy.h 29288 2009-07-01 13:03:35Z axel $
// Author: Markus Frank 2004 // Author: Markus Frank 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_CollectionProxy #ifndef Reflex_CollectionProxy
#define Reflex_CollectionProxy 1 1 #define Reflex_CollectionProxy 1 1
#include <cstddef> #include <cstddef>
// Forward declarations // Forward declarations
namespace std { namespace std {
template <class T, class A> class deque; template <class T, class A> class deque;
template <class T, class A> class vector; template <class T, class A> class vector;
template <class T, class A> class list; template <class T, class A> class list;
template <class T, class A> class queue; template <class T, class A> class queue;
template <class T, class A> class stack; template <class T, class A> class stack;
template <class K, class T, class A> class set; template <class K, class T, class A> class set;
template <class K, class T, class A> class multiset; template <class K, class T, class A> class multiset;
template <class K, class T, class R, class A> class map; template <class K, class T, class R, class A> class map;
template <class K, class T, class R, class A> class multimap; template <class K, class T, class R, class A> class multimap;
template <class T> class allocator; template <class T> class allocator;
} }
// Hash map forward declarations // Hash map forward declarations
#if defined(__GNUC__) #if defined(__GNUC__)
namespace __gnu_cxx { // GNU GCC namespace __gnu_cxx { // GNU GCC
template <class T, class F, class E, class A> class hash_set; template <class T, class F, class E, class A> class hash_set;
template <class T, class F, class E, class A> class hash_multiset; template <class T, class F, class E, class A> class hash_multiset;
template <class K, class T, class F, class E, class A> class hash_map; template <class K, class T, class F, class E, class A> class hash_map;
template <class K, class T, class F, class E, class A> class hash_multi template <class K, class T, class F, class E, class A> class hash_multimap;
map;
} }
#elif defined(_WIN32) #elif defined(_WIN32)
namespace stdext { // Visual C++ namespace stdext { // Visual C++
template <class K, class T, class A> class hash_set; template <class K, class T, class A> class hash_set;
template <class K, class T, class A> class hash_multiset; template <class K, class T, class A> class hash_multiset;
template <class K, class T, class R, class A> class hash_map; template <class K, class T, class R, class A> class hash_map;
template <class K, class T, class R, class A> class hash_multimap; template <class K, class T, class R, class A> class hash_multimap;
} }
#endif #endif
namespace Reflex { namespace Reflex {
#ifndef __CINT__ #ifndef __CINT__
struct EnvironBase { struct EnvironBase {
EnvironBase() : fIdx(0), fSize(0), fObject(0), fStart(0), fTemp(0), f EnvironBase(): fIdx(0),
DeleteTemp(false), fRefSize(1), fSpace(0) fSize(0),
{ fObject(0),
// fprintf("Running default constructor on %p\n",this); fStart(0),
} fTemp(0),
virtual ~EnvironBase() {} fDeleteTemp(false),
size_t fIdx; fRefSize(1),
size_t fSize; fSpace(0) {
void* fObject; // fprintf("Running default constructor on %p\n",this);
void* fStart; }
void* fTemp;
bool fDeleteTemp; virtual ~EnvironBase() {}
int fRefSize;
size_t fSpace; size_t fIdx;
}; size_t fSize;
template <typename T> struct Environ : public EnvironBase { void* fObject;
typedef T Iter_t; void* fStart;
Iter_t fIterator; void* fTemp;
T& iter() { return fIterator; } bool fDeleteTemp;
static void *Create() { int fRefSize;
return new Environ(); size_t fSpace;
} };
}; template <typename T> struct Environ: public EnvironBase {
typedef T Iter_t;
Iter_t fIterator;
T&
iter() { return fIterator; }
static void*
Create() {
return new Environ();
}
};
#else #else
struct EnvironBase; struct EnvironBase;
template <typename T> struct Environ; template <typename T> struct Environ;
#endif #endif
template <typename T> struct Address { template <typename T> struct Address {
static void* address(T ref) { static void*
return (void*)&ref; address(T ref) {
} return (void*)& ref;
}; }
template <class T> struct CollType };
template <class T> struct CollType
#ifdef _KCC // KAI compiler #ifdef _KCC // KAI compiler
: public Address<typename T::value_type&> : public Address<typename T::value_type&>
#else #else
: public Address<typename T::const_reference> : public Address<typename T::const_reference>
#endif #endif
{ {
typedef T Cont_t; typedef T Cont_t;
typedef typename T::iterator Iter_t; typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t; typedef typename T::value_type Value_t;
typedef Reflex::Environ<Iter_t> Env_t; typedef Reflex::Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t; typedef Env_t* PEnv_t;
typedef Cont_t *PCont_t; typedef Cont_t* PCont_t;
typedef Value_t *PValue_t; typedef Value_t* PValue_t;
static inline PCont_t
object(void* ptr) {
return PCont_t(PEnv_t(ptr)->fObject);
}
static inline PCont_t object(void* ptr) { static void*
return PCont_t(PEnv_t(ptr)->fObject); size(void* env) {
} PEnv_t e = PEnv_t(env);
static void* size(void* env) { e->fSize = PCont_t(e->fObject)->size();
PEnv_t e = PEnv_t(env); return &e->fSize;
e->fSize = PCont_t(e->fObject)->size(); }
return &e->fSize;
} static void*
static void* clear(void* env) { clear(void* env) {
object(env)->clear(); object(env)->clear();
return 0; return 0;
} }
static void* first(void* env) {
PEnv_t e = PEnv_t(env); static void*
PCont_t c = PCont_t(e->fObject); first(void* env) {
// Assume iterators do not need destruction PEnv_t e = PEnv_t(env);
e->fIterator = c->begin(); PCont_t c = PCont_t(e->fObject);
e->fSize = c->size(); // Assume iterators do not need destruction
if ( 0 == e->fSize ) return e->fStart = 0; e->fIterator = c->begin();
e->fSize = c->size();
if (0 == e->fSize) { return e->fStart = 0; }
#ifdef _KCC // KAI compiler #ifdef _KCC // KAI compiler
typename T::value_type& ref = *(e->iter()); typename T::value_type& ref = *(e->iter());
#else #else
typename T::const_reference ref = *(e->iter()); typename T::const_reference ref = *(e->iter());
#endif #endif
return e->fStart = address(ref); return e->fStart = address(ref);
} }
static void* next(void* env) {
PEnv_t e = PEnv_t(env); static void*
PCont_t c = PCont_t(e->fObject); next(void* env) {
for ( ; e->fIdx > 0 && e->iter() != c->end(); ++(e->iter()), --e-> PEnv_t e = PEnv_t(env);
fIdx ) {} PCont_t c = PCont_t(e->fObject);
// TODO: Need to find something for going backwards....
if ( e->iter() == c->end() ) return 0; for ( ; e->fIdx > 0 && e->iter() != c->end(); ++(e->iter()), --e->fId
x) {}
// TODO: Need to find something for going backwards....
if (e->iter() == c->end()) { return 0; }
#ifdef _KCC // KAI compiler #ifdef _KCC // KAI compiler
typename T::value_type& ref = *(e->iter()); typename T::value_type& ref = *(e->iter());
#else #else
typename T::const_reference ref = *(e->iter()); typename T::const_reference ref = *(e->iter());
#endif #endif
return address(ref); return address(ref);
} }
static void* construct(void* env) {
PEnv_t e = PEnv_t(env);
PValue_t m = PValue_t(e->fStart);
for (size_t i=0; i<e->fSize; ++i, ++m)
::new(m) Value_t();
return 0;
}
static void* collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (Iter_t i=c->begin(); i != c->end(); ++i, ++m )
::new(m) Value_t(*i);
return 0;
}
static void* destruct(void* env) {
PEnv_t e = PEnv_t(env);
PValue_t m = PValue_t(e->fStart);
for (size_t i=0; i < e->fSize; ++i, ++m )
m->~Value_t();
return 0;
}
};
/** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h static void*
* construct(void* env) {
* Small helper to encapsulate all necessary data accesses for PEnv_t e = PEnv_t(env);
* containers like vector, list, deque PValue_t m = PValue_t(e->fStart);
*
* @author M.Frank
* @version 1.0
* @date 10/10/2004
*/
template <class T> struct Pushback : public CollType<T> {
typedef T Cont_t;
typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
static void* resize(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
c->resize(e->fSize);
e->fIdx = 0;
return e->fStart = address(*c->begin());
}
static void* feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (size_t i=0; i<e->fSize; ++i, ++m)
c->push_back(*m);
return 0;
}
static int value_offset() {
return 0;
}
};
/** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h for (size_t i = 0; i < e->fSize; ++i, ++m) {
* ::new (m) Value_t();
* Small helper to encapsulate all necessary data accesses for
* containers like set, multiset etc.
*
* @author M.Frank
* @version 1.0
* @date 10/10/2004
*/
template <class T> struct Insert : public CollType<T> {
typedef T Cont_t;
typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t;
typedef Cont_t *PCont_t;
typedef Value_t *PValue_t;
static void* feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (size_t i=0; i<e->fSize; ++i, ++m)
c->insert(*m);
return 0;
} }
static void* resize(void* /* env */ ) { return 0;
return 0; }
static void*
collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (Iter_t i = c->begin(); i != c->end(); ++i, ++m) {
::new (m) Value_t(*i);
} }
static int value_offset() { return 0;
return 0; }
static void*
destruct(void* env) {
PEnv_t e = PEnv_t(env);
PValue_t m = PValue_t(e->fStart);
for (size_t i = 0; i < e->fSize; ++i, ++m) {
m->~Value_t();
} }
}; return 0;
}
};
/** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h /** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h
* *
* Small helper to encapsulate all necessary data accesses for * Small helper to encapsulate all necessary data accesses for
* containers like Set, multiset etc. * containers like vector, list, deque
* *
* @author M.Frank * @author M.Frank
* @version 1.0 * @version 1.0
* @date 10/10/2004 * @date 10/10/2004
*/ */
template <class T> struct MapInsert : public CollType<T> { template <class T> struct Pushback: public CollType<T> {
typedef T Cont_t; typedef T Cont_t;
typedef typename T::iterator Iter_t; typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t; typedef typename T::value_type Value_t;
typedef Environ<Iter_t> Env_t; typedef Environ<Iter_t> Env_t;
typedef Env_t *PEnv_t; typedef Env_t* PEnv_t;
typedef Cont_t *PCont_t; typedef Cont_t* PCont_t;
typedef Value_t *PValue_t; typedef Value_t* PValue_t;
static void* feed(void* env) { static void*
PEnv_t e = PEnv_t(env); resize(void* env) {
PCont_t c = PCont_t(e->fObject); PEnv_t e = PEnv_t(env);
PValue_t m = PValue_t(e->fStart); PCont_t c = PCont_t(e->fObject);
for (size_t i=0; i<e->fSize; ++i, ++m) c->resize(e->fSize);
c->insert(*m); e->fIdx = 0;
return 0; return e->fStart = address(*c->begin());
}
static void*
feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (size_t i = 0; i < e->fSize; ++i, ++m) {
c->push_back(*m);
} }
static void* resize(void* /* env */ ) { return 0;
return 0; }
static int
value_offset() {
return 0;
}
};
/** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h
*
* Small helper to encapsulate all necessary data accesses for
* containers like set, multiset etc.
*
* @author M.Frank
* @version 1.0
* @date 10/10/2004
*/
template <class T> struct Insert: public CollType<T> {
typedef T Cont_t;
typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t* PEnv_t;
typedef Cont_t* PCont_t;
typedef Value_t* PValue_t;
static void*
feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (size_t i = 0; i < e->fSize; ++i, ++m) {
c->insert(*m);
} }
static int value_offset() { return 0;
return ((char*)&((PValue_t(0x1000))->second)) - ((char*)PValue_t(0 }
x1000));
static void*
resize(void* /* env */) {
return 0;
}
static int
value_offset() {
return 0;
}
};
/** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h
*
* Small helper to encapsulate all necessary data accesses for
* containers like Set, multiset etc.
*
* @author M.Frank
* @version 1.0
* @date 10/10/2004
*/
template <class T> struct MapInsert: public CollType<T> {
typedef T Cont_t;
typedef typename T::iterator Iter_t;
typedef typename T::value_type Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t* PEnv_t;
typedef Cont_t* PCont_t;
typedef Value_t* PValue_t;
static void*
feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart);
for (size_t i = 0; i < e->fSize; ++i, ++m) {
c->insert(*m);
} }
}; return 0;
}
#ifndef __CINT__ static void*
// Need specialization for boolean references due to stupid STL vector<b resize(void* /* env */) {
ool>
template<> inline void* Reflex::Address<std::vector<bool,std::allocator<
bool> >::const_reference>::address(std::vector<bool,std::allocator<bool> >:
:const_reference ) {
return 0; return 0;
} }
static int
value_offset() {
return ((char*) &((PValue_t(0x1000))->second)) - ((char*) PValue_t(0x
1000));
}
};
#ifndef __CINT__
// Need specialization for boolean references due to stupid STL vector<bool
>
template <> inline void* Reflex::Address<std::vector<bool, std::allocator<b
ool> >::const_reference
>::address(std::vector<bool, std::allocator<bool> >::const_reference) {
return 0;
}
#endif #endif
} }
#include <vector> #include <vector>
namespace Reflex { namespace Reflex {
/** @class CollFuncTable /** @class CollFuncTable
* *
* Table containing pointers to concrete functions to manipulate * Table containing pointers to concrete functions to manipulate
* Collections in a generic way * Collections in a generic way
* *
* @author M.Frank * @author M.Frank
*/ */
struct RFLX_API CollFuncTable { struct RFLX_API CollFuncTable {
size_t iter_size; size_t iter_size;
size_t value_diff; size_t value_diff;
int value_offset; int value_offset;
void* (*size_func)(void*); void* (*size_func)(void*);
void* (*resize_func)(void*); void* (*resize_func)(void*);
void* (*clear_func)(void*); void* (*clear_func)(void*);
void* (*first_func)(void*); void* (*first_func)(void*);
void* (*next_func)(void*); void* (*next_func)(void*);
void* (*construct_func)(void*); void* (*construct_func)(void*);
void* (*destruct_func)(void*); void* (*destruct_func)(void*);
void* (*feed_func)(void*); void* (*feed_func)(void*);
void* (*collect_func)(void*); void* (*collect_func)(void*);
void* (*create_env)(); void* (*create_env)();
}; };
template <typename T> struct CFTGenerator { template <typename T> struct CFTGenerator {
static CollFuncTable* Generate() { static CollFuncTable*
typedef typename T::Value_t Value_t; Generate() {
typedef std::pair<Value_t,Value_t> Pair_t; typedef typename T::Value_t Value_t;
Pair_t* ptr = (Pair_t*)0x1000; typedef std::pair<Value_t, Value_t> Pair_t;
CollFuncTable* p = new CollFuncTable(); Pair_t* ptr = (Pair_t*) 0x1000;
p->iter_size = sizeof(typename T::Iter_t); CollFuncTable* p = new CollFuncTable();
p->value_diff = ((char*)&ptr->second) - ((char*)&ptr->first); p->iter_size = sizeof(typename T::Iter_t);
p->value_offset = T::value_offset(); p->value_diff = ((char*) &ptr->second) - ((char*) &ptr->first);
p->size_func = T::size; p->value_offset = T::value_offset();
p->first_func = T::first; p->size_func = T::size;
p->next_func = T::next; p->first_func = T::first;
p->clear_func = T::clear; p->next_func = T::next;
p->resize_func = T::resize; p->clear_func = T::clear;
p->collect_func = T::collect; p->resize_func = T::resize;
p->construct_func = T::construct; p->collect_func = T::collect;
p->destruct_func = T::destruct; p->construct_func = T::construct;
p->feed_func = T::feed; p->destruct_func = T::destruct;
p->create_env = T::Env_t::Create; p->feed_func = T::feed;
return p; p->create_env = T::Env_t::Create;
} return p;
}; } // Generate
struct CFTNullGenerator {
static void* Void_func(void*) { };
return 0; struct CFTNullGenerator {
} static void*
static void* Void_func0() { return 0; } Void_func(void*) {
static CollFuncTable* Generate() { return 0;
CollFuncTable* p = new CollFuncTable(); }
p->iter_size = 4;
p->value_diff = 0; static void*
p->value_offset = 0; Void_func0() { return 0; }
p->size_func = Void_func;
p->first_func = Void_func; static CollFuncTable*
p->next_func = Void_func; Generate() {
p->clear_func = Void_func; CollFuncTable* p = new CollFuncTable();
p->resize_func = Void_func; p->iter_size = 4;
p->collect_func = Void_func; p->value_diff = 0;
p->construct_func = Void_func; p->value_offset = 0;
p->destruct_func = Void_func; p->size_func = Void_func;
p->feed_func = Void_func; p->first_func = Void_func;
p->create_env = Void_func0; p->next_func = Void_func;
return p; p->clear_func = Void_func;
} p->resize_func = Void_func;
}; p->collect_func = Void_func;
// General proxy (dummy) p->construct_func = Void_func;
template <typename A> struct Proxy {}; p->destruct_func = Void_func;
p->feed_func = Void_func;
// Specialization for std::vector p->create_env = Void_func0;
template <class T, class A> struct Proxy< std::vector<T,A> > { return p;
static CollFuncTable* Generate() { } // Generate
return CFTGenerator<Pushback<std::vector<T,A> > >::Generate();
} };
}; // General proxy (dummy)
// Specialization for std::list template <typename A> struct Proxy {};
template <class T, class A> struct Proxy< std::list<T,A> > {
static CollFuncTable* Generate() { // Specialization for std::vector
return CFTGenerator<Pushback<std::list<T,A> > >::Generate(); template <class T, class A> struct Proxy<std::vector<T, A> > {
} static CollFuncTable*
}; Generate() {
// Specialization for std::deque return CFTGenerator<Pushback<std::vector<T, A> > >::Generate();
template <class T, class A> struct Proxy< std::deque<T,A> > { }
static CollFuncTable* Generate() {
return CFTGenerator<Pushback<std::deque<T,A> > >::Generate(); };
} // Specialization for std::list
}; template <class T, class A> struct Proxy<std::list<T, A> > {
// Specialization for std::set static CollFuncTable*
template <class K, class T, class A> struct Proxy< std::set<K,T,A> > { Generate() {
static CollFuncTable* Generate() { return CFTGenerator<Pushback<std::list<T, A> > >::Generate();
return CFTGenerator<Insert<std::set<K,T,A> > >::Generate(); }
}
}; };
// Specialization for std::multiset // Specialization for std::deque
template <class K, class T, class A> struct Proxy< std::multiset<K,T,A> template <class T, class A> struct Proxy<std::deque<T, A> > {
> { static CollFuncTable*
static CollFuncTable* Generate() { Generate() {
return CFTGenerator<Insert<std::multiset<K,T,A> > >::Generate(); return CFTGenerator<Pushback<std::deque<T, A> > >::Generate();
} }
};
// Specialization for std::map };
template <class K, class T, class R, class A> struct Proxy< std::map<K,T // Specialization for std::set
,R,A> > { template <class K, class T, class A> struct Proxy<std::set<K, T, A> > {
static CollFuncTable* Generate() { static CollFuncTable*
return CFTGenerator<MapInsert<std::map<K,T,R,A> > >::Generate(); Generate() {
} return CFTGenerator<Insert<std::set<K, T, A> > >::Generate();
}; }
// Specialization for std::multimap
template <class K, class T, class R, class A> struct Proxy< std::multima };
p<K,T,R,A> > { // Specialization for std::multiset
static CollFuncTable* Generate() { template <class K, class T, class A> struct Proxy<std::multiset<K, T, A> >
return CFTGenerator<MapInsert<std::multimap<K,T,R,A> > >::Generate {
(); static CollFuncTable*
} Generate() {
}; return CFTGenerator<Insert<std::multiset<K, T, A> > >::Generate();
// Specialization for std::queue -- not implemented }
template <class K, class T> struct Proxy< std::queue<K,T> > {
static CollFuncTable* Generate() { return CFTNullGenerator::Generate };
(); } // Specialization for std::map
}; template <class K, class T, class R, class A> struct Proxy<std::map<K, T, R
// Specialization for std::stack -- not implemented , A> > {
template <class K, class T> struct Proxy< std::stack<K,T> > { static CollFuncTable*
static CollFuncTable* Generate() { return CFTNullGenerator::Generate Generate() {
(); } return CFTGenerator<MapInsert<std::map<K, T, R, A> > >::Generate();
}; }
};
// Specialization for std::multimap
template <class K, class T, class R, class A> struct Proxy<std::multimap<K,
T, R, A> > {
static CollFuncTable*
Generate() {
return CFTGenerator<MapInsert<std::multimap<K, T, R, A> > >::Generate
();
}
};
// Specialization for std::queue -- not implemented
template <class K, class T> struct Proxy<std::queue<K, T> > {
static CollFuncTable*
Generate() { return CFTNullGenerator::Generate(); }
};
// Specialization for std::stack -- not implemented
template <class K, class T> struct Proxy<std::stack<K, T> > {
static CollFuncTable*
Generate() { return CFTNullGenerator::Generate(); }
};
#if defined(__GNUC__) #if defined(__GNUC__)
// Specialization for __gnu_cxx::hash_set // Specialization for __gnu_cxx::hash_set
template <class T, class F, class E, class A> struct Proxy< __gnu_cxx::h template <class T, class F, class E, class A> struct Proxy<__gnu_cxx::hash_
ash_set<T,F,E,A> > { set<T, F, E, A> > {
static CollFuncTable* Generate() { static CollFuncTable*
return CFTGenerator<Insert<__gnu_cxx::hash_set<T,F,E,A> > >::Gener Generate() {
ate(); return CFTGenerator<Insert<__gnu_cxx::hash_set<T, F, E, A> > >::Gener
} ate();
}; }
// Specialization for __gnu_cxx::hash_multiset
template <class T, class F, class E, class A> struct Proxy< __gnu_cxx::h };
ash_multiset<T,F,E,A> > { // Specialization for __gnu_cxx::hash_multiset
static CollFuncTable* Generate() { template <class T, class F, class E, class A> struct Proxy<__gnu_cxx::hash_
return CFTGenerator<Insert<__gnu_cxx::hash_multiset<T,F,E,A> > >:: multiset<T, F, E, A> > {
Generate(); static CollFuncTable*
} Generate() {
}; return CFTGenerator<Insert<__gnu_cxx::hash_multiset<T, F, E, A> > >::
// Specialization for __gnu_cxx::hash_map Generate();
template <class K, class T, class F, class E, class A> struct Proxy< __g }
nu_cxx::hash_map<K,T,F,E,A> > {
static CollFuncTable* Generate() { };
return CFTGenerator<MapInsert<__gnu_cxx::hash_map<K,T,F,E,A> > >:: // Specialization for __gnu_cxx::hash_map
Generate(); template <class K, class T, class F, class E, class A> struct Proxy<__gnu_c
} xx::hash_map<K, T, F, E, A> > {
}; static CollFuncTable*
// Specialization for __gnu_cxx::hash_multimap Generate() {
template <class K, class T, class F, class E, class A> struct Proxy< __g return CFTGenerator<MapInsert<__gnu_cxx::hash_map<K, T, F, E, A> > >:
nu_cxx::hash_multimap<K,T,F,E,A> > { :Generate();
static CollFuncTable* Generate() { }
return CFTGenerator<MapInsert<__gnu_cxx::hash_multimap<K,T,F,E,A>
> >::Generate(); };
} // Specialization for __gnu_cxx::hash_multimap
}; template <class K, class T, class F, class E, class A> struct Proxy<__gnu_c
xx::hash_multimap<K, T, F, E, A> > {
static CollFuncTable*
Generate() {
return CFTGenerator<MapInsert<__gnu_cxx::hash_multimap<K, T, F, E, A>
> >::Generate();
}
};
#elif defined(_WIN32) #elif defined(_WIN32)
// Specialization for stdext::hash_multiset // Specialization for stdext::hash_multiset
template <class K, class T, class A> struct Proxy< stdext::hash_multiset template <class K, class T, class A> struct Proxy<stdext::hash_multiset<K,
<K,T,A> > { T, A> > {
static CollFuncTable* Generate() { static CollFuncTable*
return CFTGenerator<Insert<stdext::hash_multiset<K,T,A> > >::Gener Generate() {
ate(); return CFTGenerator<Insert<stdext::hash_multiset<K, T, A> > >::Genera
} te();
}; }
// Specialization for stdext::hash_set
template <class K, class T, class A> struct Proxy< stdext::hash_set<K,T, };
A> > { // Specialization for stdext::hash_set
static CollFuncTable* Generate() { template <class K, class T, class A> struct Proxy<stdext::hash_set<K, T, A>
return CFTGenerator<Insert<stdext::hash_set<K,T,A> > >::Generate() > {
; static CollFuncTable*
} Generate() {
}; return CFTGenerator<Insert<stdext::hash_set<K, T, A> > >::Generate();
// Specialization for stdext::hash_map }
template <class K, class T, class R, class A> struct Proxy< stdext::hash
_map<K,T,R,A> > { };
static CollFuncTable* Generate() { // Specialization for stdext::hash_map
return CFTGenerator<MapInsert<stdext::hash_map<K,T,R,A> > >::Gener template <class K, class T, class R, class A> struct Proxy<stdext::hash_map
ate(); <K, T, R, A> > {
} static CollFuncTable*
}; Generate() {
// Specialization for stdext::hash_multimap return CFTGenerator<MapInsert<stdext::hash_map<K, T, R, A> > >::Gener
template <class K, class T, class R, class A> struct Proxy< stdext::hash ate();
_multimap<K,T,R,A> > { }
static CollFuncTable* Generate() {
return CFTGenerator<MapInsert<stdext::hash_multimap<K,T,R,A> > >:: };
Generate(); // Specialization for stdext::hash_multimap
} template <class K, class T, class R, class A> struct Proxy<stdext::hash_mul
}; timap<K, T, R, A> > {
static CollFuncTable*
Generate() {
return CFTGenerator<MapInsert<stdext::hash_multimap<K, T, R, A> > >::
Generate();
}
};
#endif #endif
// Specialization for std::bitset // Specialization for std::bitset
template <typename B> struct StdBitSetHelper {}; template <typename B> struct StdBitSetHelper {};
#ifndef __CINT__ #ifndef __CINT__
template <typename Bitset_t> struct CollType<StdBitSetHelper<Bitset_t> > template <typename Bitset_t> struct CollType<StdBitSetHelper<Bitset_t> > :
: public Address<const bool &> public Address<const bool&> {
{ typedef Bitset_t Cont_t;
typedef Bitset_t Cont_t; typedef std::pair<size_t, bool> Iter_t;
typedef std::pair<size_t,bool> Iter_t; typedef bool Value_t;
typedef bool Value_t; typedef Environ<Iter_t> Env_t;
typedef Environ<Iter_t> Env_t; typedef Env_t* PEnv_t;
typedef Env_t *PEnv_t; typedef Cont_t* PCont_t;
typedef Cont_t *PCont_t; typedef Value_t* PValue_t;
typedef Value_t *PValue_t;
virtual ~CollType() {}
static inline PCont_t
object(void* ptr) {
return PCont_t(PEnv_t(ptr)->fObject);
}
virtual ~CollType() {} static void*
size(void* env) {
PEnv_t e = PEnv_t(env);
e->fSize = PCont_t(e->fObject)->size();
return &e->fSize;
}
static inline PCont_t object(void* ptr) { static void*
return PCont_t(PEnv_t(ptr)->fObject); clear(void* env) {
} object(env)->reset();
static void* size(void* env) { return 0;
PEnv_t e = PEnv_t(env); }
e->fSize = PCont_t(e->fObject)->size();
return &e->fSize;
}
static void* clear(void* env) {
object(env)->reset();
return 0;
}
static void* first(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
e->fIterator.first = 0;
e->fIterator.second = c->size() > 0 ? c->test(e->fIterator.first)
: false ; // Iterator actually hold the value.
e->fSize = c->size();
return 0;
}
static void* next(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
for (; e->fIdx > 0 && e->fIterator.first != c->size(); ++(e->fIter
ator.first), --e->fIdx){ }
e->fIterator.second = (e->fIterator.first != c->size()) ? c->test(
e->fIterator.first) : false;
return 0;
}
static void* construct(void*) {
// Nothing to construct.
return 0;
}
static void* collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // 'start' is a buffer outside t
he container.
for (size_t i=0; i != c->size(); ++i, ++m )
*m = c->test(i);
return 0;
}
static void* destruct(void*) {
// Nothing to destruct.
return 0;
}
};
template <typename Bitset_t> static void*
struct Pushback<StdBitSetHelper<Bitset_t> > : public CollType<StdBitSet first(void* env) {
Helper<Bitset_t> > { PEnv_t e = PEnv_t(env);
typedef Bitset_t Cont_t; PCont_t c = PCont_t(e->fObject);
typedef bool Iter_t; e->fIterator.first = 0;
typedef bool Value_t; e->fIterator.second = c->size() > 0 ? c->test(e->fIterator.first) : f
typedef Environ<Iter_t> Env_t; alse; // Iterator actually hold the value.
typedef Env_t *PEnv_t; e->fSize = c->size();
typedef Cont_t *PCont_t; return 0;
typedef Value_t *PValue_t; }
static void* resize(void* env) { static void*
PEnv_t e = PEnv_t(env); next(void* env) {
e->fIdx = 0; PEnv_t e = PEnv_t(env);
return 0; PCont_t c = PCont_t(e->fObject);
}
static void* feed(void* env) { for ( ; e->fIdx > 0 && e->fIterator.first != c->size(); ++(e->fIterat
PEnv_t e = PEnv_t(env); or.first), --e->fIdx) {}
PCont_t c = PCont_t(e->fObject); e->fIterator.second = (e->fIterator.first != c->size()) ? c->test(e->
PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf fIterator.first) : false;
fer' outside the container. return 0;
for (size_t i=0; i<e->fSize; ++i, ++m) }
c->set(i,*m);
return 0; static void*
construct(void*) {
// Nothing to construct.
return 0;
}
static void*
collect(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // 'start' is a buffer outside t
he container.
for (size_t i = 0; i != c->size(); ++i, ++m) {
*m = c->test(i);
} }
static int value_offset() { return 0;
return 0; }
static void*
destruct(void*) {
// Nothing to destruct.
return 0;
}
};
template <typename Bitset_t>
struct Pushback<StdBitSetHelper<Bitset_t> > : public CollType<StdBitSetHelp
er<Bitset_t> > {
typedef Bitset_t Cont_t;
typedef bool Iter_t;
typedef bool Value_t;
typedef Environ<Iter_t> Env_t;
typedef Env_t* PEnv_t;
typedef Cont_t* PCont_t;
typedef Value_t* PValue_t;
static void*
resize(void* env) {
PEnv_t e = PEnv_t(env);
e->fIdx = 0;
return 0;
}
static void*
feed(void* env) {
PEnv_t e = PEnv_t(env);
PCont_t c = PCont_t(e->fObject);
PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf
fer' outside the container.
for (size_t i = 0; i < e->fSize; ++i, ++m) {
c->set(i, *m);
} }
}; return 0;
}
static int
value_offset() {
return 0;
}
};
#endif #endif
template <typename B> struct Proxy< StdBitSetHelper< B > > { template <typename B> struct Proxy<StdBitSetHelper<B> > {
static CollFuncTable* Generate() { static CollFuncTable*
return CFTGenerator<Pushback< StdBitSetHelper< B > > >::Generate() Generate() {
; return CFTGenerator<Pushback<StdBitSetHelper<B> > >::Generate();
} }
};
};
} }
#endif // Reflex_CollectionProxy #endif // Reflex_CollectionProxy
 End of changes. 40 change blocks. 
505 lines changed or deleted 633 lines changed or added


 CombinedCalculator.h   CombinedCalculator.h 
// @(#)root/roostats:$Id: CombinedCalculator.h 28963 2009-06-12 15:47:45Z w outer $ // @(#)root/roostats:$Id: CombinedCalculator.h 30462 2009-09-25 16:05:55Z m oneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_CombinedCalculator #ifndef ROOSTATS_CombinedCalculator
#define ROOSTATS_CombinedCalculator #define ROOSTATS_CombinedCalculator
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif #endif
#ifndef ROOSTATS_HypoTestCalculator #ifndef ROOSTATS_HypoTestCalculator
#include "RooStats/HypoTestCalculator.h" #include "RooStats/HypoTestCalculator.h"
#endif #endif
#ifndef ROOSTATS_ModelConfig
#include "RooStats/ModelConfig.h"
#endif
#ifndef ROO_ABS_PDF #ifndef ROO_ABS_PDF
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#endif #endif
#ifndef ROO_ABS_DATA #ifndef ROO_ABS_DATA
#include "RooAbsData.h" #include "RooAbsData.h"
#endif #endif
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef ROO_WORKSPACE // #ifndef ROO_WORKSPACE
#include "RooWorkspace.h" // #include "RooWorkspace.h"
#endif // #endif
//_________________________________________________ //_________________________________________________
/* /*
BEGIN_HTML BEGIN_HTML
<p> <p>
CombinedCalculator is an interface class for a tools which can produce both RooStats HypoTestResults and ConfIntervals. CombinedCalculator is an interface class for a tools which can produce both RooStats HypoTestResults and ConfIntervals.
The interface currently assumes that any such calculator can be configured by specifying: The interface currently assumes that any such calculator can be configured by specifying:
<ul> <ul>
<li>a model common model (eg. a family of specific models which includes b oth the null and alternate),</li> <li>a model common model (eg. a family of specific models which includes b oth the null and alternate),</li>
<li>a data set, </li> <li>a data set, </li>
skipping to change at line 73 skipping to change at line 77
</p> </p>
END_HTML END_HTML
*/ */
// //
namespace RooStats { namespace RooStats {
class CombinedCalculator : public IntervalCalculator, public HypoTestCal culator { class CombinedCalculator : public IntervalCalculator, public HypoTestCal culator {
public: public:
CombinedCalculator(){
// default constructor CombinedCalculator() :
fWS = 0; fPdf(0),
fNullParams = 0; fData(0),
fAlternateParams = 0; fPOI(0),
fPOI = 0; fNullParams(0),
fNuisParams = 0; fAlternateParams(0),
fOwnsWorkspace = false; fNuisParams(0)
} {}
CombinedCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf CombinedCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet&
, RooArgSet& paramsOfInterest, paramsOfInterest,
Double_t size = 0.05, RooArgSet* nullParams = 0, R Double_t size = 0.05, const RooArgSet* nullParams
ooArgSet* altParams = 0){ = 0, const RooArgSet* altParams = 0, const RooArgSet* nuisParams = 0) :
// alternate constructor
SetWorkspace(ws); fPdf(&pdf),
SetData(data); fData(&data),
SetPdf(pdf); fPOI(&paramsOfInterest),
SetParameters(paramsOfInterest); fNullParams(nullParams),
fAlternateParams(altParams),
fNuisParams(nuisParams)
{
SetTestSize(size); SetTestSize(size);
if(nullParams ) }
SetNullParameters(*nullParams);
else // constructor from data and model configuration
SetNullParameters(paramsOfInterest); CombinedCalculator(RooAbsData& data, const ModelConfig& model,
if (altParams) SetAlternateParameters(*altParams); Double_t size = 0.05) :
fOwnsWorkspace = false; fPdf(0),
} fData(&data),
fPOI(0),
CombinedCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgSet& param fNullParams(0),
sOfInterest, fAlternateParams(0),
Double_t size = 0.05, RooArgSet* nullParams = 0, R fNuisParams(0)
ooArgSet* altParams = 0){ {
// alternate constructor SetModel(model);
fWS = new RooWorkspace();
fOwnsWorkspace = true;
SetData(data);
SetPdf(pdf);
SetParameters(paramsOfInterest);
SetTestSize(size); SetTestSize(size);
if(nullParams )
SetNullParameters(*nullParams);
else
SetNullParameters(paramsOfInterest);
if (altParams) SetAlternateParameters(*altParams);
}
virtual ~CombinedCalculator() {
// destructor.
if( fOwnsWorkspace && fWS) delete fWS;
// commented out b/c currently the calculator does not own these.
Change if we clone.
// if (fWS) delete fWS;
// if (fNullParams) delete fNullParams;
// if (fAlternateParams) delete fAlternateParams;
// if (fPOI) delete fPOI;
// if (fNuisParams) delete fNuisParams;
} }
// destructor.
virtual ~CombinedCalculator() { }
// if( fOwnsWorkspace && fWS) delete fWS;
// // commented out b/c currently the calculator does not own thes
e. Change if we clone.
// // if (fWS) delete fWS;
// // if (fNullParams) delete fNullParams;
// // if (fAlternateParams) delete fAlternateParams;
// // if (fPOI) delete fPOI;
// // if (fNuisParams) delete fNuisParams;
// }
// Main interface to get a ConfInterval, pure virtual // Main interface to get a ConfInterval, pure virtual
virtual ConfInterval* GetInterval() const = 0; virtual ConfInterval* GetInterval() const = 0;
// main interface to get a HypoTestResult, pure virtual // main interface to get a HypoTestResult, pure virtual
virtual HypoTestResult* GetHypoTest() const = 0; virtual HypoTestResult* GetHypoTest() const = 0;
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana // Set the DataSet, add to the the workspace if not already there
lysis virtual void SetData(RooAbsData & data) {
virtual void SetWorkspace(RooWorkspace & ws) { fData = &data;
if (!fWS) }
fWS = &ws;
else{ // set the model
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ; virtual void SetModel(const ModelConfig & model) {
fWS->merge(ws); fPdf = model.GetPdf();
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ; fPOI = model.GetParametersOfInterest();
} fNullParams = model.GetSnapshot();
fNuisParams = model.GetNuisanceParameters();
}
virtual void SetNullModel( const ModelConfig &) { // to be understoo
d what to do
}
virtual void SetAlternateModel(const ModelConfig &) { // to be under
stood what to do
} }
// Set the DataSet, add to the the workspace if not already there /* specific setting - keep for convenience- some of them could be re
virtual void SetData(RooAbsData & data) { moved */
if (!fWS) {
fWS = new RooWorkspace(); // Set the Pdf
fOwnsWorkspace = true; virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; }
}
if (! fWS->data( data.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData( data.GetName() );
};
// Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) {
if (!fWS)
fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf( pdf.GetName() );
}
// Set the Pdf, add to the the workspace if not already there
virtual void SetCommonPdf(RooAbsPdf& pdf) { SetPdf(pdf);}
// Set the Pdf, add to the the workspace if not already there
virtual void SetNullPdf(RooAbsPdf& pdf) { SetPdf(pdf);}
// Set the Pdf, add to the the workspace if not already there
virtual void SetAlternatePdf(RooAbsPdf& pdf) { SetPdf(pdf);}
// specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name){fDataName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(const RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams
t;} = &set;}
// from HypoTestCalculator
// set the PDF for the null hypothesis. Needs to be the common one
virtual void SetNullPdf(const char* name) {SetPdf(name);}
// set the PDF for the alternate hypothesis. Needs to be the common o
ne
virtual void SetAlternatePdf(const char* name) {SetPdf(name);}
// set a common PDF for both the null and alternate hypotheses
virtual void SetCommonPdf(const char* name) {SetPdf(name);}
// set parameter values for the null if using a common PDF // set parameter values for the null if using a common PDF
virtual void SetNullParameters(RooArgSet& set) {fNullParams = &set;} virtual void SetNullParameters(const RooArgSet& set) {fNullParams = & set;}
// set parameter values for the alternate if using a common PDF // set parameter values for the alternate if using a common PDF
virtual void SetAlternateParameters(RooArgSet& set) {fAlternateParams = &set;} virtual void SetAlternateParameters(const RooArgSet& set) {fAlternate Params = &set;}
protected: protected:
RooAbsPdf * GetPdf() const { return fPdf; }
RooAbsData * GetData() const { return fData; }
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // a workspace that owns all the components to be
used by the calculator RooAbsPdf * fPdf;
const char* fPdfName; // name of common PDF in workspace RooAbsData * fData;
const char* fDataName; // name of data set in workspace const RooArgSet* fPOI; // RooArgSet specifying parameters of interes
RooArgSet* fNullParams; // RooArgSet specifying null parameters for h t for interval
ypothesis test const RooArgSet* fNullParams; // RooArgSet specifying null parameters
RooArgSet* fAlternateParams; // RooArgSet specifying alternate parame for hypothesis test
ters for hypothesis test const RooArgSet* fAlternateParams; // RooArgSet specifying alternate
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for parameters for hypothesis test // Is it used ????
interval const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f ters for interval
or interval
Bool_t fOwnsWorkspace;
ClassDef(CombinedCalculator,1) // A base class that is for tools that can be both HypoTestCalculators and IntervalCalculators ClassDef(CombinedCalculator,1) // A base class that is for tools that can be both HypoTestCalculators and IntervalCalculators
}; };
} }
#endif #endif
 End of changes. 15 change blocks. 
134 lines changed or deleted 99 lines changed or added


 ConfInterval.h   ConfInterval.h 
// @(#)root/roostats:$Id: ConfInterval.h 26324 2008-11-20 17:17:32Z moneta $ // @(#)root/roostats:$Id: ConfInterval.h 30512 2009-09-28 17:24:48Z moneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_ConfInterval #ifndef ROOSTATS_ConfInterval
skipping to change at line 49 skipping to change at line 49
class ConfInterval : public TNamed { class ConfInterval : public TNamed {
public: public:
ConfInterval() : TNamed() {} ConfInterval() : TNamed() {}
ConfInterval(const char* name) : TNamed(name,name) {} ConfInterval(const char* name) : TNamed(name,name) {}
ConfInterval(const char* name, const char* title) : TNamed(name,title ) {} ConfInterval(const char* name, const char* title) : TNamed(name,title ) {}
virtual ~ConfInterval() {} virtual ~ConfInterval() {}
//pure virtual? where does =0 go with const? //pure virtual? where does =0 go with const?
virtual Bool_t IsInInterval(RooArgSet&) = 0; virtual Bool_t IsInInterval(const RooArgSet&) = 0;
// used to set confidence level. Keep pure virtual // used to set confidence level. Keep pure virtual
virtual void SetConfidenceLevel(Double_t cl) = 0; virtual void SetConfidenceLevel(Double_t cl) = 0;
// return confidence level // return confidence level
virtual Double_t ConfidenceLevel() const = 0; virtual Double_t ConfidenceLevel() const = 0;
// //
// if so does this implement it? // if so does this implement it?
// private fSize; // private fSize;
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const = 0; virtual RooArgSet* GetParameters() const = 0;
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
virtual Bool_t CheckParameters(RooArgSet&) const = 0; virtual Bool_t CheckParameters(const RooArgSet&) const = 0;
protected: protected:
ClassDef(ConfInterval,1) // Interface for Confidence Intervals ClassDef(ConfInterval,1) // Interface for Confidence Intervals
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 DictSelection.h   DictSelection.h 
// @(#)root/reflex:$Id: DictSelection.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: DictSelection.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
#ifndef Reflex_DictSelection #ifndef Reflex_DictSelection
#define Reflex_DictSelection #define Reflex_DictSelection
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
/** /**
* @file DictSelection.h * @file DictSelection.h
* @author scott snyder * @author scott snyder
skipping to change at line 47 skipping to change at line 47
* class C { ... }; * class C { ... };
* } * }
* namespace Reflex { * namespace Reflex {
* namespace selection { * namespace selection {
* namespace N { * namespace N {
* class C { ... }; * class C { ... };
* } * }
* } * }
* } * }
* *
@endcode @endcode
* *
* If, however, we're dealing with a template class, @c C\<T>, then * If, however, we're dealing with a template class, @c C\<T>, then
* things are trickier, since one needs to be sure that the * things are trickier, since one needs to be sure that the
* selection class gets properly instantiated. As before, the dictionary * selection class gets properly instantiated. As before, the dictionary
* generator will look for a class @c Reflex::selection::C\<T> (with the sa me * generator will look for a class @c Reflex::selection::C\<T> (with the sa me
* template arguments as @c C). This will only succeed, however, * template arguments as @c C). This will only succeed, however,
* if the selection class has otherwise been used. Example: * if the selection class has otherwise been used. Example:
* *
* @code * @code
* *
skipping to change at line 72 skipping to change at line 72
* namespace selection { * namespace selection {
* template <class T> * template <class T>
* class C { ... }; * class C { ... };
* } * }
* } * }
* *
* struct foo { C<int> x; }; * struct foo { C<int> x; };
* *
* // Without this, the selection class won't be fully instantiated. * // Without this, the selection class won't be fully instantiated.
* struct foo_selection { Reflex::selection::C<int> x; } * struct foo_selection { Reflex::selection::C<int> x; }
@endcode @endcode
* *
* What one would really like is a way to ensure that the selection class * What one would really like is a way to ensure that the selection class
* gets instantiated whenever the class its describing does. That does * gets instantiated whenever the class its describing does. That does
* not seem to be possible without modifying that class (at least not * not seem to be possible without modifying that class (at least not
* without changes to gccxml). The following idiom seems to work: * without changes to gccxml). The following idiom seems to work:
* *
* @code * @code
* *
* template <class T> class Reflex::selection::C; // forward declaration * template <class T> class Reflex::selection::C; // forward declaration
* *
skipping to change at line 101 skipping to change at line 101
* namespace selection { * namespace selection {
* template <class T> * template <class T>
* class C * class C
* { * {
* typedef DictSelection<C> self; * typedef DictSelection<C> self;
* ... * ...
* }; * };
* } * }
* } * }
* *
@endcode @endcode
* *
* Note that if you instead use * Note that if you instead use
* *
* @code * @code
* *
* typedef Reflex::selection::C<T> DictSelection; * typedef Reflex::selection::C<T> DictSelection;
* *
@endcode @endcode
* *
* then @c Reflex::selection::C\<T> will not be fully instantiated. * then @c Reflex::selection::C\<T> will not be fully instantiated.
* *
* We turn now to declarations the may be present in the selection class. * We turn now to declarations the may be present in the selection class.
* Below, we'll call the class being described by the selection class @c C. * Below, we'll call the class being described by the selection class @c C.
* *
* @Reflex::selection::AUTOSELECT * @Reflex::selection::AUTOSELECT
* *
* This can be useful for automatically including classes which @c C depe nds upon. * This can be useful for automatically including classes which @c C depe nds upon.
* *
skipping to change at line 148 skipping to change at line 148
* AUTOSELECT fX; * AUTOSELECT fX;
* }; * };
* } * }
* } * }
* *
* // The above declarations mark both C<T> and std::vector<T> * // The above declarations mark both C<T> and std::vector<T>
* // as autoselect. This means that dictionary information for them * // as autoselect. This means that dictionary information for them
* // will be emitted wherever it's needed --- no need to list them * // will be emitted wherever it's needed --- no need to list them
* // in selection.xml. * // in selection.xml.
* *
@endcode @endcode
* *
* @Reflex::selection::TRANSIENT * @Reflex::selection::TRANSIENT
* *
* This declaration marks the corresponding MemberAt in @c C with * This declaration marks the corresponding MemberAt in @c C with
* the same Name as transient. This allows the transient flag * the same Name as transient. This allows the transient flag
* to be listed once in the class header, rather than having * to be listed once in the class header, rather than having
* to list it in selection.xml (in possibly many places if @c C * to list it in selection.xml (in possibly many places if @c C
* is a template class). Example: * is a template class). Example:
* *
* @code * @code
skipping to change at line 176 skipping to change at line 176
* *
* namespace Reflex { * namespace Reflex {
* namespace selection { * namespace selection {
* class C * class C
* { * {
* TRANSIENT fY; // Don't save C::fY. * TRANSIENT fY; // Don't save C::fY.
* }; * };
* } * }
* } * }
* *
@endcode @endcode
* *
* @Reflex::selection::TEMPLATE_DEFAULTS<T1, T2, ...> * @Reflex::selection::TEMPLATE_DEFAULTS<T1, T2, ...>
* *
* (The Name of the MemberAt used does not matter.) * (The Name of the MemberAt used does not matter.)
* Declares default template arguments for @c C. Up to 15 arguments * Declares default template arguments for @c C. Up to 15 arguments
* may be listed. If a given position cannot be defaulted, then * may be listed. If a given position cannot be defaulted, then
* use @c Reflex::selection::NODEFAULT. * use @c Reflex::selection::NODEFAULT.
* *
* If this declaration has been made, then any defaulted template * If this declaration has been made, then any defaulted template
* arguments will be suppressed in the external representations * arguments will be suppressed in the external representations
skipping to change at line 217 skipping to change at line 217
* { * {
* typedef DictSelection<C> self; * typedef DictSelection<C> self;
* *
* TEMPLATE_DEFAULTS<NODEFAULT, int> dummy; * TEMPLATE_DEFAULTS<NODEFAULT, int> dummy;
* }; * };
* } * }
* } * }
* // With the above, then C<T,int> will be represented externally * // With the above, then C<T,int> will be represented externally
* // as just `C<T>'. * // as just `C<T>'.
* *
@endcode @endcode
*/ */
namespace Reflex { namespace Reflex {
namespace Selection {
/*
* @brief turn of autoselection of the class
*
* By default classes which appear in the Selection namespace will be selec
ted
* for dictionary generation. If a class has a member of type NO_SELF_AUTOS
ELECT
* no dictionary information for this class will be generated.
*/
class RFLX_API NO_SELF_AUTOSELECT {};
/*
* @brief Mark a MemberAt as being transient.
*
* This should be used in a selection class. This marks the corresponding
* MemberAt as being transient. See the header comments for examples.
*/
class RFLX_API TRANSIENT {};
/*
* @brief Mark the At of a (data)MemberAt as autoselected.
*
* This should be used in a selection class. The Name of the MemberAt shall
be the same
* as the MemberAt in the original class and will be automatically
* selected to have dictionary information generated wherever it's
* needed. See the header comments for examples.
*/
class RFLX_API AUTOSELECT {};
/*
* @brief Placeholder for @c TEMPLATE_DEFAULTS.
*
* This is used in the @c TEMPLATE_DEFAULTS template argument list
* for positions where template arguments cannot be defaulted.
*/
struct RFLX_API NODEFAULT {};
/*
* @brief Declare template argument defaults.
*
* This should be used in a selection class. The template arguments
* of this class give the template argument defaults for the class
* being described. If the class is used with defaulted template
* arguments, then these arguments will be omitted from external
* representations. See the header comments for examples.
*/
template <class T1 = NODEFAULT,
class T2 = NODEFAULT,
class T3 = NODEFAULT,
class T4 = NODEFAULT,
class T5 = NODEFAULT,
class T6 = NODEFAULT,
class T7 = NODEFAULT,
class T8 = NODEFAULT,
class T9 = NODEFAULT,
class T10 = NODEFAULT,
class T11 = NODEFAULT,
class T12 = NODEFAULT,
class T13 = NODEFAULT,
class T14 = NODEFAULT,
class T15 = NODEFAULT>
struct TEMPLATE_DEFAULTS {
typedef NODEFAULT nodefault;
typedef T1 t1;
typedef T2 t2;
typedef T3 t3;
typedef T4 t4;
typedef T5 t5;
typedef T6 t6;
typedef T7 t7;
typedef T8 t8;
typedef T9 t9;
typedef T10 t10;
typedef T11 t11;
typedef T12 t12;
typedef T13 t13;
typedef T14 t14;
typedef T15 t15;
};
namespace Selection { } // namespace Selection
/*
* @brief turn of autoselection of the class
*
* By default classes which appear in the Selection namespace will be
selected
* for dictionary generation. If a class has a member of type NO_SELF_
AUTOSELECT
* no dictionary information for this class will be generated.
*/
class RFLX_API NO_SELF_AUTOSELECT {};
/*
* @brief Mark a MemberAt as being transient.
*
* This should be used in a selection class. This marks the correspon
ding
* MemberAt as being transient. See the header comments for examples.
*/
class RFLX_API TRANSIENT {};
/*
* @brief Mark the At of a (data)MemberAt as autoselected.
*
* This should be used in a selection class. The Name of the MemberAt
shall be the same
* as the MemberAt in the original class and will be automatically
* selected to have dictionary information generated wherever it's
* needed. See the header comments for examples.
*/
class RFLX_API AUTOSELECT{};
/*
* @brief Placeholder for @c TEMPLATE_DEFAULTS.
*
* This is used in the @c TEMPLATE_DEFAULTS template argument list
* for positions where template arguments cannot be defaulted.
*/
struct RFLX_API NODEFAULT {};
/*
* @brief Declare template argument defaults.
*
* This should be used in a selection class. The template arguments
* of this class give the template argument defaults for the class
* being described. If the class is used with defaulted template
* arguments, then these arguments will be omitted from external
* representations. See the header comments for examples.
*/
template <class T1 = NODEFAULT,
class T2 = NODEFAULT,
class T3 = NODEFAULT,
class T4 = NODEFAULT,
class T5 = NODEFAULT,
class T6 = NODEFAULT,
class T7 = NODEFAULT,
class T8 = NODEFAULT,
class T9 = NODEFAULT,
class T10 = NODEFAULT,
class T11 = NODEFAULT,
class T12 = NODEFAULT,
class T13 = NODEFAULT,
class T14 = NODEFAULT,
class T15 = NODEFAULT>
struct TEMPLATE_DEFAULTS
{
typedef NODEFAULT nodefault;
typedef T1 t1;
typedef T2 t2;
typedef T3 t3;
typedef T4 t4;
typedef T5 t5;
typedef T6 t6;
typedef T7 t7;
typedef T8 t8;
typedef T9 t9;
typedef T10 t10;
typedef T11 t11;
typedef T12 t12;
typedef T13 t13;
typedef T14 t14;
typedef T15 t15;
};
} // namespace Selection
} // namespace Reflex } // namespace Reflex
#endif // Reflex_DictSelection #endif // Reflex_DictSelection
 End of changes. 10 change blocks. 
95 lines changed or deleted 91 lines changed or added


 DictionaryGenerator.h   DictionaryGenerator.h 
// @(#)root/reflex:$Id: DictionaryGenerator.h 24140 2008-06-04 13:17:45Z ax el $ // @(#)root/reflex:$Id: DictionaryGenerator.h 29288 2009-07-01 13:03:35Z ax el $
// Author: Antti Hahto 06/20/06 // Author: Antti Hahto 06/20/06
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 27 skipping to change at line 27
// 1. Create a new generator : Dictgen generator // 1. Create a new generator : Dictgen generator
// 2. Set recursive parsing, optional (default:on) : generator.Use_recurs ive(true/false) // 2. Set recursive parsing, optional (default:on) : generator.Use_recurs ive(true/false)
// 3. Set selection file, optional : generator.Use_select ion("filename") // 3. Set selection file, optional : generator.Use_select ion("filename")
// 4. Run, example // 4. Run, example
// Scope::GlobalScope().Gendict(generator); // Scope::GlobalScope().Gendict(generator);
// 5. Dump results into file/stdout(if filename left empty) : generator.Du mp("filename") // 5. Dump results into file/stdout(if filename left empty) : generator.Du mp("filename")
#ifndef Reflex_DictionaryGenerator #ifndef Reflex_DictionaryGenerator
#define Reflex_DictionaryGenerator #define Reflex_DictionaryGenerator
# include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
# include "Reflex/Type.h" #include "Reflex/Type.h"
# include <fstream> #include <fstream>
# include <string> #include <string>
# include <iostream> #include <iostream>
# include <vector> #include <vector>
# include <ctime> #include <ctime>
# include <iostream> #include <iostream>
# include <iomanip> #include <iomanip>
# include <limits> #include <limits>
# include <ostream> #include <ostream>
# include <sstream> #include <sstream>
#include <list> // isnewtype2 #include <list> // isnewtype2
#include <algorithm> //isnewtype2 #include <algorithm> //isnewtype2
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( push ) # pragma warning( push )
#pragma warning( disable : 4251 ) # pragma warning( disable : 4251 )
#endif #endif
namespace Reflex namespace Reflex {
{ // forward declarations
class Type;
// forward declarations
class Type; /*
* @class DictionaryGenerator DictonaryGenerator.h Reflex/DictionaryGenerat
or.h
* @author Antti Hahto
* @date 20/06/2006
* @ingroup Ref
*/
class RFLX_API DictionaryGenerator {
public:
/* default constructor */
DictionaryGenerator();
/* destructor */
~DictionaryGenerator();
friend std::ostream& operator <<(std::ostream& s,
const DictionaryGenerator& obj);
/**
* Use_recursive set recursive or not
* @param recursive
* @return
*/
bool Use_recursive(bool recursive);
/**
* Use_selection set selection file
* @param filename
* @return
*/
bool Use_selection(const std::string& filename);
/**
* Dump output the results into stream
* @param filename
*/
void Print(const std::string& filename = "");
/**
* AddHeaderFile adds an extra user .h file into dump
* @param filename
*/
void AddHeaderFile(const std::string& filename);
/**
* GetTypeNumber allt types have a unique id-number
* @param mebertype
* @return
*/
std::string GetTypeNumber(const Type& membertype);
/**
* Use_recursive get if recursion set
* @return true if recursion is set
*/
bool Use_recursive();
/**
* AddIntoInstances add Instances -field into output
* @param item
*/
void AddIntoInstances(const std::string& item);
/**
* AddIntoNS add NS field into output
* @param typenumber
* @param membertype
*/
void AddIntoNS(const std::string& typenumber,
const Type& membertype);
/**
* AddIntoShadow add Shadow field into output
* param item
*/
void AddIntoShadow(const std::string& item);
/**
* AddIntoFree add Free field into output
* @param item
*/
void AddIntoFree(const std::string& item);
/**
* AddIntoClasses add Classes field into output
* @param item
*/
void AddIntoClasses(const std::string& item);
/**
* fMethodCountermethod_Xn, after Stub Functions for the class
*/
double fMethodCounter;
/**
* fStr_namespaces
*/
std::ostringstream fStr_namespaces;
/**
* GetParams
* @param membertype
*/
std::string GetParams(const Type& membertype);
/**
* IsNewType already introduced type?
* @param searchtype
* @return
*/
bool IsNewType(const Type& searchtype);
/**
* Replace_colon
* @param scoped_name
* @return
*/
std::string Replace_colon(std::string scoped_name);
/**
* fSelections
*/
std::vector<std::string> fSelections; // for explicitly choosing cl
asses to include into generation
/**
* fPattern_selections
*/
std::vector<std::string> fPattern_selections;
bool IsNewType2(const Type& searchtype); // testing; work-in-prog
ress
private:
/**
* GetSubScopes one scope can include multiple subscopes
* @param allscopes
*/
void GetSubScopes(Scope_Iterator allscopes);
/**
* GetMembers and subscope can include members
*/
void GetMembers(Scope_Iterator subsco);
/**
* fTypes store used types
*/
std::vector<Reflex::Type> fTypes;
/**
* fStr_header
*/
std::ostringstream fStr_header;
/**
* fStr_shadow
*/
std::ostringstream fStr_shadow;
/**
* fStr_shadow2 member predefinations for shadow
*/
std::ostringstream fStr_shadow2;
/**
* fStr_classes
*/
std::ostringstream fStr_classes;
/**
* fStr_classes_method for class part, method_xn
*/
std::ostringstream fStr_classes_method;
/**
* fStr_frees
*/
std::ostringstream fStr_frees;
/**
* fStr_instances
*/
std::ostringstream fStr_instances;
/**
* fStr_instances2 instances unload() -part
*/
std::ostringstream fStr_instances2;
/**
* fSelect_recursive if set true, recursive go throught all the scopes
*/
bool fSelect_recursive;
/* /*
* @class DictionaryGenerator DictonaryGenerator.h Reflex/DictionaryGener
ator.h
* @author Antti Hahto
* @date 20/06/2006
* @ingroup Ref
*/
class RFLX_API DictionaryGenerator
{
public:
/* default constructor */
DictionaryGenerator();
/* destructor */
~DictionaryGenerator();
friend std::ostream & operator << ( std::ostream & s,
const DictionaryGenerator & obj );
/**
* Use_recursive set recursive or not
* @param recursive
* @return
*/
bool Use_recursive(bool recursive);
/**
* Use_selection set selection file
* @param filename
* @return
*/
bool Use_selection(const std::string & filename);
/**
* Dump output the results into stream
* @param filename
*/
void Print(const std::string & filename = "");
/**
* AddHeaderFile adds an extra user .h file into dump
* @param filename
*/
void AddHeaderFile(const std::string & filename);
/**
* GetTypeNumber allt types have a unique id-number
* @param mebertype
* @return
*/
std::string GetTypeNumber( const Type & membertype);
/**
* Use_recursive get if recursion set
* @return true if recursion is set
*/
bool Use_recursive();
/**
* AddIntoInstances add Instances -field into output
* @param item
*/
void AddIntoInstances(const std::string & item);
/**
* AddIntoNS add NS field into output
* @param typenumber
* @param membertype
*/
void AddIntoNS(const std::string & typenumber,
const Type & membertype);
/**
* AddIntoShadow add Shadow field into output
* param item
*/
void AddIntoShadow(const std::string & item);
/**
* AddIntoFree add Free field into output
* @param item
*/
void AddIntoFree(const std::string & item);
/**
* AddIntoClasses add Classes field into output
* @param item
*/
void AddIntoClasses(const std::string & item);
/**
* fMethodCountermethod_Xn, after Stub Functions for the class
*/
double fMethodCounter;
/**
* fStr_namespaces
*/
std::ostringstream fStr_namespaces;
/**
* GetParams
* @param membertype
*/
std::string GetParams(const Type & membertype);
/**
* IsNewType already introduced type?
* @param searchtype
* @return
*/
bool IsNewType( const Type & searchtype);
/**
* Replace_colon
* @param scoped_name
* @return
*/
std::string Replace_colon(std::string scoped_name);
/**
* fSelections
*/
std::vector <std::string> fSelections; // for explicitly choosing cl
asses to include into generation
/**
* fPattern_selections
*/
std::vector <std::string> fPattern_selections;
bool IsNewType2 ( const Type & searchtype); // testing; work-in-prog
ress
private:
/**
* GetSubScopes one scope can include multiple subscopes
* @param allscopes
*/
void GetSubScopes (Scope_Iterator allscopes );
/**
* GetMembers and subscope can include members
*/
void GetMembers ( Scope_Iterator subsco);
/**
* fTypes store used types
*/
std::vector<Reflex::Type> fTypes;
/**
* fStr_header
*/
std::ostringstream fStr_header;
/**
* fStr_shadow
*/
std::ostringstream fStr_shadow;
/**
* fStr_shadow2 member predefinations for shadow
*/
std::ostringstream fStr_shadow2;
/**
* fStr_classes
*/
std::ostringstream fStr_classes;
/**
* fStr_classes_method for class part, method_xn
*/
std::ostringstream fStr_classes_method;
/**
* fStr_frees
*/
std::ostringstream fStr_frees;
/**
* fStr_instances
*/
std::ostringstream fStr_instances;
/**
* fStr_instances2 instances unload() -part
*/
std::ostringstream fStr_instances2;
/**
* fSelect_recursive if set true, recursive go throught all the scopes
*/
bool fSelect_recursive;
/*
// FIND2 START testing // FIND2 START testing
struct mydata struct mydata
{ {
Reflex::Type itemnum; Reflex::Type itemnum;
Reflex::Type value; Reflex::Type value;
}; };
struct MatchItemNum struct MatchItemNum
{ {
Reflex::Type itemnum; Reflex::Type itemnum;
MatchItemNum(Reflex::Type num) : itemnum(num) MatchItemNum(Reflex::Type num) : itemnum(num)
{ {
} }
bool operator()(const mydata &data) const bool operator()(const mydata &data) const
{ {
//return (data.itemnum == itemnum); //return (data.itemnum == itemnum);
return (data.itemnum.IsEquivalentTo(itemnum)); return (data.itemnum.IsEquivalentTo(itemnum));
} }
}; };
std::list<mydata> types2; std::list<mydata> types2;
// FIND2 END // FIND2 END
*/ */
}; // class DictionaryGenerator }; // class DictionaryGenerator
/** stream operator */ /** stream operator */
std::ostream & operator << ( std::ostream & s, std::ostream& operator <<(std::ostream& s,
const DictionaryGenerator & obj ); const DictionaryGenerator& obj);
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::DictionaryGenerator::AddHeaderFile(const std::string & inline void
filename) { Reflex::DictionaryGenerator::AddHeaderFile(const std::string& filename) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// Adds an extra user .h -file into dump // Adds an extra user .h -file into dump
fStr_header<< "#include \"" << filename << "\"\n"; fStr_header << "#include \"" << filename << "\"\n";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::DictionaryGenerator::AddIntoInstances(const std::string inline void
& item) { Reflex::DictionaryGenerator::AddIntoInstances(const std::string& item) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// The last field of the generated file // The last field of the generated file
fStr_instances << item; fStr_instances << item;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::DictionaryGenerator::AddIntoShadow(const std::string & inline void
item) { Reflex::DictionaryGenerator::AddIntoShadow(const std::string& item) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// Shadow field of the generated file // Shadow field of the generated file
fStr_shadow << item; fStr_shadow << item;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::DictionaryGenerator::AddIntoFree(const std::string & it inline void
em) { Reflex::DictionaryGenerator::AddIntoFree(const std::string& item) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// Free field generation // Free field generation
fStr_frees << item; fStr_frees << item;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::DictionaryGenerator::AddIntoClasses(const std::string & inline void
item) { Reflex::DictionaryGenerator::AddIntoClasses(const std::string& item) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// Classes field generation // Classes field generation
fStr_classes << item; fStr_classes << item;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::DictionaryGenerator::DictionaryGenerator() inline Reflex::DictionaryGenerator::DictionaryGenerator()
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fMethodCounter(0), : fMethodCounter(0),
fSelect_recursive(true) { fSelect_recursive(true) {
fTypes.clear(); // storage of used types fTypes.clear(); // storage of used types
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::DictionaryGenerator::~DictionaryGenerator() { inline Reflex::DictionaryGenerator::~DictionaryGenerator() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) # pragma warning( pop )
#endif #endif
#endif // Reflex_DictionaryGenerator #endif // Reflex_DictionaryGenerator
 End of changes. 17 change blocks. 
238 lines changed or deleted 232 lines changed or added


 Dinv.h   Dinv.h 
// @(#)root/smatrix:$Id: Dinv.h 28954 2009-06-12 09:36:34Z moneta $ // @(#)root/smatrix:$Id: Dinv.h 30459 2009-09-25 15:38:26Z moneta $
// Authors: T. Glebe, L. Moneta 2005 // Authors: T. Glebe, L. Moneta 2005
#ifndef ROOT_Math_Dinv #ifndef ROOT_Math_Dinv
#define ROOT_Math_Dinv #define ROOT_Math_Dinv
// ******************************************************************** // ********************************************************************
// //
// source: // source:
// //
// type: source code // type: source code
// //
skipping to change at line 96 skipping to change at line 96
/* N.GT.3 CASES. FACTORIZE MATRIX AND INVERT. */ /* N.GT.3 CASES. FACTORIZE MATRIX AND INVERT. */
if (Dfactir<MatrixRep,n,idim>(rhs,det,work) == false) { if (Dfactir<MatrixRep,n,idim>(rhs,det,work) == false) {
std::cerr << "Dfactir failed!!" << std::endl; std::cerr << "Dfactir failed!!" << std::endl;
return false; return false;
} }
return Dfinv<MatrixRep,n,idim>(rhs,work); return Dfinv<MatrixRep,n,idim>(rhs,work);
#else #else
/* Initialized data */ /* Initialized data */
static unsigned int work[n+1]; unsigned int work[n+1];
for(unsigned int i=0; i<n+1; ++i) work[i] = 0; for(unsigned int i=0; i<n+1; ++i) work[i] = 0;
static typename MatrixRep::value_type det = 0; static typename MatrixRep::value_type det = 0;
if (DfactMatrix(rhs,det,work) != 0) { if (DfactMatrix(rhs,det,work) != 0) {
std::cerr << "Dfact_matrix failed!!" << std::endl; std::cerr << "Dfact_matrix failed!!" << std::endl;
return false; return false;
} }
int ifail = DfinvMatrix(rhs,work); int ifail = DfinvMatrix(rhs,work);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 EnumBuilder.h   EnumBuilder.h 
// @(#)root/reflex:$Id: EnumBuilder.h 28992 2009-06-15 09:20:22Z axel $ // @(#)root/reflex:$Id: EnumBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_EnumBuilder #ifndef Reflex_EnumBuilder
#define Reflex_EnumBuilder #define Reflex_EnumBuilder
// Include files // Include files
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Member.h" #include "Reflex/Member.h"
namespace Reflex{ namespace Reflex {
// forward declarations
class Enum;
/**
* @class EnumBuilder EnumBuilder.h Reflex/Builder/EnumBuilder.h
* @author Stefan Roiser
* @date 14/3/2005
* @ingroup RefBld
*/
class RFLX_API EnumBuilder {
public:
/** constructor */
EnumBuilder(const char* name,
const std::type_info & ti,
unsigned int modifiers = 0);
// forward declarations /** destructor */
class Enum; virtual ~EnumBuilder();
/** /**
* @class EnumBuilder EnumBuilder.h Reflex/Builder/EnumBuilder.h * AddProperty will add a PropertyNth to the PropertyNth stack
* @author Stefan Roiser * which will be emptied with the next enum / item build
* @date 14/3/2005 * @param key the PropertyNth key
* @ingroup RefBld * @param value the value of the PropertyNth
*/ * @return a reference to the building class
class RFLX_API EnumBuilder { */
EnumBuilder& AddItem(const char* nam,
public: long value);
/** constructor */
EnumBuilder( const char * name,
const std::type_info & ti,
unsigned int modifiers = 0 );
/** destructor */
virtual ~EnumBuilder();
/**
* AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emptied with the next enum / item build
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
EnumBuilder & AddItem ( const char * nam,
long value );
/**
* AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
EnumBuilder & AddProperty( const char * key,
Any value );
/**
* AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
EnumBuilder & AddProperty( const char * key,
const char * value );
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private:
/** current enum being built */ /**
Enum * fEnum; * AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
EnumBuilder& AddProperty(const char* key,
Any value);
/** last added enum item */ /**
Member fLastMember; * AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
EnumBuilder& AddProperty(const char* key,
const char* value);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private:
/** current enum being built */
Enum* fEnum;
/** last added enum item */
Member fLastMember;
}; // class EnumBuilder
/**
* @class EnumBuilder EnumBuilder.h Reflex/Builder/EnumBuilder.h
* @author Stefan Roiser
* @ingroup RefBld
* @date 30/3/2004
*/
template <typename T>
class EnumBuilderT {
public:
/** constructor */
EnumBuilderT(unsigned int modifiers = 0);
/** constructor */
EnumBuilderT(const char* nam,
unsigned int modifiers = 0);
}; // class EnumBuilder /** destructor */
virtual ~EnumBuilderT() {}
/** /**
* @class EnumBuilder EnumBuilder.h Reflex/Builder/EnumBuilder.h * AddItem add a new item in the enum
* @author Stefan Roiser * @param Name item Name
* @ingroup RefBld * @param value the value of the item
* @date 30/3/2004 * @return a reference to the building class
*/ */
template < typename T > EnumBuilderT& AddItem(const char* nam,
class EnumBuilderT { long value);
public:
/** constructor */
EnumBuilderT( unsigned int modifiers = 0 );
/** constructor */
EnumBuilderT( const char * nam,
unsigned int modifiers = 0 );
/** destructor */
virtual ~EnumBuilderT() {}
/**
* AddItem add a new item in the enum
* @param Name item Name
* @param value the value of the item
* @return a reference to the building class
*/
EnumBuilderT & AddItem( const char * nam,
long value );
/**
* AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emptied with the next enum / item build
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template < typename P >
EnumBuilderT & AddProperty( const char * key,
P value );
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private: /**
* AddProperty will add a PropertyNth to the PropertyNth stack
/** the enums and values */ * which will be emptied with the next enum / item build
EnumBuilder fEnumBuilderImpl; * @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template <typename P>
EnumBuilderT& AddProperty(const char* key,
P value);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private:
/** the enums and values */
EnumBuilder fEnumBuilderImpl;
}; // class EnumBuilder }; // class EnumBuilder
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template <typename T>
inline Reflex::EnumBuilderT<T>::EnumBuilderT( unsigned int modifiers ) inline Reflex::EnumBuilderT<T>::EnumBuilderT(unsigned int modifiers)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fEnumBuilderImpl( Tools::Demangle( typeid(T) ).c_str(), : fEnumBuilderImpl(Tools::Demangle(typeid(T)).c_str(),
typeid(T), typeid(T),
modifiers ) {} modifiers) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template <typename T>
inline Reflex::EnumBuilderT<T>::EnumBuilderT( const char * nam, inline Reflex::EnumBuilderT<T>::EnumBuilderT(const char* nam,
unsigned int modifiers unsigned int modifiers)
) //-------------------------------------------------------------------------
//------------------------------------------------------------------------- ------
------ : fEnumBuilderImpl(nam,
: fEnumBuilderImpl( nam, typeid(UnknownType),
typeid(UnknownType), modifiers) {
modifiers ) {} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template <typename T>
inline Reflex::EnumBuilderT<T> & inline Reflex::EnumBuilderT<T>&
Reflex::EnumBuilderT<T>::AddItem( const char * nam, Reflex::EnumBuilderT<T
long value ) { >::AddItem(const char* nam,
long value) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fEnumBuilderImpl.AddItem( nam, value ); fEnumBuilderImpl.AddItem(nam, value);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template < typename P > template <typename T> template <typename P>
inline Reflex::EnumBuilderT<T> & inline Reflex::EnumBuilderT<T>&
Reflex::EnumBuilderT<T>::AddProperty( const char * key, Reflex::EnumBuilderT<T
P value ) { >::AddProperty(const char* key,
P value) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fEnumBuilderImpl.AddProperty( key, value ); fEnumBuilderImpl.AddProperty(key, value);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > inline Reflex::Type template <typename T> inline Reflex::Type
Reflex::EnumBuilderT<T>::ToType() { Reflex::EnumBuilderT<T
>::ToType() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fEnumBuilderImpl.ToType(); return fEnumBuilderImpl.ToType();
} }
#endif // Reflex_EnumBuilder #endif // Reflex_EnumBuilder
 End of changes. 18 change blocks. 
137 lines changed or deleted 134 lines changed or added


 Factory.h   Factory.h 
// @(#)root/mathcore:$Id: Factory.h 21503 2007-12-19 17:34:54Z moneta $ // @(#)root/tmva $Id: Factory.h 29122 2009-06-22 06:51:30Z brun $
// Author: L. Moneta Fri Dec 22 14:43:33 2006 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
/********************************************************************** /**************************************************************************
* * ********
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis
* * *
* * * Package: TMVA
**********************************************************************/ *
* Class : Factory
// Header file for class Factory *
* Web : http://tmva.sourceforge.net
#ifndef ROOT_Math_Factory *
#define ROOT_Math_Factory *
*
* Description:
*
* This is the main MVA steering class: it creates (books) all MVA met
hods, *
* and guides them through the training, testing and evaluation phases
. *
*
*
* Authors (alphabetical):
*
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland
*
* Joerg Stelzer <stelzer@cern.ch> - DESY, Germany
*
* Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland
*
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German
y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada
*
*
*
* Copyright (c) 2005:
*
* CERN, Switzerland
*
* U. of Victoria, Canada
*
* MPI-K Heidelberg, Germany
*
*
*
* Redistribution and use in source and binary forms, with or without
*
* modification, are permitted according to the terms listed in LICENSE
*
* (http://tmva.sourceforge.net/LICENSE)
*
**************************************************************************
********/
#ifndef ROOT_TMVA_Factory
#define ROOT_TMVA_Factory
//////////////////////////////////////////////////////////////////////////
// //
// Factory //
// //
// This is the main MVA steering class: it creates all MVA methods, //
// and guides them through the training, testing and evaluation //
// phases //
// //
//////////////////////////////////////////////////////////////////////////
#include <string> #include <string>
#include <vector>
#include <map>
#ifndef ROOT_TCut
#include "TCut.h"
#endif
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_DataSet
#include "TMVA/DataSet.h"
#endif
class TFile;
class TTree;
class TDirectory;
namespace TMVA {
class IMethod;
class MethodBase;
class DataInputHandler;
class DataSetInfo;
class VariableTransformBase;
class Factory : public Configurable {
public:
typedef std::vector<IMethod*> MVector;
// no default constructor
Factory( TString theJobName, TFile* theTargetFile, TString theOption
= "" );
// default destructor
virtual ~Factory();
virtual const char* GetName() const { return "Factory"; }
// add events to training and testing trees
void AddSignalTrainingEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddBackgroundTrainingEvent( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddSignalTestEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddBackgroundTestEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddTrainingEvent( const TString& className, const std::vector<Do
uble_t>& event, Double_t weight );
void AddTestEvent ( const TString& className, const std::vector<Do
uble_t>& event, Double_t weight );
void AddEvent ( const TString& className, Types::ETreeType tt,
const std::vector<Double_t>& event, Double_t weight );
Bool_t UserAssignEvents(UInt_t clIndex);
TTree* CreateEventAssignTrees( const TString& name );
DataSetInfo& AddDataSet( DataSetInfo& );
DataSetInfo& AddDataSet( const TString& );
// special case: signal/background
// Data input related
void SetInputTrees( const TString& signalFileName, const TString& bac
kgroundFileName,
Double_t signalWeight=1.0, Double_t backgroundWei
ght=1.0 );
void SetInputTrees( TTree* inputTree, const TCut& SigCut, const TCut&
BgCut );
// Set input trees at once
void SetInputTrees( TTree* signal, TTree* background,
Double_t signalWeight=1.0, Double_t backgroundWei
ght=1.0) ;
void AddSignalTree( TTree* signal, Double_t weight=1.0, Types::ETr
eeType treetype = Types::kMaxTreeType );
void AddSignalTree( TString datFileS, Double_t weight=1.0, Types::ETr
eeType treetype = Types::kMaxTreeType );
void AddSignalTree( TTree* signal, Double_t weight, const TString& tr
eetype );
// ... depreciated, kept for backwards compatibility
void SetSignalTree( TTree* signal, Double_t weight=1.0);
void AddBackgroundTree( TTree* background, Double_t weight=1.0, Types
::ETreeType treetype = Types::kMaxTreeType );
void AddBackgroundTree( TString datFileB, Double_t weight=1.0, Types
::ETreeType treetype = Types::kMaxTreeType );
void AddBackgroundTree( TTree* background, Double_t weight, const TSt
ring & treetype );
// ... depreciated, kept for backwards compatibility
void SetBackgroundTree( TTree* background, Double_t weight=1.0 );
void SetSignalWeightExpression( const TString& variable );
void SetBackgroundWeightExpression( const TString& variable );
// special case: regression
void AddRegressionTree( TTree* tree, Double_t weight = 1.0,
Types::ETreeType treetype = Types::kMaxTreeTy
pe ) {
AddTree( tree, "Regression", weight, "", treetype );
}
// general
// Data input related
void SetTree( TTree* tree, const TString& className, Double_t weight
); // depreciated
void AddTree( TTree* tree, const TString& className, Double_t weight=
1.0,
const TCut& cut = "",
Types::ETreeType tt = Types::kMaxTreeType );
void AddTree( TTree* tree, const TString& className, Double_t weight,
const TCut& cut, const TString& treeType );
// set input variable
void SetInputVariables ( std::vector<TString>* theVariables ); // de
preciated
void AddVariable ( const TString& expression, const TString& t
itle, const TString& unit,
char type='F', Double_t min = 0, Double_t m
ax = 0 );
void AddVariable ( const TString& expression, char type='F',
Double_t min = 0, Double_t max = 0 );
void AddTarget ( const TString& expression, const TString& t
itle = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 );
void AddRegressionTarget( const TString& expression, const TString& t
itle = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 )
{
AddTarget( expression, title, unit, min, max );
}
void AddSpectator ( const TString& expression, const TString&
title = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 );
// set weight for class
void SetWeightExpression( const TString& variable, const TString& cla
ssName = "" );
// set cut for class
void SetCut( const TString& cut, const TString& className = "" );
void SetCut( const TCut& cut, const TString& className = "" );
void AddCut( const TString& cut, const TString& className = "" );
void AddCut( const TCut& cut, const TString& className = "" );
// prepare input tree for training
void PrepareTrainingAndTestTree( const TCut& cut, const TString& spli
tOpt );
void PrepareTrainingAndTestTree( TCut sigcut, TCut bkgcut, const TStr
ing& splitOpt );
// ... deprecated, kept for backwards compatibility
void PrepareTrainingAndTestTree( const TCut& cut, Int_t Ntrain, Int_t
Ntest = -1 );
void PrepareTrainingAndTestTree( const TCut& cut, Int_t NsigTrain, In
t_t NbkgTrain, Int_t NsigTest, Int_t NbkgTest,
const TString& otherOpt="SplitMode=R
andom:!V" );
MethodBase* BookMethod( TString theMethodName, TString methodTitle, T
String theOption = "" );
MethodBase* BookMethod( Types::EMVA theMethod, TString methodTitle,
TString theOption = "" );
MethodBase* BookMethod( TMVA::Types::EMVA /*theMethod*/,
TString /*methodTitle*/,
TString /*methodOption*/,
TMVA::Types::EMVA /*theCommittee*/,
TString /*committeeOption = ""*/ ) { return 0
; }
// training for all booked methods
void TrainAllMethods ( TString what = "Classification
" );
void TrainAllMethodsForClassification( void ) { TrainAllMethods( "Cla
ssification" ); }
void TrainAllMethodsForRegression ( void ) { TrainAllMethods( "Reg
ression" ); }
// testing
void TestAllMethods();
// performance evaluation
void EvaluateAllMethods( void );
void EvaluateAllVariables( TString options = "" );
// delete all methods and reset the method vector
void DeleteAllMethods( void );
// accessors
IMethod* GetMethod( const TString& title ) const;
Bool_t Verbose( void ) const { return fVerbose; }
void SetVerbose( Bool_t v=kTRUE );
// make ROOT-independent C++ class for classifier response
// (classifier-specific implementation)
// If no classifier name is given, help messages for all booked
// classifiers are printed
virtual void MakeClass( const TString& methodTitle = "" ) const;
// prints classifier-specific hepl messages, dedicated to
// help with the optimisation and configuration options tuning.
// If no classifier name is given, help messages for all booked
// classifiers are printed
void PrintHelpMessage( const TString& methodTitle = "" ) const;
static TDirectory* RootBaseDir() { return (TDirectory*)fgTargetFile;
}
private:
// the beautiful greeting message
void Greetings();
void WriteDataInformation();
DataInputHandler& DataInput() { return *fDataInputHandler; }
DataSetInfo& DefaultDataSetInfo();
void SetInputTreesFromEventAssignTrees();
private:
// data members
static TFile* fgTargetFile; //! ROOT
output file
DataInputHandler* fDataInputHandler;
std::vector<TMVA::VariableTransformBase*> fDefaultTrfs; //! list
of transformations on default DataSet
// cd to local directory
TString fOptions; //! optio
n string given by construction (presently only "V")
TString fTransformations; //! List
of transformations to test
Bool_t fVerbose; //! verbo
se mode
MVector fMethods; //! all M
VA methods
TString fJobName; //! jobna
me, used as extension in weight file names
// flag determining the way training and test data are assigned to Fa
ctory
enum DataAssignType { kUndefined = 0,
kAssignTrees,
kAssignEvents };
DataAssignType fDataAssignType; //! flags
for data assigning
std::vector<TTree*> fTrainAssignTree; //! for e
ach class: tmp tree if user wants to assign the events directly
std::vector<TTree*> fTestAssignTree; //! for e
ach class: tmp tree if user wants to assign the events directly
Int_t fATreeType; // typ
e of event (=classIndex)
Float_t fATreeWeight; // wei
ght of the event
Float_t* fATreeEvent; // eve
nt variables
namespace ROOT { protected:
namespace Math {
class Minimizer;
//_________________________________________________________________________
__
/**
Factory class holding static functions to create the interfaces like RO
OT::Math::Minimizer
via the Plugin Manager
*/
class Factory {
public:
/**
static method to create the corrisponding Minimizer given the string
*/
static ROOT::Math::Minimizer * CreateMinimizer(const std::string & minim
izerType = "Minuit2", const std::string & algoType = "Migrad");
};
} // end namespace Fit ClassDef(Factory,0) // The factory creates all MVA methods, and perf
orms their training and testing
};
} // end namespace ROOT } // namespace TMVA
#endif /* ROOT_Fit_MinimizerFactory */ #endif
 End of changes. 7 change blocks. 
38 lines changed or deleted 342 lines changed or added


 FeldmanCousins.h   FeldmanCousins.h 
skipping to change at line 26 skipping to change at line 26
#endif #endif
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif #endif
#include "RooStats/ToyMCSampler.h" #include "RooStats/ToyMCSampler.h"
#include "RooStats/ConfidenceBelt.h" #include "RooStats/ConfidenceBelt.h"
#include "RooAbsData.h" #include "RooAbsData.h"
#include "RooWorkspace.h"
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "TList.h" #include "TList.h"
class RooAbsData; class RooAbsData;
namespace RooStats { namespace RooStats {
class ConfInterval; class ConfInterval;
class FeldmanCousins : public IntervalCalculator { class FeldmanCousins : public IntervalCalculator, public TNamed {
public: public:
FeldmanCousins(); FeldmanCousins();
virtual ~FeldmanCousins(); virtual ~FeldmanCousins();
// Main interface to get a ConfInterval (will be a PointSetInterval) // Main interface to get a ConfInterval (will be a PointSetInterval)
virtual ConfInterval* GetInterval() const; virtual ConfInterval* GetInterval() const;
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana // Set the DataSet
lysis virtual void SetData(RooAbsData& data) { fData = &data; }
virtual void SetWorkspace(RooWorkspace& ws) { // Set the Pdf
if(fOwnsWorkspace && fWS) delete fWS; virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; }
fOwnsWorkspace = false;
fWS = &ws;
}
// Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) {
if (!fWS) {
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->data(data.GetName()) ) {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData(data.GetName());
}
// Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) {
if (!fWS)
fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ))
{
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf(pdf.GetName());
}
// specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) {fDataName = name;}
// specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(const RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams = &set;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
virtual void SetModel(const ModelConfig &);
RooAbsData* GetPointsToScan() { RooAbsData* GetPointsToScan() {
if(!fPointsToTest) CreateParameterPoints(); if(!fPointsToTest) CreateParameterPoints();
return fPointsToTest; return fPointsToTest;
} }
ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;} ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;}
void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;} void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;}
void SetNBins(Int_t bins) {fNbins = bins;} void SetNBins(Int_t bins) {fNbins = bins;}
skipping to change at line 126 skipping to change at line 94
private: private:
// initializes fPointsToTest data member (mutable) // initializes fPointsToTest data member (mutable)
void CreateParameterPoints() const; void CreateParameterPoints() const;
// initializes fTestStatSampler data member (mutable) // initializes fTestStatSampler data member (mutable)
void CreateTestStatSampler() const; void CreateTestStatSampler() const;
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // a workspace that owns all the components to be RooAbsPdf * fPdf; // common PDF
used by the calculator RooAbsData * fData; // data set
Bool_t fOwnsWorkspace; // flag if this object owns its workspace const RooArgSet* fPOI; // RooArgSet specifying parameters of interes
const char* fPdfName; // name of common PDF in workspace t for interval
const char* fDataName; // name of data set in workspace const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for ters for interval
interval
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f
or interval
mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler mutable ToyMCSampler* fTestStatSampler; // the test statistic sampler
mutable RooAbsData* fPointsToTest; // points to perform the construct ion mutable RooAbsData* fPointsToTest; // points to perform the construct ion
mutable ConfidenceBelt* fConfBelt; mutable ConfidenceBelt* fConfBelt;
bool fAdaptiveSampling; // controls use of adaptive sampling algorith m bool fAdaptiveSampling; // controls use of adaptive sampling algorith m
Int_t fNbins; // number of samples per variable Int_t fNbins; // number of samples per variable
Bool_t fFluctuateData; // tell ToyMCSampler to fluctuate number of e ntries in dataset Bool_t fFluctuateData; // tell ToyMCSampler to fluctuate number of e ntries in dataset
Bool_t fDoProfileConstruction; // instead of full construction over n uisance parametrs, do profile Bool_t fDoProfileConstruction; // instead of full construction over n uisance parametrs, do profile
bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav ed to a TFile bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav ed to a TFile
bool fCreateBelt; // controls use if ConfidenceBelt should be saved t o a TFile bool fCreateBelt; // controls use if ConfidenceBelt should be saved t o a TFile
 End of changes. 9 change blocks. 
53 lines changed or deleted 17 lines changed or added


 FitConfig.h   FitConfig.h 
// @(#)root/mathcore:$Id: FitConfig.h 28946 2009-06-11 15:39:14Z moneta $ // @(#)root/mathcore:$Id: FitConfig.h 29513 2009-07-17 15:30:07Z moneta $
// Author: L. Moneta Thu Sep 21 16:21:29 2006 // Author: L. Moneta Thu Sep 21 16:21:29 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class FitConfig // Header file for class FitConfig
#ifndef ROOT_Fit_FitConfig #ifndef ROOT_Fit_FitConfig
#define ROOT_Fit_FitConfig #define ROOT_Fit_FitConfig
#ifndef ROOT_Fit_ParameterSettings #ifndef ROOT_Fit_ParameterSettings
#include "Fit/ParameterSettings.h" #include "Fit/ParameterSettings.h"
#endif #endif
#ifndef ROOT_Fit_MinimizerControlParams #ifndef ROOT_Math_MinimizerOptions
#include "Fit/MinimizerControlParams.h" #include "Math/MinimizerOptions.h"
#endif #endif
#ifndef ROOT_Math_IParamFunctionfwd #ifndef ROOT_Math_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h" #include "Math/IParamFunctionfwd.h"
#endif #endif
#include <vector> #include <vector>
namespace ROOT { namespace ROOT {
skipping to change at line 108 skipping to change at line 108
set the parameter settings from number of parameters and a vector of values and optionally step values. If there are not existing or number of p arameters does not match existing one, create a new parameter setting list. set the parameter settings from number of parameters and a vector of values and optionally step values. If there are not existing or number of p arameters does not match existing one, create a new parameter setting list.
*/ */
void SetParamsSettings(unsigned int npar, const double * params, const d ouble * vstep = 0); void SetParamsSettings(unsigned int npar, const double * params, const d ouble * vstep = 0);
/** /**
create a new minimizer according to chosen configuration create a new minimizer according to chosen configuration
*/ */
ROOT::Math::Minimizer * CreateMinimizer(); ROOT::Math::Minimizer * CreateMinimizer();
/** /**
access to the minimizer control parameter (const method)
*/
const MinimizerControlParams & MinimizerOptions() const { return fMinimi
zerOpts; }
/**
access to the minimizer control parameter (non const method) access to the minimizer control parameter (non const method)
*/ */
MinimizerControlParams & MinimizerOptions() { return fMinimizerOpts; } ROOT::Math::MinimizerOptions & MinimizerOptions() { return fMinimizerOp ts; }
#ifndef __CINT__ // this method fails on Windows #ifndef __CINT__ // this method fails on Windows
/** /**
set all the minimizer options using class MinimizerOptions set all the minimizer options using class MinimizerOptions
*/ */
void SetMinimizerOptions(const ROOT::Math::MinimizerOptions & minopt); void SetMinimizerOptions(const ROOT::Math::MinimizerOptions & minopt);
#endif #endif
/** /**
set minimizer type set minimizer type
*/ */
void SetMinimizer(const char * type, const char * algo = 0) { void SetMinimizer(const char * type, const char * algo = 0) {
if (type) fMinimizerType = type; if (type) fMinimizerOpts.SetMinimizerType(type);
if (algo) fMinimAlgoType = algo; if (algo) fMinimizerOpts.SetMinimizerAlgorithm(algo);
} }
/** /**
return type of minimizer package return type of minimizer package
*/ */
const std::string & MinimizerType() const { return fMinimizerType; } const std::string & MinimizerType() const { return fMinimizerOpts.Minimi zerType(); }
/** /**
return type of minimizer algorithms return type of minimizer algorithms
*/ */
const std::string & MinimizerAlgoType() const { return fMinimAlgoType; } const std::string & MinimizerAlgoType() const { return fMinimizerOpts.Mi nimizerAlgorithm(); }
/** /**
flag to check if resulting errors are be normalized according to chi2 /ndf flag to check if resulting errors are be normalized according to chi2 /ndf
*/ */
bool NormalizeErrors() const { return fNormErrors; } bool NormalizeErrors() const { return fNormErrors; }
///do analysis for parabolic errors ///do analysis for parabolic errors
bool ParabErrors() const { return fParabErrors; } bool ParabErrors() const { return fParabErrors; }
///do minos errros analysis on the parameters ///do minos errros analysis on the parameters
skipping to change at line 191 skipping to change at line 186
private: private:
bool fNormErrors; // flag for error normalization bool fNormErrors; // flag for error normalization
bool fParabErrors; // get correct parabolic errors estimate (call Hess e after minimizing) bool fParabErrors; // get correct parabolic errors estimate (call Hess e after minimizing)
bool fMinosErrors; // do full error analysis using Minos bool fMinosErrors; // do full error analysis using Minos
std::vector<ROOT::Fit::ParameterSettings> fSettings; // vector with the parameter settings std::vector<ROOT::Fit::ParameterSettings> fSettings; // vector with the parameter settings
std::vector<unsigned int> fMinosParams; // vector with the parameter indeces for running Minos std::vector<unsigned int> fMinosParams; // vector with the parameter indeces for running Minos
std::string fMinimizerType; // minimizer type (MINUIT, MINUIT2, etc..) ROOT::Math::MinimizerOptions fMinimizerOpts; //minimizer control param
std::string fMinimAlgoType; // algorithm type (MIGRAD, SIMPLEX, etc..) eters including name and algo type
MinimizerControlParams fMinimizerOpts; //minimizer control parameters
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Fit_FitConfig */ #endif /* ROOT_Fit_FitConfig */
 End of changes. 8 change blocks. 
17 lines changed or deleted 10 lines changed or added


 FunctionBuilder.h   FunctionBuilder.h 
// @(#)root/reflex:$Id: FunctionBuilder.h 28992 2009-06-15 09:20:22Z axel $ // @(#)root/reflex:$Id: FunctionBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_FunctionBuilder #ifndef Reflex_FunctionBuilder
#define Reflex_FunctionBuilder #define Reflex_FunctionBuilder
// Include files // Include files
#include "Reflex/Reflex.h" #include "Reflex/Reflex.h"
namespace Reflex { namespace Reflex {
// forward declarations
// forward declarations class FunctionMember;
class FunctionMember; class Type;
class Type;
/**
* @class FunctionBuilder FunctionBuilder.h Reflex/Builder/FunctionBuilder.
h
* @author Pere Mato
* @date 1/8/2004
* @ingroup RefBld
*/
class RFLX_API FunctionBuilder {
public:
/** constructor */
FunctionBuilder(const Type &typ,
const char* nam,
StubFunction stubFP,
void* stubCtx,
const char* params,
unsigned char modifiers);
/** destructor */
virtual ~FunctionBuilder();
/** AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
FunctionBuilder& AddProperty(const char* key,
Any value);
FunctionBuilder& AddProperty(const char* key,
const char* value);
/** /**
* @class FunctionBuilder FunctionBuilder.h Reflex/Builder/FunctionBuilde * ToMember will return the member currently being built
r.h * @return member currently being built
* @author Pere Mato */
* @date 1/8/2004 Member ToMember();
* @ingroup RefBld
*/ private:
class RFLX_API FunctionBuilder { /** function member */
Member fFunction;
public:
}; // class FunctionBuilder
/** constructor */
FunctionBuilder( const Type & typ, /**
const char * nam, * @class FunctionBuilderImpl FunctionBuilder.h Reflex/Builder/FunctionBuil
StubFunction stubFP, der.h
void * stubCtx, * @author Pere Mato
const char * params, * @date 3/8/2004
unsigned char modifiers ); * @ingroup RefBld
*/
/** destructor */ class RFLX_API FunctionBuilderImpl {
virtual ~FunctionBuilder(); public:
/** constructor */
/** AddProperty will add a property FunctionBuilderImpl(const char* nam,
* @param key the property key const Type &typ,
* @param value the value of the property StubFunction stubFP,
* @return a reference to the building class void* stubCtx,
*/ const char* params,
FunctionBuilder & AddProperty( const char * key, unsigned char modifiers = 0);
Any value );
FunctionBuilder & AddProperty( const char * key, /** destructor */
const char * value ); ~FunctionBuilderImpl();
/** /** AddProperty will add a property
* ToMember will return the member currently being built * @param key the property key
* @return member currently being built * @param value the value of the property
*/ * @return a reference to the building class
Member ToMember(); */
void AddProperty(const char* key,
private: Any value);
void AddProperty(const char* key,
/** function member */ const char* value);
Member fFunction;
}; // class FunctionBuilder
/** /**
* @class FunctionBuilderImpl FunctionBuilder.h Reflex/Builder/FunctionBu * ToMember will return the member currently being built
ilder.h * @return member currently being built
* @author Pere Mato */
* @date 3/8/2004 Member ToMember();
* @ingroup RefBld
*/ private:
class RFLX_API FunctionBuilderImpl { /** function member being built */
Member fFunction;
public:
}; // class FunctionBuilderImpl
/** constructor */
FunctionBuilderImpl( const char * nam, /**
const Type & typ, * @class FunctionBuilderT FunctionBuilder.h Reflex/Builder/FunctionBuilder
StubFunction stubFP, .h
void * stubCtx, * @author Pere Mato
const char * params, * @date 1/8/2004
unsigned char modifiers = 0 ); * @ingroup RefBld
*/
/** destructor */ template <typename F> class FunctionBuilderT {
~FunctionBuilderImpl(); public:
/** constructor */
/** AddProperty will add a property FunctionBuilderT(const char* nam,
* @param key the property key StubFunction stubFP,
* @param value the value of the property void* stubCtx,
* @return a reference to the building class const char* params,
*/ unsigned char modifiers);
void AddProperty( const char * key,
Any value ); /** destructor */
void AddProperty( const char * key, virtual ~FunctionBuilderT() {}
const char * value );
/** AddProperty will add a property
/** * @param key the property key
* ToMember will return the member currently being built * @param value the value of the property
* @return member currently being built * @return a reference to the building class
*/ */
Member ToMember(); template <typename P>
FunctionBuilderT& AddProperty(const char* key,
private: P value);
/** function member being built */
Member fFunction;
}; // class FunctionBuilderImpl
/** /**
* @class FunctionBuilderT FunctionBuilder.h Reflex/Builder/FunctionBuild * ToMember will return the member currently being built
er.h * @return member currently being built
* @author Pere Mato */
* @date 1/8/2004 Member ToMember();
* @ingroup RefBld
*/ private:
template < typename F > class FunctionBuilderT { /** function builder implemenation */
FunctionBuilderImpl fFunctionBuilderImpl;
public:
/** constructor */
FunctionBuilderT( const char * nam,
StubFunction stubFP,
void * stubCtx,
const char * params,
unsigned char modifiers );
/** destructor */
virtual ~FunctionBuilderT() {}
/** AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
template < typename P >
FunctionBuilderT & AddProperty( const char * key, P value );
/**
* ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private: }; //class FunctionBuilderT
/** function builder implemenation */
FunctionBuilderImpl fFunctionBuilderImpl;
}; //class FunctionBuilderT
} // namespace Reflex } // namespace Reflex
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename F > template <typename F>
inline Reflex::FunctionBuilderT<F>::FunctionBuilderT( const char * nam, inline Reflex::FunctionBuilderT<F>::FunctionBuilderT(const char* nam,
StubFunction st StubFunction stubFP,
ubFP, void* stubCtx,
void * stubCtx, const char* params,
const char * pa unsigned char modifier
rams, s)
unsigned char m //-------------------------------------------------------------------------
odifiers ) ------
//------------------------------------------------------------------------- : fFunctionBuilderImpl(nam,
------ FunctionDistiller<F>::Get(),
: fFunctionBuilderImpl( nam, stubFP,
FunctionDistiller<F>::Get(), stubCtx,
stubFP, params,
stubCtx, modifiers) {
params, }
modifiers ) { }
//-------------------------------------------------------------------------
//------------------------------------------------------------------------- ------
------ template <typename F> template <typename P>
template < typename F > template < typename P > inline Reflex::FunctionBuilderT<F>&
inline Reflex::FunctionBuilderT<F> & Reflex::FunctionBuilderT<F
Reflex::FunctionBuilderT<F>::AddProperty( const char * key, >::AddProperty(const char* key,
P value ) P value) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
{ fFunctionBuilderImpl.AddProperty(key, value);
fFunctionBuilderImpl.AddProperty(key , value); return *this;
return * this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename F > inline Reflex::Member template <typename F> inline Reflex::Member
Reflex::FunctionBuilderT<F>::ToMember() { Reflex::FunctionBuilderT<F
>::ToMember() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fFunctionBuilderImpl.ToMember(); return fFunctionBuilderImpl.ToMember();
} }
#endif // Reflex_FunctionBuilder #endif // Reflex_FunctionBuilder
 End of changes. 8 change blocks. 
161 lines changed or deleted 152 lines changed or added


 G__ci.h   G__ci.h 
skipping to change at line 423 skipping to change at line 423
#endif #endif
/*********************************************************************** /***********************************************************************
* Define G__EH_DUMMY_DELETE in order to avoid some compiler dependency * Define G__EH_DUMMY_DELETE in order to avoid some compiler dependency
* about 'void operator delete(void*,[DLLID]_tag*);' * about 'void operator delete(void*,[DLLID]_tag*);'
***********************************************************************/ ***********************************************************************/
#if defined(__HP_aCC) || defined(G__VISUAL) #if defined(__HP_aCC) || defined(G__VISUAL)
#define G__EH_DUMMY_DELETE #define G__EH_DUMMY_DELETE
#endif #endif
#ifdef __CINT__
#undef G__WIN32
#endif
#ifdef G__NONANSI #ifdef G__NONANSI
#ifdef G__ANSIHEADER #ifdef G__ANSIHEADER
#undef G__ANSIHEADER #undef G__ANSIHEADER
#endif #endif
#endif #endif
#ifndef G__IF_DUMMY #ifndef G__IF_DUMMY
#define G__IF_DUMMY /* avoid compiler warning */ #define G__IF_DUMMY /* avoid compiler warning */
#endif #endif
skipping to change at line 1469 skipping to change at line 1465
/* #define G__VAARG_NOSUPPORT */ /* #define G__VAARG_NOSUPPORT */
#ifdef __ia64__ #ifdef __ia64__
#define G__VAARG_INC_COPY_N 8 #define G__VAARG_INC_COPY_N 8
#else #else
#define G__VAARG_INC_COPY_N 4 #define G__VAARG_INC_COPY_N 4
#endif #endif
#define G__VAARG_PASS_BY_REFERENCE 8 #define G__VAARG_PASS_BY_REFERENCE 8
#elif defined(__x86_64__) && (defined(__linux) || defined(__APPLE__) || \ #elif defined(__x86_64__) && (defined(__linux) || defined(__APPLE__) || \
defined(__FreeBSD__)) defined(__FreeBSD__) && defined(__sun))
/********************************************** /**********************************************
* AMD64/EM64T * AMD64/EM64T
* It turned out it is quite difficult to support this * It turned out it is quite difficult to support this
* platform as it uses registers for passing arguments (first 6 long * platform as it uses registers for passing arguments (first 6 long
* and first 8 double arguments in registers, the remaining on the stack) * and first 8 double arguments in registers, the remaining on the stack)
* for Linux/gcc. * for Linux/gcc.
**********************************************/ **********************************************/
#define G__VAARG_INC_COPY_N 8 #define G__VAARG_INC_COPY_N 8
/* #define G__VAARG_PASS_BY_REFERENCE 8 */ /* #define G__VAARG_PASS_BY_REFERENCE 8 */
 End of changes. 2 change blocks. 
5 lines changed or deleted 1 lines changed or added


 HybridCalculator.h   HybridCalculator.h 
// @(#)root/roostats:$Id: HybridCalculator.h 29107 2009-06-19 14:26:42Z mon eta $ // @(#)root/roostats:$Id: HybridCalculator.h 30462 2009-09-25 16:05:55Z mon eta $
/************************************************************************* /*************************************************************************
* Project: RooStats * * Project: RooStats *
* Package: RooFit/RooStats * * Package: RooFit/RooStats *
* Authors: * * Authors: *
* Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke * * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
************************************************************************* *************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
skipping to change at line 29 skipping to change at line 29
#ifndef ROOSTATS_HypoTestCalculator #ifndef ROOSTATS_HypoTestCalculator
#include "RooStats/HypoTestCalculator.h" #include "RooStats/HypoTestCalculator.h"
#endif #endif
#include <vector> #include <vector>
#ifndef ROOSTATS_HypoTestResult #ifndef ROOSTATS_HypoTestResult
#include "RooStats/HybridResult.h" #include "RooStats/HybridResult.h"
#endif #endif
#ifndef ROOSTATS_ModelConfig
#include "RooStats/ModelConfig.h"
#endif
class TH1; class TH1;
namespace RooStats { namespace RooStats {
class HybridCalculator : public HypoTestCalculator , public TNamed { class HybridCalculator : public HypoTestCalculator , public TNamed {
public: public:
/// Constructor with only name and title /// Dummy Constructor with only name and title
HybridCalculator(const char *name = 0, HybridCalculator(const char *name = 0,
const char *title = 0); const char *title = 0);
/// Constructor for HybridCalculator /// Constructor for HybridCalculator
HybridCalculator(const char *name, HybridCalculator(const char *name,
const char *title, const char *title,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgList& observables, RooArgList& observables,
RooArgSet* nuisance_parameters = 0, const RooArgSet* nuisance_parameters = 0,
RooAbsPdf* prior_pdf = 0); RooAbsPdf* prior_pdf = 0,
bool GenerateBinned = false); //Nils 31.7.09
/// Constructor for HybridCalculator using a data set and pdf instan ces /// Constructor for HybridCalculator using a data set and pdf instan ces
HybridCalculator(RooAbsData& data, HybridCalculator(RooAbsData& data,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgSet* nuisance_parameters = 0, const RooArgSet* nuisance_parameters = 0,
RooAbsPdf* prior_pdf = 0); RooAbsPdf* prior_pdf = 0,
bool GenerateBinned = false); //Nils 31.7.09
/// Constructor for HybridCalculator using name, title, a data set an d pdf instances /// Constructor for HybridCalculator using name, title, a data set an d pdf instances
HybridCalculator(const char *name, HybridCalculator(const char *name,
const char *title, const char *title,
RooAbsData& data, RooAbsData& data,
RooAbsPdf& sb_model, RooAbsPdf& sb_model,
RooAbsPdf& b_model, RooAbsPdf& b_model,
RooArgSet* nuisance_parameters = 0, const RooArgSet* nuisance_parameters = 0,
RooAbsPdf* prior_pdf = 0); RooAbsPdf* prior_pdf = 0,
bool GenerateBinned = false); //Nils 31.7.09
private: // not yet available
/// Constructor for HybridCalculator using name, title, a workspace a
nd pdf names
HybridCalculator(RooWorkspace & wks,
const char* data,
const char* sb_model,
const char* b_model,
RooArgSet* nuisance_parameters,
const char* prior_pdf);
/// Constructor for HybridCalculator using name, title, a workspace a nd pdf names /// Constructor for HybridCalculator with ModelConfig
HybridCalculator(const char *name, HybridCalculator(const char *name,
const char *title, const char *title,
RooWorkspace & wks, RooAbsData& data,
const char* data, const ModelConfig& sb_model,
const char* sb_model, const ModelConfig& b_model);
const char* b_model,
RooArgSet* nuisance_parameters,
const char* prior_pdf);
public: public:
/// Destructor of HybridCalculator /// Destructor of HybridCalculator
virtual ~HybridCalculator(); virtual ~HybridCalculator();
/// inherited methods from HypoTestCalculanterface /// inherited methods from HypoTestCalculator interface
virtual HybridResult* GetHypoTest() const; virtual HybridResult* GetHypoTest() const;
// inherited setter methods from HypoTestCalculator // inherited setter methods from HypoTestCalculator
private: // set the model for the null hypothesis (only B)
// set a workspace that owns all the necessary components for the ana virtual void SetNullModel(const ModelConfig & );
lysis // set the model for the alternate hypothesis (S+B)
virtual void SetWorkspace(RooWorkspace& ws); virtual void SetAlternateModel(const ModelConfig & );
// set the PDF for the null hypothesis (only B)
virtual void SetNullPdf(const char* name) { fBModelName = name; }
// set the PDF for the alternate hypothesis (S+B)
virtual void SetAlternatePdf(const char* name ) { fSbModelName = name
;}
// set a common PDF for both the null and alternate hypotheses
virtual void SetCommonPdf(const char* name) {fSbModelName = name; }
public:
// Set a common PDF for both the null and alternate // Set a common PDF for both the null and alternate
virtual void SetCommonPdf(RooAbsPdf & pdf) { fSbModel = &pdf; } virtual void SetCommonPdf(RooAbsPdf & pdf) { fSbModel = &pdf; }
// Set the PDF for the null (only B) // Set the PDF for the null (only B)
virtual void SetNullPdf(RooAbsPdf& pdf) { fBModel = &pdf; } virtual void SetNullPdf(RooAbsPdf& pdf) { fBModel = &pdf; }
// Set the PDF for the alternate hypothesis ( i.e. S+B) // Set the PDF for the alternate hypothesis ( i.e. S+B)
virtual void SetAlternatePdf(RooAbsPdf& pdf) { fSbModel = &pdf; } virtual void SetAlternatePdf(RooAbsPdf& pdf) { fSbModel = &pdf; }
// specify the name of the dataset in the workspace to be used // Set the DataSet
virtual void SetData(const char* name) { fDataName = name; }
// Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) { fData = &data; } virtual void SetData(RooAbsData& data) { fData = &data; }
// set parameter values for the null if using a common PDF // set parameter values for the null if using a common PDF
virtual void SetNullParameters(RooArgSet& ) { } // not needed virtual void SetNullParameters(const RooArgSet& ) { } // not needed
// set parameter values for the alternate if using a common PDF // set parameter values for the alternate if using a common PDF
virtual void SetAlternateParameters(RooArgSet&) {} // not needed virtual void SetAlternateParameters(const RooArgSet&) {} // not need ed
// additional methods specific for HybridCalculator // additional methods specific for HybridCalculator
// set a prior pdf for the nuisance parameters // set a prior pdf for the nuisance parameters
void SetNuisancePdf(RooAbsPdf & prior_pdf) { void SetNuisancePdf(RooAbsPdf & prior_pdf) {
fPriorPdf = &prior_pdf; fPriorPdf = &prior_pdf;
fUsePriorPdf = true; // if set by default turn it on fUsePriorPdf = true; // if set by default turn it on
} }
// set name of a prior pdf for the nuisance parameters in the previo
usly given workspace
void SetNuisancePdf(const char * name) {
fPriorPdfName = name;
fUsePriorPdf = true; // if set by default turn it on
}
// set the nuisance parameters to be marginalized // set the nuisance parameters to be marginalized
void SetNuisanceParameters(RooArgSet & params) { fParameters = &param s; } void SetNuisanceParameters(const RooArgSet & params) { fNuisanceParam eters = &params; }
// set number of toy MC // set number of toy MC
void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; } void SetNumberOfToys(unsigned int ntoys) { fNToys = ntoys; }
// control use of the pdf for the nuisance parameter and marginalize them // control use of the pdf for the nuisance parameter and marginalize them
void UseNuisance(bool on = true) { fUsePriorPdf = on; } void UseNuisance(bool on = true) { fUsePriorPdf = on; }
// control to use bin data generation
void SetGenerateBinned(bool on = true) { fGenerateBinned = on; }
void SetTestStatistics(int index); void SetTestStatistics(int index);
HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors ) const; HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors ) const;
HybridResult* Calculate(RooAbsData& data, unsigned int nToys, bool us ePriors) const; HybridResult* Calculate(RooAbsData& data, unsigned int nToys, bool us ePriors) const;
HybridResult* Calculate(unsigned int nToys, bool usePriors) const; HybridResult* Calculate(unsigned int nToys, bool usePriors) const;
void PrintMore(const char* options) const; void PrintMore(const char* options) const;
private: private:
void RunToys(std::vector<double>& bVals, std::vector<double>& sbVals, unsigned int nToys, bool usePriors) const; void RunToys(std::vector<double>& bVals, std::vector<double>& sbVals, unsigned int nToys, bool usePriors) const;
// check input parameters before performing the calculation // check input parameters before performing the calculation
bool DoCheckInputs() const; bool DoCheckInputs() const;
// initialize all the data and pdf by using a workspace as input
bool DoInitializeFromWS();
unsigned int fTestStatisticsIdx; // Index of the test statistics to u se unsigned int fTestStatisticsIdx; // Index of the test statistics to u se
unsigned int fNToys; // number of Toys MC unsigned int fNToys; // number of Toys MC
bool fUsePriorPdf; // use a prior for nuisance paramet ers bool fUsePriorPdf; // use a prior for nuisance paramet ers
RooAbsPdf* fSbModel; // The pdf of the signal+background model RooAbsPdf* fSbModel; // The pdf of the signal+background model
RooAbsPdf* fBModel; // The pdf of the background model RooAbsPdf* fBModel; // The pdf of the background model
mutable RooArgList* fObservables; // Collection of the observables of the model mutable RooArgList* fObservables; // Collection of the observables of the model
RooArgSet* fParameters; // Collection of the nuisance parameters in t const RooArgSet* fNuisanceParameters; // Collection of the nuisance
he model parameters in the model
RooAbsPdf* fPriorPdf; // Prior PDF of the nuisance parameters RooAbsPdf* fPriorPdf; // Prior PDF of the nuisance parameters
RooAbsData * fData; // pointer to the data sets RooAbsData * fData; // pointer to the data sets
//bool fOwnsWorkspace; // flag indicating if calculator manages th bool fGenerateBinned; //Flag to control binned generation
e workspace
RooWorkspace * fWS; // a workspace that owns all the components t // TString fSbModelName; // name of pdf of the signal+background mo
o be used by the calculator del
TString fSbModelName; // name of pdf of the signal+background model // TString fBModelName; // name of pdf of the background model
TString fBModelName; // name of pdf of the background model // TString fPriorPdfName; // name of pdf of the background model
TString fPriorPdfName; // name of pdf of the background model // TString fDataName; // name of the dataset in the workspace
TString fDataName; // name of the dataset in the workspace
protected: protected:
ClassDef(HybridCalculator,1) // Hypothesis test calculator using a B ayesian-frequentist hybrid method ClassDef(HybridCalculator,1) // Hypothesis test calculator using a B ayesian-frequentist hybrid method
}; };
} }
#endif #endif
 End of changes. 21 change blocks. 
67 lines changed or deleted 42 lines changed or added


 HybridPlot.h   HybridPlot.h 
// @(#)root/roostats:$Id: HybridPlot.h 26434 2008-11-24 21:29:32Z moneta $ // @(#)root/roostats:$Id: HybridPlot.h 30462 2009-09-25 16:05:55Z moneta $
/************************************************************************* /*************************************************************************
* Project: RooStats * * Project: RooStats *
* Package: RooFit/RooStats * * Package: RooFit/RooStats *
* Authors: * * Authors: *
* Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke * * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
************************************************************************* *************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
skipping to change at line 45 skipping to change at line 45
class HybridPlot : public TNamed { class HybridPlot : public TNamed {
public: public:
/// Constructor /// Constructor
HybridPlot(const char* name, HybridPlot(const char* name,
const char* title, const char* title,
std::vector<double> sb_values, std::vector<double> sb_values,
std::vector<double> b_values, std::vector<double> b_values,
double m2lnQ_data, double testStat_data,
int n_bins, int n_bins,
bool verbosity=true); bool verbosity=true);
/// Destructor /// Destructor
~HybridPlot(); ~HybridPlot();
/// Draw on canvas /// Draw on canvas
void Draw (const char* options=""); void Draw (const char* options="");
/// All the objects are written to rootfile /// All the objects are written to rootfile
skipping to change at line 120 skipping to change at line 120
/// Get the median of an histogram /// Get the median of an histogram
double GetMedian(TH1* histo); double GetMedian(TH1* histo);
private: private:
TH1F* fSb_histo; // The sb Histo TH1F* fSb_histo; // The sb Histo
TH1F* fSb_histo_shaded; // The sb Histo shaded TH1F* fSb_histo_shaded; // The sb Histo shaded
TH1F* fB_histo; // The b Histo TH1F* fB_histo; // The b Histo
TH1F* fB_histo_shaded; // The b Histo shaded TH1F* fB_histo_shaded; // The b Histo shaded
TLine* fData_m2lnQ_line; // The line for the data -2lnQ TLine* fData_testStat_line; // The line for the data value of the tes t statistic
TLegend* fLegend; // The legend of the plot TLegend* fLegend; // The legend of the plot
bool fVerbose; // verbosity flag bool fVerbose; // verbosity flag
TCanvas* fCanvas; // plot canvas TCanvas* fCanvas; // plot canvas
ClassDef(HybridPlot,1) // Provides the plots for an HybridResult ClassDef(HybridPlot,1) // Provides the plots for an HybridResult
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 HybridResult.h   HybridResult.h 
// @(#)root/roostats:$Id: HybridResult.h 26434 2008-11-24 21:29:32Z moneta $ // @(#)root/roostats:$Id: HybridResult.h 30462 2009-09-25 16:05:55Z moneta $
/************************************************************************* /*************************************************************************
* Project: RooStats * * Project: RooStats *
* Package: RooFit/RooStats * * Package: RooFit/RooStats *
* Authors: * * Authors: *
* Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke * * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
************************************************************************* *************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
skipping to change at line 33 skipping to change at line 33
namespace RooStats { namespace RooStats {
class HybridPlot; class HybridPlot;
class HybridResult : public HypoTestResult { class HybridResult : public HypoTestResult {
public: public:
/// Constructor for HybridResult /// Constructor for HybridResult
HybridResult(const char *name,const char *title,std::vector<double>& testStat_sb_vals, HybridResult(const char *name,const char *title,std::vector<double>& testStat_sb_vals,
std::vector<double>& testStat_b_vals); std::vector<double>& testStat_b_vals, bool sumLargerValu es=true);
HybridResult(const char *name,const char *title); HybridResult(const char *name,const char *title);
/// Default constructor for HybridResult /// Default constructor for HybridResult
HybridResult(); HybridResult();
/// Destructor of HybridResult /// Destructor of HybridResult
virtual ~HybridResult(); virtual ~HybridResult();
void SetDataTestStatistics(double testStat_data_val); void SetDataTestStatistics(double testStat_data_val);
skipping to change at line 71 skipping to change at line 71
// Return p-value for alternate hypothesis // Return p-value for alternate hypothesis
Double_t AlternatePValue() const; Double_t AlternatePValue() const;
private: private:
std::vector<double> fTestStat_b; // vector of results for B-only toy- MC std::vector<double> fTestStat_b; // vector of results for B-only toy- MC
std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC
double fTestStat_data; // results (test statistics) evaluated for dat a double fTestStat_data; // results (test statistics) evaluated for dat a
mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue com putation have been already done or not (ie need to be refreshed) mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue com putation have been already done or not (ie need to be refreshed)
mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValu e computation have been already done or not (ie need to be refreshed) mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValu e computation have been already done or not (ie need to be refreshed)
bool fSumLargerValues; // p-value for velues of testStat >= testStat_ data (or testStat <= testStat_data)
protected: protected:
ClassDef(HybridResult,1) // Class containing the results of the Hybr idCalculator ClassDef(HybridResult,1) // Class containing the results of the Hybr idCalculator
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 HypoTestCalculator.h   HypoTestCalculator.h 
// @(#)root/roostats:$Id: HypoTestCalculator.h 26964 2008-12-16 16:30:01Z m oneta $ // @(#)root/roostats:$Id: HypoTestCalculator.h 30462 2009-09-25 16:05:55Z m oneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_HypoTestCalculator #ifndef ROOSTATS_HypoTestCalculator
skipping to change at line 46 skipping to change at line 46
The concrete implementations of this interface should deal with the details of how the nuisance parameters are The concrete implementations of this interface should deal with the details of how the nuisance parameters are
dealt with (eg. integration vs. profiling) and which test-statistic is used (perhaps this should be added to the interface). dealt with (eg. integration vs. profiling) and which test-statistic is used (perhaps this should be added to the interface).
</p> </p>
<p> <p>
The motivation for this interface is that we hope to be able to specify the problem in a common way for several concrete calculators. The motivation for this interface is that we hope to be able to specify the problem in a common way for several concrete calculators.
</p> </p>
END_HTML END_HTML
*/ */
// //
class RooAbsPdf; // class RooAbsPdf;
class RooArgSet; class RooAbsData;
// class RooArgSet;
class RooWorkspace; class RooWorkspace;
namespace RooStats { namespace RooStats {
class HypoTestResult; class HypoTestResult;
class ModelConfig;
class HypoTestCalculator { class HypoTestCalculator {
public: public:
// Concrete implementations should have a constructor like:
// HypoTestCalculator(RooWorkspace*, RooAbsData*,RooAbsPdf*, RooAbsPd
f*, RooArgSet*, RooArgSet*)
// Concrete implementations should have a constructor like:
// HypoTestCalculator(RooAbsData*,RooAbsPdf*, RooAbsPdf*, RooArgSet*,
RooArgSet*)
virtual ~HypoTestCalculator() {} virtual ~HypoTestCalculator() {}
// main interface to get a HypoTestResult, pure virtual // main interface to get a HypoTestResult, pure virtual
virtual HypoTestResult* GetHypoTest() const = 0; virtual HypoTestResult* GetHypoTest() const = 0;
// Initialize the calculator from a given data set, a null pdf and an // Set a common model for both the null and alternate, add to the the
alternate pdf. workspace if not already there
// The null parameters and alternate parameters can be optionally pas virtual void SetCommonModel(const ModelConfig& model) {
sed otherwise by default SetNullModel(model);
// the parameters of the pdf's will be used. SetAlternateModel(model);
// In addition, one can give optionally a nuisance pdf with nuisance
parameters to be marginalized
virtual void Initialize(RooAbsData & data, RooAbsPdf & nullPdf, RooAb
sPdf & alternatePdf,
RooArgSet * nullParameters = 0, RooArgSet * a
lternateParameters = 0,
RooArgSet * nuisanceParameters = 0, RooAbsPdf
* nuisancePdf = 0 ) {
SetData(data);
SetNullPdf(nullPdf);
SetAlternatePdf(alternatePdf);
if (nullParameters) SetNullParameters(*nullParameters);
if (alternateParameters) SetAlternateParameters(*alternateParamete
rs);
if (nuisanceParameters) SetNuisanceParameters(*nuisanceParameters)
;
if (nuisancePdf) SetNuisancePdf(*nuisancePdf);
}
// Initialize the calculator from a given data set and a common pdf
for null and alternate hypothesis.
// In this case the null parameters and alternate parameters must be
given.
// In addition, one can give optionally a nuisance pdf with nuisance
parameters to be marginalized
virtual void Initialize(RooAbsData & data, RooAbsPdf & commonPdf,
RooArgSet & nullParameters, RooArgSet & alter
nateParameters,
RooArgSet * nuisanceParameters = 0, RooAbsPdf
* nuisancePdf = 0 ) {
Initialize(data, commonPdf, commonPdf, &nullParameters, &alternate
Parameters, nuisanceParameters, nuisancePdf);
}
// Initialize the calculator from a workspace and names for the data
set,
// the null pdf and the alternate pdf.
// The null parameters and alternate parameters can be optionally pas
sed otherwise by default
// the parameters of the pdf's will be used.
// In addition, one can give optionally a nuisance pdf with nuisance
parameters to be marginalized
virtual void Initialize(RooWorkspace & ws, const char * data, const c
har * nullPdf, const char * alternatePdf,
RooArgSet * nullParameters = 0, RooArgSet * a
lternateParameters = 0,
RooArgSet * nuisanceParameters = 0, const cha
r * nuisancePdf = 0 ) {
SetWorkspace(ws);
SetData(data);
SetNullPdf(nullPdf);
SetAlternatePdf(alternatePdf);
if (nullParameters) SetNullParameters(*nullParameters);
if (alternateParameters) SetAlternateParameters(*alternateParamete
rs);
if (nuisanceParameters) SetNuisanceParameters(*nuisanceParameters)
;
if (nuisancePdf) SetNuisancePdf(nuisancePdf);
} }
// Initialize the calculator from a workspace and names for the data // Set the model for the null hypothesis
set and a common pdf virtual void SetNullModel(const ModelConfig& model) = 0;
// for both the null and the alternate hypothesis. // Set the model for the alternate hypothesis
// In this case the null parameters and alternate parameters must be virtual void SetAlternateModel(const ModelConfig& model) = 0;
given. // Set the DataSet
// In addition, one can give optionally a nuisance pdf with nuisance
parameters to be marginalized
virtual void Initialize(RooWorkspace & ws, const char * data, const c
har * commonPdf,
RooArgSet & nullParameters, RooArgSet & alter
nateParameters,
RooArgSet * nuisanceParameters = 0, const cha
r * nuisancePdf = 0 ) {
Initialize(ws, data, commonPdf, commonPdf, &nullParameters, &alter
nateParameters, nuisanceParameters, nuisancePdf);
}
// set a workspace that owns all the necessary components for the ana
lysis
virtual void SetWorkspace(RooWorkspace& ws) = 0;
// set the PDF for the null hypothesis
virtual void SetNullPdf(const char* name) = 0;
// set the PDF for the alternate hypothesis
virtual void SetAlternatePdf(const char* name) = 0;
// set a common PDF for both the null and alternate hypotheses
virtual void SetCommonPdf(const char* name) {
SetNullPdf(name);
SetAlternatePdf(name);
}
// Set a common PDF for both the null and alternate, add to the the w
orkspace if not already there
virtual void SetCommonPdf(RooAbsPdf& pdf) {
SetNullPdf(pdf);
SetAlternatePdf(pdf);
}
// Set the PDF for the null, add to the the workspace if not already
there
virtual void SetNullPdf(RooAbsPdf& pdf) = 0;
// Set the PDF for the alternate hypothesis, add to the the workspace
if not already there
virtual void SetAlternatePdf(RooAbsPdf& pdf) = 0;
// specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) = 0;
// Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) = 0; virtual void SetData(RooAbsData& data) = 0;
// set parameter values for the null if using a common PDF
virtual void SetNullParameters(RooArgSet&) = 0;
// set parameter values for the alternate if using a common PDF
virtual void SetAlternateParameters(RooArgSet&) = 0;
// set the pdf name for an auxillary measurement of the nuisance whic
h will be marginalized by the calculator
// needs to be implemented by the derived class only if this feature
is supported
virtual void SetNuisancePdf(const char * ) {}
// set the pdf for an auxillary measurement which will be marginalize
d by the calculator
// needs to be implemented by the derived class only if this feature
is supported
virtual void SetNuisancePdf(RooAbsPdf &) {}
// set the parameters for the constraned pdf which will be marginali
zed by the calculator
// needs to be implemented by the derived class if this feature is su
pported
virtual void SetNuisanceParameters(RooArgSet &) {}
protected: protected:
ClassDef(HypoTestCalculator,1) // Interface for tools doing hypothes is tests ClassDef(HypoTestCalculator,1) // Interface for tools doing hypothes is tests
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
141 lines changed or deleted 16 lines changed or added


 InternalTools.h   InternalTools.h 
// @(#)root/reflex:$Id: InternalTools.h 22815 2008-03-21 10:55:12Z axel $ // @(#)root/reflex:$Id: InternalTools.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2006 // Author: Stefan Roiser 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
// Include Files // Include Files
#ifndef Reflex_InternalTools #ifndef Reflex_InternalTools
#define Reflex_InternalTools #define Reflex_InternalTools
namespace Reflex { namespace Reflex {
namespace OTools {
template <typename TO> class ToIter {
public:
template <typename CONT>
static typename std::vector<TO>::iterator
Begin(const CONT& cont) {
return ((typename std::vector<TO> &) const_cast<CONT&>(cont)).begin()
;
}
template <typename CONT>
static typename std::vector<TO>::iterator
End(const CONT& cont) {
return ((typename std::vector<TO> &) const_cast<CONT&>(cont)).end();
}
template <typename CONT>
static typename std::vector<TO>::const_reverse_iterator
RBegin(const CONT& cont) {
return ((const typename std::vector<TO> &)cont).rbegin();
}
template <typename CONT>
static typename std::vector<TO>::const_reverse_iterator
REnd(const CONT& cont) {
return ((const typename std::vector<TO> &)cont).rend();
}
namespace OTools { };
template< typename TO > class ToIter { } // namespace OTools
public:
template < typename CONT >
static typename std::vector<TO>::iterator Begin( const CONT & cont
) {
return ((typename std::vector<TO> &)const_cast<CONT &>(cont)).b
egin();
}
template < typename CONT >
static typename std::vector<TO>::iterator End( const CONT & cont )
{
return ((typename std::vector<TO> &)const_cast<CONT &>(cont)).e
nd();
}
template < typename CONT >
static typename std::vector<TO>::const_reverse_iterator RBegin( co
nst CONT & cont ) {
return ((const typename std::vector<TO> &)cont).rbegin();
}
template < typename CONT >
static typename std::vector<TO>::const_reverse_iterator REnd( cons
t CONT & cont ) {
return ((const typename std::vector<TO> &)cont).rend();
}
};
} // namespace OTools
} // namespace Reflex } // namespace Reflex
#endif // Reflex_InternalTools #endif // Reflex_InternalTools
 End of changes. 4 change blocks. 
35 lines changed or deleted 30 lines changed or added


 IntervalCalculator.h   IntervalCalculator.h 
// @(#)root/roostats:$Id: IntervalCalculator.h 28306 2009-04-21 10:04:57Z m oneta $ // @(#)root/roostats:$Id: IntervalCalculator.h 30512 2009-09-28 17:24:48Z m oneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
skipping to change at line 49 skipping to change at line 49
</p> </p>
END_HTML END_HTML
*/ */
// //
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
//#include "TNamed.h" //#include "TNamed.h"
class RooAbsPdf;
class RooArgSet;
class RooAbsData; class RooAbsData;
class RooWorkspace; class RooWorkspace;
namespace RooStats { namespace RooStats {
class ConfInterval; class ConfInterval;
class IntervalCalculator {//: public TNamed { class ModelConfig;
class IntervalCalculator {
public: public:
//IntervalCalculator(); //IntervalCalculator();
virtual ~IntervalCalculator() {} virtual ~IntervalCalculator() {}
// Main interface to get a ConfInterval, pure virtual // Main interface to get a ConfInterval, pure virtual
virtual ConfInterval* GetInterval() const = 0; virtual ConfInterval* GetInterval() const = 0;
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const = 0; virtual Double_t Size() const = 0;
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const = 0; virtual Double_t ConfidenceLevel() const = 0;
// set a workspace that owns all the necessary components for the ana // Set the DataSet ( add to the the workspace if not already there ?)
lysis
virtual void SetWorkspace(RooWorkspace& ws) = 0;
// Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData&) = 0; virtual void SetData(RooAbsData&) = 0;
// Set the Pdf, add to the the workspace if not already there // Set the Model
virtual void SetPdf(RooAbsPdf&) = 0; virtual void SetModel(const ModelConfig & /* model */) = 0; // {} //
make pure virtual ? /* = 0 */
// specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name) = 0;
// specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) = 0;
// specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet&) = 0;
// specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet&) = 0;
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) = 0; virtual void SetTestSize(Double_t size) = 0;
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) = 0; virtual void SetConfidenceLevel(Double_t cl) = 0;
protected: protected:
ClassDef(IntervalCalculator,1) // Interface for tools setting limit s (producing confidence intervals) ClassDef(IntervalCalculator,1) // Interface for tools setting limit s (producing confidence intervals)
}; };
} }
 End of changes. 5 change blocks. 
21 lines changed or deleted 8 lines changed or added


 Kernel.h   Kernel.h 
// @(#)root/reflex:$Id: Kernel.h 29112 2009-06-20 04:39:31Z pcanal $ // @(#)root/reflex:$Id: Kernel.h 29355 2009-07-06 17:34:05Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_Kernel #ifndef Reflex_Kernel
#define Reflex_Kernel #define Reflex_Kernel
// These macros will allow selection on exported symbols // These macros will allow selection on exported symbols
// taken from http://www.nedprod.com/programs/gccvisibility.html // taken from http://www.nedprod.com/programs/gccvisibility.html
// Shared library support // Shared library support
#if __GNUC__ >= 4 && !defined(__CINT__) #if __GNUC__ >= 4 && !defined(__CINT__)
# define GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY
#endif #endif
#if !defined(REFLEX_DLL_VETO) && !defined(REFLEX_DLL) && !defined(__CINT__) #if !defined(REFLEX_DLL_VETO) && !defined(REFLEX_DLL) && !defined(__CINT__)
// we build Reflex as DLL by default, #define REFLEX_DLL_VETO to hide visib ility / dllim/export code // we build Reflex as DLL by default, #define REFLEX_DLL_VETO to hide visib ility / dllim/export code
# define REFLEX_DLL # define REFLEX_DLL
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
# define RFLX_IMPORT __declspec(dllimport) # define RFLX_IMPORT __declspec(dllimport)
# define RFLX_EXPORT __declspec(dllexport) # define RFLX_EXPORT __declspec(dllexport)
# define RFLX_DLLLOCAL
# define RFLX_DLLPUBLIC
#else
# ifdef GCC_HASCLASSVISIBILITY
# define RFLX_EXPORT __attribute__((visibility("default")))
# define RFLX_DLLLOCAL __attribute__((visibility("hidden")))
# define RFLX_DLLPUBLIC __attribute__((visibility("default")))
# else
# define RFLX_EXPORT
# define RFLX_DLLLOCAL # define RFLX_DLLLOCAL
# define RFLX_DLLPUBLIC # define RFLX_DLLPUBLIC
#else # endif
# ifdef GCC_HASCLASSVISIBILITY # define RFLX_IMPORT
# define RFLX_EXPORT __attribute__((visibility("default")))
# define RFLX_DLLLOCAL __attribute__((visibility("hidden")))
# define RFLX_DLLPUBLIC __attribute__((visibility("default")))
# else
# define RFLX_EXPORT
# define RFLX_DLLLOCAL
# define RFLX_DLLPUBLIC
# endif
# define RFLX_IMPORT
#endif #endif
// Define RFLX_API for DLL builds // Define RFLX_API for DLL builds
#ifdef REFLEX_DLL #ifdef REFLEX_DLL
# ifdef REFLEX_BUILD # ifdef REFLEX_BUILD
# define RFLX_API RFLX_EXPORT # define RFLX_API RFLX_EXPORT
# else # else
# define RFLX_API RFLX_IMPORT # define RFLX_API RFLX_IMPORT
# endif // REFLEX_BUILD # endif // REFLEX_BUILD
#else #else
# define RFLX_API # define RFLX_API
#endif // REFLEX_DLL #endif // REFLEX_DLL
// Throwable classes must always be visible on GCC in all binaries // Throwable classes must always be visible on GCC in all binaries
#ifdef _WIN32 #ifdef _WIN32
# define RFLX_EXCEPTIONAPI(api) api # define RFLX_EXCEPTIONAPI(api) api
#elif defined(GCC_HASCLASSVISIBILITY) #elif defined(GCC_HASCLASSVISIBILITY)
# define RFLX_EXCEPTIONAPI(api) RFLX_EXPORT # define RFLX_EXCEPTIONAPI(api) RFLX_EXPORT
#else #else
# define RFLX_EXCEPTIONAPI(api) # define RFLX_EXCEPTIONAPI(api)
#endif #endif
// end macros for symbol selection // end macros for symbol selection
// include config.h generated by autoconf // include config.h generated by autoconf
#if defined (HAVE_CONFIG) #if defined(HAVE_CONFIG)
#include "config.h" # include "config.h"
#endif #endif
#if defined (_AIX) #if defined(_AIX)
#define ANSICPP # define ANSICPP
#define NEED_STRCASECMP # define NEED_STRCASECMP
#endif #endif
#if defined(__alpha) && !defined(__linux) #if defined(__alpha) && !defined(__linux)
#ifndef __USE_STD_IOSTREAM # ifndef __USE_STD_IOSTREAM
#define __USE_STD_IOSTREAM # define __USE_STD_IOSTREAM
#endif # endif
#endif #endif
// windows.h and oracle define CONST // windows.h and oracle define CONST
#ifdef CONST #ifdef CONST
#undef CONST # undef CONST
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
// Some pragmas to avoid warnings in MSVisualC // Some pragmas to avoid warnings in MSVisualC
// Disable warning C4786: identifier was truncated to '255' characters in t he debug information // Disable warning C4786: identifier was truncated to '255' characters in t he debug information
#pragma warning ( disable : 4786 ) # pragma warning ( disable : 4786 )
// Disable warning C4291: no matching operator delete found; memory will no t be freed if // Disable warning C4291: no matching operator delete found; memory will no t be freed if
// initialization throws an exception // initialization throws an exception
#pragma warning ( disable : 4291 ) # pragma warning ( disable : 4291 )
// Disable warning C4250: inheritance via dominance // Disable warning C4250: inheritance via dominance
#pragma warning ( disable : 4250 ) # pragma warning ( disable : 4250 )
#endif #endif
// some compilers define the macros below in limits // some compilers define the macros below in limits
#include <limits> #include <limits>
#ifndef LONGLONG_MAX #ifndef LONGLONG_MAX
#define LONGLONG_MAX 0x7FFFFFFFFFFFFFFFLL # define LONGLONG_MAX 0x7FFFFFFFFFFFFFFFLL
#endif #endif
#ifndef LONGLONG_MIN #ifndef LONGLONG_MIN
#define LONGLONG_MIN 0x8000000000000000LL # define LONGLONG_MIN 0x8000000000000000LL
#endif #endif
#ifndef ULONGLONG_MAX #ifndef ULONGLONG_MAX
#define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFLL # define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFLL
#endif #endif
#ifndef ULONGLONG_MIN #ifndef ULONGLONG_MIN
#define ULONGLONG_MIN 0x0000000000000000LL # define ULONGLONG_MIN 0x0000000000000000LL
#endif #endif
// Include files // Include files
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <string> #include <string>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <exception> #include <exception>
namespace Reflex { namespace Reflex {
#if 0 #if 0
// The definition of Reflex::longlong is now removed. // The definition of Reflex::longlong is now removed.
// It is not needed by the Reflex API, and it interfers // It is not needed by the Reflex API, and it interfers
// with user code defining its own longlong, because // with user code defining its own longlong, because
// the dictionaries pull it in via "using namespace Reflex". // the dictionaries pull it in via "using namespace Reflex".
// Large integer definition depends of the platform // Large integer definition depends of the platform
#if defined(_WIN32) && !defined(__CINT__) # if defined(_WIN32) && !defined(__CINT__)
typedef __int64 longlong; typedef __int64 longlong;
typedef unsigned __int64 ulonglong; typedef unsigned __int64 ulonglong;
#else # else
typedef long long int longlong; /* */ typedef long long int longlong; /* */
typedef unsigned long long int /**/ ulonglong; typedef unsigned long long int /**/ ulonglong;
#endif # endif
#endif #endif
// forward declarations
class Any;
class Type;
class Base;
class Scope;
class Object;
class Member;
class PropertyList;
class TypeTemplate;
class MemberTemplate;
typedef std::vector<std::string> StdString_Cont_Type_t;
typedef StdString_Cont_Type_t::const_iterator StdString_Iterator;
typedef StdString_Cont_Type_t::const_reverse_iterator Reverse_StdString_Ite
rator;
typedef std::vector<Type> Type_Cont_Type_t;
typedef Type_Cont_Type_t::const_iterator Type_Iterator;
typedef Type_Cont_Type_t::const_reverse_iterator Reverse_Type_Iterator;
typedef std::vector<Base> Base_Cont_Type_t;
typedef Base_Cont_Type_t::const_iterator Base_Iterator;
typedef Base_Cont_Type_t::const_reverse_iterator Reverse_Base_Iterator;
typedef std::vector<Scope> Scope_Cont_Type_t;
typedef Scope_Cont_Type_t::const_iterator Scope_Iterator;
typedef Scope_Cont_Type_t::const_reverse_iterator Reverse_Scope_Iterator;
typedef std::vector<Object> Object_Cont_Type_t;
typedef Object_Cont_Type_t::const_iterator Object_Iterator;
typedef Object_Cont_Type_t::const_reverse_iterator Reverse_Object_Iterator;
typedef std::vector<Member> Member_Cont_Type_t;
typedef Member_Cont_Type_t::const_iterator Member_Iterator;
typedef Member_Cont_Type_t::const_reverse_iterator Reverse_Member_Iterator;
typedef std::vector<TypeTemplate> TypeTemplate_Cont_Type_t;
typedef TypeTemplate_Cont_Type_t::const_iterator TypeTemplate_Iterator;
typedef TypeTemplate_Cont_Type_t::const_reverse_iterator Reverse_TypeTempla
te_Iterator;
typedef std::vector<MemberTemplate> MemberTemplate_Cont_Type_t;
typedef MemberTemplate_Cont_Type_t::const_iterator MemberTemplate_Iterator;
typedef MemberTemplate_Cont_Type_t::const_reverse_iterator Reverse_MemberTe
mplate_Iterator;
namespace Dummy {
RFLX_API const StdString_Cont_Type_t& StdStringCont();
RFLX_API const Type_Cont_Type_t& TypeCont();
RFLX_API const Base_Cont_Type_t& BaseCont();
RFLX_API const Scope_Cont_Type_t& ScopeCont();
RFLX_API const Object_Cont_Type_t& ObjectCont();
RFLX_API const Member_Cont_Type_t& MemberCont();
RFLX_API const TypeTemplate_Cont_Type_t& TypeTemplateCont();
RFLX_API const MemberTemplate_Cont_Type_t& MemberTemplateCont();
RFLX_API Any& Any();
RFLX_API const Object& Object();
RFLX_API const Type& Type();
RFLX_API const TypeTemplate& TypeTemplate();
RFLX_API const Base& Base();
RFLX_API const PropertyList& PropertyList();
RFLX_API const Member& Member();
RFLX_API const MemberTemplate& MemberTemplate();
RFLX_API const Scope& Scope();
template <class T> inline const T&
Get() {
static T t;
return t;
}
}
// forward declarations /** The Reflex instance ensures the setup of the databases
class Any; and provides access to some general information about the Reflex packag
class Type; e */
class Base; class RFLX_API Instance {
class Scope; public:
class Object; /** default constructor */
class Member; Instance();
class PropertyList;
class TypeTemplate; /** destructor */
class MemberTemplate; ~Instance();
typedef std::vector<std::string> StdString_Cont_Type_t; /** return true if Reflex has shutdown (end of process) */
typedef StdString_Cont_Type_t::const_iterator StdString_Iterator; static bool HasShutdown();
typedef StdString_Cont_Type_t::const_reverse_iterator Reverse_StdString_
Iterator; private:
Instance(Instance * createSingleton);
typedef std::vector< Type > Type_Cont_Type_t; static Instance& CreateReflexInstance();
typedef Type_Cont_Type_t::const_iterator Type_Iterator;
typedef Type_Cont_Type_t::const_reverse_iterator Reverse_Type_Iterator; static Instance* fgSingleton;
static bool fgHasShutdown;
typedef std::vector< Base > Base_Cont_Type_t; void Shutdown();
typedef Base_Cont_Type_t::const_iterator Base_Iterator; /** default constructor */
typedef Base_Cont_Type_t::const_reverse_iterator Reverse_Base_Iterator; }; // struct Reflex
typedef std::vector< Scope > Scope_Cont_Type_t; /** the Name of the package - used for messages */
typedef Scope_Cont_Type_t::const_iterator Scope_Iterator; RFLX_API const std::string& Argv0(); // returns "Reflex";
typedef Scope_Cont_Type_t::const_reverse_iterator Reverse_Scope_Iterator
; // these defines are used for the modifiers they are used in the following
// classes
typedef std::vector< Object > Object_Cont_Type_t; // BA = BASE
typedef Object_Cont_Type_t::const_iterator Object_Iterator; // CL = CLASS
typedef Object_Cont_Type_t::const_reverse_iterator Reverse_Object_Iterat // FU = FUNCTION
or; // DM = DATAMEMBER
// FM = FUNCTIONMEMBER
typedef std::vector< Member > Member_Cont_Type_t; // TY = TYPE
typedef Member_Cont_Type_t::const_iterator Member_Iterator; // ME = MEMBER
typedef Member_Cont_Type_t::const_reverse_iterator Reverse_Member_Iterat // BA CL DM FM TY ME
or; enum ENTITY_DESCRIPTION {
PUBLIC = (1 << 0), // X X X X
typedef std::vector< TypeTemplate > TypeTemplate_Cont_Type_t; PROTECTED = (1 << 1), // X X X X
typedef TypeTemplate_Cont_Type_t::const_iterator TypeTemplate_Iterator; PRIVATE = (1 << 2), // X X X X
typedef TypeTemplate_Cont_Type_t::const_reverse_iterator Reverse_TypeTem REGISTER = (1 << 3), // X X X
plate_Iterator; STATIC = (1 << 4), // X X X
CONSTRUCTOR = (1 << 5), // X X
typedef std::vector< MemberTemplate > MemberTemplate_Cont_Type_t; DESTRUCTOR = (1 << 6), // X X
typedef MemberTemplate_Cont_Type_t::const_iterator MemberTemplate_Iterat EXPLICIT = (1 << 7), // X X
or; EXTERN = (1 << 8), // X X X
typedef MemberTemplate_Cont_Type_t::const_reverse_iterator Reverse_Membe COPYCONSTRUCTOR = (1 << 9), // X X
rTemplate_Iterator; OPERATOR = (1 << 10), // X X
INLINE = (1 << 11), // X X
namespace Dummy { CONVERTER = (1 << 12), // X X
RFLX_API const StdString_Cont_Type_t & StdStringCont(); AUTO = (1 << 13), // X X
RFLX_API const Type_Cont_Type_t & TypeCont(); MUTABLE = (1 << 14), // X X
RFLX_API const Base_Cont_Type_t & BaseCont(); CONST = (1 << 15), // X X X
RFLX_API const Scope_Cont_Type_t & ScopeCont(); VOLATILE = (1 << 16), // X X X
RFLX_API const Object_Cont_Type_t & ObjectCont(); REFERENCE = (1 << 17), // X X
RFLX_API const Member_Cont_Type_t & MemberCont(); ABSTRACT = (1 << 18), // X X X
RFLX_API const TypeTemplate_Cont_Type_t & TypeTemplateCont(); VIRTUAL = (1 << 19), // X X X
RFLX_API const MemberTemplate_Cont_Type_t & MemberTemplateCont(); TRANSIENT = (1 << 20), // X X
RFLX_API Any & Any(); ARTIFICIAL = (1 << 21), // X X X X X X
RFLX_API const Object & Object(); // the bits 31 - 28 are reserved for template default arguments
RFLX_API const Type & Type(); TEMPLATEDEFAULTS1 = (0 << 31) & (0 << 30) & (0 << 29) & (1 << 28),
RFLX_API const TypeTemplate & TypeTemplate(); TEMPLATEDEFAULTS2 = (0 << 31) & (0 << 30) & (1 << 29) & (0 << 28),
RFLX_API const Base & Base(); TEMPLATEDEFAULTS3 = (0 << 31) & (0 << 30) & (1 << 29) & (1 << 28),
RFLX_API const PropertyList & PropertyList(); TEMPLATEDEFAULTS4 = (0 << 31) & (1 << 30) & (0 << 29) & (0 << 28),
RFLX_API const Member & Member(); TEMPLATEDEFAULTS5 = (0 << 31) & (1 << 30) & (0 << 29) & (1 << 28),
RFLX_API const MemberTemplate & MemberTemplate(); TEMPLATEDEFAULTS6 = (0 << 31) & (1 << 30) & (1 << 29) & (0 << 28),
RFLX_API const Scope & Scope(); TEMPLATEDEFAULTS7 = (0 << 31) & (1 << 30) & (1 << 29) & (1 << 28),
template< class T > inline const T & Get() { TEMPLATEDEFAULTS8 = (1 << 31) & (0 << 30) & (0 << 29) & (0 << 28),
static T t; TEMPLATEDEFAULTS9 = (1 << 31) & (0 << 30) & (0 << 29) & (1 << 28),
return t; TEMPLATEDEFAULTS10 = (1 << 31) & (0 << 30) & (1 << 29) & (0 << 28),
} TEMPLATEDEFAULTS11 = (1 << 31) & (0 << 30) & (1 << 29) & (1 << 28),
} TEMPLATEDEFAULTS12 = (1 << 31) & (1 << 30) & (0 << 29) & (0 << 28),
TEMPLATEDEFAULTS13 = (1 << 31) & (1 << 30) & (0 << 29) & (1 << 28),
/** The Reflex instance ensures the setup of the databases TEMPLATEDEFAULTS14 = (1 << 31) & (1 << 30) & (1 << 29) & (0 << 28),
and provides access to some general information about the Reflex pac TEMPLATEDEFAULTS15 = (1 << 31) & (1 << 30) & (1 << 29) & (1 << 28)
kage */ };
class RFLX_API Instance {
public: /** enum for printing names */
enum ENTITY_HANDLING {
/** default constructor */ FINAL = (1 << 0),
Instance(); QUALIFIED = (1 << 1),
SCOPED = (1 << 2),
/** destructor */ F = (1 << 4),
~Instance(); Q = (1 << 5),
S = (1 << 6)
/** return true if Reflex has shutdown (end of process) */ };
static bool HasShutdown();
/** enum containing all possible types and scopes */
private: enum TYPE {
Instance(Instance* createSingleton); CLASS = 0,
static Instance& CreateReflexInstance(); STRUCT,
ENUM,
static Instance* fgSingleton; FUNCTION,
static bool fgHasShutdown; ARRAY,
void Shutdown(); FUNDAMENTAL,
/** default constructor */ POINTER,
}; // struct Reflex POINTERTOMEMBER,
TYPEDEF,
/** the Name of the package - used for messages */ UNION,
RFLX_API const std::string & Argv0(); // returns "Reflex"; TYPETEMPLATEINSTANCE,
MEMBERTEMPLATEINSTANCE,
// these defines are used for the modifiers they are used in the followi NAMESPACE,
ng DATAMEMBER,
// classes FUNCTIONMEMBER,
// BA = BASE UNRESOLVED
// CL = CLASS };
// FU = FUNCTION
// DM = DATAMEMBER /** enum containing all possible 'representation' types */
// FM = FUNCTIONMEMBER enum REPRESTYPE {
// TY = TYPE REPRES_POINTER = 'a' - 'A', // To be added to the other
// ME = MEMBER value to refer to a pointer to
// BA CL DM FM TY ME REPRES_CHAR = 'c',
enum ENTITY_DESCRIPTION { REPRES_SIGNED_CHAR = 'c',
PUBLIC = (1<<0), // X X X X REPRES_SHORT_INT = 's',
PROTECTED = (1<<1), // X X X X REPRES_INT = 'i',
PRIVATE = (1<<2), // X X X X REPRES_LONG_INT = 'l',
REGISTER = (1<<3), // X X X REPRES_UNSIGNED_CHAR = 'b',
STATIC = (1<<4), // X X X REPRES_UNSIGNED_SHORT_INT = 'r',
CONSTRUCTOR = (1<<5), // X X REPRES_UNSIGNED_INT = 'h',
DESTRUCTOR = (1<<6) , // X X REPRES_UNSIGNED_LONG_INT = 'k',
EXPLICIT = (1<<7), // X X REPRES_BOOL = 'g',
EXTERN = (1<<8) , // X X X REPRES_FLOAT = 'f',
COPYCONSTRUCTOR = (1<<9) , // X X REPRES_DOUBLE = 'd',
OPERATOR = (1<<10), // X X REPRES_LONG_DOUBLE = 'q',
INLINE = (1<<11), // X X REPRES_VOID = 'y',
CONVERTER = (1<<12), // X X REPRES_LONGLONG = 'n',
AUTO = (1<<13), // X X REPRES_ULONGLONG = 'm',
MUTABLE = (1<<14), // X X REPRES_STRUCT = 'u',
CONST = (1<<15), // X X X REPRES_CLASS = 'u',
VOLATILE = (1<<16), // X X X REPRES_ENUM = 'i', // Intentionally equal to REPRES_IN
REFERENCE = (1<<17), // X X T
ABSTRACT = (1<<18), // X X X REPRES_NOTYPE = '\0'
VIRTUAL = (1<<19), // X X X // '1' is also a value used (for legacy implementation o
TRANSIENT = (1<<20), // X X f function pointer)
ARTIFICIAL = (1<<21), // X X X X X X // 'E' is also a value used (for legacy implementation o
// the bits 31 - 28 are reserved for template default arguments f FILE*)
TEMPLATEDEFAULTS1 = (0<<31)&(0<<30)&(0<<29)&(1<<28), // 'a', 'j', 'T', 'o', 'O', 'p', 'P', 'z', 'Z', '\011',
TEMPLATEDEFAULTS2 = (0<<31)&(0<<30)&(1<<29)&(0<<28), '\001', 'w' are also a value used (for support of various interpreter types
TEMPLATEDEFAULTS3 = (0<<31)&(0<<30)&(1<<29)&(1<<28), )
TEMPLATEDEFAULTS4 = (0<<31)&(1<<30)&(0<<29)&(0<<28), };
TEMPLATEDEFAULTS5 = (0<<31)&(1<<30)&(0<<29)&(1<<28),
TEMPLATEDEFAULTS6 = (0<<31)&(1<<30)&(1<<29)&(0<<28), enum EMEMBERQUERY {
TEMPLATEDEFAULTS7 = (0<<31)&(1<<30)&(1<<29)&(1<<28), INHERITEDMEMBERS_DEFAULT, // NO by default, set to ALSO by UpdateMemb
TEMPLATEDEFAULTS8 = (1<<31)&(0<<30)&(0<<29)&(0<<28), ers()
TEMPLATEDEFAULTS9 = (1<<31)&(0<<30)&(0<<29)&(1<<28), INHERITEDMEMBERS_NO,
TEMPLATEDEFAULTS10 = (1<<31)&(0<<30)&(1<<29)&(0<<28), INHERITEDMEMBERS_ALSO
TEMPLATEDEFAULTS11 = (1<<31)&(0<<30)&(1<<29)&(1<<28), };
TEMPLATEDEFAULTS12 = (1<<31)&(1<<30)&(0<<29)&(0<<28),
TEMPLATEDEFAULTS13 = (1<<31)&(1<<30)&(0<<29)&(1<<28), enum EDELAYEDLOADSETTING {
TEMPLATEDEFAULTS14 = (1<<31)&(1<<30)&(1<<29)&(0<<28), DELAYEDLOAD_OFF,
TEMPLATEDEFAULTS15 = (1<<31)&(1<<30)&(1<<29)&(1<<28) DELAYEDLOAD_ON
}; };
/** enum for printing names */ // Note TYPE and REPRESTYPE are 'small' enums and could be stored as 'char'
enum ENTITY_HANDLING { to save space
FINAL = (1<<0),
QUALIFIED = (1<<1), /** the max unsigned int */
SCOPED = (1<<2), size_t NPos();
F = (1<<4),
Q = (1<<5), /**
S = (1<<6) * typedef for function member type (necessary for return value of
}; * getter function)
*/
/** enum containing all possible types and scopes */ typedef void (*StubFunction)(void*, void*, const std::vector<void*>&, void*
enum TYPE { );
CLASS = 0,
STRUCT, /** typedef for function for Offset calculation */
ENUM, typedef size_t (*OffsetFunction)(void*);
FUNCTION,
ARRAY, /** dummy types for type_info purposes */
FUNDAMENTAL, class RFLX_API NullType {};
POINTER, class RFLX_API UnknownType {};
POINTERTOMEMBER, /** place holders for protected types */
TYPEDEF, class RFLX_API ProtectedClass {};
UNION, class RFLX_API ProtectedEnum {};
TYPETEMPLATEINSTANCE, class RFLX_API ProtectedStruct {};
MEMBERTEMPLATEINSTANCE, class RFLX_API ProtectedUnion {};
NAMESPACE, /** place holders for private types */
DATAMEMBER, class RFLX_API PrivateClass {};
FUNCTIONMEMBER, class RFLX_API PrivateEnum {};
UNRESOLVED class RFLX_API PrivateStruct {};
}; class RFLX_API PrivateUnion {};
/** place holders for unnamed types (also typeinfo purposes) */
/** enum containing all possible 'representation' types */ class RFLX_API UnnamedClass {};
enum REPRESTYPE { class RFLX_API UnnamedEnum {};
REPRES_POINTER = 'a' - 'A', // To be added to the other class RFLX_API UnnamedNamespace {};
value to refer to a pointer to class RFLX_API UnnamedStruct {};
REPRES_CHAR = 'c', class RFLX_API UnnamedUnion {};
REPRES_SIGNED_CHAR = 'c',
REPRES_SHORT_INT = 's', /** exception classes */
REPRES_INT = 'i', class RFLX_EXCEPTIONAPI(RFLX_API) RuntimeError: public std::exception {
REPRES_LONG_INT = 'l', public:
REPRES_UNSIGNED_CHAR = 'b', RuntimeError(const std::string & msg): fMsg(Reflex::Argv0() + ": " + msg
REPRES_UNSIGNED_SHORT_INT = 'r', ) {}
REPRES_UNSIGNED_INT = 'h', ~RuntimeError() throw() {}
REPRES_UNSIGNED_LONG_INT = 'k', virtual const char*
REPRES_BOOL = 'g', what() const throw() { return fMsg.c_str(); }
REPRES_FLOAT = 'f',
REPRES_DOUBLE = 'd', std::string fMsg;
REPRES_LONG_DOUBLE = 'q', };
REPRES_VOID = 'y',
REPRES_LONGLONG = 'n',
REPRES_ULONGLONG = 'm',
REPRES_STRUCT = 'u',
REPRES_CLASS = 'u',
REPRES_ENUM = 'i', // Intentionally equal to REPRES_IN
T
REPRES_NOTYPE = '\0'
// '1' is also a value used (for legacy implementation of function po
inter)
// 'E' is also a value used (for legacy implementation of FILE*)
// 'a', 'j', 'T', 'o', 'O', 'p', 'P', 'z', 'Z', '\011', '\001', 'w' a
re also a value used (for support of various interpreter types)
};
enum EMEMBERQUERY {
INHERITEDMEMBERS_DEFAULT, // NO by default, set to ALSO by UpdateMemb
ers()
INHERITEDMEMBERS_NO,
INHERITEDMEMBERS_ALSO
};
// Note TYPE and REPRESTYPE are 'small' enums and could be stored as 'ch
ar' to save space
/** the max unsigned int */
size_t NPos();
/**
* typedef for function member type (necessary for return value of
* getter function)
*/
typedef void (* StubFunction) ( void*, void *, const std::vector < void
* > &, void *);
/** typedef for function for Offset calculation */
typedef size_t (* OffsetFunction) ( void * );
/** dummy types for type_info purposes */
class RFLX_API NullType {};
class RFLX_API UnknownType {};
/** place holders for protected types */
class RFLX_API ProtectedClass {};
class RFLX_API ProtectedEnum {};
class RFLX_API ProtectedStruct {};
class RFLX_API ProtectedUnion {};
/** place holders for private types */
class RFLX_API PrivateClass {};
class RFLX_API PrivateEnum {};
class RFLX_API PrivateStruct {};
class RFLX_API PrivateUnion {};
/** place holders for unnamed types (also typeinfo purposes) */
class RFLX_API UnnamedClass {};
class RFLX_API UnnamedEnum {};
class RFLX_API UnnamedNamespace {};
class RFLX_API UnnamedStruct {};
class RFLX_API UnnamedUnion {};
/** exception classes */
class RFLX_EXCEPTIONAPI(RFLX_API) RuntimeError : public std::exception {
public:
RuntimeError(const std::string& msg) : fMsg(Reflex::Argv0() + ": " +
msg) { }
~RuntimeError() throw() {}
virtual const char * what() const throw( ) { return fMsg.c_str();}
std::string fMsg;
};
} // namespace Reflex } // namespace Reflex
namespace ROOT { namespace ROOT {
namespace Reflex { namespace Reflex {
using namespace ::Reflex; using namespace ::Reflex;
} }
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::NPos() { inline size_t
Reflex::NPos() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return (size_t) -1; return (size_t) -1;
} }
#endif // Reflex_Kernel #endif // Reflex_Kernel
 End of changes. 26 change blocks. 
328 lines changed or deleted 333 lines changed or added


 LikelihoodInterval.h   LikelihoodInterval.h 
// @(#)root/roostats:$Id: LikelihoodInterval.h 29107 2009-06-19 14:26:42Z m oneta $ // @(#)root/roostats:$Id: LikelihoodInterval.h 30512 2009-09-28 17:24:48Z m oneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_LikelihoodInterval #ifndef RooStats_LikelihoodInterval
skipping to change at line 35 skipping to change at line 35
namespace RooStats { namespace RooStats {
class LikelihoodInterval : public ConfInterval { class LikelihoodInterval : public ConfInterval {
public: public:
LikelihoodInterval(); LikelihoodInterval();
LikelihoodInterval(const char* name); LikelihoodInterval(const char* name);
LikelihoodInterval(const char* name, const char* title); LikelihoodInterval(const char* name, const char* title);
LikelihoodInterval(const char* name, RooAbsReal*, RooArgSet*); LikelihoodInterval(const char* name, RooAbsReal*, const RooArgSet*);
LikelihoodInterval(const char* name, const char* title, RooAbsReal*, LikelihoodInterval(const char* name, const char* title, RooAbsReal*,
RooArgSet*); const RooArgSet*);
virtual ~LikelihoodInterval(); virtual ~LikelihoodInterval();
virtual Bool_t IsInInterval(RooArgSet&); virtual Bool_t IsInInterval(const RooArgSet&);
virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;}
virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet&) const ; Bool_t CheckParameters(const RooArgSet&) const ;
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
Double_t LowerLimit(RooRealVar& param) ; Double_t LowerLimit(RooRealVar& param) ;
Double_t UpperLimit(RooRealVar& param) ; Double_t UpperLimit(RooRealVar& param) ;
RooAbsReal* GetLikelihoodRatio() {return fLikelihoodRatio;} RooAbsReal* GetLikelihoodRatio() {return fLikelihoodRatio;}
private: private:
RooArgSet* fParameters; // parameters of interest for this interval const RooArgSet* fParameters; // parameters of interest for this inte rval
RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma ke contours RooAbsReal* fLikelihoodRatio; // likelihood ratio function used to ma ke contours
Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL) Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL)
ClassDef(LikelihoodInterval,1) // Concrete implementation of a ConfI nterval based on a likelihood ratio ClassDef(LikelihoodInterval,1) // Concrete implementation of a ConfI nterval based on a likelihood ratio
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 7 lines changed or added


 MCMCCalculator.h   MCMCCalculator.h 
// @(#)root/roostats:$Id: MCMCCalculator.h 26805 2009-06-17 14:31:02Z kbela sco $ // @(#)root/roostats:$Id: MCMCCalculator.h 26805 2009-06-17 14:31:02Z kbela sco $
// Author: Kevin Belasco 17/06/2009 // Authors: Kevin Belasco 17/06/2009
// Authors: Kyle Cranmer 17/06/2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_MCMCCalculator #ifndef ROOSTATS_MCMCCalculator
#define ROOSTATS_MCMCCalculator #define ROOSTATS_MCMCCalculator
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROO_ABS_PDF
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#endif
#ifndef ROO_ABS_DATA
#include "RooAbsData.h" #include "RooAbsData.h"
#endif
#ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif
#ifndef ROO_ARG_LIST
#include "RooArgList.h" #include "RooArgList.h"
#include "RooWorkspace.h" #endif
// #ifndef ROO_WORKSPACE
// #include "RooWorkspace.h"
// #endif
#ifndef ROOSTATS_ProposalFunction
#include "RooStats/ProposalFunction.h" #include "RooStats/ProposalFunction.h"
#endif
#ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif
#ifndef RooStats_MCMCInterval
#include "RooStats/MCMCInterval.h" #include "RooStats/MCMCInterval.h"
#endif
namespace RooStats { namespace RooStats {
class MCMCCalculator : public IntervalCalculator { class ModelConfig;
class MCMCCalculator : public IntervalCalculator, public TNamed {
public: public:
// default constructor // default constructor
MCMCCalculator(); MCMCCalculator();
// alternate constructor // This constructor will set up a basic settings package including a
MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf, // ProposalFunction, number of iterations, burn in steps, confidence
RooArgSet& paramsOfInterest, ProposalFunction& proposalFunction, // level, and interval determination method. Any of these basic
Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); // settings can be overridden by calling one of the Set...() methods.
MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& par
amsOfInterest);
// This constructor will set up a basic settings package including a
// ProposalFunction, number of iterations, burn in steps, confidence
// level, and interval determination method. Any of these basic
// settings can be overridden by calling one of the Set...() methods.
MCMCCalculator(RooAbsData& data, const ModelConfig& model);
// MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf,
// RooArgSet& paramsOfInterest);
// alternate constructor, no automatic basic settings
MCMCCalculator(RooAbsData& data, const ModelConfig& model, ProposalFu
nction& proposalFunction,
Int_t numIters, RooArgList* axes = NULL, Double_t size
= 0.05);
// MCMCCalculator(RooWorkspace& ws, RooAbsData& data, RooAbsPdf& pdf
,
// const RooArgSet& paramsOfInterest, ProposalFunction& proposalFu
nction,
// Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05);
// alternate constructor // alternate constructor, no automatic basic settings
MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf, MCMCCalculator(RooAbsData& data, RooAbsPdf& pdf,
RooArgSet& paramsOfInterest, ProposalFunction& proposalFunction, const RooArgSet& paramsOfInterest, ProposalFunction& proposalFunct ion,
Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05); Int_t numIters, RooArgList* axes = NULL, Double_t size = 0.05);
virtual ~MCMCCalculator() virtual ~MCMCCalculator() {}
{
if (fOwnsWorkspace)
delete fWS;
}
// Main interface to get a ConfInterval // Main interface to get a ConfInterval
virtual MCMCInterval* GetInterval() const; virtual MCMCInterval* GetInterval() const;
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana virtual void SetModel(const ModelConfig & model);
lysis
virtual void SetWorkspace(RooWorkspace & ws)
{
if (!fWS)
fWS = &ws;
else {
//RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->merge(ws);
//RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
}
// set the name of the data set
virtual void SetData(const char* data) { fDataName = data; }
// Set the DataSet, add to the the workspace if not already there // Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData& data) virtual void SetData(RooAbsData& data) { fData = &data; }
{
if (!fWS) {
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->data(data.GetName()) ) {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData(data.GetName());
}
// set the name of the pdf
virtual void SetPdf(const char* name) { fPdfName = name; }
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; }
{
if (!fWS)
fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ))
{
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf(pdf.GetName());
}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(const RooArgSet& set) { fPOI = &set; }
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams = &set;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
// set the proposal function for suggesting new points for the MCMC // set the proposal function for suggesting new points for the MCMC
virtual void SetProposalFunction(ProposalFunction& proposalFunction) virtual void SetProposalFunction(ProposalFunction& proposalFunction)
{ fPropFunc = &proposalFunction; } { fPropFunc = &proposalFunction; }
// set the number of iterations to run the metropolis algorithm // set the number of iterations to run the metropolis algorithm
virtual void SetNumIters(Int_t numIters) virtual void SetNumIters(Int_t numIters)
{ fNumIters = numIters; } { fNumIters = numIters; }
// set the number of steps in the chain to discard as burn-in, // set the number of steps in the chain to discard as burn-in,
// starting from the first // starting from the first
virtual void SetNumBurnInSteps(Int_t numBurnInSteps) virtual void SetNumBurnInSteps(Int_t numBurnInSteps)
{ fNumBurnInSteps = numBurnInSteps; } { fNumBurnInSteps = numBurnInSteps; }
// set the number of bins to create for each axis when constructing t he interval // set the number of bins to create for each axis when constructing t he interval
virtual void SetNumBins(Int_t numBins) virtual void SetNumBins(Int_t numBins) { fNumBins = numBins; }
{ fNumBins = numBins; }
// set which variables to put on each axis // set which variables to put on each axis
virtual void SetAxes(RooArgList& axes) virtual void SetAxes(RooArgList& axes)
{ fAxes = &axes; } { fAxes = &axes; }
// set whether to use kernel estimation to determine the interval
virtual void SetUseKeys(Bool_t useKeys) { fUseKeys = useKeys; }
// set whether to use sparse histogram (if using histogram at all)
virtual void SetUseSparseHist(Bool_t useSparseHist)
{ fUseSparseHist = useSparseHist; }
protected: protected:
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // owns all the components used by the calculator //RooWorkspace* fWS; // owns all the components used by the calculato
RooArgSet* fPOI; // parameters of interest for interval r
RooArgSet* fNuisParams; // nuisance parameters for interval const RooArgSet * fPOI; // parameters of interest for interval
Bool_t fOwnsWorkspace; // whether we own the workspace const RooArgSet * fNuisParams; // nuisance parameters for interval
ProposalFunction* fPropFunc; // Proposal function for MCMC integratio //Bool_t fOwnsWorkspace; // whether we own the workspace
n mutable ProposalFunction* fPropFunc; // Proposal function for MCMC in
const char* fPdfName; // name of common PDF in workspace tegration
const char* fDataName; // name of data set in workspace RooAbsPdf * fPdf; // pointer to common PDF (owned by the workspace)
RooAbsData * fData; // pointer to the data (owned by the workspace)
// const char* fPdfName; // name of common PDF in workspace
// const char* fDataName; // name of data set in workspace
Int_t fNumIters; // number of iterations to run metropolis algorithm Int_t fNumIters; // number of iterations to run metropolis algorithm
Int_t fNumBurnInSteps; // number of iterations to discard as burn-in, starting from the first Int_t fNumBurnInSteps; // number of iterations to discard as burn-in, starting from the first
Int_t fNumBins; // set the number of bins to create for each Int_t fNumBins; // set the number of bins to create for each
// axis when constructing the interval // axis when constructing the interval
RooArgList* fAxes; // which variables to put on each axis RooArgList * fAxes; // which variables to put on each axis
Bool_t fUseKeys; // whether to use kernel estimation to determine int
erval
Bool_t fUseSparseHist; // whether to use sparse histogram (if using h
ist at all)
void SetupBasicUsage();
void SetBins(const RooAbsCollection& coll, Int_t numBins) const
{
TIterator* it = coll.createIterator();
RooAbsArg* r;
while ((r = (RooAbsArg*)it->Next()) != NULL)
if (dynamic_cast<RooRealVar*>(r))
((RooRealVar*)r)->setBins(numBins);
delete it;
}
ClassDef(MCMCCalculator,1) // Markov Chain Monte Carlo calculator for Bayesian credible intervals ClassDef(MCMCCalculator,1) // Markov Chain Monte Carlo calculator for Bayesian credible intervals
}; };
} }
#endif #endif
 End of changes. 25 change blocks. 
70 lines changed or deleted 93 lines changed or added


 MCMCInterval.h   MCMCInterval.h 
skipping to change at line 19 skipping to change at line 19
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_MCMCInterval #ifndef RooStats_MCMCInterval
#define RooStats_MCMCInterval #define RooStats_MCMCInterval
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef RooStats_ConfInterval #ifndef ROOSTATS_ConfInterval
#include "RooStats/ConfInterval.h" #include "RooStats/ConfInterval.h"
#endif #endif
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef ROO_ARG_LIST
#include "RooArgList.h" #include "RooArgList.h"
#include "RooRealVar.h" #endif
#ifndef ROO_DATA_HIST
#include "RooDataHist.h"
#endif
#ifndef ROO_DATA_SET
#include "RooDataSet.h" #include "RooDataSet.h"
#endif
#ifndef ROO_REAL_VAR
#include "RooRealVar.h"
#endif
#ifndef ROO_KEYS_PDF
#include "RooNDKeysPdf.h"
#endif
#ifndef ROOSTATS_MarkovChain
#include "RooStats/MarkovChain.h"
#endif
#ifndef ROOT_TH1
#include "TH1.h" #include "TH1.h"
#endif
#ifndef ROO_PRODUCT
#include "RooProduct.h"
#endif
#ifndef RooStats_Heavyside
#include "RooStats/Heavyside.h"
#endif
#ifndef ROO_PRODUCT
#include "RooProduct.h"
#endif
#ifndef ROOT_THnSparse
#include "THnSparse.h"
#endif
namespace RooStats { namespace RooStats {
class MCMCInterval : public ConfInterval { class MCMCInterval : public ConfInterval {
public: public:
MCMCInterval(); MCMCInterval();
MCMCInterval(const char* name); MCMCInterval(const char* name);
MCMCInterval(const char* name, const char* title); MCMCInterval(const char* name, const char* title);
MCMCInterval(const char* name, const char* title, RooArgSet& paramete MCMCInterval(const char* name, const char* title, const RooArgSet& pa
rs, rameters,
RooDataSet& chain); MarkovChain& chain);
enum {DEFAULT_NUM_BINS = 50}; enum {DEFAULT_NUM_BINS = 50};
virtual ~MCMCInterval() virtual ~MCMCInterval()
{ {
delete[] fAxes; delete[] fAxes;
delete fHist; delete fHist;
delete fData; delete fChain;
delete[] fNumBins; // kbelasco: check here for memory management errors
delete fDataHist;
delete fSparseHist;
delete fKeysPdf;
delete fProduct;
delete fHeavyside;
delete fKeysDataHist;
delete fCutoffVar;
} }
// determine whether this point is in the confidence interval // determine whether this point is in the confidence interval
virtual Bool_t IsInInterval(RooArgSet& point); virtual Bool_t IsInInterval(const RooArgSet& point);
// set the desired confidence level (see GetActualConfidenceLevel()) // set the desired confidence level (see GetActualConfidenceLevel())
// Note: calling this function triggers the algorithm that determines // Note: calling this function triggers the algorithm that determines
// the interval, so call this after initializing all other aspects // the interval, so call this after initializing all other aspects
// of this IntervalCalculator // of this IntervalCalculator
// Also, calling this function again with a different confidence leve l // Also, calling this function again with a different confidence leve l
// retriggers the calculation of the interval // retriggers the calculation of the interval
virtual void SetConfidenceLevel(Double_t cl); virtual void SetConfidenceLevel(Double_t cl);
// get the desired confidence level (see GetActualConfidenceLevel()) // get the desired confidence level (see GetActualConfidenceLevel())
virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
// do we want it to return list of parameters // return a set containing the parameters of this interval
// the caller owns the returned RooArgSet*
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// get the cutoff bin height for being considered in the // get the cutoff bin height for being considered in the
// confidence interval // confidence interval
virtual Double_t GetCutoff() { return fCutoff; } virtual Double_t GetHistCutoff();
// get the cutoff RooNDKeysPdf value for being considered in the
// confidence interval
virtual Double_t GetKeysPdfCutoff();
//virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }
// get the actual value of the confidence level for this interval. // get the actual value of the confidence level for this interval.
// It is >= the specified confidence level because the interval conta virtual Double_t GetActualConfidenceLevel();
ins
// all bins with the cutoff height (or higher), until at least the de // get the sum of all bin weights
sired virtual Double_t GetSumOfWeights() const
// confidence level is reached. { return fDataHist->sum(kFALSE); }
// Returns (Sum of bin heights in interval) / (Sum of all bin heights
)
virtual Double_t GetActualConfidenceLevel()
{ return fIntervalSum/fHist->GetSumOfWeights(); }
// whether the specified confidence level is a floor for the actual // whether the specified confidence level is a floor for the actual
// confidence level (strict), or a ceiling (not strict) // confidence level (strict), or a ceiling (not strict)
virtual void SetStrict(Bool_t isStrict) { fIsStrict = isStrict; } virtual void SetHistStrict(Bool_t isHistStrict) { fIsHistStrict = isH istStrict; }
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet& point) const; Bool_t CheckParameters(const RooArgSet& point) const;
// Set the parameters of interest for this interval // Set the parameters of interest for this interval
// and change other internal data members accordingly // and change other internal data members accordingly
virtual void SetParameters(RooArgSet& parameters); virtual void SetParameters(const RooArgSet& parameters);
// Set the MarkovChain that this interval is based on
virtual void SetChain(MarkovChain& chain) { fChain = &chain; }
// Set which parameters go on which axis. The first list element // Set which parameters go on which axis. The first list element
// goes on the x axis, second (if it exists) on y, third (if it // goes on the x axis, second (if it exists) on y, third (if it
// exists) on z. // exists) on z, etc
virtual void SetAxes(RooArgList& axes); virtual void SetAxes(RooArgList& axes);
// return a list of RooRealVars representing the axes
// you own the returned RooArgList
virtual RooArgList* GetAxes()
{
RooArgList* axes = new RooArgList();
for (Int_t i = 0; i < fDimension; i++)
axes->addClone(*fAxes[i]);
return axes;
}
// get the lower limit of param in the confidence interval // get the lower limit of param in the confidence interval
// Note that this works better for some distributions (ones with exac tly // Note that this works better for some distributions (ones with exac tly
// one maximum) than others, and sometimes has little value. // one maximum) than others, and sometimes has little value.
virtual Double_t LowerLimit(RooRealVar& param); virtual Double_t LowerLimit(RooRealVar& param);
// determine lower limit using keys pdf
virtual Double_t LowerLimitByKeys(RooRealVar& param);
// determine upper limit using keys pdf
virtual Double_t UpperLimitByKeys(RooRealVar& param);
// determine lower limit using histogram
virtual Double_t LowerLimitByHist(RooRealVar& param);
// determine lower limit using histogram
virtual Double_t LowerLimitBySparseHist(RooRealVar& param);
// determine lower limit using histogram
virtual Double_t LowerLimitByDataHist(RooRealVar& param);
// determine upper limit using histogram
virtual Double_t UpperLimitByHist(RooRealVar& param);
// determine upper limit using histogram
virtual Double_t UpperLimitBySparseHist(RooRealVar& param);
// determine upper limit using histogram
virtual Double_t UpperLimitByDataHist(RooRealVar& param);
// get the upper limit of param in the confidence interval // get the upper limit of param in the confidence interval
// Note that this works better for some distributions (ones with exac tly // Note that this works better for some distributions (ones with exac tly
// one maximum) than others, and sometimes has little value. // one maximum) than others, and sometimes has little value.
virtual Double_t UpperLimit(RooRealVar& param); virtual Double_t UpperLimit(RooRealVar& param);
// set the number of steps in the chain to discard as burn-in, // set the number of steps in the chain to discard as burn-in,
// starting from the first // starting from the first
virtual void SetNumBurnInSteps(Int_t numBurnInSteps) virtual void SetNumBurnInSteps(Int_t numBurnInSteps)
{ fNumBurnInSteps = numBurnInSteps; } { fNumBurnInSteps = numBurnInSteps; }
// set whether to use kernel estimation to determine the interval
virtual void SetUseKeys(Bool_t useKeys) { fUseKeys = useKeys; }
// set whether to use a sparse histogram. you MUST also call
// SetUseKeys(kFALSE) to use a histogram.
virtual void SetUseSparseHist(Bool_t useSparseHist)
{ fUseSparseHist = useSparseHist; }
// get whether we used kernel estimation to determine the interval
virtual Bool_t GetUseKeys() { return fUseKeys; }
// get the number of steps in the chain to disard as burn-in,
// get the number of steps in the chain to disard as burn-in,
// starting from the first
virtual Int_t GetNumBurnInSteps() { return fNumBurnInSteps; }
// set the number of bins to use (same for all axes, for now) // set the number of bins to use (same for all axes, for now)
virtual void SetNumBins(Int_t numBins); //virtual void SetNumBins(Int_t numBins);
// Get a clone of the histogram of the posterior // Get a clone of the histogram of the posterior
virtual TH1* GetPosteriorHist(); virtual TH1* GetPosteriorHist();
// Get a clone of the keys pdf of the posterior
virtual RooNDKeysPdf* GetPosteriorKeysPdf();
// Get a clone of the (keyspdf * heavyside) product of the posterior
virtual RooProduct* GetPosteriorKeysProduct();
// Get the number of parameters of interest in this interval
virtual Int_t GetDimension() const { return fDimension; }
// Get the markov chain on which this interval is based
// You do not own the returned MarkovChain*
virtual const MarkovChain* GetChain() { return fChain; }
// Get a clone of the markov chain on which this interval is based
// as a RooDataSet. You own the returned RooDataSet*
virtual RooDataSet* GetChainAsDataSet(RooArgSet* whichVars = NULL)
{ return fChain->GetAsDataSet(whichVars); }
// Get the markov chain on which this interval is based // Get the markov chain on which this interval is based
virtual const RooDataSet* GetChain() { return fData; } // as a RooDataSet. You do not own the returned RooDataSet*
virtual const RooDataSet* GetChainAsConstDataSet()
{ return fChain->GetAsConstDataSet(); }
// Get a clone of the markov chain on which this interval is based
// as a RooDataHist. You own the returned RooDataHist*
virtual RooDataHist* GetChainAsDataHist(RooArgSet* whichVars = NULL)
{ return fChain->GetAsDataHist(whichVars); }
// Get a clone of the markov chain on which this interval is based
// as a THnSparse. You own the returned THnSparse*
virtual THnSparse* GetChainAsSparseHist(RooArgSet* whichVars = NULL)
{ return fChain->GetAsSparseHist(whichVars); }
// Get a clone of the NLL variable from the markov chain
virtual RooRealVar* GetNLLVar() const { return fChain->GetNLLVar(); }
// Get a clone of the weight variable from the markov chain
virtual RooRealVar* GetWeightVar() const { return fChain->GetWeightVa
r(); }
// set the acceptable level or error for Keys interval determination
virtual void SetEpsilon(Double_t epsilon)
{
if (epsilon < 0)
coutE(InputArguments) << "MCMCInterval::SetEpsilon will not all
ow "
<< "negative epsilon value" << endl;
else
fEpsilon = epsilon;
}
private:
inline Bool_t AcceptableConfLevel(Double_t confLevel);
protected: protected:
// data members // data members
RooArgSet* fParameters; // parameters of interest for this interval const RooArgSet * fParameters; // parameters of interest for this int
RooDataSet* fData; // the markov chain erval
TH1* fHist; // histogram generated from data to determine binning MarkovChain* fChain; // the markov chain
RooDataHist* fDataHist; // the binned Markov Chain data
RooNDKeysPdf* fKeysPdf; // the kernel estimation pdf
RooProduct* fProduct; // the (keysPdf * heavyside) product
Heavyside* fHeavyside; // the Heavyside function
RooDataHist* fKeysDataHist; // data hist representing product
TH1* fHist; // the binned Markov Chain data
THnSparse* fSparseHist; // the binned Markov Chain data
Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL) Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 fo r 95% CL)
Double_t fCutoff; // cutoff bin size to be in interval Double_t fHistConfLevel; // the actual conf level determined by hist
Bool_t fIsStrict; // whether the specified confidence level is a floo Double_t fKeysConfLevel; // the actual conf level determined by keys
r Double_t fHistCutoff; // cutoff bin size to be in interval
// for the actual confidence level (strict), or a Double_t fKeysCutoff; // cutoff keys pdf value to be in interval
// ceiling (not strict) Double_t fFull; // Value of intergral of fProduct
RooRealVar* fCutoffVar; // cutoff variable to use for integrating key
s pdf
Bool_t fUseKeys; // whether to use kernel estimation
Bool_t fUseSparseHist; // whether to use sparse hist (vs. RooDataHist
)
Bool_t fIsHistStrict; // whether the specified confidence level is a
floor
// for the actual confidence level (strict), or
a
// ceiling (not strict) for determination by hi
stogram
Int_t fDimension; // number of variables Int_t fDimension; // number of variables
Int_t fNumBurnInSteps; // number of steps to discard as burn in, star ting from the first Int_t fNumBurnInSteps; // number of steps to discard as burn in, star ting from the first
Int_t* fNumBins; // number of bins for each dimension
Double_t fIntervalSum; // sum of heights of bins in the interval Double_t fIntervalSum; // sum of heights of bins in the interval
RooRealVar** fAxes; // array of pointers to RooRealVars representing RooRealVar** fAxes; // array of pointers to RooRealVars representing
// the axes of the histogram // the axes of the histogram
// fAxes[0] represents x-axis, [1] y, [2] z // fAxes[0] represents x-axis, [1] y, [2] z, etc
Int_t fPreferredNumBins; // number of bins client wants Double_t fEpsilon; // acceptable error for Keys interval determinatio
n
// functions // functions
virtual void DetermineInterval(); virtual void DetermineInterval();
virtual void CreateHistogram(); virtual void DetermineByHist();
virtual void DetermineBySparseHist();
virtual void DetermineByDataHist();
virtual void DetermineByKeys();
virtual void CreateHist();
virtual void CreateSparseHist();
virtual void CreateDataHist();
virtual void CreateKeysPdf();
virtual void CreateKeysDataHist();
inline virtual Double_t CalcConfLevel(Double_t cutoff, Double_t full)
;
ClassDef(MCMCInterval,1) // Concrete implementation of a ConfInterva l based on MCMC calculation ClassDef(MCMCInterval,1) // Concrete implementation of a ConfInterva l based on MCMC calculation
}; };
} }
#endif #endif
 End of changes. 27 change blocks. 
39 lines changed or deleted 208 lines changed or added


 MatrixRepresentationsStatic.h   MatrixRepresentationsStatic.h 
// @(#)root/smatrix:$Id: MatrixRepresentationsStatic.h 21553 2007-12-21 10: 55:46Z moneta $ // @(#)root/smatrix:$Id: MatrixRepresentationsStatic.h 30459 2009-09-25 15: 38:26Z moneta $
// Author: L. Moneta, J. Palacios 2006 // Author: L. Moneta, J. Palacios 2006
#ifndef ROOT_Math_MatrixRepresentationsStatic #ifndef ROOT_Math_MatrixRepresentationsStatic
#define ROOT_Math_MatrixRepresentationsStatic 1 #define ROOT_Math_MatrixRepresentationsStatic 1
// Include files // Include files
/** /**
@defgroup MatRep SMatrix Storage Representation @defgroup MatRep SMatrix Storage Representation
@ingroup SMatrixGroup @ingroup SMatrixGroup
skipping to change at line 108 skipping to change at line 108
enum { enum {
/// return no. of matrix rows /// return no. of matrix rows
kRows = D1, kRows = D1,
/// return no. of matrix columns /// return no. of matrix columns
kCols = D2, kCols = D2,
/// return no of elements: rows*columns /// return no of elements: rows*columns
kSize = D1*D2 kSize = D1*D2
}; };
private: private:
T fArray[kSize]; //T __attribute__ ((aligned (16))) fArray[kSize];
T fArray[kSize];
}; };
// template<unigned int D> // template<unigned int D>
// struct Creator { // struct Creator {
// static const RowOffsets<D> & Offsets() { // static const RowOffsets<D> & Offsets() {
// static RowOffsets<D> off; // static RowOffsets<D> off;
// return off; // return off;
// } // }
/** /**
Static structure to keep the conversion from (i,j) to offsets in the storage data for a Static structure to keep the conversion from (i,j) to offsets in the storage data for a
symmetric matrix symmetric matrix
*/ */
template<unsigned int D> template<unsigned int D>
struct RowOffsets { struct RowOffsets {
RowOffsets() { inline RowOffsets() {
int v[D]; int v[D];
v[0]=0; v[0]=0;
for (unsigned int i=1; i<D; ++i) for (unsigned int i=1; i<D; ++i)
v[i]=v[i-1]+i; v[i]=v[i-1]+i;
for (unsigned int i=0; i<D; ++i) { for (unsigned int i=0; i<D; ++i) {
for (unsigned int j=0; j<=i; ++j) for (unsigned int j=0; j<=i; ++j)
fOff[i*D+j] = v[i]+j; fOff[i*D+j] = v[i]+j;
for (unsigned int j=i+1; j<D; ++j) for (unsigned int j=i+1; j<D; ++j)
fOff[i*D+j] = v[j]+i ; fOff[i*D+j] = v[j]+i ;
} }
} }
int operator()(unsigned int i, unsigned int j) const { return fOff[i* inline int operator()(unsigned int i, unsigned int j) const { return
D+j]; } fOff[i*D+j]; }
int apply(unsigned int i) const { return fOff[i]; } inline int apply(unsigned int i) const { return fOff[i]; }
int fOff[D*D]; int fOff[D*D];
}; };
// Make the lookup tables available at compile time:
// Add them to a namespace?
static const int fOff1x1[] = {0};
static const int fOff2x2[] = {0, 1, 1, 2};
static const int fOff3x3[] = {0, 1, 3, 1, 2, 4, 3, 4, 5};
static const int fOff4x4[] = {0, 1, 3, 6, 1, 2, 4, 7, 3, 4, 5, 8, 6, 7, 8,
9};
static const int fOff5x5[] = {0, 1, 3, 6, 10, 1, 2, 4, 7, 11, 3, 4, 5, 8, 1
2, 6, 7, 8, 9, 13, 10, 11, 12, 13, 14};
static const int fOff6x6[] = {0, 1, 3, 6, 10, 15, 1, 2, 4, 7, 11, 16, 3, 4,
5, 8, 12, 17, 6, 7, 8, 9, 13, 18, 10, 11, 12, 13, 14, 19, 15, 16, 17, 18,
19, 20};
static const int fOff7x7[] = {0, 1, 3, 6, 10, 15, 21, 1, 2, 4, 7, 11, 16, 2
2, 3, 4, 5, 8, 12, 17, 23, 6, 7, 8, 9, 13, 18, 24, 10, 11, 12, 13, 14, 19,
25, 15, 16, 17, 18, 19, 20, 26, 21, 22, 23, 24, 25, 26, 27};
static const int fOff8x8[] = {0, 1, 3, 6, 10, 15, 21, 28, 1, 2, 4, 7, 11, 1
6, 22, 29, 3, 4, 5, 8, 12, 17, 23, 30, 6, 7, 8, 9, 13, 18, 24, 31, 10, 11,
12, 13, 14, 19, 25, 32, 15, 16, 17, 18, 19, 20, 26, 33, 21, 22, 23, 24, 25,
26, 27, 34, 28, 29, 30, 31, 32, 33, 34, 35};
static const int fOff9x9[] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 1, 2, 4, 7, 1
1, 16, 22, 29, 37, 3, 4, 5, 8, 12, 17, 23, 30, 38, 6, 7, 8, 9, 13, 18, 24,
31, 39, 10, 11, 12, 13, 14, 19, 25, 32, 40, 15, 16, 17, 18, 19, 20, 26, 33,
41, 21, 22, 23, 24, 25, 26, 27, 34, 42, 28, 29, 30, 31, 32, 33, 34, 35, 43
, 36, 37, 38, 39, 40, 41, 42, 43, 44};
static const int fOff10x10[] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 1, 2, 4
, 7, 11, 16, 22, 29, 37, 46, 3, 4, 5, 8, 12, 17, 23, 30, 38, 47, 6, 7, 8, 9
, 13, 18, 24, 31, 39, 48, 10, 11, 12, 13, 14, 19, 25, 32, 40, 49, 15, 16, 1
7, 18, 19, 20, 26, 33, 41, 50, 21, 22, 23, 24, 25, 26, 27, 34, 42, 51, 28,
29, 30, 31, 32, 33, 34, 35, 43, 52, 36, 37, 38, 39, 40, 41, 42, 43, 44, 53,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54};
template<>
struct RowOffsets<1> {
RowOffsets() {}
int operator()(unsigned int , unsigned int ) const { return 0; } /
/ Just one element
int apply(unsigned int ) const { return 0; }
};
template<>
struct RowOffsets<2> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return i+j;
/*fOff2x2[i*2+j];*/ }
int apply(unsigned int i) const { return fOff2x2[i]; }
};
template<>
struct RowOffsets<3> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
3x3[i*3+j]; }
int apply(unsigned int i) const { return fOff3x3[i]; }
};
template<>
struct RowOffsets<4> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
4x4[i*4+j]; }
int apply(unsigned int i) const { return fOff4x4[i]; }
};
template<>
struct RowOffsets<5> {
inline RowOffsets() {}
inline int operator()(unsigned int i, unsigned int j) const { retu
rn fOff5x5[i*5+j]; }
// int operator()(unsigned int i, unsigned int j) const {
// if(j <= i) return (i * (i + 1)) / 2 + j;
// else return (j * (j + 1)) / 2 + i;
// }
inline int apply(unsigned int i) const { return fOff5x5[i]; }
};
template<>
struct RowOffsets<6> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
6x6[i*6+j]; }
int apply(unsigned int i) const { return fOff6x6[i]; }
};
template<>
struct RowOffsets<7> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
7x7[i*7+j]; }
int apply(unsigned int i) const { return fOff7x7[i]; }
};
template<>
struct RowOffsets<8> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
8x8[i*8+j]; }
int apply(unsigned int i) const { return fOff8x8[i]; }
};
template<>
struct RowOffsets<9> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
9x9[i*9+j]; }
int apply(unsigned int i) const { return fOff9x9[i]; }
};
template<>
struct RowOffsets<10> {
RowOffsets() {}
int operator()(unsigned int i, unsigned int j) const { return fOff
10x10[i*10+j]; }
int apply(unsigned int i) const { return fOff10x10[i]; }
};
//_________________________________________________________________________ ________ //_________________________________________________________________________ ________
/** /**
MatRepSym MatRepSym
Matrix storage representation for a symmetric matrix of dimension NxN Matrix storage representation for a symmetric matrix of dimension NxN
This class is a template on the contained type and on the symmetric m atrix size, N. This class is a template on the contained type and on the symmetric m atrix size, N.
It has as data member an array of type T of size N*(N+1)/2, It has as data member an array of type T of size N*(N+1)/2,
containing the lower diagonal block of the matrix. containing the lower diagonal block of the matrix.
The order follows the lower diagonal block, still in a row-major conv ention. The order follows the lower diagonal block, still in a row-major conv ention.
For example for a symmetric 3x3 matrix the order of the 6 elements For example for a symmetric 3x3 matrix the order of the 6 elements
\f$ \left[a_0,a_1.....a_5 \right]\f$ is: \f$ \left[a_0,a_1.....a_5 \right]\f$ is:
skipping to change at line 179 skipping to change at line 271
inline const T& operator()(unsigned int i, unsigned int j) const { inline const T& operator()(unsigned int i, unsigned int j) const {
return fArray[Offsets()(i,j)]; return fArray[Offsets()(i,j)];
} }
inline T& operator()(unsigned int i, unsigned int j) { inline T& operator()(unsigned int i, unsigned int j) {
return fArray[Offsets()(i,j)]; return fArray[Offsets()(i,j)];
} }
inline T& operator[](unsigned int i) { inline T& operator[](unsigned int i) {
return fArray[Offsets().apply(i) ]; return fArray[Offsets().apply(i) ];
//return fArray[Offsets()(i/D, i%D)];
} }
inline const T& operator[](unsigned int i) const { inline const T& operator[](unsigned int i) const {
return fArray[Offsets().apply(i) ]; return fArray[Offsets().apply(i) ];
//return fArray[Offsets()(i/D, i%D)];
} }
inline T apply(unsigned int i) const { inline T apply(unsigned int i) const {
return fArray[Offsets().apply(i) ]; return fArray[Offsets().apply(i) ];
//return operator()(i/D, i%D); //return operator()(i/D, i%D);
} }
inline T* Array() { return fArray; } inline T* Array() { return fArray; }
inline const T* Array() const { return fArray; } inline const T* Array() const { return fArray; }
skipping to change at line 254 skipping to change at line 348
enum { enum {
/// return no. of matrix rows /// return no. of matrix rows
kRows = D, kRows = D,
/// return no. of matrix columns /// return no. of matrix columns
kCols = D, kCols = D,
/// return no of elements: rows*columns /// return no of elements: rows*columns
kSize = D*(D+1)/2 kSize = D*(D+1)/2
}; };
void CreateOffsets() { void CreateOffsets() {
static RowOffsets<D> off; const static RowOffsets<D> off;
fOff = &off; fOff = &off;
} }
inline const RowOffsets<D> & Offsets() const { inline const RowOffsets<D> & Offsets() const {
return *fOff; return *fOff;
} }
private: private:
//T __attribute__ ((aligned (16))) fArray[kSize];
T fArray[kSize]; T fArray[kSize];
RowOffsets<D> * fOff; //! transient const RowOffsets<D> * fOff; //! transient
}; };
} // namespace Math } // namespace Math
} // namespace ROOT } // namespace ROOT
#endif // MATH_MATRIXREPRESENTATIONSSTATIC_H #endif // MATH_MATRIXREPRESENTATIONSSTATIC_H
 End of changes. 10 change blocks. 
8 lines changed or deleted 131 lines changed or added


 Member.h   Member.h 
// @(#)root/reflex:$Id: Member.h 27746 2009-03-10 11:52:01Z axel $ // @(#)root/reflex:$Id: Member.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_Member #ifndef Reflex_Member
#define Reflex_Member #define Reflex_Member
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class MemberBase;
class Type;
class Scope;
class PropertyList;
class Object;
class MemberTemplate;
class DictionaryGenerator;
/**
* @class Member Member.h Reflex/Member.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API Member {
friend class OwnedMember;
public:
/** default constructor */
Member(const MemberBase * memberBase = 0);
// forward declarations /** copy constructor */
class MemberBase; Member(const Member &rh);
class Type;
class Scope; /** destructor */
class PropertyList; ~Member();
class Object;
class MemberTemplate; /**
class DictionaryGenerator; * lesser than operator
*/
/** bool operator <(const Member& rh) const;
* @class Member Member.h Reflex/Member.h
* @author Stefan Roiser /**
* @date 24/11/2003 * equal operator
* @ingroup Ref */
*/ bool operator ==(const Member& rh) const;
class RFLX_API Member {
/**
friend class OwnedMember; * not equal operator
*/
public: bool operator !=(const Member& rh) const;
/** default constructor */ /**
Member( const MemberBase * memberBase = 0 ); * assignment operator
*/
/** copy constructor */ Member& operator =(const Member& rh);
Member( const Member & rh );
/**
/** destructor */ * operator bool will return true if the member is valid
~Member(); * @return true if member is implemented
*/
/** operator bool() const;
* lesser than operator
*/
bool operator < ( const Member & rh ) const;
/**
* equal operator
*/
bool operator == ( const Member & rh ) const;
/**
* not equal operator
*/
bool operator != ( const Member & rh ) const;
/**
* assignment operator
*/
Member & operator = ( const Member & rh );
/**
* operator bool will return true if the member is valid
* @return true if member is implemented
*/
operator bool () const;
#ifdef REFLEX_CINT_MERGE #ifdef REFLEX_CINT_MERGE
// To prevent any un-authorized use as the old type // To prevent any un-authorized use as the old type
bool operator!() const { return !operator bool(); } bool
bool operator&&(bool right) const { return operator bool() && right; operator !() const { return !operator bool(); }
}
bool operator&&(int right) const { return operator bool() && right; } bool
bool operator&&(long right) const { return operator bool() && right; operator &&(bool right) const { return operator bool() && right; }
}
bool operator&&(const Scope &right) const; bool
bool operator&&(const Type &right) const; operator &&(int right) const { return operator bool() && right; }
bool operator&&(const Member &right) const;
bool operator||(bool right) const { return operator bool() || right; bool
} operator &&(long right) const { return operator bool() && right; }
bool operator||(int right) const { return operator bool() || right; }
bool operator||(long right) const { return operator bool() || right; bool operator &&(const Scope& right) const;
} bool operator &&(const Type& right) const;
bool operator||(const Scope &right) const; bool operator &&(const Member& right) const;
bool operator||(const Type &right) const; bool
bool operator||(const Member &right) const; operator ||(bool right) const { return operator bool() || right; }
private:
operator int () const; bool
public: operator ||(int right) const { return operator bool() || right; }
bool
operator ||(long right) const { return operator bool() || right; }
bool operator ||(const Scope& right) const;
bool operator ||(const Type& right) const;
bool operator ||(const Member& right) const;
private:
operator int() const;
public:
#endif #endif
/** /**
* DeclaringScope will return the scope which the member lives in * DeclaringScope will return the scope which the member lives in
* @return the declaring scope of the member * @return the declaring scope of the member
*/ */
Scope DeclaringScope() const; Scope DeclaringScope() const;
/** /**
* DeclaringType will return the type which the member lives in * DeclaringType will return the type which the member lives in
* (i.e. the same as the Scope) * (i.e. the same as the Scope)
* @return the declaring type of the member * @return the declaring type of the member
*/ */
Type DeclaringType() const; Type DeclaringType() const;
/** /**
* GenerateDict will produce the dictionary information of this type * GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance * @param generator a reference to the dictionary generator instance
*/ */
void GenerateDict(DictionaryGenerator &generator) const; void GenerateDict(DictionaryGenerator& generator) const;
/** /**
* Get a static data member value * Get a static data member value
* @return member value as object * @return member value as object
*/ */
Object Get() const; Object Get() const;
/** /**
* Get the data member value * Get the data member value
* @return member value as object * @return member value as object
*/ */
Object Get( const Object & obj) const; Object Get(const Object& obj) const;
/** /**
* Id returns a unique identifier of the member in the system * Id returns a unique identifier of the member in the system
* @return unique identifier * @return unique identifier
*/ */
void * Id() const; void* Id() const;
/** /**
* Invoke a member function * Invoke a member function
* @param obj the object which owns the member function * @param obj the object which owns the member function
* @param paramList a vector of addresses to paramter values * @param paramList a vector of addresses to paramter values
* @return the return value of the function as object * @return the return value of the function as object
*/ */
void Invoke(const Object & obj, Object* ret, void Invoke(const Object& obj,
const std::vector<void *>& paramList = std::vector<void*> Object* ret,
()) const; const std::vector<void*>& paramList = std::vector<void*>())
const;
/**
* Invoke a member function /**
* @param obj the object which owns the member function * Invoke a member function
* @param paramList a vector of addresses to paramter values * @param obj the object which owns the member function
* @return the return value of the function as object * @param paramList a vector of addresses to paramter values
*/ * @return the return value of the function as object
template <typename T> */
void Invoke(const Object & obj, T& ret, template <typename T>
const std::vector<void *>& paramList = std::vector<void*> void Invoke(const Object& obj,
()) const; T& ret,
const std::vector<void*>& paramList = std::vector<void*>())
/** const;
* Invoke a static function
* @param paramList a vector of addresses to parameter values /**
* @return the return value of the function as object * Invoke a static function
*/ * @param paramList a vector of addresses to parameter values
void Invoke(Object* ret, const std::vector<void *>& paramList = std:: * @return the return value of the function as object
vector<void*>()) const; */
void Invoke(Object* ret,
/** const std::vector<void*>& paramList = std::vector<void*>())
* Invoke a static function const;
* @param paramList a vector of addresses to parameter values
* @return the return value of the function as object /**
*/ * Invoke a static function
template <typename T> * @param paramList a vector of addresses to parameter values
void Invoke(T& ret, const std::vector<void *>& paramList = std::vecto * @return the return value of the function as object
r<void*>()) const; */
template <typename T>
/** void Invoke(T& ret,
* IsAbstract checks whether abstract is set for the data member, const std::vector<void*>& paramList = std::vector<void*>())
* or a function member is pure virtual const;
* @return true if abstract modifier is set for this member
*/ /**
bool IsAbstract() const; * IsAbstract checks whether abstract is set for the data member,
* or a function member is pure virtual
/** * @return true if abstract modifier is set for this member
* IsArtificial checks whether artificial is set for the data member */
* @return true if artificial modifier is set for this member bool IsAbstract() const;
*/
bool IsArtificial() const; /**
* IsArtificial checks whether artificial is set for the data member
/** * @return true if artificial modifier is set for this member
* IsAuto checks whether auto is set for the data member */
* @return true if auto modifier is set for this member bool IsArtificial() const;
*/
bool IsAuto() const; /**
* IsAuto checks whether auto is set for the data member
/** * @return true if auto modifier is set for this member
* IsConstructor checks whether the function member is a constructor */
* @return true if member is a constructor bool IsAuto() const;
*/
bool IsConstructor() const; /**
* IsConstructor checks whether the function member is a constructor
/** * @return true if member is a constructor
* IsConst will check whether this member is const qualified. */
* @return true if the member is const qualified bool IsConstructor() const;
*/
bool IsConst() const;
/**
* IsConverter checks whether the function member is a user defined co
nversion function
* @return true if member is a conversion operator
*/
bool IsConverter() const;
/**
*IsCopyConstructor checks whether the function member is a copy const
ructor
* @return true if member is a copy constructor
*/
bool IsCopyConstructor() const;
/**
* IsDataMember returns true if this is a data member
* @return true if this member is a data member
*/
bool IsDataMember() const;
/**
* check whether the function member is a destructor
* @return true if this member is a destructor
*/
bool IsDestructor() const;
/**
* IsExplicit checks whether explicit is set for the function member
* @return true if explicit modifier is set for this member
*/
bool IsExplicit() const;
/**
* IsExtern checks whether extern is set for the data member
* @return true if extern modifier is set for this member
*/
bool IsExtern() const;
/**
* IsFunctionMember returns true if this is a function member
* @return true if this member is a function member
*/
bool IsFunctionMember() const;
/**
* IsInline checks whether inline is set for the function member
* @return true if inline modifier is set for this member
*/
bool IsInline() const;
/**
* IsMutable check whether mutable is set for the data member
* @return true if mutable modifier is set for this member
*/
bool IsMutable() const;
/**
* IsOperator check whether the function member is an operator
* @return true if this member is an operator function
*/
bool IsOperator() const;
/**
* IsPrivate checks whether the function member is private
* @return true if access to this member is private
*/
bool IsPrivate() const;
/**
* IsProtected checks whether the function member is protected
* @return true if access to this member is protected
*/
bool IsProtected() const;
/**
* IsPublic checks whether the function member is public
* @return true if access to this member is public
*/
bool IsPublic() const;
/**
* IsPureVirtual checks whether the Member is a pure virtual
* function.
* @return true if function and abstract modifier is set
*/
bool IsPureVirtual() const;
/**
* IsRegister checks whether register is set for the data member
* @return true if register modifier is set for this member
*/
bool IsRegister() const;
/*
* IsStatic checks whether static is set for the data member
* @return true is static modifier is set for this member
*/
bool IsStatic() const;
/**
* IsTemplateInstance returns true if the member represents a
* templated member function
* @return true if member represents a templated member function
*/
bool IsTemplateInstance() const;
/**
* IsTransient checks whether the function member is transient
* @return true if transient modifier is set for this member (not a C+
+ modifier)
*/
bool IsTransient() const;
/**
* IsVirtual checks whether virtual is set for the function member
* @return true if virtual modifier is set for this member
*/
bool IsVirtual() const;
/**
* IsVolatile will check whether this member is volatile qualified.
* @return true if the member is volatile qualified
*/
bool IsVolatile() const;
/**
* MemberType return the type of the member as enum value (function or
data member)
* @return member type as enum
*/
TYPE MemberType() const;
/**
* MemberTypeAsString returns the string representation of the member
species
* @return member type as string representation
*/
std::string MemberTypeAsString() const;
/**
* Name returns the Name of the member
* @param mod modifiers can be or'ed as argument
* SCOPED - fully scoped name
* FINAL - resolve all typedefs
* QUALIFIED - cv and reference qualification
* @return name of the member
*/
std::string Name( unsigned int mod = 0 ) const;
/**
* Name_c_str returns a char* pointer to the unqualified member name
* @return c string to unqualified member name
*/
const char * Name_c_str() const;
/**
* Offset returns the offset of the data member relative to the start
of the scope
* @return offset of member as int
*/
size_t Offset() const;
void InterpreterOffset(char*);
char*& InterpreterOffset() const;
/**
* FunctionParameterSize returns the number of parameters
* @param required if true only returns the number of required paramet
ers
* @return number of parameters
*/
size_t FunctionParameterSize( bool required = false ) const;
/** FunctionParameterAt nth default value if declared*/
std::string FunctionParameterDefaultAt( size_t nth ) const;
StdString_Iterator FunctionParameterDefault_Begin() const;
StdString_Iterator FunctionParameterDefault_End() const;
Reverse_StdString_Iterator FunctionParameterDefault_RBegin() const;
Reverse_StdString_Iterator FunctionParameterDefault_REnd() const;
/**
* FunctionParametertNameAt returns the nth parameter name
* @param nth parameter name
* @return nth parameter name
*/
std::string FunctionParameterNameAt( size_t nth ) const;
StdString_Iterator FunctionParameterName_Begin() const;
StdString_Iterator FunctionParameterName_End() const;
Reverse_StdString_Iterator FunctionParameterName_RBegin() const;
Reverse_StdString_Iterator FunctionParameterName_REnd() const;
/**
* Properties will return the properties attached to this item
* @return properties of this member
*/
PropertyList Properties() const;
/*void Set( const Object & instance, /**
* IsConst will check whether this member is const qualified.
* @return true if the member is const qualified
*/
bool IsConst() const;
/**
* IsConverter checks whether the function member is a user defined conv
ersion function
* @return true if member is a conversion operator
*/
bool IsConverter() const;
/**
*IsCopyConstructor checks whether the function member is a copy constru
ctor
* @return true if member is a copy constructor
*/
bool IsCopyConstructor() const;
/**
* IsDataMember returns true if this is a data member
* @return true if this member is a data member
*/
bool IsDataMember() const;
/**
* check whether the function member is a destructor
* @return true if this member is a destructor
*/
bool IsDestructor() const;
/**
* IsExplicit checks whether explicit is set for the function member
* @return true if explicit modifier is set for this member
*/
bool IsExplicit() const;
/**
* IsExtern checks whether extern is set for the data member
* @return true if extern modifier is set for this member
*/
bool IsExtern() const;
/**
* IsFunctionMember returns true if this is a function member
* @return true if this member is a function member
*/
bool IsFunctionMember() const;
/**
* IsInline checks whether inline is set for the function member
* @return true if inline modifier is set for this member
*/
bool IsInline() const;
/**
* IsMutable check whether mutable is set for the data member
* @return true if mutable modifier is set for this member
*/
bool IsMutable() const;
/**
* IsOperator check whether the function member is an operator
* @return true if this member is an operator function
*/
bool IsOperator() const;
/**
* IsPrivate checks whether the function member is private
* @return true if access to this member is private
*/
bool IsPrivate() const;
/**
* IsProtected checks whether the function member is protected
* @return true if access to this member is protected
*/
bool IsProtected() const;
/**
* IsPublic checks whether the function member is public
* @return true if access to this member is public
*/
bool IsPublic() const;
/**
* IsPureVirtual checks whether the Member is a pure virtual
* function.
* @return true if function and abstract modifier is set
*/
bool IsPureVirtual() const;
/**
* IsRegister checks whether register is set for the data member
* @return true if register modifier is set for this member
*/
bool IsRegister() const;
/*
* IsStatic checks whether static is set for the data member
* @return true is static modifier is set for this member
*/
bool IsStatic() const;
/**
* IsTemplateInstance returns true if the member represents a
* templated member function
* @return true if member represents a templated member function
*/
bool IsTemplateInstance() const;
/**
* IsTransient checks whether the function member is transient
* @return true if transient modifier is set for this member (not a C++
modifier)
*/
bool IsTransient() const;
/**
* IsVirtual checks whether virtual is set for the function member
* @return true if virtual modifier is set for this member
*/
bool IsVirtual() const;
/**
* IsVolatile will check whether this member is volatile qualified.
* @return true if the member is volatile qualified
*/
bool IsVolatile() const;
/**
* MemberType return the type of the member as enum value (function or d
ata member)
* @return member type as enum
*/
TYPE MemberType() const;
/**
* MemberTypeAsString returns the string representation of the member sp
ecies
* @return member type as string representation
*/
std::string MemberTypeAsString() const;
/**
* Name returns the Name of the member
* @param mod modifiers can be or'ed as argument
* SCOPED - fully scoped name
* FINAL - resolve all typedefs
* QUALIFIED - cv and reference qualification
* @return name of the member
*/
std::string Name(unsigned int mod = 0) const;
/**
* Name_c_str returns a char* pointer to the unqualified member name
* @return c string to unqualified member name
*/
const char* Name_c_str() const;
/**
* Offset returns the offset of the data member relative to the start of
the scope
* @return offset of member as int
*/
size_t Offset() const;
void InterpreterOffset(char*);
char*& InterpreterOffset() const;
/**
* FunctionParameterSize returns the number of parameters
* @param required if true only returns the number of required parameter
s
* @return number of parameters
*/
size_t FunctionParameterSize(bool required = false) const;
/** FunctionParameterAt nth default value if declared*/
std::string FunctionParameterDefaultAt(size_t nth) const;
StdString_Iterator FunctionParameterDefault_Begin() const;
StdString_Iterator FunctionParameterDefault_End() const;
Reverse_StdString_Iterator FunctionParameterDefault_RBegin() const;
Reverse_StdString_Iterator FunctionParameterDefault_REnd() const;
/**
* FunctionParametertNameAt returns the nth parameter name
* @param nth parameter name
* @return nth parameter name
*/
std::string FunctionParameterNameAt(size_t nth) const;
StdString_Iterator FunctionParameterName_Begin() const;
StdString_Iterator FunctionParameterName_End() const;
Reverse_StdString_Iterator FunctionParameterName_RBegin() const;
Reverse_StdString_Iterator FunctionParameterName_REnd() const;
/**
* Properties will return the properties attached to this item
* @return properties of this member
*/
PropertyList Properties() const;
/*void Set( const Object & instance,
const Object & value ) const;*/ const Object & value ) const;*/
/**
* Set will set the value of a data member
* @param instance of the object owning the data member
* @param value the memory address of the value to set
*/
void Set( const Object & instance,
const void * value ) const;
/**
* SetScope will set the Scope of the member
* @param sc scope to set
*/
void SetScope( const Scope & sc ) const;
/**
* Stubcontext returns a pointer to the context of the member
* @return pointer to member context
*/
void * Stubcontext() const;
/**
* Stubfunction returns the pointer to the stub function
* @return function pointer to stub function
*/
StubFunction Stubfunction() const;
/**
* TemplateArgumentAt will return the nth template argument
* @param nth template argument
* @return nth template argument
*/
Type TemplateArgumentAt( size_t nth ) const;
/**
* TemplateArgumentSize will return the number of template arguments
* @return number of template arguments
*/
size_t TemplateArgumentSize() const;
Type_Iterator TemplateArgument_Begin() const;
Type_Iterator TemplateArgument_End() const;
Reverse_Type_Iterator TemplateArgument_RBegin() const;
Reverse_Type_Iterator TemplateArgument_REnd() const;
/**
* TemplateFamily returns the corresponding MemberTemplate if any
* @return corresponding MemberTemplate
*/
MemberTemplate TemplateFamily() const;
/**
* ToMemberBase returns the underlying, internal MemberBase
* @return memberbase pointer
*/
MemberBase* ToMemberBase() const;
/**
* TypeOf returns the member type
* @return member type
*/
Type TypeOf() const;
/**
* UpdateFunctionParameterNames updates the names of parameters
* @param parameters new list of ';' separated parameter names, must
not specify default values
*/
void UpdateFunctionParameterNames(const char* parameters);
private:
void Delete();
/**
* the pointer to the member implementation
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 0..1
* @label member base
*/
MemberBase * fMemberBase;
}; // class Member /**
* Set will set the value of a data member
* @param instance of the object owning the data member
* @param value the memory address of the value to set
*/
void Set(const Object& instance,
const void* value) const;
/**
* SetScope will set the Scope of the member
* @param sc scope to set
*/
void SetScope(const Scope& sc) const;
/**
* Stubcontext returns a pointer to the context of the member
* @return pointer to member context
*/
void* Stubcontext() const;
/**
* Stubfunction returns the pointer to the stub function
* @return function pointer to stub function
*/
StubFunction Stubfunction() const;
/**
* TemplateArgumentAt will return the nth template argument
* @param nth template argument
* @return nth template argument
*/
Type TemplateArgumentAt(size_t nth) const;
/**
* TemplateArgumentSize will return the number of template arguments
* @return number of template arguments
*/
size_t TemplateArgumentSize() const;
Type_Iterator TemplateArgument_Begin() const;
Type_Iterator TemplateArgument_End() const;
Reverse_Type_Iterator TemplateArgument_RBegin() const;
Reverse_Type_Iterator TemplateArgument_REnd() const;
/**
* TemplateFamily returns the corresponding MemberTemplate if any
* @return corresponding MemberTemplate
*/
MemberTemplate TemplateFamily() const;
/**
* ToMemberBase returns the underlying, internal MemberBase
* @return memberbase pointer
*/
MemberBase* ToMemberBase() const;
/**
* TypeOf returns the member type
* @return member type
*/
Type TypeOf() const;
/**
* UpdateFunctionParameterNames updates the names of parameters
* @param parameters new list of ';' separated parameter names, must no
t specify default values
*/
void UpdateFunctionParameterNames(const char* parameters);
private:
void Delete();
/**
* the pointer to the member implementation
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 0..1
* @label member base
*/
MemberBase* fMemberBase;
}; // class Member
} //namespace Reflex } //namespace Reflex
#include "Reflex/internal/MemberBase.h" #include "Reflex/internal/MemberBase.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
#include "Reflex/PropertyList.h" #include "Reflex/PropertyList.h"
#include "Reflex/Type.h" #include "Reflex/Type.h"
#include "Reflex/MemberTemplate.h" #include "Reflex/MemberTemplate.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::operator < ( const Member & rh ) const { inline bool
Reflex::Member::operator <(const Member& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( (*this) && (bool)rh ) if ((*this) && (bool) rh) {
return ( TypeOf() < rh.TypeOf() && Name() < rh.Name()); return TypeOf() < rh.TypeOf() && Name() < rh.Name();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::operator == ( const Member & rh ) const { inline bool
Reflex::Member::operator ==(const Member& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( (*this) && (bool)rh ) if ((*this) && (bool) rh) {
return ( TypeOf() == rh.TypeOf() && 0==strcmp(Name_c_str(),rh.Name_c_ return TypeOf() == rh.TypeOf() && 0 == strcmp(Name_c_str(), rh.Name_c
str()) ); _str());
}
// both invalid is equal, too // both invalid is equal, too
return (!(*this)) && (!rh); return (!(*this)) && (!rh);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::operator != ( const Member & rh ) const { inline bool
Reflex::Member::operator !=(const Member& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ! ( *this == rh ); return !(*this == rh);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member & Reflex::Member::operator = ( const Member & rh ) { inline Reflex::Member&
Reflex::Member::operator =(const Member& rh) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fMemberBase = rh.fMemberBase; fMemberBase = rh.fMemberBase;
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member::operator bool () const { inline
Reflex::Member::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != fMemberBase; return 0 != fMemberBase;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Member::DeclaringScope() const { inline Reflex::Scope
Reflex::Member::DeclaringScope() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->DeclaringScope(); if (*this) {
return fMemberBase->DeclaringScope();
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Member::DeclaringType() const { inline Reflex::Type
Reflex::Member::DeclaringType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->DeclaringScope(); if (*this) {
return fMemberBase->DeclaringScope();
}
return Dummy::Type(); return Dummy::Type();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::Member::Id() const { inline void*
Reflex::Member::Id() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return (void*)fMemberBase; return (void*) fMemberBase;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template <typename T> template <typename T>
inline void Reflex::Member::Invoke(const Object & obj, T& ret, inline void
const std::vector<void *>& paramList) co Reflex::Member::Invoke(const Object& obj,
nst { T& ret,
const std::vector<void*>& paramList) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
Object retO(Type::ByTypeInfo(typeid(T)), &ret); Object retO(Type::ByTypeInfo(typeid(T)), &ret);
Invoke(obj, &retO, paramList); Invoke(obj, &retO, paramList);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template <typename T> template <typename T>
inline void Reflex::Member::Invoke(T& ret, inline void
const std::vector<void *>& paramList) co Reflex::Member::Invoke(T& ret,
nst { const std::vector<void*>& paramList) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
Object retO(Type::ByTypeInfo(typeid(T)), &ret); Object retO(Type::ByTypeInfo(typeid(T)), &ret);
Invoke(&retO, paramList); Invoke(&retO, paramList);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsAbstract() const { inline bool
Reflex::Member::IsAbstract() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsAbstract(); if (*this) {
return fMemberBase->IsAbstract();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsArtificial() const { inline bool
Reflex::Member::IsArtificial() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsArtificial(); if (*this) {
return fMemberBase->IsArtificial();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsAuto() const { inline bool
Reflex::Member::IsAuto() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsAuto(); if (*this) {
return fMemberBase->IsAuto();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsConstructor() const { inline bool
Reflex::Member::IsConstructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsConstructor(); if (*this) {
return fMemberBase->IsConstructor();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsConst() const { inline bool
Reflex::Member::IsConst() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsConst(); if (*this) {
return fMemberBase->IsConst();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsConverter() const { inline bool
Reflex::Member::IsConverter() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsConverter(); if (*this) {
return fMemberBase->IsConverter();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsCopyConstructor() const { inline bool
Reflex::Member::IsCopyConstructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsCopyConstructor(); if (*this) {
return fMemberBase->IsCopyConstructor();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsDataMember() const { inline bool
Reflex::Member::IsDataMember() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsDataMember(); if (*this) {
return fMemberBase->IsDataMember();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsDestructor() const { inline bool
Reflex::Member::IsDestructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsDestructor(); if (*this) {
return fMemberBase->IsDestructor();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsExplicit() const { inline bool
Reflex::Member::IsExplicit() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsExplicit(); if (*this) {
return fMemberBase->IsExplicit();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsExtern() const { inline bool
Reflex::Member::IsExtern() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsExtern(); if (*this) {
return fMemberBase->IsExtern();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsFunctionMember() const { inline bool
Reflex::Member::IsFunctionMember() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsFunctionMember(); if (*this) {
return fMemberBase->IsFunctionMember();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsInline() const { inline bool
Reflex::Member::IsInline() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsInline(); if (*this) {
return fMemberBase->IsInline();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsMutable() const { inline bool
Reflex::Member::IsMutable() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsMutable(); if (*this) {
return fMemberBase->IsMutable();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsOperator() const { inline bool
Reflex::Member::IsOperator() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsOperator(); if (*this) {
return fMemberBase->IsOperator();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsPrivate() const { inline bool
Reflex::Member::IsPrivate() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsPrivate(); if (*this) {
return fMemberBase->IsPrivate();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsProtected() const { inline bool
Reflex::Member::IsProtected() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsProtected(); if (*this) {
return fMemberBase->IsProtected();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsPublic() const { inline bool
Reflex::Member::IsPublic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsPublic(); if (*this) {
return fMemberBase->IsPublic();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsPureVirtual() const { inline bool
Reflex::Member::IsPureVirtual() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return IsFunctionMember() && IsAbstract(); if (*this) {
return IsFunctionMember() && IsAbstract();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsRegister() const { inline bool
Reflex::Member::IsRegister() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsRegister(); if (*this) {
return fMemberBase->IsRegister();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsStatic() const { inline bool
Reflex::Member::IsStatic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsStatic(); if (*this) {
return fMemberBase->IsStatic();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsTemplateInstance() const { inline bool
Reflex::Member::IsTemplateInstance() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsTemplateInstance(); if (*this) {
return fMemberBase->IsTemplateInstance();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsTransient() const { inline bool
Reflex::Member::IsTransient() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsTransient(); if (*this) {
return fMemberBase->IsTransient();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsVirtual() const { inline bool
Reflex::Member::IsVirtual() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsVirtual(); if (*this) {
return fMemberBase->IsVirtual();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Member::IsVolatile() const { inline bool
Reflex::Member::IsVolatile() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->IsVolatile(); if (*this) {
return fMemberBase->IsVolatile();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TYPE Reflex::Member::MemberType() const { inline Reflex::TYPE
Reflex::Member::MemberType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->MemberType(); if (*this) {
return fMemberBase->MemberType();
}
return UNRESOLVED; return UNRESOLVED;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::Member::MemberTypeAsString() const { inline std::string
Reflex::Member::MemberTypeAsString() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->MemberTypeAsString(); if (*this) {
return fMemberBase->MemberTypeAsString();
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::Member::Name( unsigned int mod ) const { inline std::string
Reflex::Member::Name(unsigned int mod) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->Name( mod ); if (*this) {
return fMemberBase->Name(mod);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::Member::Name_c_str ( ) const { inline const char*
Reflex::Member::Name_c_str() const {
//---------------------------------------------------------------------- --------- //---------------------------------------------------------------------- ---------
if ( *this ) return fMemberBase->Name_c_str( ); if (*this) {
return fMemberBase->Name_c_str();
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Member::Offset() const { inline size_t
Reflex::Member::Offset() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->Offset(); if (*this) {
return fMemberBase->Offset();
}
return 0; return 0;
} }
inline void Reflex::Member::InterpreterOffset(char* offset) inline void
{ Reflex::Member::InterpreterOffset(char* offset) {
if (*this) { if (*this) {
fMemberBase->InterpreterOffset(offset); fMemberBase->InterpreterOffset(offset);
} }
} }
inline char*& Reflex::Member::InterpreterOffset() const inline char*&
{ Reflex::Member::InterpreterOffset() const {
return fMemberBase->InterpreterOffset(); return fMemberBase->InterpreterOffset();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Member::FunctionParameterSize( bool required ) const inline size_t
{ Reflex::Member::FunctionParameterSize(bool required) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterSize( required ); if (*this) {
return fMemberBase->FunctionParameterSize(required);
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::Member::FunctionParameterDefaultAt( size_t nth ) inline std::string
const { Reflex::Member::FunctionParameterDefaultAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterDefaultAt( nth ); if (*this) {
return fMemberBase->FunctionParameterDefaultAt(nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::Member::FunctionParameterDefault_ inline Reflex::StdString_Iterator
Begin() const { Reflex::Member::FunctionParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterDefault_Begin(); if (*this) {
return fMemberBase->FunctionParameterDefault_Begin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::Member::FunctionParameterDefault_ inline Reflex::StdString_Iterator
End() const { Reflex::Member::FunctionParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterDefault_End(); if (*this) {
return fMemberBase->FunctionParameterDefault_End();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::Member::FunctionParameter inline Reflex::Reverse_StdString_Iterator
Default_RBegin() const { Reflex::Member::FunctionParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterDefault_RBegin(); if (*this) {
return fMemberBase->FunctionParameterDefault_RBegin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::Member::FunctionParameter inline Reflex::Reverse_StdString_Iterator
Default_REnd() const { Reflex::Member::FunctionParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterDefault_REnd(); if (*this) {
return fMemberBase->FunctionParameterDefault_REnd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::Member::FunctionParameterNameAt( size_t nth ) co inline std::string
nst { Reflex::Member::FunctionParameterNameAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterNameAt( nth ); if (*this) {
return fMemberBase->FunctionParameterNameAt(nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::Member::FunctionParameterName_Beg inline Reflex::StdString_Iterator
in() const { Reflex::Member::FunctionParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterName_Begin(); if (*this) {
return fMemberBase->FunctionParameterName_Begin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::Member::FunctionParameterName_End inline Reflex::StdString_Iterator
() const { Reflex::Member::FunctionParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterName_End(); if (*this) {
return fMemberBase->FunctionParameterName_End();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::Member::FunctionParameter inline Reflex::Reverse_StdString_Iterator
Name_RBegin() const { Reflex::Member::FunctionParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterName_RBegin(); if (*this) {
return fMemberBase->FunctionParameterName_RBegin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::Member::FunctionParameter inline Reflex::Reverse_StdString_Iterator
Name_REnd() const { Reflex::Member::FunctionParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->FunctionParameterName_REnd(); if (*this) {
return fMemberBase->FunctionParameterName_REnd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList Reflex::Member::Properties() const { inline Reflex::PropertyList
Reflex::Member::Properties() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->Properties(); if (*this) {
return fMemberBase->Properties();
}
return Dummy::PropertyList(); return Dummy::PropertyList();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Member::SetScope( const Scope & sc ) const { inline void
Reflex::Member::SetScope(const Scope& sc) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) fMemberBase->SetScope( sc ); if (*this) {
fMemberBase->SetScope(sc);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::Member::Stubcontext() const { inline void*
Reflex::Member::Stubcontext() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->Stubcontext(); if (*this) {
return fMemberBase->Stubcontext();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StubFunction Reflex::Member::Stubfunction() const { inline Reflex::StubFunction
Reflex::Member::Stubfunction() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->Stubfunction(); if (*this) {
return fMemberBase->Stubfunction();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Member::TemplateArgumentAt( size_t nth ) const inline Reflex::Type
{ Reflex::Member::TemplateArgumentAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgumentAt( nth ); if (*this) {
return fMemberBase->TemplateArgumentAt(nth);
}
return Dummy::Type(); return Dummy::Type();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Member::TemplateArgumentSize() const { inline size_t
Reflex::Member::TemplateArgumentSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgumentSize(); if (*this) {
return fMemberBase->TemplateArgumentSize();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::Member::TemplateArgument_Begin() const inline Reflex::Type_Iterator
{ Reflex::Member::TemplateArgument_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgument_Begin(); if (*this) {
return fMemberBase->TemplateArgument_Begin();
}
return Dummy::TypeCont().begin(); return Dummy::TypeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::Member::TemplateArgument_End() const { inline Reflex::Type_Iterator
Reflex::Member::TemplateArgument_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgument_End(); if (*this) {
return fMemberBase->TemplateArgument_End();
}
return Dummy::TypeCont().end(); return Dummy::TypeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::Member::TemplateArgument_RBegi inline Reflex::Reverse_Type_Iterator
n() const { Reflex::Member::TemplateArgument_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgument_RBegin(); if (*this) {
return fMemberBase->TemplateArgument_RBegin();
}
return Dummy::TypeCont().rbegin(); return Dummy::TypeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::Member::TemplateArgument_REnd( inline Reflex::Reverse_Type_Iterator
) const { Reflex::Member::TemplateArgument_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateArgument_REnd(); if (*this) {
return fMemberBase->TemplateArgument_REnd();
}
return Dummy::TypeCont().rend(); return Dummy::TypeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate Reflex::Member::TemplateFamily() const { inline Reflex::MemberTemplate
Reflex::Member::TemplateFamily() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberBase->TemplateFamily(); if (*this) {
return fMemberBase->TemplateFamily();
}
return Dummy::MemberTemplate(); return Dummy::MemberTemplate();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberBase* Reflex::Member::ToMemberBase() const { inline Reflex::MemberBase*
Reflex::Member::ToMemberBase() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fMemberBase; return fMemberBase;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Member::TypeOf() const { inline Reflex::Type
Reflex::Member::TypeOf() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( *this ) return fMemberBase->TypeOf(); if (*this) {
return fMemberBase->TypeOf();
}
return Dummy::Type(); return Dummy::Type();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Member::UpdateFunctionParameterNames(const char* parame inline void
ters) { Reflex::Member::UpdateFunctionParameterNames(const char* parameters) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if (*this) return fMemberBase->UpdateFunctionParameterNames(parameters); if (*this) {
return fMemberBase->UpdateFunctionParameterNames(parameters);
}
} }
#ifdef REFLEX_CINT_MERGE #ifdef REFLEX_CINT_MERGE
inline bool operator&&(bool b, const Reflex::Member & rh) { inline bool
operator &&(bool b,
const Reflex::Member& rh) {
return b && rh.operator bool(); return b && rh.operator bool();
} }
inline bool operator&&(int i, const Reflex::Member & rh) {
inline bool
operator &&(int i,
const Reflex::Member& rh) {
return i && rh.operator bool(); return i && rh.operator bool();
} }
inline bool operator&&(short s, const Reflex::Member & rh) {
inline bool
operator &&(short s,
const Reflex::Member& rh) {
return s && rh.operator bool(); return s && rh.operator bool();
} }
inline bool operator||(short s, const Reflex::Member & rh) {
inline bool
operator ||(short s,
const Reflex::Member& rh) {
return s || rh.operator bool(); return s || rh.operator bool();
} }
inline bool operator||(bool b, const Reflex::Member & rh) {
inline bool
operator ||(bool b,
const Reflex::Member& rh) {
return b || rh.operator bool(); return b || rh.operator bool();
} }
inline bool operator||(int i, const Reflex::Member & rh) {
inline bool
operator ||(int i,
const Reflex::Member& rh) {
return i || rh.operator bool(); return i || rh.operator bool();
} }
#endif #endif
#endif // Reflex_Member #endif // Reflex_Member
 End of changes. 143 change blocks. 
622 lines changed or deleted 815 lines changed or added


 MemberBase.h   MemberBase.h 
// @(#)root/reflex:$Id: MemberBase.h 27509 2009-02-19 03:32:22Z pcanal $ // @(#)root/reflex:$Id: MemberBase.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_MemberBase #ifndef Reflex_MemberBase
#define Reflex_MemberBase #define Reflex_MemberBase
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/PropertyList.h" #include "Reflex/PropertyList.h"
#include "Reflex/Type.h" #include "Reflex/Type.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
namespace Reflex { namespace Reflex {
// forward declarations
class Object;
class DictionaryGenerator;
/**
* @class MemberBase MemberBase.h Reflex/internal/MemberBase.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API MemberBase {
public:
/** default constructor */
MemberBase(const char* name,
const Type &type,
TYPE memberType,
unsigned int modifiers);
// forward declarations /** destructor */
class Object; virtual ~MemberBase();
class DictionaryGenerator;
/**
* @class MemberBase MemberBase.h Reflex/internal/MemberBase.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API MemberBase {
public:
/** default constructor */
MemberBase( const char * name,
const Type & type,
TYPE memberType,
unsigned int modifiers );
/** destructor */
virtual ~MemberBase();
/**
* operator member will return the member object of this MemberBase
*/
operator Member () const;
/**
* DeclaringScope will return the scope which the member lives in
* @return the declaring scope of the member
*/
Scope DeclaringScope() const;
/**
* DeclaringType will return the type which the member lives in
* @return the declaring type of the member
*/
Type DeclaringType() const;
/**
* GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance
*/
virtual void GenerateDict(DictionaryGenerator & generator) const;
/** Get the member value */ /**
virtual Object Get( const Object & obj ) const; * operator member will return the member object of this MemberBase
*/
operator Member() const;
/** Invoke the member function */ /**
/*virtual Object Invoke( const Object & obj, * DeclaringScope will return the scope which the member lives in
const std::vector < Object > & paramList ) const;*/ * @return the declaring scope of the member
virtual void Invoke( const Object & obj, Object* ret, */
const std::vector < void * > & paramList = Scope DeclaringScope() const;
std::vector<void*>()) const;
/** Invoke the function (for static functions) */ /**
//virtual Object Invoke( const std::vector < Object > & paramList ) c * DeclaringType will return the type which the member lives in
onst; * @return the declaring type of the member
virtual void Invoke( Object* ret, const std::vector < void * > & para */
mList = Type DeclaringType() const;
std::vector<void*>()) const;
/** check whether abstract is set for the data member */ /**
bool IsAbstract() const; * GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance
*/
virtual void GenerateDict(DictionaryGenerator& generator) const;
/** check whether artificial is set for the data member */ /** Get the member value */
bool IsArtificial() const; virtual Object Get(const Object& obj) const;
/** check whether auto is set for the data member */ /** Invoke the member function */
bool IsAuto() const;
/** check whether the function member is a constructor */ /*virtual Object Invoke( const Object & obj,
bool IsConstructor() const; const std::vector < Object > & paramList ) const;*/
virtual void Invoke(const Object& obj,
Object* ret,
const std::vector<void*>& paramList =
std::vector<void*>()) const;
/** check whether a member is const qualified */ /** Invoke the function (for static functions) */
bool IsConst() const; //virtual Object Invoke( const std::vector < Object > & paramList ) cons
t;
virtual void Invoke(Object* ret,
const std::vector<void*>& paramList =
std::vector<void*>()) const;
/** check whether the function member is a user defined conversion fu /** check whether abstract is set for the data member */
nction */ bool IsAbstract() const;
bool IsConverter() const;
/** check whether the function member is a copy constructor */ /** check whether artificial is set for the data member */
bool IsCopyConstructor() const; bool IsArtificial() const;
/** return true if this is a data member */ /** check whether auto is set for the data member */
bool IsDataMember() const; bool IsAuto() const;
/** check whether the function member is a destructor */ /** check whether the function member is a constructor */
bool IsDestructor() const; bool IsConstructor() const;
/** check whether explicit is set for the function member */ /** check whether a member is const qualified */
bool IsExplicit() const; bool IsConst() const;
/** check whether extern is set for the data member */ /** check whether the function member is a user defined conversion funct
bool IsExtern() const; ion */
bool IsConverter() const;
/** return true if this is a function member */ /** check whether the function member is a copy constructor */
bool IsFunctionMember() const; bool IsCopyConstructor() const;
/** check whether inline is set for the function member */ /** return true if this is a data member */
bool IsInline() const; bool IsDataMember() const;
/** check whether mutable is set for the data member */ /** check whether the function member is a destructor */
bool IsMutable() const; bool IsDestructor() const;
/** check whether the function member is an operator */ /** check whether explicit is set for the function member */
bool IsOperator() const; bool IsExplicit() const;
/** check whether the function member is private */ /** check whether extern is set for the data member */
bool IsPrivate() const; bool IsExtern() const;
/** check whether the function member is protected */ /** return true if this is a function member */
bool IsProtected() const; bool IsFunctionMember() const;
/** check whether the function member is public */ /** check whether inline is set for the function member */
bool IsPublic() const; bool IsInline() const;
/** check whether register is set for the data member */ /** check whether mutable is set for the data member */
bool IsRegister() const; bool IsMutable() const;
/** check whether static is set for the data member */ /** check whether the function member is an operator */
bool IsStatic() const; bool IsOperator() const;
/** /** check whether the function member is private */
* IsTemplateInstance returns true if the type represents a bool IsPrivate() const;
* ClassTemplateInstance
* @return true if type represents a InstantiatedTemplateClass
*/
bool IsTemplateInstance() const;
/** check whether transient is set for the data member */ /** check whether the function member is protected */
bool IsTransient() const; bool IsProtected() const;
/** check whether virtual is set for the function member */ /** check whether the function member is public */
bool IsVirtual() const; bool IsPublic() const;
/** check whether a member is volatile qualified */ /** check whether register is set for the data member */
bool IsVolatile() const; bool IsRegister() const;
/** return the type of the member (function or data member) */ /** check whether static is set for the data member */
TYPE MemberType() const; bool IsStatic() const;
/** returns the string representation of the member species */ /**
std::string MemberTypeAsString() const; * IsTemplateInstance returns true if the type represents a
* ClassTemplateInstance
* @return true if type represents a InstantiatedTemplateClass
*/
bool IsTemplateInstance() const;
/** return the name of the member */ /** check whether transient is set for the data member */
virtual std::string Name( unsigned int mod = 0 ) const; bool IsTransient() const;
/** /** check whether virtual is set for the function member */
* Name_c_str returns a char* pointer to the unqualified Name bool IsVirtual() const;
* @ return c string to unqualified Name
*/
const char * Name_c_str() const;
/** return the offset of the member */ /** check whether a member is volatile qualified */
virtual size_t Offset() const; bool IsVolatile() const;
virtual void InterpreterOffset(char*);
virtual char*& InterpreterOffset() const;
/** number of parameters */ /** return the type of the member (function or data member) */
virtual size_t FunctionParameterSize( bool required = false ) const; TYPE MemberType() const;
/** FunctionParameterDefaultAt returns the nth default value if decla /** returns the string representation of the member species */
red*/ std::string MemberTypeAsString() const;
virtual std::string FunctionParameterDefaultAt( size_t nth ) const;
virtual StdString_Iterator FunctionParameterDefault_Begin() const; /** return the name of the member */
virtual StdString_Iterator FunctionParameterDefault_End() const; virtual std::string Name(unsigned int mod = 0) const;
virtual Reverse_StdString_Iterator FunctionParameterDefault_RBegin()
const;
virtual Reverse_StdString_Iterator FunctionParameterDefault_REnd() co
nst;
/** FunctionParameterNameAt returns the nth name if declared*/ /**
virtual std::string FunctionParameterNameAt( size_t nth ) const; * Name_c_str returns a char* pointer to the unqualified Name
* @ return c string to unqualified Name
*/
const char* Name_c_str() const;
/** return the offset of the member */
virtual size_t Offset() const;
virtual void InterpreterOffset(char*);
virtual char*& InterpreterOffset() const;
/** number of parameters */
virtual size_t FunctionParameterSize(bool required = false) const;
/** FunctionParameterDefaultAt returns the nth default value if declared
*/
virtual std::string FunctionParameterDefaultAt(size_t nth) const;
virtual StdString_Iterator FunctionParameterDefault_Begin() const;
virtual StdString_Iterator FunctionParameterDefault_End() const;
virtual Reverse_StdString_Iterator FunctionParameterDefault_RBegin() con
st;
virtual Reverse_StdString_Iterator FunctionParameterDefault_REnd() const
;
/** FunctionParameterNameAt returns the nth name if declared*/
virtual std::string FunctionParameterNameAt(size_t nth) const;
virtual StdString_Iterator FunctionParameterName_Begin() const;
virtual StdString_Iterator FunctionParameterName_End() const;
virtual Reverse_StdString_Iterator FunctionParameterName_RBegin() const;
virtual Reverse_StdString_Iterator FunctionParameterName_REnd() const;
virtual StdString_Iterator FunctionParameterName_Begin() const; /**
virtual StdString_Iterator FunctionParameterName_End() const; * Properties will return a pointer to the property list attached
virtual Reverse_StdString_Iterator FunctionParameterName_RBegin() con * to this item
st; * @return pointer to property list
virtual Reverse_StdString_Iterator FunctionParameterName_REnd() const */
; PropertyList Properties() const;
/** /** Set the member value */
* Properties will return a pointer to the property list attached
* to this item
* @return pointer to property list
*/
PropertyList Properties() const;
/** Set the member value */ /*virtual void Set( const Object & instance,
/*virtual void Set( const Object & instance,
const Object & value ) const;*/ const Object & value ) const;*/
virtual void Set( const Object & instance, virtual void Set(const Object& instance,
const void * value ) const; const void* value) const;
/** Set the type of the member */ /** Set the type of the member */
void SetScope( const Scope & scope ) const; void SetScope(const Scope& scope) const;
/** return the context of the member */ /** return the context of the member */
virtual void * Stubcontext() const; virtual void* Stubcontext() const;
/** return the pointer to the stub function */ /** return the pointer to the stub function */
virtual StubFunction Stubfunction() const; virtual StubFunction Stubfunction() const;
/**
* TemplateArgumentAt will return a pointer to the nth template argume
nt
* @param nth nth template argument
* @return pointer to nth template argument
*/
virtual Type TemplateArgumentAt( size_t nth ) const;
/**
* TemplateArgumentSize will return the number of template arguments
* @return number of template arguments
*/
virtual size_t TemplateArgumentSize() const;
virtual Type_Iterator TemplateArgument_Begin() const;
virtual Type_Iterator TemplateArgument_End() const;
virtual Reverse_Type_Iterator TemplateArgument_RBegin() const;
virtual Reverse_Type_Iterator TemplateArgument_REnd() const;
/**
* TemplateFamily returns the corresponding MemberTemplate if any
* @return corresponding MemberTemplate
*/
virtual MemberTemplate TemplateFamily() const;
/** return pointer to member type */
Type TypeOf() const;
/**
* UpdateFunctionParameterNames updates the names of parameters
* @param parameters new list of ';' separated parameter names, must
not specify default values
*/
virtual void UpdateFunctionParameterNames(const char* parameters);
protected:
/**
* CalculateBaseObject will calculate the inheritance between an objec
t
* and the local type if necessary
* @param obj the object from which the calculation should start
* @return memory address of new local object relative to obj
*/
void * CalculateBaseObject( const Object & obj ) const;
protected:
/**
* characteristics of the Member
* @label Member
* @supplierCardinality 1
* @link aggregation
* @clientCardinality 1
*/
Type fType;
/** all modifiers of the member */
unsigned int fModifiers;
private:
/** name of member */
std::string fName;
/**
* scope of the member
* @label member scope
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
mutable
Scope fScope;
/**
* the kind of member ( data/function-member)
* @label member type
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
TYPE fMemberType;
/**
* property list
* @label propertylist
* @link aggregationByValue
* @clientCardinality 1
* @supplierCardinality 0..1
*/
OwnedPropertyList fPropertyList;
/**
* pointer back to the member object
* @label this member
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
Member * fThisMember;
}; // class Member /**
* TemplateArgumentAt will return a pointer to the nth template argument
* @param nth nth template argument
* @return pointer to nth template argument
*/
virtual Type TemplateArgumentAt(size_t nth) const;
/**
* TemplateArgumentSize will return the number of template arguments
* @return number of template arguments
*/
virtual size_t TemplateArgumentSize() const;
virtual Type_Iterator TemplateArgument_Begin() const;
virtual Type_Iterator TemplateArgument_End() const;
virtual Reverse_Type_Iterator TemplateArgument_RBegin() const;
virtual Reverse_Type_Iterator TemplateArgument_REnd() const;
/**
* TemplateFamily returns the corresponding MemberTemplate if any
* @return corresponding MemberTemplate
*/
virtual MemberTemplate TemplateFamily() const;
/** return pointer to member type */
Type TypeOf() const;
/**
* UpdateFunctionParameterNames updates the names of parameters
* @param parameters new list of ';' separated parameter names, must no
t specify default values
*/
virtual void UpdateFunctionParameterNames(const char* parameters);
protected:
/**
* CalculateBaseObject will calculate the inheritance between an object
* and the local type if necessary
* @param obj the object from which the calculation should start
* @return memory address of new local object relative to obj
*/
void* CalculateBaseObject(const Object& obj) const;
protected:
/**
* characteristics of the Member
* @label Member
* @supplierCardinality 1
* @link aggregation
* @clientCardinality 1
*/
Type fType;
/** all modifiers of the member */
unsigned int fModifiers;
private:
/** name of member */
std::string fName;
/**
* scope of the member
* @label member scope
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
mutable
Scope fScope;
/**
* the kind of member ( data/function-member)
* @label member type
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
TYPE fMemberType;
/**
* property list
* @label propertylist
* @link aggregationByValue
* @clientCardinality 1
* @supplierCardinality 0..1
*/
OwnedPropertyList fPropertyList;
/**
* pointer back to the member object
* @label this member
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
Member* fThisMember;
}; // class Member
} //namespace Reflex } //namespace Reflex
#include "Reflex/Object.h" #include "Reflex/Object.h"
#include "Reflex/MemberTemplate.h" #include "Reflex/MemberTemplate.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object Reflex::MemberBase::Get( const Object & /* obj */ ) c inline Reflex::Object
onst { Reflex::MemberBase::Get(const Object& /* obj */) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Object(); return Object();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//inline Reflex::Object //inline Reflex::Object
//Reflex::MemberBase::Invoke( const Object & /* obj */ , //Reflex::MemberBase::Invoke( const Object & /* obj */ ,
// const std::vector < Object > & /* param List */ ) const { // const std::vector < Object > & /* param List */ ) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// return Object(); // return Object();
//} //}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void inline void
Reflex::MemberBase::Invoke( const Object & /* obj */ , Object* /*ret*/, Reflex::MemberBase::Invoke(const Object& /* obj */,
const std::vector < void * > & /* paramList */ Object* /*ret*/,
) const { const std::vector<void*>& /* paramList */) const
{
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//inline Reflex::Object //inline Reflex::Object
//Reflex::MemberBase::Invoke( const std::vector < Object > & /* paramList * / ) const { //Reflex::MemberBase::Invoke( const std::vector < Object > & /* paramList * / ) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// return Object(); // return Object();
//} //}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void inline void
Reflex::MemberBase::Invoke( Object* /*ret*/, const std::vector < void * > & Reflex::MemberBase::Invoke(Object* /*ret*/,
/* paramList */ ) const { const std::vector<void*>& /* paramList */) const
{
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsAbstract() const { inline bool
Reflex::MemberBase::IsAbstract() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & ABSTRACT); return 0 != (fModifiers & ABSTRACT);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsArtificial() const { inline bool
Reflex::MemberBase::IsArtificial() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & ARTIFICIAL); return 0 != (fModifiers & ARTIFICIAL);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsAuto() const { inline bool
Reflex::MemberBase::IsAuto() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & AUTO); return 0 != (fModifiers & AUTO);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsConstructor() const { inline bool
Reflex::MemberBase::IsConstructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & CONSTRUCTOR); return 0 != (fModifiers & CONSTRUCTOR);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsConst() const { inline bool
Reflex::MemberBase::IsConst() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & CONST); return 0 != (fModifiers & CONST);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsConverter() const { inline bool
Reflex::MemberBase::IsConverter() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & CONVERTER); return 0 != (fModifiers & CONVERTER);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsCopyConstructor() const { inline bool
Reflex::MemberBase::IsCopyConstructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & COPYCONSTRUCTOR); return 0 != (fModifiers & COPYCONSTRUCTOR);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsDataMember() const { inline bool
Reflex::MemberBase::IsDataMember() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fMemberType == DATAMEMBER ); return fMemberType == DATAMEMBER;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsDestructor() const { inline bool
Reflex::MemberBase::IsDestructor() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & DESTRUCTOR); return 0 != (fModifiers & DESTRUCTOR);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsExplicit() const { inline bool
Reflex::MemberBase::IsExplicit() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & EXPLICIT); return 0 != (fModifiers & EXPLICIT);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsExtern() const { inline bool
Reflex::MemberBase::IsExtern() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & EXTERN); return 0 != (fModifiers & EXTERN);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsFunctionMember() const { inline bool
Reflex::MemberBase::IsFunctionMember() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fMemberType == FUNCTIONMEMBER ); return fMemberType == FUNCTIONMEMBER;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsInline() const { inline bool
Reflex::MemberBase::IsInline() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & INLINE); return 0 != (fModifiers & INLINE);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsMutable() const { inline bool
Reflex::MemberBase::IsMutable() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & MUTABLE); return 0 != (fModifiers & MUTABLE);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsOperator() const { inline bool
Reflex::MemberBase::IsOperator() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & OPERATOR); return 0 != (fModifiers & OPERATOR);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsPrivate() const { inline bool
Reflex::MemberBase::IsPrivate() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PRIVATE); return 0 != (fModifiers & PRIVATE);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsProtected() const { inline bool
Reflex::MemberBase::IsProtected() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PROTECTED); return 0 != (fModifiers & PROTECTED);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsPublic() const { inline bool
Reflex::MemberBase::IsPublic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & PUBLIC); return 0 != (fModifiers & PUBLIC);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsRegister() const { inline bool
Reflex::MemberBase::IsRegister() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & REGISTER); return 0 != (fModifiers & REGISTER);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsStatic() const { inline bool
Reflex::MemberBase::IsStatic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & STATIC); return 0 != (fModifiers & STATIC);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsTemplateInstance() const { inline bool
Reflex::MemberBase::IsTemplateInstance() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fMemberType == MEMBERTEMPLATEINSTANCE ); return fMemberType == MEMBERTEMPLATEINSTANCE;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsTransient() const { inline bool
Reflex::MemberBase::IsTransient() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & TRANSIENT); return 0 != (fModifiers & TRANSIENT);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsVirtual() const { inline bool
Reflex::MemberBase::IsVirtual() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & VIRTUAL); return 0 != (fModifiers & VIRTUAL);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberBase::IsVolatile() const { inline bool
Reflex::MemberBase::IsVolatile() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != (fModifiers & VOLATILE); return 0 != (fModifiers & VOLATILE);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TYPE Reflex::MemberBase::MemberType() const { inline Reflex::TYPE
Reflex::MemberBase::MemberType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fMemberType; return fMemberType;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberBase::Name( unsigned int mod ) const { inline std::string
Reflex::MemberBase::Name(unsigned int mod) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( 0 != ( mod & ( SCOPED | S ))) { if (0 != (mod & (SCOPED | S))) {
std::string s(DeclaringScope().Name( mod )); std::string s(DeclaringScope().Name(mod));
if ( ! DeclaringScope().IsTopScope()) s += "::";
if (!DeclaringScope().IsTopScope()) {
s += "::";
}
s += fName; s += fName;
return s; return s;
} }
return fName; return fName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::MemberBase::Name_c_str() const { inline const char*
Reflex::MemberBase::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName.c_str(); return fName.c_str();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberBase::Offset() const { inline size_t
Reflex::MemberBase::Offset() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::MemberBase::InterpreterOffset(char*) { inline void
Reflex::MemberBase::InterpreterOffset(char*) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline char*& Reflex::MemberBase::InterpreterOffset() const { inline char*&
Reflex::MemberBase::InterpreterOffset() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
static char* p = 0; static char* p = 0;
return p; return p;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberBase::FunctionParameterSize( bool /* required * inline size_t
/ ) const { Reflex::MemberBase::FunctionParameterSize(bool /* required */) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberBase::FunctionParameterDefaultAt( size_t / inline std::string
* nth */ ) const { Reflex::MemberBase::FunctionParameterDefaultAt(size_t /* nth */) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberBase::FunctionParameterDefa inline Reflex::StdString_Iterator
ult_Begin() const { Reflex::MemberBase::FunctionParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberBase::FunctionParameterDefa inline Reflex::StdString_Iterator
ult_End() const { Reflex::MemberBase::FunctionParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberBase::FunctionParam inline Reflex::Reverse_StdString_Iterator
eterDefault_RBegin() const { Reflex::MemberBase::FunctionParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberBase::FunctionParam inline Reflex::Reverse_StdString_Iterator
eterDefault_REnd() const { Reflex::MemberBase::FunctionParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberBase::FunctionParameterNameAt( size_t /* n inline std::string
th */ ) const { Reflex::MemberBase::FunctionParameterNameAt(size_t /* nth */) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberBase::FunctionParameterName inline Reflex::StdString_Iterator
_Begin() const { Reflex::MemberBase::FunctionParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberBase::FunctionParameterName inline Reflex::StdString_Iterator
_End() const { Reflex::MemberBase::FunctionParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberBase::FunctionParam inline Reflex::Reverse_StdString_Iterator
eterName_RBegin() const { Reflex::MemberBase::FunctionParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberBase::FunctionParam inline Reflex::Reverse_StdString_Iterator
eterName_REnd() const { Reflex::MemberBase::FunctionParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//inline void Reflex::MemberBase::Set( const Object & /* instance */, //inline void Reflex::MemberBase::Set( const Object & /* instance */,
// const Object & /* value */ ) c onst {} // const Object & /* value */ ) c onst {}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::MemberBase::Set( const Object & /* instance */, inline void
const void * /* value */ ) const Reflex::MemberBase::Set(const Object& /* instance */,
{} const void* /* value */) const {}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::MemberBase::SetScope( const Scope & scope ) const { inline void
Reflex::MemberBase::SetScope(const Scope& scope) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fScope = scope; fScope = scope;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::MemberBase::Stubcontext() const { inline void*
Reflex::MemberBase::Stubcontext() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StubFunction Reflex::MemberBase::Stubfunction() const { inline Reflex::StubFunction
Reflex::MemberBase::Stubfunction() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberBase::TemplateArgumentSize() const { inline size_t
Reflex::MemberBase::TemplateArgumentSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::MemberBase::TemplateArgument_Begin() c inline Reflex::Type_Iterator
onst { Reflex::MemberBase::TemplateArgument_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().begin(); return Dummy::TypeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::MemberBase::TemplateArgument_End() con inline Reflex::Type_Iterator
st { Reflex::MemberBase::TemplateArgument_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().end(); return Dummy::TypeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::MemberBase::TemplateArgument_R inline Reflex::Reverse_Type_Iterator
Begin() const { Reflex::MemberBase::TemplateArgument_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rbegin(); return Dummy::TypeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::MemberBase::TemplateArgument_R inline Reflex::Reverse_Type_Iterator
End() const { Reflex::MemberBase::TemplateArgument_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rend(); return Dummy::TypeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate Reflex::MemberBase::TemplateFamily() const { inline Reflex::MemberTemplate
Reflex::MemberBase::TemplateFamily() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::MemberTemplate(); return Dummy::MemberTemplate();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::MemberBase::TypeOf() const { inline Reflex::Type
Reflex::MemberBase::TypeOf() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fType; return fType;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::MemberBase::UpdateFunctionParameterNames(const char* /* inline void
parameters*/) {} Reflex::MemberBase::UpdateFunctionParameterNames(const char* /*parameters*/
) {}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
#endif // Reflex_MemberBase #endif // Reflex_MemberBase
 End of changes. 107 change blocks. 
350 lines changed or deleted 387 lines changed or added


 MemberTemplate.h   MemberTemplate.h 
// @(#)root/reflex:$Id: MemberTemplate.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: MemberTemplate.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_MemberTemplate #ifndef Reflex_MemberTemplate
#define Reflex_MemberTemplate #define Reflex_MemberTemplate
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class MemberTemplateName;
class Member;
/**
* @class MemberTemplate MemberTemplate.h Reflex/MemberTemplate.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API MemberTemplate {
friend class OwnedMemberTemplate;
public:
/** default constructor */
MemberTemplate(const MemberTemplateName * memberTemplateName = 0);
// forward declarations /** copy constructor */
class MemberTemplateName; MemberTemplate(const MemberTemplate &rh);
class Member;
/**
* @class MemberTemplate MemberTemplate.h Reflex/MemberTemplate.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API MemberTemplate {
friend class OwnedMemberTemplate;
public:
/** default constructor */
MemberTemplate( const MemberTemplateName * memberTemplateName = 0 );
/** copy constructor */
MemberTemplate( const MemberTemplate & rh );
/** destructor */
~MemberTemplate();
/**
* operator bool will return true if the member template is resolved
* @return true if member template is resolved
*/
operator bool () const;
/**
* operator == will return true if two member templates are the same
* @return true if member templates match
*/
bool operator == ( const MemberTemplate & rh ) const;
/**
* ByName will return a member template corresponding to the argument
name
* @param member template name to lookup
* @param nTemplateParams looks up the template family with this numbe
r of template parameters
* if it is set to 0, the first occurence of the template famil
y name will be returned
* @return corresponding member template to name
*/
static MemberTemplate ByName( const std::string & name,
size_t nTemplateParams = 0 );
/**
* Id will return a memory address which is a unique id for this membe
r template
* @return unique id of this member template
*/
void * Id() const;
/**
* MemberTemplateAt will return the nth member template defined
* @param nth member template
* @return nth member template
*/
static MemberTemplate MemberTemplateAt( size_t nth );
/**
* MemberTemplateSize will return the number of member templates defin
ed
* @return number of defined member templates
*/
static size_t MemberTemplateSize();
/**
* MemberTemplate_Begin returns the begin iterator of the member templ
ate container
* @return begin iterator of member template container
*/
static MemberTemplate_Iterator MemberTemplate_Begin();
/**
* MemberTemplate_End returns the end iterator of the member template
container
* @return end iterator of member template container
*/
static MemberTemplate_Iterator MemberTemplate_End();
/**
* MemberTemplate_Rbegin returns the rbegin iterator of the member tem
plate container
* @return rbegin iterator of member template container
*/
static Reverse_MemberTemplate_Iterator MemberTemplate_RBegin();
/**
* MemberTemplate_Rend returns the rend iterator of the member templat
e container
* @return rend iterator of member template container
*/
static Reverse_MemberTemplate_Iterator MemberTemplate_REnd();
/**
* Name will return the name of the template family and a list of
* all currently available instantiations
* @return template family name with all instantiantion
*/
std::string Name( unsigned int mod = 0 ) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance c
ontainer
* @return the begin iterator of the instance container
*/
Member_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance conta
iner
* @return the end iterator of the instance container
*/
Member_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance
container
* @return the rbegin iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance con
tainer
* @return the rend iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_REnd() const;
/**
* TemplateInstanceAt will return the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Member TemplateInstanceAt( size_t nth ) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt
default value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt( size_t nth ) const;
/**
* TemplateParameterDefault_Begin returns the begin of the container o
f template parameter default names
* @return begin of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_Begin() const;
/**
* TemplateParameterDefault_End returns the end of the container of te
mplate parameter default names
* @return end of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_End() const;
/**
* TemplateParameterDefault_RBegin returns the reverse begin of the co
ntainer of template parameter default names
* @return reverse begin of container of template parameter default na
mes
*/
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
/**
* TemplateParameterDefault_REnd returns the reverse end of the contai
ner of template parameter default names
* @return reverse end of container of template parameter default name
s
*/
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterA
t
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt( size_t nth ) const;
/**
* TemplateParameterName_Begin returns the begin of the container of t
emplate parameter names
* @return begin of container of template parameter names
*/
StdString_Iterator TemplateParameterName_Begin() const;
/**
* TemplateParameterName_End returns the end of the container of templ
ate parameter names
* @return end of container of template parameter names
*/
StdString_Iterator TemplateParameterName_End() const;
/**
* TemplateParameterName_RBegin returns the reverse begin of the conta
iner of template parameter names
* @return reverse begin of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
/**
* TemplateParameterName_REnd returns the reverse end of the container
of template parameter names
* @return reverse end of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to
the local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance( const Member & templateInstance ) const;
private:
/**
* pointer to the member template implementation
* @label member template name
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
const MemberTemplateName * fMemberTemplateName;
}; // class MemberTemplate /** destructor */
~MemberTemplate();
/**
* operator bool will return true if the member template is resolved
* @return true if member template is resolved
*/
operator bool() const;
/**
* operator == will return true if two member templates are the same
* @return true if member templates match
*/
bool operator ==(const MemberTemplate& rh) const;
/**
* ByName will return a member template corresponding to the argument na
me
* @param member template name to lookup
* @param nTemplateParams looks up the template family with this number
of template parameters
* if it is set to 0, the first occurence of the template family
name will be returned
* @return corresponding member template to name
*/
static MemberTemplate ByName(const std::string& name,
size_t nTemplateParams = 0);
/**
* Id will return a memory address which is a unique id for this member
template
* @return unique id of this member template
*/
void* Id() const;
/**
* MemberTemplateAt will return the nth member template defined
* @param nth member template
* @return nth member template
*/
static MemberTemplate MemberTemplateAt(size_t nth);
/**
* MemberTemplateSize will return the number of member templates defined
* @return number of defined member templates
*/
static size_t MemberTemplateSize();
/**
* MemberTemplate_Begin returns the begin iterator of the member templat
e container
* @return begin iterator of member template container
*/
static MemberTemplate_Iterator MemberTemplate_Begin();
/**
* MemberTemplate_End returns the end iterator of the member template co
ntainer
* @return end iterator of member template container
*/
static MemberTemplate_Iterator MemberTemplate_End();
/**
* MemberTemplate_Rbegin returns the rbegin iterator of the member templ
ate container
* @return rbegin iterator of member template container
*/
static Reverse_MemberTemplate_Iterator MemberTemplate_RBegin();
/**
* MemberTemplate_Rend returns the rend iterator of the member template
container
* @return rend iterator of member template container
*/
static Reverse_MemberTemplate_Iterator MemberTemplate_REnd();
/**
* Name will return the name of the template family and a list of
* all currently available instantiations
* @return template family name with all instantiantion
*/
std::string Name(unsigned int mod = 0) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance con
tainer
* @return the begin iterator of the instance container
*/
Member_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance contain
er
* @return the end iterator of the instance container
*/
Member_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance c
ontainer
* @return the rbegin iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance conta
iner
* @return the rend iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_REnd() const;
/**
* TemplateInstanceAt will return the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Member TemplateInstanceAt(size_t nth) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt de
fault value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt(size_t nth) const;
/**
* TemplateParameterDefault_Begin returns the begin of the container of
template parameter default names
* @return begin of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_Begin() const;
/**
* TemplateParameterDefault_End returns the end of the container of temp
late parameter default names
* @return end of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_End() const;
/**
* TemplateParameterDefault_RBegin returns the reverse begin of the cont
ainer of template parameter default names
* @return reverse begin of container of template parameter default name
s
*/
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
/**
* TemplateParameterDefault_REnd returns the reverse end of the containe
r of template parameter default names
* @return reverse end of container of template parameter default names
*/
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterAt
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt(size_t nth) const;
/**
* TemplateParameterName_Begin returns the begin of the container of tem
plate parameter names
* @return begin of container of template parameter names
*/
StdString_Iterator TemplateParameterName_Begin() const;
/**
* TemplateParameterName_End returns the end of the container of templat
e parameter names
* @return end of container of template parameter names
*/
StdString_Iterator TemplateParameterName_End() const;
/**
* TemplateParameterName_RBegin returns the reverse begin of the contain
er of template parameter names
* @return reverse begin of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
/**
* TemplateParameterName_REnd returns the reverse end of the container o
f template parameter names
* @return reverse end of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to th
e local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance(const Member& templateInstance) const;
private:
/**
* pointer to the member template implementation
* @label member template name
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
const MemberTemplateName* fMemberTemplateName;
}; // class MemberTemplate
} // namespace Reflex } // namespace Reflex
#include "Reflex/internal/MemberTemplateName.h" #include "Reflex/internal/MemberTemplateName.h"
#include "Reflex/internal/MemberTemplateImpl.h" #include "Reflex/internal/MemberTemplateImpl.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate::MemberTemplate( const MemberTemplateName * m emberTemplateName ) inline Reflex::MemberTemplate::MemberTemplate(const MemberTemplateName* mem berTemplateName)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fMemberTemplateName( memberTemplateName ) {} : fMemberTemplateName(memberTemplateName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate::MemberTemplate( const MemberTemplate & rh ) inline Reflex::MemberTemplate::MemberTemplate(const MemberTemplate& rh)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fMemberTemplateName( rh.fMemberTemplateName ) {} : fMemberTemplateName(rh.fMemberTemplateName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate::~MemberTemplate() {} inline Reflex::MemberTemplate::~MemberTemplate() {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate::operator bool () const { inline
Reflex::MemberTemplate::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( this->fMemberTemplateName && this->fMemberTemplateName->fMemberTemp if (this->fMemberTemplateName && this->fMemberTemplateName->fMemberTempl
lateImpl ) return true; ateImpl) {
return true;
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::MemberTemplate::operator == ( const MemberTemplate & rh inline bool
) const { Reflex::MemberTemplate::operator ==(const MemberTemplate& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fMemberTemplateName == rh.fMemberTemplateName ); return fMemberTemplateName == rh.fMemberTemplateName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::MemberTemplate::Id() const { inline void*
Reflex::MemberTemplate::Id() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return (void*)fMemberTemplateName; return (void*) fMemberTemplateName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberTemplate::MemberTemplateSize() { inline size_t
Reflex::MemberTemplate::MemberTemplateSize() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return MemberTemplateName::MemberTemplateSize(); return MemberTemplateName::MemberTemplateSize();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberTemplate::TemplateInstanceSize() const { inline size_t
Reflex::MemberTemplate::TemplateInstanceSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateI if (*this) {
nstanceSize(); return fMemberTemplateName->fMemberTemplateImpl->TemplateInstanceSize
();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberTemplate::TemplateParameterSize() const { inline size_t
Reflex::MemberTemplate::TemplateParameterSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterSize(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterSiz
e();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberTemplate::TemplateParameterDefaultAt( size inline std::string
_t nth ) const { Reflex::MemberTemplate::TemplateParameterDefaultAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterDefaultAt( nth ); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterDef
aultAt(nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplate::TemplateParameter inline Reflex::StdString_Iterator
Default_Begin() const { Reflex::MemberTemplate::TemplateParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterDefault_Begin(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterDef
ault_Begin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplate::TemplateParameter inline Reflex::StdString_Iterator
Default_End() const { Reflex::MemberTemplate::TemplateParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterDefault_End(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterDef
ault_End();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplate::TemplateP inline Reflex::Reverse_StdString_Iterator
arameterDefault_RBegin() const { Reflex::MemberTemplate::TemplateParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterDefault_RBegin(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterDef
ault_RBegin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplate::TemplateP inline Reflex::Reverse_StdString_Iterator
arameterDefault_REnd() const { Reflex::MemberTemplate::TemplateParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterDefault_REnd(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterDef
ault_REnd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberTemplate::TemplateParameterNameAt( size_t inline std::string
nth ) const { Reflex::MemberTemplate::TemplateParameterNameAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterNameAt( nth ); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterNam
eAt(nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplate::TemplateParameter inline Reflex::StdString_Iterator
Name_Begin() const { Reflex::MemberTemplate::TemplateParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterName_Begin(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterNam
e_Begin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplate::TemplateParameter inline Reflex::StdString_Iterator
Name_End() const { Reflex::MemberTemplate::TemplateParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterName_End(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterNam
e_End();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplate::TemplateP inline Reflex::Reverse_StdString_Iterator
arameterName_RBegin() const { Reflex::MemberTemplate::TemplateParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterName_RBegin(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterNam
e_RBegin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplate::TemplateP inline Reflex::Reverse_StdString_Iterator
arameterName_REnd() const { Reflex::MemberTemplate::TemplateParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fMemberTemplateName->fMemberTemplateImpl->TemplateP if (*this) {
arameterName_REnd(); return fMemberTemplateName->fMemberTemplateImpl->TemplateParameterNam
e_REnd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
#endif // Reflex_MemberTemplate #endif // Reflex_MemberTemplate
 End of changes. 40 change blocks. 
309 lines changed or deleted 336 lines changed or added


 MemberTemplateImpl.h   MemberTemplateImpl.h 
// @(#)root/reflex:$Id: MemberTemplateImpl.h 24138 2008-06-04 12:50:27Z axe l $ // @(#)root/reflex:$Id: MemberTemplateImpl.h 29288 2009-07-01 13:03:35Z axe l $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_MemberTemplateImpl #ifndef Reflex_MemberTemplateImpl
#define Reflex_MemberTemplateImpl #define Reflex_MemberTemplateImpl
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( push ) # pragma warning( push )
#pragma warning( disable : 4251 ) # pragma warning( disable : 4251 )
#endif #endif
namespace Reflex { namespace Reflex {
// forward declarations
class Member;
class Scope;
class MemberTemplate;
class MemberTemplateName;
class FunctionMemberTemplateInstance;
/**
* @class MemberTemplateImpl MemberTemplateImpl.h Reflex/MemberTemplateImpl
.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API MemberTemplateImpl {
public:
/** default constructor */
MemberTemplateImpl(const char* templateName,
const Scope &scope,
const std::vector<std::string> &parameterNames,
const std::vector<std::string>& parameterDefaults = s
td::vector<std::string>());
// forward declarations /** destructor */
class Member; virtual ~MemberTemplateImpl();
class Scope;
class MemberTemplate;
class MemberTemplateName;
class FunctionMemberTemplateInstance;
/**
* @class MemberTemplateImpl MemberTemplateImpl.h Reflex/MemberTemplateIm
pl.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API MemberTemplateImpl {
public:
/** default constructor */
MemberTemplateImpl( const char * templateName,
const Scope & scope,
const std::vector < std::string > & parameterNames,
const std::vector < std::string > & parameterDefaults = std::vecto
r<std::string>());
/** destructor */
virtual ~MemberTemplateImpl();
/**
* operator == will return true if two At templates are the same
* @return true if At templates match
*/
bool operator == ( const MemberTemplateImpl & rh ) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance c
ontainer
* @return the begin iterator of the instance container
*/
Member_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance conta
iner
* @return the end iterator of the instance container
*/
Member_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance
container
* @return the rbegin iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance con
tainer
* @return the rend iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_REnd() const;
/**
* instantion will return a pointer to the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Member TemplateInstanceAt( size_t nth ) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt
default value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt( size_t nth ) const;
StdString_Iterator TemplateParameterDefault_Begin() const;
StdString_Iterator TemplateParameterDefault_End() const;
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterA
t
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt( size_t nth ) const;
StdString_Iterator TemplateParameterName_Begin() const;
StdString_Iterator TemplateParameterName_End() const;
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* Return the member template API class corresponding to this member t
emplate impl
* @return corresponding member template
*/
MemberTemplate ThisMemberTemplate() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to
the local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance( const Member & templateInstance ) const;
private:
/**
* declaring scope of this member template
* @link aggregation
* @label member template scope
* @clientCardinality 1
* @supplierCardinality 1
*/
Scope fScope;
/**
* the class template instances
* @link aggregation
* @supplierCardinality 1..*
* @clientCardinality 1
* @label template instances
*/
mutable
std::vector < Member > fTemplateInstances;
/**
* container of function parameter template names
*/
mutable
std::vector < std::string > fParameterNames;
/**
* function parameter template default values
*/
mutable
std::vector < std::string > fParameterDefaults;
/**
* number of required template parameters
*/
size_t fReqParameters;
/**
* pointer back to the member template name
* @link aggregation
* @label member template name
* @supplierCardinality 1
* @clientCardinality 1
*/
MemberTemplateName * fMemberTemplateName;
}; // class MemberTemplateImpl /**
* operator == will return true if two At templates are the same
* @return true if At templates match
*/
bool operator ==(const MemberTemplateImpl& rh) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance con
tainer
* @return the begin iterator of the instance container
*/
Member_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance contain
er
* @return the end iterator of the instance container
*/
Member_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance c
ontainer
* @return the rbegin iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance conta
iner
* @return the rend iterator of the instance container
*/
Reverse_Member_Iterator TemplateInstance_REnd() const;
/**
* instantion will return a pointer to the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Member TemplateInstanceAt(size_t nth) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt de
fault value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt(size_t nth) const;
StdString_Iterator TemplateParameterDefault_Begin() const;
StdString_Iterator TemplateParameterDefault_End() const;
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterAt
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt(size_t nth) const;
StdString_Iterator TemplateParameterName_Begin() const;
StdString_Iterator TemplateParameterName_End() const;
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* Return the member template API class corresponding to this member tem
plate impl
* @return corresponding member template
*/
MemberTemplate ThisMemberTemplate() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to th
e local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance(const Member& templateInstance) const;
private:
/**
* declaring scope of this member template
* @link aggregation
* @label member template scope
* @clientCardinality 1
* @supplierCardinality 1
*/
Scope fScope;
/**
* the class template instances
* @link aggregation
* @supplierCardinality 1..*
* @clientCardinality 1
* @label template instances
*/
mutable
std::vector<Member> fTemplateInstances;
/**
* container of function parameter template names
*/
mutable
std::vector<std::string> fParameterNames;
/**
* function parameter template default values
*/
mutable
std::vector<std::string> fParameterDefaults;
/**
* number of required template parameters
*/
size_t fReqParameters;
/**
* pointer back to the member template name
* @link aggregation
* @label member template name
* @supplierCardinality 1
* @clientCardinality 1
*/
MemberTemplateName* fMemberTemplateName;
}; // class MemberTemplateImpl
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::MemberTemplateImpl::TemplateParameterSize() const { inline size_t
Reflex::MemberTemplateImpl::TemplateParameterSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.size(); return fParameterNames.size();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberTemplateImpl::TemplateParameterDefaultAt( inline std::string
size_t nth ) const { Reflex::MemberTemplateImpl::TemplateParameterDefaultAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fParameterDefaults.size() ) return fParameterDefaults[ nth ]; if (nth < fParameterDefaults.size()) {
return fParameterDefaults[nth];
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplateImpl::TemplateParam inline Reflex::StdString_Iterator
eterDefault_Begin() const { Reflex::MemberTemplateImpl::TemplateParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterDefaults.begin(); return fParameterDefaults.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplateImpl::TemplateParam inline Reflex::StdString_Iterator
eterDefault_End() const { Reflex::MemberTemplateImpl::TemplateParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterDefaults.end(); return fParameterDefaults.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplateImpl::Templ inline Reflex::Reverse_StdString_Iterator
ateParameterDefault_RBegin() const { Reflex::MemberTemplateImpl::TemplateParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterDefaults).rbegin(); return ((const std::vector<std::string> &)fParameterDefaults).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplateImpl::Templ inline Reflex::Reverse_StdString_Iterator
ateParameterDefault_REnd() const { Reflex::MemberTemplateImpl::TemplateParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterDefaults).rend(); return ((const std::vector<std::string> &)fParameterDefaults).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::MemberTemplateImpl::TemplateParameterNameAt( siz inline std::string
e_t nth ) const { Reflex::MemberTemplateImpl::TemplateParameterNameAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fParameterNames.size() ) return fParameterNames[ nth ]; if (nth < fParameterNames.size()) {
return fParameterNames[nth];
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplateImpl::TemplateParam inline Reflex::StdString_Iterator
eterName_Begin() const { Reflex::MemberTemplateImpl::TemplateParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.begin(); return fParameterNames.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::MemberTemplateImpl::TemplateParam inline Reflex::StdString_Iterator
eterName_End() const { Reflex::MemberTemplateImpl::TemplateParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.end(); return fParameterNames.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplateImpl::Templ inline Reflex::Reverse_StdString_Iterator
ateParameterName_RBegin() const { Reflex::MemberTemplateImpl::TemplateParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterNames).rbegin(); return ((const std::vector<std::string> &)fParameterNames).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::MemberTemplateImpl::Templ inline Reflex::Reverse_StdString_Iterator
ateParameterName_REnd() const { Reflex::MemberTemplateImpl::TemplateParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterNames).rend(); return ((const std::vector<std::string> &)fParameterNames).rend();
} }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) # pragma warning( pop )
#endif #endif
#endif // Reflex_MemberTemplateImpl #endif // Reflex_MemberTemplateImpl
 End of changes. 23 change blocks. 
202 lines changed or deleted 201 lines changed or added


 MemberTemplateName.h   MemberTemplateName.h 
// @(#)root/reflex:$Id: MemberTemplateName.h 22729 2008-03-19 10:20:10Z pca nal $ // @(#)root/reflex:$Id: MemberTemplateName.h 29288 2009-07-01 13:03:35Z axe l $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_MemberTemplateName #ifndef Reflex_MemberTemplateName
#define Reflex_MemberTemplateName #define Reflex_MemberTemplateName
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class MemberTemplate;
class MemberTemplateImpl;
/**
* @class MemberTemplateName MemberTemplateName.h Reflex/internal/MemberTem
plateName.h
* @author Stefan Roiser
* @date 8/8/2006
* @ingroup Ref
*/
class RFLX_API MemberTemplateName {
friend class MemberTemplate;
friend class MemberTemplateImpl;
public:
/** constructor */
MemberTemplateName(const char* name,
MemberTemplateImpl * memberTemplImpl);
// forward declarations /**
class MemberTemplate; * ByName will return a member template corresponding to the argument na
class MemberTemplateImpl; me
* @param member template name to lookup
/** * @param nTemplateParams looks up the template family with this number
* @class MemberTemplateName MemberTemplateName.h Reflex/internal/MemberT of template parameters
emplateName.h * if it is set to 0, the first occurence of the template family
* @author Stefan Roiser name will be returned
* @date 8/8/2006 * @return corresponding member template to name
* @ingroup Ref */
*/ static MemberTemplate ByName(const std::string& name,
class RFLX_API MemberTemplateName { size_t nTemplateParams = 0);
friend class MemberTemplate; /**
friend class MemberTemplateImpl; * CleanUp is called at the end of the process
*/
public: static void CleanUp();
/** constructor */ /*
MemberTemplateName( const char * name, * DeleteMemberTemplate will remove the dictionary information
MemberTemplateImpl * memberTemplImpl ); * of one member template from memory
*/
/** void DeleteMemberTemplate() const;
* ByName will return a member template corresponding to the argument
name /**
* @param member template name to lookup * Name will return the name of the member template
* @param nTemplateParams looks up the template family with this numbe * @return name of member template
r of template parameters */
* if it is set to 0, the first occurence of the template famil std::string Name(unsigned int mod) const;
y name will be returned
* @return corresponding member template to name /**
*/ * Name_c_str will return a char * pointer to the member template name
static MemberTemplate ByName( const std::string & name, * @return member template name as char *
size_t nTemplateParams = 0 ); */
const char* Name_c_str() const;
/**
* CleanUp is called at the end of the process /**
*/ * ThisMemberTemplate will return the MemberTemplate API class of this m
static void CleanUp(); ember template
* @return API member template class
/* */
* DeleteMemberTemplate will remove the dictionary information MemberTemplate ThisMemberTemplate() const;
* of one member template from memory
*/ /**
void DeleteMemberTemplate() const; * MemberTemplateAt will return the nth member template defined
* @param nth member template
/** * @return nth member template
* Name will return the name of the member template */
* @return name of member template static MemberTemplate MemberTemplateAt(size_t nth);
*/
std::string Name( unsigned int mod ) const; /**
* MemberTemplateSize will return the number of member templates defined
/** * @return number of defined member templates
* Name_c_str will return a char * pointer to the member template name */
* @return member template name as char * static size_t MemberTemplateSize();
*/
const char * Name_c_str() const; /**
* MemberTemplate_Begin returns the begin iterator of the member templat
/** e container
* ThisMemberTemplate will return the MemberTemplate API class of this * @return begin iterator of member template container
member template */
* @return API member template class static MemberTemplate_Iterator MemberTemplate_Begin();
*/
MemberTemplate ThisMemberTemplate() const; /**
* MemberTemplate_End returns the end iterator of the member template co
/** ntainer
* MemberTemplateAt will return the nth member template defined * @return end iterator of member template container
* @param nth member template */
* @return nth member template static MemberTemplate_Iterator MemberTemplate_End();
*/
static MemberTemplate MemberTemplateAt( size_t nth ); /**
* MemberTemplate_Rbegin returns the rbegin iterator of the member templ
/** ate container
* MemberTemplateSize will return the number of member templates defin * @return rbegin iterator of member template container
ed */
* @return number of defined member templates static Reverse_MemberTemplate_Iterator MemberTemplate_RBegin();
*/
static size_t MemberTemplateSize(); /**
* MemberTemplate_Rend returns the rend iterator of the member template
/** container
* MemberTemplate_Begin returns the begin iterator of the member templ * @return rend iterator of member template container
ate container */
* @return begin iterator of member template container static Reverse_MemberTemplate_Iterator MemberTemplate_REnd();
*/
static MemberTemplate_Iterator MemberTemplate_Begin(); private:
/** destructor */
/** ~MemberTemplateName();
* MemberTemplate_End returns the end iterator of the member template
container private:
* @return end iterator of member template container /**
*/ * The name of the member template
static MemberTemplate_Iterator MemberTemplate_End(); */
std::string fName;
/**
* MemberTemplate_Rbegin returns the rbegin iterator of the member tem /**
plate container * Pointer to the implementation of the member template
* @return rbegin iterator of member template container * @link aggregation
*/ * @supplierCardinality 1
static Reverse_MemberTemplate_Iterator MemberTemplate_RBegin(); * @clientCardinality 0..1
* @label member template impl
/** */
* MemberTemplate_Rend returns the rend iterator of the member templat mutable
e container MemberTemplateImpl * fMemberTemplateImpl;
* @return rend iterator of member template container
*/ /**
static Reverse_MemberTemplate_Iterator MemberTemplate_REnd(); * pointer back to the member temlate
* @label this member template
private: * @link aggregation
* @clientCardinality 1
/** destructor */ * @supplierCardinality 1
~MemberTemplateName(); */
MemberTemplate* fThisMemberTemplate;
private:
/**
* The name of the member template
*/
std::string fName;
/**
* Pointer to the implementation of the member template
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 0..1
* @label member template impl
*/
mutable
MemberTemplateImpl * fMemberTemplateImpl;
/**
* pointer back to the member temlate
* @label this member template
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
MemberTemplate * fThisMemberTemplate;
}; // class MemberTemplate }; // class MemberTemplate
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::MemberTemplateName::Name_c_str() const { inline const char*
Reflex::MemberTemplateName::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName.c_str(); return fName.c_str();
} }
#endif // Reflex_MemberTemplateName #endif // Reflex_MemberTemplateName
 End of changes. 5 change blocks. 
140 lines changed or deleted 135 lines changed or added


 MinimizerOptions.h   MinimizerOptions.h 
// @(#)root/mathcore:$Id: MinimizerOptions.h 26508 2008-11-28 14:22:29Z mon eta $ // @(#)root/mathcore:$Id: MinimizerOptions.h 29513 2009-07-17 15:30:07Z mon eta $
// Author: L. Moneta Fri Aug 15 2008 // Author: L. Moneta Fri Aug 15 2008
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2008 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2008 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
#ifndef ROOT_Math_MinimizerOptions #ifndef ROOT_Math_MinimizerOptions
skipping to change at line 108 skipping to change at line 108
/// set the tolerance /// set the tolerance
void SetTolerance(double tol) { fTolerance = tol; } void SetTolerance(double tol) { fTolerance = tol; }
/// set the strategy /// set the strategy
void SetStrategy(int stra) { fStrategy = stra; } void SetStrategy(int stra) { fStrategy = stra; }
/// set error def /// set error def
void SetErrorDef(double err) { fErrorDef = err; } void SetErrorDef(double err) { fErrorDef = err; }
/// set minimizer type /// set minimizer type
void SetMinimizerType(const std::string & type) { fMinimType = type; } void SetMinimizerType(const char * type) { fMinimType = type; }
/// set minimizer algorithm /// set minimizer algorithm
void SetMinimizerAlgorithm(const std::string & type) { fAlgoType = type; } void SetMinimizerAlgorithm(const char *type) { fAlgoType = type; }
private: private:
int fLevel; // debug print level int fLevel; // debug print level
int fMaxCalls; // maximum number of function calls int fMaxCalls; // maximum number of function calls
int fMaxIter; // maximum number of iterations int fMaxIter; // maximum number of iterations
int fStrategy; // minimizer strategy (used by Minuit) int fStrategy; // minimizer strategy (used by Minuit)
double fErrorDef; // error definition (=1. for getting 1 sigma e rror for chi2 fits) double fErrorDef; // error definition (=1. for getting 1 sigma e rror for chi2 fits)
double fTolerance; // minimize tolerance to reach solution double fTolerance; // minimize tolerance to reach solution
std::string fMinimType; // Minimizer type (Minuit, Minuit2, etc.. std::string fMinimType; // Minimizer type (Minuit, Minuit2, etc..
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 ModelConfig.h   ModelConfig.h 
skipping to change at line 30 skipping to change at line 30
#endif #endif
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef ROO_WORKSPACE #ifndef ROO_WORKSPACE
#include "RooWorkspace.h" #include "RooWorkspace.h"
#endif #endif
#ifndef ROO_MSG_SERVICE #include <string>
#include "RooMsgService.h"
#endif
//_________________________________________________ //_________________________________________________
/* /*
BEGIN_HTML BEGIN_HTML
<p> <p>
ModelConfig is a simple class that holds configuration information specifyi ng how a model ModelConfig is a simple class that holds configuration information specifyi ng how a model
should be used in the context of various RooStats tools. A single model ca n be used should be used in the context of various RooStats tools. A single model ca n be used
in different ways, and this class should carry all that is needed to specif y how it should be used. in different ways, and this class should carry all that is needed to specif y how it should be used.
</p> </p>
END_HTML END_HTML
*/ */
// //
namespace RooStats { namespace RooStats {
class ModelConfig : public TNamed { class ModelConfig : public TNamed {
public: public:
ModelConfig() : TNamed(){
fWS = 0; ModelConfig() : TNamed(), fWS(0), fOwnsWorkspace(false) {
fOwnsWorkspace = false;
} }
ModelConfig(const char* name) : TNamed(name, name){ ModelConfig(const char* name) : TNamed(name, name), fWS(0), fOwnsWorkspa
fWS = 0; ce(false) {
fOwnsWorkspace = false;
} }
ModelConfig(const char* name, const char* title) : TNamed(name, title){ ModelConfig(const char* name, const char* title) : TNamed(name, title), fWS(0), fOwnsWorkspace(false) {
fWS = 0; fWS = 0;
fOwnsWorkspace = false; fOwnsWorkspace = false;
} }
virtual ~ModelConfig() { // destructor.
// destructor. virtual ~ModelConfig();
if( fOwnsWorkspace && fWS) delete fWS;
}
// set a workspace that owns all the necessary components for the analys is // set a workspace that owns all the necessary components for the analys is
virtual void SetWorkspace(RooWorkspace & ws) { virtual void SetWorkspace(RooWorkspace & ws);
if (!fWS)
fWS = &ws;
else{
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->merge(ws);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
}
// helper function to avoid code duplication
void DefineSet(const char* name, RooArgSet& set){
if (!fWS) {
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->set( name )){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->defineSet(name, set);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
}
// Set the DataSet, add to the the workspace if not already there
virtual void SetData(RooAbsData & data) {
if (!fWS) {
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->data( data.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData( data.GetName() );
}
// Set the proto DataSet, add to the the workspace if not already there // Set the proto DataSet, add to the the workspace if not already there
virtual void SetProtoData(RooAbsData & data) { virtual void SetProtoData(RooAbsData & data) {
if (!fWS) { ImportDataInWS(data);
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->data( data.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetProtoData( data.GetName() ); SetProtoData( data.GetName() );
} }
// Set the Pdf, add to the the workspace if not already there // Set the Pdf, add to the the workspace if not already there
virtual void SetPdf(RooAbsPdf& pdf) { virtual void SetPdf(RooAbsPdf& pdf) {
if (!fWS) ImportPdfInWS(pdf);
fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ) ){
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf( pdf.GetName() ); SetPdf( pdf.GetName() );
} }
// Set the Prior Pdf, add to the the workspace if not already there
virtual void SetPriorPdf(RooAbsPdf& pdf) {
ImportPdfInWS(pdf);
SetPriorPdf( pdf.GetName() );
}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) { virtual void SetParameters(RooArgSet& set) {
string temp = GetName(); fPOIName=std::string(GetName()) + "_POI";
temp+="_POI"; DefineSetInWS(fPOIName.c_str(), set);
fPOIName=temp.c_str();
DefineSet(fPOIName, set);
} }
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) { virtual void SetNuisanceParameters(RooArgSet& set) {
string temp = GetName(); fNuisParamsName=std::string(GetName()) + "_NuisParams";
temp+="_NuisParams"; DefineSetInWS(fNuisParamsName.c_str(), set);
fNuisParamsName=temp.c_str();
DefineSet(fNuisParamsName, set);
} }
// set parameter values for the null if using a common PDF // set parameter values for the null if using a common PDF
virtual void SetSnapshot(RooArgSet& set) { virtual void SetSnapshot(RooArgSet& set) {
string temp = GetName(); fSnapshotName=std::string(GetName()) + "_Snapshot";
temp+="_Snapshot"; DefineSetInWS(fSnapshotName.c_str(), set);
fSnapshotName=temp.c_str();
DefineSet(fSnapshotName, set);
} }
// specify the name of the PDF in the workspace to be used // specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) { virtual void SetPdf(const char* name) {
if(!fWS){ if(!fWS){
coutE(ObjectHandling) << "workspace not set" << endl; coutE(ObjectHandling) << "workspace not set" << endl;
return; return;
} }
if(fWS->pdf(name)) if(fWS->pdf(name))
fPdfName = name; fPdfName = name;
skipping to change at line 186 skipping to change at line 128
coutE(ObjectHandling) << "workspace not set" << endl; coutE(ObjectHandling) << "workspace not set" << endl;
return; return;
} }
if(fWS->pdf(name)) if(fWS->pdf(name))
fPriorPdfName = name; fPriorPdfName = name;
else else
coutE(ObjectHandling) << "pdf "<<name<< " does not exist in worksp ace"<<endl; coutE(ObjectHandling) << "pdf "<<name<< " does not exist in worksp ace"<<endl;
} }
// specify the name of the dataset in the workspace to be used // specify the name of the dataset in the workspace to be used
virtual void SetData(const char* name){
if(!fWS){
coutE(ObjectHandling) << "workspace not set" << endl;
return;
}
if(fWS->data(name))
fDataName = name;
else
coutE(ObjectHandling) << "dataset "<<name<< " does not exist in wo
rkspace"<<endl;
}
// specify the name of the dataset in the workspace to be used
virtual void SetProtoData(const char* name){ virtual void SetProtoData(const char* name){
if(!fWS){ if(!fWS){
coutE(ObjectHandling) << "workspace not set" << endl; coutE(ObjectHandling) << "workspace not set" << endl;
return; return;
} }
if(fWS->data(name)) if(fWS->data(name))
fProtoDataName = name; fProtoDataName = name;
else else
coutE(ObjectHandling) << "dataset "<<name<< " does not exist in wo rkspace"<<endl; coutE(ObjectHandling) << "dataset "<<name<< " does not exist in wo rkspace"<<endl;
} }
/* getter methods */ /* getter methods */
/// get model PDF (return NULL if pdf has not been specified or does not exist) /// get model PDF (return NULL if pdf has not been specified or does not exist)
RooAbsPdf * GetPdf() { return (fWS) ? fWS->pdf(fPdfName) : 0; } RooAbsPdf * GetPdf() const { return (fWS) ? fWS->pdf(fPdfName.c_str()) :
0; }
/// get data set (return NULL if data set has not been specified or does
not exist)
RooAbsData * GetData() { return (fWS) ? fWS->data(fDataName) : 0; }
/// get RooArgSet containing the parameter of interest (return NULL if n ot existing) /// get RooArgSet containing the parameter of interest (return NULL if n ot existing)
const RooArgSet * GetParametersOfInterest() { return (fWS) ? fWS->set(fP OIName) : 0; } const RooArgSet * GetParametersOfInterest() const { return (fWS) ? fWS-> set(fPOIName.c_str()) : 0; }
/// get RooArgSet containing the nuisance parameters (return NULL if not existing) /// get RooArgSet containing the nuisance parameters (return NULL if not existing)
const RooArgSet * GetNuisanceParameters() { return (fWS) ? fWS->set(fNui sParamsName) : 0; } const RooArgSet * GetNuisanceParameters() const { return (fWS) ? fWS->se t(fNuisParamsName.c_str()) : 0; }
/// get RooArgSet containing the constraint parameters (return NULL if n ot existing) /// get RooArgSet containing the constraint parameters (return NULL if n ot existing)
const RooArgSet * GetConstraintParameters() { return (fWS) ? fWS->set(fC onstrainedParamName) : 0; } const RooArgSet * GetConstraintParameters() const { return (fWS) ? fWS-> set(fConstrainedParamName.c_str()) : 0; }
/// get parameters prior pdf (return NULL if not existing) /// get parameters prior pdf (return NULL if not existing)
RooAbsPdf * GetPriorPdf() { return (fWS) ? fWS->pdf(fPriorPdfName) : 0; } RooAbsPdf * GetPriorPdf() const { return (fWS) ? fWS->pdf(fPriorPdfName. c_str()) : 0; }
/// get RooArgSet for observales (return NULL if not existing) /// get RooArgSet for observales (return NULL if not existing)
const RooArgSet * GetObservables() { return (fWS) ? fWS->set(fObservable sName) : 0; } const RooArgSet * GetObservables() const { return (fWS) ? fWS->set(fObse rvablesName.c_str()) : 0; }
/// get RooArgSet for conditional observales (return NULL if not existi ng) /// get RooArgSet for conditional observales (return NULL if not existi ng)
const RooArgSet * GetConditionalObservables() { return (fWS) ? fWS->set( fConditionalObservablesName) : 0; } const RooArgSet * GetConditionalObservables() const { return (fWS) ? fWS ->set(fConditionalObservablesName.c_str()) : 0; }
/// get Proto data set (return NULL if not existing) /// get Proto data set (return NULL if not existing)
RooAbsData * GetProtoData() { return (fWS) ? fWS->data(fProtoDataName) : 0; } RooAbsData * GetProtoData() const { return (fWS) ? fWS->data(fProtoDat aName.c_str()) : 0; }
/// get RooArgSet for parameters for a particular hypothesis (return NU LL if not existing) /// get RooArgSet for parameters for a particular hypothesis (return NU LL if not existing)
const RooArgSet * GetSnapshot() { return (fWS) ? fWS->set(fSnapshotName) const RooArgSet * GetSnapshot() const { return (fWS) ? fWS->set(fSnapsho
: 0; } tName.c_str()) : 0; }
const RooWorkspace * GetWS() const { return fWS; }
protected: protected:
// helper functions to define a set in the WS
void DefineSetInWS(const char* name, RooArgSet& set);
// internal function to import Pdf in WS
void ImportPdfInWS(RooAbsPdf & pdf);
// internal function to import data in WS
void ImportDataInWS(RooAbsData & data);
RooWorkspace* fWS; // a workspace that owns all the components to be use d by the calculator RooWorkspace* fWS; // a workspace that owns all the components to be use d by the calculator
Bool_t fOwnsWorkspace; Bool_t fOwnsWorkspace;
const char* fPdfName; // name of PDF in workspace
const char* fDataName; // name of data set in workspace
const char* fPOIName; // name for RooArgSet specifying parameters of int
erest
const char* fNuisParamsName; // name for RooArgSet specifying nuisance p std::string fPdfName; // name of PDF in workspace
arameters std::string fDataName; // name of data set in workspace
const char* fConstrainedParamName; // name for RooArgSet specifying cons std::string fPOIName; // name for RooArgSet specifying parameters of int
trained parameters erest
const char* fPriorPdfName; // name for RooAbsPdf specifying a prior on t
he parameters std::string fNuisParamsName; // name for RooArgSet specifying nuisance p
arameters
std::string fConstrainedParamName; // name for RooArgSet specifying cons
trained parameters
std::string fPriorPdfName; // name for RooAbsPdf specifying a prior on t
he parameters
const char* fConditionalObservablesName; // name for RooArgSet specifyin std::string fConditionalObservablesName; // name for RooArgSet specifyin
g conditional observables g conditional observables
const char* fProtoDataName; // name for RooArgSet specifying dataset tha std::string fProtoDataName; // name for RooArgSet specifying dataset tha
t should be used as protodata t should be used as protodata
const char* fSnapshotName; // name for RooArgSet that specifies a partic ular hypothesis std::string fSnapshotName; // name for RooArgSet that specifies a partic ular hypothesis
const char* fObservablesName; // name for RooArgSet specifying observabl e parameters. std::string fObservablesName; // name for RooArgSet specifying observabl e parameters.
ClassDef(ModelConfig,1) // A class that holds configuration information for a model using a workspace as a store ClassDef(ModelConfig,1) // A class that holds configuration information for a model using a workspace as a store
}; };
} // end namespace RooStats } // end namespace RooStats
#endif #endif
 End of changes. 28 change blocks. 
123 lines changed or deleted 62 lines changed or added


 NamespaceBuilder.h   NamespaceBuilder.h 
// @(#)root/reflex:$Id: NamespaceBuilder.h 22729 2008-03-19 10:20:10Z pcana l $ // @(#)root/reflex:$Id: NamespaceBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_NamespaceBuilder #ifndef Reflex_NamespaceBuilder
#define Reflex_NamespaceBuilder #define Reflex_NamespaceBuilder
// Include files // Include files
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
namespace Reflex{ namespace Reflex {
/**
* @class NamespaceBuilder NamespaceBuilder.h Reflex/Builder/NamespaceBuild
er.h
* @author Stefan Roiser
* @ingroup RefBld
* @date 30/3/2004
*/
class RFLX_API NamespaceBuilder {
public:
/** constructor */
NamespaceBuilder(const char* nam);
/** destructor */
virtual ~NamespaceBuilder() {}
/** AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
NamespaceBuilder& AddProperty(const char* key,
Any value);
NamespaceBuilder& AddProperty(const char* key,
const char* value);
/** /**
* @class NamespaceBuilder NamespaceBuilder.h Reflex/Builder/NamespaceBui * ToScope will return the currently being built namespace
lder.h * @return namespace currently being built
* @author Stefan Roiser */
* @ingroup RefBld Scope ToScope();
* @date 30/3/2004
*/ private:
class RFLX_API NamespaceBuilder { /** the namespace */
Scope fNamespace;
public:
/** constructor */
NamespaceBuilder( const char * nam );
/** destructor */
virtual ~NamespaceBuilder() {}
/** AddProperty will add a PropertyNth
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
NamespaceBuilder & AddProperty( const char * key, Any value );
NamespaceBuilder & AddProperty( const char * key, const char * value
);
/**
* ToScope will return the currently being built namespace
* @return namespace currently being built
*/
Scope ToScope();
private: }; // class NamespaceBuilder
/** the namespace */
Scope fNamespace;
}; // class NamespaceBuilder
} // namespace Reflex } // namespace Reflex
#endif // Reflex_NamespaceBuilder #endif // Reflex_NamespaceBuilder
 End of changes. 4 change blocks. 
38 lines changed or deleted 35 lines changed or added


 NewDelFunctions.h   NewDelFunctions.h 
// $Id: NewDelFunctions.h 2134 2007-11-30 18:07:51Z pcanal $ // $Id: NewDelFunctions.h 2134 2007-11-30 18:07:51Z pcanal $
#ifndef Reflex_NewDelFunctions #ifndef Reflex_NewDelFunctions
#define Reflex_NewDelFunctions #define Reflex_NewDelFunctions
/** /**
* @file NewDelFunctions.h * @file NewDelFunctions.h
*/ */
namespace Reflex { namespace Reflex {
typedef void* (*NewFunc_t)(void*);
typedef void* (*NewArrFunc_t)(long size, void* arena);
typedef void (*DelFunc_t)(void*);
typedef void (*DelArrFunc_t)(void*);
typedef void (*DesFunc_t)(void*);
struct RFLX_API NewDelFunctions {
NewFunc_t fNew; //pointer to a function newing one obj
ect.
NewArrFunc_t fNewArray; //pointer to a function newing an arra
y of objects.
DelFunc_t fDelete; //pointer to a function deleting one o
bject.
DelArrFunc_t fDeleteArray; //pointer to a function deleting an ar
ray of objects.
DesFunc_t fDestructor; //pointer to a function call an object
's destructor.
};
template <class T> struct NewDelFunctionsT: public NewDelFunctions {
static void*
new_T(void* p) { return p ? new (p) T : new T; }
static void*
new_p_T(void* p) { return p ? new (p) T : ::new T; }
static void*
new_np_T(void* p) { return p ? ::new (p) T : new T; }
static void*
newArray_T(long size,
void* p) { return p ? new (p) T[size] : new T[size]; }
static void*
newArray_p_T(long size,
void* p) { return p ? new (p) T[size] : ::new T[size]; }
static void*
newArray_np_T(long size,
void* p) { return p ? ::new (p) T[size] : new T[size]; }
static void
delete_T(void* p) { delete (T*) p; }
static void
deleteArray_T(void* p) { delete[] (T*) p; }
static void
destruct_T(void* p) { ((T*) p)->~T(); }
NewDelFunctionsT() {
fNew = new_T;
fNewArray = newArray_T;
fDelete = delete_T;
fDeleteArray = deleteArray_T;
fDestructor = destruct_T;
}
typedef void* (*NewFunc_t)( void* ); };
typedef void* (*NewArrFunc_t)( long size, void *arena );
typedef void (*DelFunc_t)( void* );
typedef void (*DelArrFunc_t)( void* );
typedef void (*DesFunc_t)( void* );
struct RFLX_API NewDelFunctions {
NewFunc_t fNew; //pointer to a function newing one obj
ect.
NewArrFunc_t fNewArray; //pointer to a function newing an arra
y of objects.
DelFunc_t fDelete; //pointer to a function deleting one o
bject.
DelArrFunc_t fDeleteArray; //pointer to a function deleting an ar
ray of objects.
DesFunc_t fDestructor; //pointer to a function call an object
's destructor.
};
template <class T> struct NewDelFunctionsT : public NewDelFunctions {
static void* new_T(void* p) { return p ? new(p) T : new T; }
static void* new_p_T(void* p) { return p ? new(p) T : ::new T; }
static void* new_np_T(void* p) { return p ? ::new(p) T : new T; }
static void* newArray_T(long size, void* p) { return p ? new (p) T[si
ze] : new T[size]; }
static void* newArray_p_T(long size, void* p) { return p ? new (p) T[
size] : ::new T[size]; }
static void* newArray_np_T(long size, void* p) { return p ? ::new (p)
T[size] : new T[size]; }
static void delete_T(void *p) { delete (T*)p; }
static void deleteArray_T(void* p) { delete [] (T*)p; }
static void destruct_T(void* p) { ((T*)p)->~T(); }
NewDelFunctionsT() {
fNew = new_T;
fNewArray = newArray_T;
fDelete = delete_T;
fDeleteArray = deleteArray_T;
fDestructor = destruct_T;
}
};
} // namespace reflex } // namespace reflex
#endif #endif
 End of changes. 2 change blocks. 
40 lines changed or deleted 58 lines changed or added


 NeymanConstruction.h   NeymanConstruction.h 
skipping to change at line 26 skipping to change at line 26
#endif #endif
#ifndef ROOSTATS_IntervalCalculator #ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h" #include "RooStats/IntervalCalculator.h"
#endif #endif
#include "RooStats/TestStatSampler.h" #include "RooStats/TestStatSampler.h"
#include "RooStats/ConfidenceBelt.h" #include "RooStats/ConfidenceBelt.h"
#include "RooAbsData.h" #include "RooAbsData.h"
#include "RooWorkspace.h"
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "TList.h" #include "TList.h"
class RooAbsData; class RooAbsData;
namespace RooStats { namespace RooStats {
class ConfInterval; class ConfInterval;
class NeymanConstruction : public IntervalCalculator { class NeymanConstruction : public IntervalCalculator, public TNamed {
public: public:
NeymanConstruction(); NeymanConstruction();
virtual ~NeymanConstruction(); virtual ~NeymanConstruction();
// Main interface to get a ConfInterval (will be a PointSetInterval) // Main interface to get a ConfInterval (will be a PointSetInterval)
virtual ConfInterval* GetInterval() const; virtual ConfInterval* GetInterval() const;
virtual ConfInterval* GetIntervalUsingList() const; virtual ConfInterval* GetIntervalUsingList() const;
// Interface extended with I/O support // Interface extended with I/O support
virtual ConfInterval* GetInterval(const char* asciiFilePat) const; virtual ConfInterval* GetInterval(const char* asciiFilePat) const;
skipping to change at line 78 skipping to change at line 78
// Choose number of steps for a rastor scan (common for each dimensio n) // Choose number of steps for a rastor scan (common for each dimensio n)
// void SetNumSteps(Int_t); // void SetNumSteps(Int_t);
// This class can make regularly spaced scans based on range stored i n RooRealVars. // This class can make regularly spaced scans based on range stored i n RooRealVars.
// Choose number of steps for a rastor scan (specific for each dimens ion) // Choose number of steps for a rastor scan (specific for each dimens ion)
// void SetNumSteps(map<RooAbsArg, Int_t>) // void SetNumSteps(map<RooAbsArg, Int_t>)
// Get the size of the test (eg. rate of Type I error) // Get the size of the test (eg. rate of Type I error)
virtual Double_t Size() const {return fSize;} virtual Double_t Size() const {return fSize;}
// Get the Confidence level for the test // Get the Confidence level for the test
virtual Double_t ConfidenceLevel() const {return 1.-fSize;} virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
// set a workspace that owns all the necessary components for the ana
lysis
virtual void SetWorkspace(RooWorkspace& ws) {fWS = &ws;}
// Set the DataSet, add to the the workspace if not already there virtual void SetModel(const ModelConfig &);
virtual void SetData(RooAbsData& data) {
if (!fWS) {
fWS = new RooWorkspace();
fOwnsWorkspace = true;
}
if (! fWS->data(data.GetName()) ) {
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(data);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetData(data.GetName());
}
// Set the Pdf, add to the the workspace if not already there // Set the DataSet
virtual void SetPdf(RooAbsPdf& pdf) { virtual void SetData(RooAbsData& data) { fData = &data; }
if (!fWS)
fWS = new RooWorkspace();
if (! fWS->pdf( pdf.GetName() ))
{
RooMsgService::instance().setGlobalKillBelow(RooFit::ERROR) ;
fWS->import(pdf);
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG) ;
}
SetPdf(pdf.GetName());
}
// specify the name of the dataset in the workspace to be used // Set the Pdf, add to the the workspace if not already there
virtual void SetData(const char* name) {fDataName = name;} virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; }
// specify the name of the PDF in the workspace to be used
virtual void SetPdf(const char* name) {fPdfName = name;}
// specify the parameters of interest in the interval // specify the parameters of interest in the interval
virtual void SetParameters(RooArgSet& set) {fPOI = &set;} virtual void SetParameters(const RooArgSet& set) {fPOI = &set;}
// specify the nuisance parameters (eg. the rest of the parameters) // specify the nuisance parameters (eg. the rest of the parameters)
virtual void SetNuisanceParameters(RooArgSet& set) {fNuisParams = &se t;} virtual void SetNuisanceParameters(const RooArgSet& set) {fNuisParams = &set;}
// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval) // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 9 5% Confidence Interval)
virtual void SetTestSize(Double_t size) {fSize = size;} virtual void SetTestSize(Double_t size) {fSize = size;}
// set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval) // set the confidence level for the interval (eg. 0.95 for a 95% Conf idence Interval)
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;} virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl;}
ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;} ConfidenceBelt* GetConfidenceBelt() {return fConfBelt;}
void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;} void UseAdaptiveSampling(bool flag=true){fAdaptiveSampling=flag;}
void SaveBeltToFile(bool flag=true){ void SaveBeltToFile(bool flag=true){
fSaveBeltToFile = flag; fSaveBeltToFile = flag;
if(flag) fCreateBelt = true; if(flag) fCreateBelt = true;
} }
void CreateConfBelt(bool flag=true){fCreateBelt = flag;} void CreateConfBelt(bool flag=true){fCreateBelt = flag;}
private: private:
Double_t fSize; // size of the test (eg. specified rate of Type I err or) Double_t fSize; // size of the test (eg. specified rate of Type I err or)
RooWorkspace* fWS; // a workspace that owns all the components to be RooAbsPdf * fPdf; // common PDF
used by the calculator RooAbsData * fData; // data set
Bool_t fOwnsWorkspace; // flag if this object owns its workspace const RooArgSet* fPOI; // RooArgSet specifying parameters of interes
const char* fPdfName; // name of common PDF in workspace t for interval
const char* fDataName; // name of data set in workspace const RooArgSet* fNuisParams;// RooArgSet specifying nuisance parame
RooArgSet* fPOI; // RooArgSet specifying parameters of interest for ters for interval
interval
RooArgSet* fNuisParams;// RooArgSet specifying nuisance parameters f
or interval
TestStatSampler* fTestStatSampler; TestStatSampler* fTestStatSampler;
RooAbsData* fPointsToTest; RooAbsData* fPointsToTest;
Double_t fLeftSideFraction; Double_t fLeftSideFraction;
ConfidenceBelt* fConfBelt; ConfidenceBelt* fConfBelt;
bool fAdaptiveSampling; // controls use of adaptive sampling algorith m bool fAdaptiveSampling; // controls use of adaptive sampling algorith m
bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav ed to a TFile bool fSaveBeltToFile; // controls use if ConfidenceBelt should be sav ed to a TFile
bool fCreateBelt; // controls use if ConfidenceBelt should be saved t o a TFile bool fCreateBelt; // controls use if ConfidenceBelt should be saved t o a TFile
protected: protected:
ClassDef(NeymanConstruction,1) // Interface for tools setting limit s (producing confidence intervals) ClassDef(NeymanConstruction,1) // Interface for tools setting limit s (producing confidence intervals)
 End of changes. 10 change blocks. 
45 lines changed or deleted 15 lines changed or added


 Object.h   Object.h 
// @(#)root/reflex:$Id: Object.h 26204 2008-11-14 15:38:38Z axel $ // @(#)root/reflex:$Id: Object.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_Object #ifndef Reflex_Object
#define Reflex_Object #define Reflex_Object
// Include files // Include files
#include "Reflex/Type.h" #include "Reflex/Type.h"
#include <string> #include <string>
#include <vector> #include <vector>
namespace Reflex { namespace Reflex {
// forward declarations
// forward declarations /**
* @class Object Object.h Reflex/Object.h
* @author Stefan Roiser
* @date 24/06/2004
* @ingroup Ref
*/
class RFLX_API Object {
public:
/** constructor */
Object(const Type& type = Type(),
void* mem = 0);
/** constructor */
Object(const Object &);
/** destructor */
~Object() {}
template <typename T>
static Object
Create(T& v) {
return Object(Type::ByTypeInfo(typeid(T)), &v);
}
/**
* operator assigment
*/
Object operator =(const Object& obj);
/**
* operator ==
*/
bool operator ==(const Object& obj);
/**
* inequal operator
*/
bool operator !=(const Object& obj);
/**
* operator bool
*/
operator bool() const;
/**
* Address will return the memory address of the object
* @return memory address of object
*/
void* Address() const;
/** /**
* @class Object Object.h Reflex/Object.h * CastObject an object from this class type to another one
* @author Stefan Roiser * @param to is the class type to cast into
* @date 24/06/2004 * @param obj the memory address of the object to be casted
* @ingroup Ref */
*/ Object CastObject(const Type& to) const;
class RFLX_API Object {
/**
public: * Destruct will call the destructor of a type and remove its memory
* allocation if desired
/** constructor */ */
Object( const Type & type = Type(), void Destruct() const;
void * mem = 0 );
/**
/** constructor */ * DynamicType is used to discover the dynamic type (useful in
Object( const Object & ); * case of polymorphism)
* @return the actual class of the object
/** destructor */ */
~Object() {} Type DynamicType() const;
template <typename T> /**
static Object Create(T& v) { * Get the data member value
return Object(Type::ByTypeInfo(typeid(T)), &v); * @param dm name of the data member to get
} * @return member value as object
*/
/** Object Get(const std::string& dm) const;
* operator assigment
*/ /**
Object operator = ( const Object & obj ); * Invoke a member function of the object
* @param fm name of the member function
/** * @param ret Object to put the return value into (can be 0 for function
* operator == returning void)
*/ * @param args a vector of memory addresses to parameter values
bool operator == ( const Object & obj ); * @return the return value of the function as object
*/
/** void Invoke(const std::string& fm,
* inequal operator Object* ret = 0,
*/ const std::vector<void*>& args = std::vector<void*>()) const
bool operator != ( const Object & obj ); ;
/** /**
* operator bool * Invoke a member function of the object
*/ * @param fm name of the member function
operator bool () const; * @param ret Object to put the return value into (can be 0 for function
returning void)
/** * @param args a vector of memory addresses to parameter values
* Address will return the memory address of the object * @return the return value of the function as object
* @return memory address of object */
*/ template <typename T>
void * Address() const; void
Invoke(const std::string& fm,
/** T& ret,
* CastObject an object from this class type to another one const std::vector<void*>& args = std::vector<void*>()) const {
* @param to is the class type to cast into Object retO(Type::ByTypeInfo(typeid(T)), &ret);
* @param obj the memory address of the object to be casted Invoke(fm, &retO, args);
*/ }
Object CastObject( const Type & to ) const;
/**
/** * Invoke a member function of the object
* Destruct will call the destructor of a type and remove its memory * @param fm name of the member function
* allocation if desired * @param sign the signature of the member function (for overloads)
*/ * @param ret Object to put the return value into (can be 0 for function
void Destruct() const; returning void)
* @param args a vector of memory addresses to parameter values
/** * @return the return value of the function as object
* DynamicType is used to discover the dynamic type (useful in */
* case of polymorphism) void Invoke(const std::string& fm,
* @return the actual class of the object const Type& sign,
*/ Object* ret = 0,
Type DynamicType() const; const std::vector<void*>& args = std::vector<void*>()) const
;
/**
* Get the data member value /**
* @param dm name of the data member to get * Invoke a member function of the object
* @return member value as object * @param fm name of the member function
*/ * @param sign the signature of the member function (for overloads)
Object Get( const std::string & dm ) const ; * @param ret Object to put the return value into (can be 0 for function
returning void)
/** * @param args a vector of memory addresses to parameter values
* Invoke a member function of the object * @return the return value of the function as object
* @param fm name of the member function */
* @param ret Object to put the return value into (can be 0 for functi template <typename T>
on returning void) void
* @param args a vector of memory addresses to parameter values Invoke(const std::string& fm,
* @return the return value of the function as object const Type& sign,
*/ T& ret,
void Invoke( const std::string & fm, Object* ret = 0, const std::vector<void*>& args = std::vector<void*>()) const {
const std::vector< void * >& args = std::vector<void*>()) const; Object retO(Type::ByTypeInfo(typeid(T)), &ret);
Invoke(fm, sign, &retO, args);
/** }
* Invoke a member function of the object
* @param fm name of the member function /**
* @param ret Object to put the return value into (can be 0 for functi * Set will set a data member value of this object
on returning void) * @param dm the name of the data member
* @param args a vector of memory addresses to parameter values * @param value the memory address of the value to set
* @return the return value of the function as object */
*/ void Set(const std::string& dm,
template <typename T> const void* value) const;
void Invoke( const std::string & fm, T& ret,
const std::vector< void * >& args = std::vector<void*>()) const { /**
Object retO(Type::ByTypeInfo(typeid(T)), &ret); * Set will set a data member value of this object
Invoke(fm, &retO, args); * @param dm the name of the data member
} * @param value the memory address of the value to set
*/
/** template <class T>
* Invoke a member function of the object void Set(const std::string& dm,
* @param fm name of the member function const T& value) const;
* @param sign the signature of the member function (for overloads)
* @param ret Object to put the return value into (can be 0 for functi /**
on returning void) * TypeOf will return the type of the object
* @param args a vector of memory addresses to parameter values * @return type of the object
* @return the return value of the function as object */
*/ Type TypeOf() const;
void Invoke( const std::string & fm,
const Type & sign, Object* ret = 0, private:
const std::vector< void * >& args = std::vector<void*>()) const; friend class ValueObject;
/** /** */
* Invoke a member function of the object void Set2(const std::string& dm,
* @param fm name of the member function const void* value) const;
* @param sign the signature of the member function (for overloads)
* @param ret Object to put the return value into (can be 0 for functi /**
on returning void) * the type of the object
* @param args a vector of memory addresses to parameter values * @link aggregation
* @return the return value of the function as object * @clientCardinality 1
*/ * @supplierCardinality 1
template <typename T> * @label object type
void Invoke( const std::string & fm, **/
const Type & sign, T& ret, Type fType;
const std::vector< void * >& args = std::vector<void*>()) const {
Object retO(Type::ByTypeInfo(typeid(T)), &ret); /**
Invoke(fm, sign, &retO, args); * the address of the object
} */
mutable
/** void* fAddress;
* Set will set a data member value of this object
* @param dm the name of the data member }; // class Object
* @param value the memory address of the value to set
*/ /**
void Set(const std::string & dm, * Object_Cast can be used to cast an object into a given type
const void * value ) const; * (no additional checks are performed for the time being)
* @param o the object to be casted
/** * @return the address of the object casted into type T
* Set will set a data member value of this object */
* @param dm the name of the data member template <class T> T Object_Cast(const Object& o);
* @param value the memory address of the value to set
*/
template < class T >
void Set(const std::string & dm,
const T & value ) const;
/**
* TypeOf will return the type of the object
* @return type of the object
*/
Type TypeOf() const;
private:
friend class ValueObject;
/** */
void Set2( const std::string & dm,
const void * value ) const;
/**
* the type of the object
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
* @label object type
**/
Type fType;
/**
* the address of the object
*/
mutable
void * fAddress;
}; // class Object
/**
* Object_Cast can be used to cast an object into a given type
* (no additional checks are performed for the time being)
* @param o the object to be casted
* @return the address of the object casted into type T
*/
template < class T > T Object_Cast( const Object & o );
} // namespace Reflex } // namespace Reflex
#include "Reflex/Member.h" #include "Reflex/Member.h"
#include "Reflex/Tools.h" #include "Reflex/Tools.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class T > template <class T>
inline T Reflex::Object_Cast( const Object & o ) { inline T
Reflex::Object_Cast(const Object& o) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return *(T*)o.Address(); return *(T*) o.Address();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object::Object( const Type & type, inline Reflex::Object::Object(const Type& type,
void * mem ) void* mem)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fType( type ), : fType(type),
fAddress( mem ) {} fAddress(mem) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object::Object( const Object & obj ) inline Reflex::Object::Object(const Object& obj)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fType( obj.fType ), : fType(obj.fType),
fAddress( obj.fAddress ) {} fAddress(obj.fAddress) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object Reflex::Object::operator = ( const Object & obj ) { inline Reflex::Object
Reflex::Object::operator =(const Object& obj) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fType = obj.fType; fType = obj.fType;
fAddress = obj.fAddress; fAddress = obj.fAddress;
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Object::operator == ( const Object & obj ) { inline bool
Reflex::Object::operator ==(const Object& obj) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fType == obj.fType && fAddress == obj.fAddress ); return fType == obj.fType && fAddress == obj.fAddress;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Object::operator != ( const Object & obj ) { inline bool
Reflex::Object::operator !=(const Object& obj) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fType != obj.fType || fAddress != obj.fAddress ); return fType != obj.fType || fAddress != obj.fAddress;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object::operator bool () const { inline
Reflex::Object::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fType && fAddress ) return true; if (fType && fAddress) {
return true;
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::Object::Address() const { inline void*
Reflex::Object::Address() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fAddress; return fAddress;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Object Reflex::Object::CastObject( const Type & to ) const { inline Reflex::Object
Reflex::Object::CastObject(const Type& to) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fType.CastObject(to, *this); if (*this) {
return fType.CastObject(to, *this);
}
return Object(); return Object();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Object::Destruct() const { inline void
Reflex::Object::Destruct() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) { if (*this) {
fType.Destruct(fAddress); fType.Destruct(fAddress);
fAddress = 0; fAddress = 0;
} }
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Object::DynamicType() const { inline Reflex::Type
Reflex::Object::DynamicType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fType.DynamicType(*this); return fType.DynamicType(*this);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Object::Set( const std::string & dm, inline void
const void * value ) const { Reflex::Object::Set(const std::string& dm,
const void* value) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
Set2( dm, value ); Set2(dm, value);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < class T > template <class T>
inline void Reflex::Object::Set( const std::string & dm, inline void
const T & value ) const { Reflex::Object::Set(const std::string& dm,
const T& value) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
Set2( dm, & value ); Set2(dm, &value);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type Reflex::Object::TypeOf() const { inline Reflex::Type
Reflex::Object::TypeOf() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fType; return fType;
} }
#endif // Reflex_Object #endif // Reflex_Object
 End of changes. 31 change blocks. 
224 lines changed or deleted 247 lines changed or added


 OwnedMember.h   OwnedMember.h 
// @(#)root/reflex:$Id: OwnedMember.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: OwnedMember.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2006 // Author: Stefan Roiser 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_OwnedMember #ifndef Reflex_OwnedMember
#define Reflex_OwnedMember #define Reflex_OwnedMember
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Member.h" #include "Reflex/Member.h"
#include <vector> #include <vector>
namespace Reflex { namespace Reflex {
// forward declarations
class MemberBase;
// forward declarations /**
class MemberBase; * @class OwnedMember OwnedMember.h OwnedMember.h
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedMember: public Member {
public:
/** constructor */
OwnedMember(const MemberBase * memberBase = 0):
Member(memberBase) {
}
/** take ownership */
OwnedMember(const Member &rh):
Member(rh) {}
/** delete info */
void
Delete() {
Member::Delete();
/* delete fMemberBase; */
/* fMemberBase = 0; */
}
/** }; // class OwnedMember
* @class OwnedMember OwnedMember.h OwnedMember.h
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedMember : public Member {
public:
/** constructor */
OwnedMember( const MemberBase * memberBase = 0 )
: Member ( memberBase ) {
}
/** take ownership */
OwnedMember( const Member & rh )
: Member ( rh ) {}
/** delete info */
void Delete() {
Member::Delete();
/* delete fMemberBase; */
/* fMemberBase = 0; */
}
}; // class OwnedMember
} // namespace Reflex } // namespace Reflex
#endif // Reflex_OwnedMember #endif // Reflex_OwnedMember
 End of changes. 4 change blocks. 
30 lines changed or deleted 28 lines changed or added


 OwnedMemberTemplate.h   OwnedMemberTemplate.h 
// @(#)root/reflex:$Id: OwnedMemberTemplate.h 22729 2008-03-19 10:20:10Z pc anal $ // @(#)root/reflex:$Id: OwnedMemberTemplate.h 29288 2009-07-01 13:03:35Z ax el $
// Author: Stefan Roiser 2006 // Author: Stefan Roiser 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_OwnedMemberTemplate #ifndef Reflex_OwnedMemberTemplate
#define Reflex_OwnedMemberTemplate #define Reflex_OwnedMemberTemplate
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/MemberTemplate.h" #include "Reflex/MemberTemplate.h"
namespace Reflex { namespace Reflex {
// forward declarations
class MemberTemplateImpl;
// forward declarations /**
class MemberTemplateImpl; * @class OwnedMemberTemplate OwnedMemberTemplate.h OwnedMemberTemplate.h
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedMemberTemplate: public MemberTemplate {
public:
/** constructor */
OwnedMemberTemplate(const MemberTemplateName * memberTemplateName):
MemberTemplate(memberTemplateName) {}
/** take ownership */
OwnedMemberTemplate(const MemberTemplate &rh):
MemberTemplate(rh) {}
/** delete info */
void
Delete() {
fMemberTemplateName->DeleteMemberTemplate();
}
/** }; // class OwnedMemberTemplate
* @class OwnedMemberTemplate OwnedMemberTemplate.h OwnedMemberTemplate.h
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedMemberTemplate : public MemberTemplate {
public:
/** constructor */
OwnedMemberTemplate( const MemberTemplateName * memberTemplateName )
: MemberTemplate( memberTemplateName ) {}
/** take ownership */
OwnedMemberTemplate( const MemberTemplate & rh )
: MemberTemplate( rh ) {}
/** delete info */
void Delete() {
fMemberTemplateName->DeleteMemberTemplate();
}
}; // class OwnedMemberTemplate
} // namespace Reflex } // namespace Reflex
#endif // Reflex_OwnedMemberTemplate #endif // Reflex_OwnedMemberTemplate
 End of changes. 4 change blocks. 
27 lines changed or deleted 25 lines changed or added


 OwnedPropertyList.h   OwnedPropertyList.h 
// @(#)root/reflex:$Id: OwnedPropertyList.h 22845 2008-03-26 13:41:38Z axel $ // @(#)root/reflex:$Id: OwnedPropertyList.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2006 // Author: Stefan Roiser 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_OwnedPropertyList #ifndef Reflex_OwnedPropertyList
#define Reflex_OwnedPropertyList #define Reflex_OwnedPropertyList
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/PropertyList.h" #include "Reflex/PropertyList.h"
namespace Reflex { namespace Reflex {
// forward declarations
class PropertyListImpl;
// forward declarations /**
class PropertyListImpl; * @class OwnedPropertyList OwnedPropertyList.h OwnedPropertyList.h
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedPropertyList: public PropertyList {
public:
/** constructor */
OwnedPropertyList(PropertyListImpl * propertyListImpl = 0):
PropertyList(propertyListImpl) {}
/** /** delete */
* @class OwnedPropertyList OwnedPropertyList.h OwnedPropertyList.h void Delete();
* @author Stefan Roiser
* @date 21/07/2006
* @ingroup Ref
*/
class RFLX_API OwnedPropertyList : public PropertyList {
public:
/** constructor */
OwnedPropertyList( PropertyListImpl * propertyListImpl = 0 )
: PropertyList( propertyListImpl ) {}
/** delete */ }; // class OwnedPropertyList
void Delete();
}; // class OwnedPropertyList
} // namespace Reflex } // namespace Reflex
#endif // Reflex_OwnedPropertyList #endif // Reflex_OwnedPropertyList
 End of changes. 5 change blocks. 
20 lines changed or deleted 17 lines changed or added


 PluginService.h   PluginService.h 
// @(#)root/reflex:$Id: PluginService.h 26227 2008-11-17 12:04:20Z axel $ // @(#)root/reflex:$Id: PluginService.h 29288 2009-07-01 13:03:35Z axel $
// Author: Pere Mato 2006 // Author: Pere Mato 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 26 skipping to change at line 26
#include "Reflex/Builder/FunctionBuilder.h" #include "Reflex/Builder/FunctionBuilder.h"
#include "Reflex/ValueObject.h" #include "Reflex/ValueObject.h"
#include "Reflex/Tools.h" #include "Reflex/Tools.h"
#include <string> #include <string>
#include <sstream> #include <sstream>
#define PLUGINSVC_FACTORY_NS "__pf__" #define PLUGINSVC_FACTORY_NS "__pf__"
namespace Reflex { namespace Reflex {
class PluginFactoryMap;
class PluginFactoryMap; /**
* @class PluginService PluginService.h PluginService/PluginService.h
* @author Pere Mato
* @date 01/09/2006
* @ingroup Ref
*/
class RFLX_API PluginService {
public:
template <typename R>
static R
Create(const std::string& name) {
return (R) Create(name, GetType<R>(), std::vector<ValueObject>());
}
template <typename R, typename A0>
static R
Create(const std::string& name,
const A0& a0) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0)));
}
template <typename R, typename A0, typename A1>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1)));
}
template <typename R, typename A0, typename A1, typename A2>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2)));
}
template <typename R, typename A0, typename A1, typename A2, typename A3
>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3)));
}
template <typename R, typename A0, typename A1, typename A2, typename A3
,
typename A4>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3,
const A4& a4) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4)));
}
template <typename R, typename A0, typename A1, typename A2, typename A3
,
typename A4, typename A5>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3,
const A4& a4,
const A5& a5) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5)));
}
template <typename R, typename A0, typename A1, typename A2, typename A3
,
typename A4, typename A5, typename A6>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3,
const A4& a4,
const A5& a5,
const A6& a6) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5),
ValueObject::Create(a6)));
}
template <typename R, typename A0, typename A1, typename A2, typename A3
,
typename A4, typename A5, typename A6, typename A7>
static R
Create(const std::string& name,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3,
const A4& a4,
const A5& a5,
const A6& a6,
const A7& a7) {
return (R) Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5),
ValueObject::Create(a6),
ValueObject::Create(a7)));
}
static void* Create(const std::string& name,
const Type& ret,
const std::vector<ValueObject>& arg);
template <typename T>
static bool
CompareId(const Any& id1,
const Any& id2) {
try { return id1.TypeInfo() == id2.TypeInfo() &&
any_cast<T>(id1) == any_cast<T>(id2); }
catch (const BadAnyCast&) { return false; }
}
template <typename T> static std::string
StringId(const Any& id) {
std::stringstream s;
try { s << any_cast<T>(id); }
catch (const BadAnyCast&) {}
return s.str();
}
template <typename R, typename T>
static R
CreateWithId(const T& id) {
return (R) CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>(),
std::vector<ValueObject>());
}
template <typename R, typename T, typename A0>
static R
CreateWithId(const T& id,
const A0& a0) {
return (R) CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0)));
}
template <typename R, typename T, typename A0, typename A1>
static R
CreateWithId(const T& id,
const A0& a0,
const A1& a1) {
return (R) CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0), Va
lueObject::Create(a1)));
}
template <typename R, typename T, typename A0, typename A1, typename A2>
static R
CreateWithId(const T& id,
const A0& a0,
const A1& a1,
const A2& a2) {
return (R) CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0), Va
lueObject::Create(a1),
ValueObject::Create(a2)));
}
template <typename R, typename T, typename A0, typename A1, typename A2,
typename A3>
static R
CreateWithId(const T& id,
const A0& a0,
const A1& a1,
const A2& a2,
const A3& a3) {
return (R) CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0), Va
lueObject::Create(a1),
ValueObject::Create(a2), Va
lueObject::Create(a3)));
}
static void* CreateWithId(const Any &id,
std::string (* str)(const Any&),
bool (* cmp)(const Any&,
const Any&),
const Type &ret,
const std::vector<ValueObject> &arg);
static std::string FactoryName(const std::string& n);
static int Debug();
static void SetDebug(int);
private:
/** Constructor */
PluginService();
/** Destructor */
~PluginService();
/** Get single instance of PluginService */
static PluginService& Instance();
int LoadFactoryLib(const std::string& name);
int ReadMaps();
/** int fDebugLevel;
* @class PluginService PluginService.h PluginService/PluginService.h
* @author Pere Mato
* @date 01/09/2006
* @ingroup Ref
*/
class RFLX_API PluginService {
public:
template < typename R >
static R Create(const std::string& name ) {
return (R)Create(name, GetType<R>(), std::vector<ValueObject>());
}
template < typename R, typename A0 >
static R Create(const std::string& name, const A0& a0) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0)));
}
template < typename R, typename A0, typename A1 >
static R Create(const std::string& name, const A0& a0, const A1& a1)
{
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1)));
}
template < typename R, typename A0, typename A1, typename A2 >
static R Create(const std::string& name, const A0& a0, const A1& a1,
const A2& a2) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2)));
}
template < typename R, typename A0, typename A1, typename A2, typenam
e A3 >
static R Create(const std::string& name, const A0& a0, const A1& a1,
const A2& a2, const A3& a3) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3)));
}
template < typename R, typename A0, typename A1, typename A2, typenam
e A3,
typename A4 >
static R Create(const std::string& name, const A0& a0, const A1& a
1,
const A2& a2, const A3& a3, const A4& a4 ) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4)));
}
template < typename R, typename A0, typename A1, typename A2, typenam
e A3,
typename A4, typename A5 >
static R Create(const std::string& name, const A0& a0, const A1& a
1,
const A2& a2, const A3& a3, const A4& a4, const A5& a5 ) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5)));
}
template < typename R, typename A0, typename A1, typename A2, typenam
e A3,
typename A4, typename A5, typename A6 >
static R Create(const std::string& name, const A0& a0, const A1& a
1,
const A2& a2, const A3& a3, const A4& a4, const A5& a5,
const A6& a6 ) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5),
ValueObject::Create(a6)));
}
template < typename R, typename A0, typename A1, typename A2, typenam
e A3,
typename A4, typename A5, typename A6, typename A7 >
static R Create(const std::string& name, const A0& a0, const A1& a
1,
const A2& a2, const A3& a3, const A4& a4, const A5& a5,
const A6& a6, const A7& a7 ) {
return (R)Create(name, GetType<R>(),
Tools::MakeVector(ValueObject::Create(a0),
ValueObject::Create(a1),
ValueObject::Create(a2),
ValueObject::Create(a3),
ValueObject::Create(a4),
ValueObject::Create(a5),
ValueObject::Create(a6),
ValueObject::Create(a7)));
}
static void* Create(const std::string& name,
const Type& ret,
const std::vector<ValueObject>& arg);
template < typename T >
static bool CompareId(const Any& id1,
const Any& id2 ) {
try { return id1.TypeInfo() == id2.TypeInfo() &&
any_cast<T>(id1) == any_cast<T>(id2); }
catch ( const BadAnyCast& ) { return false; }
}
template < typename T > static std::string StringId(const Any& id ){
std::stringstream s;
try { s << any_cast<T>(id); }
catch ( const BadAnyCast& ) { }
return s.str();
}
template < typename R, typename T >
static R CreateWithId(const T& id ) {
return (R)CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>()
,
std::vector<ValueObject>());
}
template < typename R, typename T, typename A0 >
static R CreateWithId(const T& id, const A0& a0) {
return (R)CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>()
,
Tools::MakeVector(ValueObject::Create(a0)));
}
template < typename R, typename T, typename A0, typename A1 >
static R CreateWithId(const T& id, const A0& a0, const A1& a1) {
return (R)CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>()
,
Tools::MakeVector(ValueObject::Create(a0), ValueObject::Create(
a1)));
}
template < typename R, typename T, typename A0, typename A1, typename
A2 >
static R CreateWithId(const T& id, const A0& a0, const A1& a1, const
A2& a2) {
return (R)CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>()
,
Tools::MakeVector(ValueObject::Create(a0), ValueObject::Create(
a1),
ValueObject::Create(a2)));
}
template < typename R, typename T, typename A0, typename A1, typename
A2, typename A3 >
static R CreateWithId(const T& id, const A0& a0, const A1& a1, const
A2& a2, const A3& a3) {
return (R)CreateWithId(id, StringId<T>, CompareId<T>, GetType<R>()
,
Tools::MakeVector(ValueObject::Create(a0), ValueObject::Create(
a1),
ValueObject::Create(a2), ValueObject::Create(a3)));
}
static void* CreateWithId(const Any& id,
std::string (*str)(const Any&),
bool(*cmp)(const Any&, const Any&),
const Type& ret,
const std::vector<ValueObject>& arg);
static std::string FactoryName(const std::string& n );
static int Debug();
static void SetDebug(int);
private:
/** Constructor */
PluginService();
/** Destructor */
~PluginService();
/** Get single instance of PluginService */
static PluginService& Instance();
int LoadFactoryLib(const std::string& name);
int ReadMaps();
int fDebugLevel; Scope fFactories;
Scope fFactories; PluginFactoryMap* fFactoryMap;
PluginFactoryMap* fFactoryMap; }; // class PluginService
}; // class PluginService
} // namespace Reflex } // namespace Reflex
//--- Factory stub functions for the different number of parameters //--- Factory stub functions for the different number of parameters
namespace { namespace {
template <typename T> struct Arg {
static T
Cast(void* a) { return *(T*) a; }
};
template <typename T> struct Arg<T*> {
static T*
Cast(void* a) { return (T*) a; }
};
template <typename P, typename S> class Factory;
template <typename P, typename R> class Factory<P, R(void)> {
public:
static void
Func(void* retaddr,
void*,
const std::vector<void*>& /* arg */,
void*) {
*(R*) retaddr = (R) ::new P;
}
};
template <typename P, typename R, typename A0> class Factory<P, R(A0)> {
public:
static void
Func(void* retaddr,
void*,
const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]));
}
};
template <typename P, typename R, typename A0, typename A1> class Factory<P
, R(A0, A1)> {
public:
static void
Func(void* retaddr,
void*,
const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(arg[
1]));
}
};
template <typename P, typename R, typename A0, typename A1, typename A2> cl
ass Factory<P, R(A0, A1, A2)> {
public:
static void
Func(void* retaddr,
void*,
const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(arg[
1]), Arg<A2>::Cast(arg[2]));
}
};
template <typename P, typename R, typename A0, typename A1, typename A2, ty
pename A3> class Factory<P, R(A0, A1, A2, A3)> {
public:
static void
Func(void* retaddr,
void*,
const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(arg[
1]), Arg<A2>::Cast(arg[2]), Arg<A3>::Cast(arg[3]));
}
template < typename T > struct Arg { };
static T Cast(void* a) { return *(T*)a; }
};
template < typename T > struct Arg<T*> {
static T* Cast(void* a ) { return (T*)a; }
};
template< typename P, typename S > class Factory;
template< typename P, typename R > class Factory<P, R(void)> {
public:
static void Func( void* retaddr, void*, const std::vector<void*>& /* a
rg */, void*) {
*(R*) retaddr = (R) ::new P;
}
};
template < typename P, typename R, typename A0 > class Factory<P, R(A0)>
{
public:
static void Func( void* retaddr, void*, const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]));
}
};
template < typename P, typename R, typename A0, typename A1 > class Facto
ry<P, R(A0, A1)> {
public:
static void Func( void* retaddr, void*, const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(a
rg[1]));
}
};
template < typename P, typename R, typename A0, typename A1, typename A2
> class Factory<P, R(A0, A1, A2)> {
public:
static void Func( void* retaddr, void*, const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(ar
g[1]), Arg<A2>::Cast(arg[2]));
}
};
template < typename P, typename R, typename A0, typename A1, typename A2,
typename A3 > class Factory<P, R(A0, A1, A2, A3)> {
public:
static void Func( void* retaddr, void*, const std::vector<void*>& arg,
void*) {
*(R*) retaddr = (R) ::new P(Arg<A0>::Cast(arg[0]), Arg<A1>::Cast(ar
g[1]), Arg<A2>::Cast(arg[2]), Arg<A3>::Cast(arg[3]));
}
};
} // unnamed namespace } // unnamed namespace
#define PLUGINSVC_CNAME(name, serial) name##_dict##serial #define PLUGINSVC_CNAME(name, serial) name ## _dict ## serial
#define PLUGINSVC_FACTORY(type, signature) _PLUGINSVC_FACTORY(type, signatu re, __LINE__) #define PLUGINSVC_FACTORY(type, signature) _PLUGINSVC_FACTORY(type, signatu re, __LINE__)
#define PLUGINSVC_FACTORY_WITH_ID(type, id, signature) _PLUGINSVC_FACTORY_W ITH_ID(type, id, signature, __LINE__) #define PLUGINSVC_FACTORY_WITH_ID(type, id, signature) _PLUGINSVC_FACTORY_W ITH_ID(type, id, signature, __LINE__)
#define _PLUGINSVC_FACTORY(type, signature, serial ) \ #define _PLUGINSVC_FACTORY(type, signature, serial) \
namespace {\ namespace { \
struct PLUGINSVC_CNAME(type, serial) {\ struct PLUGINSVC_CNAME (type, serial) { \
PLUGINSVC_CNAME(type, serial)() {\ PLUGINSVC_CNAME(type, serial) () { \
std::string name = Reflex::GetType<type>().Name(Reflex::SCOPED); \ std::string name = Reflex::GetType < type > ().Name(Reflex::SCOPED
Reflex::Type sig = Reflex::FunctionDistiller<signature>::Get(); \ ); \
std::string fname = (std::string(PLUGINSVC_FACTORY_NS "::")+Reflex::P Reflex::Type sig = Reflex::FunctionDistiller < signature > ::Get()
luginService::FactoryName(name));\ ; \
Reflex::FunctionBuilder( sig, fname.c_str(), \ std::string fname = (std::string(PLUGINSVC_FACTORY_NS "::") + Refl
Factory<type, signature>::Func , 0, "", Reflex::PUBLIC)\ ex::PluginService::FactoryName(name)); \
.AddProperty("name",name); \ Reflex::FunctionBuilder(sig, fname.c_str(), \
if ( Reflex::PluginService::Debug() ) std::cout << "PluginService: De Factory < type, signature > ::Func, 0, "",
clared factory for class " << name << " with signature " << sig.Name() << s Reflex::PUBLIC) \
td::endl; \ .AddProperty("name", name); \
}\ if (Reflex::PluginService::Debug()) { std::cout << "PluginService:
};\ Declared factory for class " << name << " with signature " << sig.Name() <
PLUGINSVC_CNAME(type, serial) PLUGINSVC_CNAME(s_##type, serial);\ < std::endl; } \
} } \
}; \
PLUGINSVC_CNAME(type, serial) PLUGINSVC_CNAME(s_ ## type, serial); \
}
#define _PLUGINSVC_FACTORY_WITH_ID(type, id, signature, serial) \ #define _PLUGINSVC_FACTORY_WITH_ID(type, id, signature, serial) \
namespace {\ namespace { \
struct PLUGINSVC_CNAME(type, serial) {\ struct PLUGINSVC_CNAME (type, serial) { \
PLUGINSVC_CNAME(type, serial)() {\ PLUGINSVC_CNAME(type, serial) () { \
std::string name = Reflex::GetType<type>().Name(Reflex::SCOPED); \ std::string name = Reflex::GetType < type > ().Name(Reflex::SCOPED
Reflex::Type sig = Reflex::FunctionDistiller<signature>::Get(); \ ); \
std::stringstream s; s << id; \ Reflex::Type sig = Reflex::FunctionDistiller < signature > ::Get()
std::string fname = (std::string(PLUGINSVC_FACTORY_NS "::")+Reflex::P ; \
luginService::FactoryName(s.str()));\ std::stringstream s; s << id; \
Reflex::FunctionBuilder( sig, fname.c_str(), \ std::string fname = (std::string(PLUGINSVC_FACTORY_NS "::") + Refl
Factory<type, signature>::Func , 0, "", Reflex::PUBLIC)\ ex::PluginService::FactoryName(s.str())); \
.AddProperty("name",name) \ Reflex::FunctionBuilder(sig, fname.c_str(), \
.AddProperty("id",id); \ Factory < type, signature > ::Func, 0, "",
if ( Reflex::PluginService::Debug() ) std::cout << "PluginService: De Reflex::PUBLIC) \
clared factory for id " << fname << " with signature " << sig.Name() << std .AddProperty("name", name) \
::endl; \ .AddProperty("id", id); \
}\ if (Reflex::PluginService::Debug()) { std::cout << "PluginService:
};\ Declared factory for id " << fname << " with signature " << sig.Name() <<
PLUGINSVC_CNAME(type, serial) PLUGINSVC_CNAME(s_##type, serial);\ std::endl; } \
} } \
}; \
PLUGINSVC_CNAME(type, serial) PLUGINSVC_CNAME(s_ ## type, serial); \
}
#endif // Reflex_PluginService #endif // Reflex_PluginService
 End of changes. 12 change blocks. 
302 lines changed or deleted 370 lines changed or added


 PointSetInterval.h   PointSetInterval.h 
skipping to change at line 40 skipping to change at line 40
public: public:
// constructors,destructors // constructors,destructors
PointSetInterval(); PointSetInterval();
PointSetInterval(const char* name); PointSetInterval(const char* name);
PointSetInterval(const char* name, const char* title); PointSetInterval(const char* name, const char* title);
PointSetInterval(const char* name, RooAbsData&); PointSetInterval(const char* name, RooAbsData&);
PointSetInterval(const char* name, const char* title, RooAbsData&); PointSetInterval(const char* name, const char* title, RooAbsData&);
virtual ~PointSetInterval(); virtual ~PointSetInterval();
virtual Bool_t IsInInterval(RooArgSet&); virtual Bool_t IsInInterval(const RooArgSet&);
virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;}
virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
// Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading? // Double_t LowerLimit(RooRealVar& param) ; // could provide, but misl eading?
// Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading? // Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading?
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// Accessor for making plots // Accessor for making plots
RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterP ointsInInterval->Clone();} RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterP ointsInInterval->Clone();}
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet&) const ; Bool_t CheckParameters(const RooArgSet&) const ;
// Method to return lower limit on a given parameter // Method to return lower limit on a given parameter
Double_t LowerLimit(RooRealVar& param) ; Double_t LowerLimit(RooRealVar& param) ;
Double_t UpperLimit(RooRealVar& param) ; Double_t UpperLimit(RooRealVar& param) ;
protected: protected:
ClassDef(PointSetInterval,1) // Concrete implementation of ConfInterva l for simple 1-D intervals in the form [a,b] ClassDef(PointSetInterval,1) // Concrete implementation of ConfInterva l for simple 1-D intervals in the form [a,b]
}; };
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PosixThreadInc.h   PosixThreadInc.h 
/* @(#)root/thread:$Id: PosixThreadInc.h 20882 2007-11-19 11:31:26Z rdm $ * / /* @(#)root/thread:$Id: PosixThreadInc.h 29797 2009-08-17 14:35:51Z rdm $ * /
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_PosixThreadInc #ifndef ROOT_PosixThreadInc
skipping to change at line 24 skipping to change at line 24
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// PosixThreadInc // // PosixThreadInc //
// // // //
// Common includes for the Posix thread implementation. // // Common includes for the Posix thread implementation. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef __CINT__ #ifndef __CINT__
#ifndef ROOT_TError
#include "TError.h"
#endif
#ifndef ROOT_TSystem
#include "TSystem.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#if defined(R__LINUX) || defined(R__SOLARIS) || defined(R__ALPHA) || \
defined(R__MACOSX) || defined(R__HPUX11)
#define PthreadDraftVersion 10
#elif defined(R__HPUX) || defined(R__AIX)
#define PthreadDraftVersion 4
#else
#if !defined(R__KCC)
#warning PthreadDraftVersion not specified
#endif
#endif
#if (PthreadDraftVersion <= 6)
#define ERRNO(x) (((x) != 0) ? (TSystem::GetErrno()) : 0)
#else
#define ERRNO(x) (x)
#endif
#endif /* __CINT__ */ #endif /* __CINT__ */
#endif #endif
 End of changes. 3 change blocks. 
25 lines changed or deleted 1 lines changed or added


 ProfileLikelihoodCalculator.h   ProfileLikelihoodCalculator.h 
// @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 29179 2009-06-23 18 :39:27Z brun $ // @(#)root/roostats:$Id: ProfileLikelihoodCalculator.h 30512 2009-09-28 17 :24:48Z moneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_ProfileLikelihoodCalculator #ifndef ROOSTATS_ProfileLikelihoodCalculator
#define ROOSTATS_ProfileLikelihoodCalculator #define ROOSTATS_ProfileLikelihoodCalculator
#ifndef ROOSTATS_CombinedCalculator #ifndef ROOSTATS_CombinedCalculator
#include "RooStats/CombinedCalculator.h" #include "RooStats/CombinedCalculator.h"
#endif #endif
#include "RooStats/LikelihoodInterval.h" #include "RooStats/LikelihoodInterval.h"
namespace RooStats { namespace RooStats {
class ProfileLikelihoodCalculator : public CombinedCalculator { class LikelihoodInterval;
class ProfileLikelihoodCalculator : public CombinedCalculator, public TN
amed {
public: public:
ProfileLikelihoodCalculator(); ProfileLikelihoodCalculator();
ProfileLikelihoodCalculator(RooWorkspace& ws, RooAbsData& data, RooAb ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, const R
sPdf& pdf, RooArgSet& paramsOfInterest, ooArgSet& paramsOfInterest,
Double_t size = 0.05, RooArgSet* nullPara Double_t size = 0.05, const RooArgSet* nu
ms = 0, RooArgSet* altParams = 0); llParams = 0 );
ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, RooArgS ProfileLikelihoodCalculator(RooAbsData& data, ModelConfig & model, Do
et& paramsOfInterest, uble_t size = 0.05);
Double_t size = 0.05, RooArgSet* nullPara
ms = 0, RooArgSet* altParams = 0);
virtual ~ProfileLikelihoodCalculator(); virtual ~ProfileLikelihoodCalculator();
// main interface, implemented // main interface, implemented
virtual ConfInterval* GetInterval() const ; virtual LikelihoodInterval* GetInterval() const ;
// main interface, implemented // main interface, implemented
virtual HypoTestResult* GetHypoTest() const; virtual HypoTestResult* GetHypoTest() const;
protected: protected:
ClassDef(ProfileLikelihoodCalculator,1) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio. ClassDef(ProfileLikelihoodCalculator,1) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio.
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
11 lines changed or deleted 15 lines changed or added


 PropertyList.h   PropertyList.h 
// @(#)root/reflex:$Id: PropertyList.h 22798 2008-03-20 17:44:12Z axel $ // @(#)root/reflex:$Id: PropertyList.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_PropertyList #ifndef Reflex_PropertyList
#define Reflex_PropertyList #define Reflex_PropertyList
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include <iostream> #include <iostream>
namespace Reflex { namespace Reflex {
// forward declarations
class PropertyListImpl;
class Any;
/**
* @class PropertyList PropertyList.h Reflex/PropertyList.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API PropertyList {
friend class OwnedPropertyList;
friend RFLX_API std::ostream& operator <<(std::ostream& s,
const PropertyList& p);
public:
/** default constructor */
PropertyList(PropertyListImpl * propertyListImpl = 0);
// forward declarations /** copy constructor */
class PropertyListImpl; PropertyList(const PropertyList &pl);
class Any;
/** destructor */
/** ~PropertyList();
* @class PropertyList PropertyList.h Reflex/PropertyList.h
* @author Stefan Roiser /**
* @date 24/11/2003 * operator bool will return true if the property list is implemented
* @ingroup Ref * @return true if property list is not a fake one
*/ */
class RFLX_API PropertyList { operator bool() const;
friend class OwnedPropertyList; /**
friend RFLX_API std::ostream & operator << ( std::ostream & s, * AddProperty will add a key value pair to the property list
const PropertyList & p ); * @param key the key of the property
* @param value the value of the property (as any object)
public: * @return the property key of this property
*/
/** default constructor */ size_t AddProperty(const std::string& key,
PropertyList( PropertyListImpl * propertyListImpl = 0 ); const Any& value) const;
/** copy constructor */ /**
PropertyList( const PropertyList & pl ); * AddProperty will add a property value pair to the property list
* @param key the key of the property
/** destructor */ * @param value the value of the property (as any object)
~PropertyList(); */
void AddProperty(size_t key,
/** const Any& value) const;
* operator bool will return true if the property list is implemented
* @return true if property list is not a fake one /**
*/ * AddProperty will add a key value pair to the property lsit
operator bool () const; * @param key the key of the property
* @param value the value of the property (as any object)
/** * @return the property key of this property
* AddProperty will add a key value pair to the property list */
* @param key the key of the property size_t AddProperty(const std::string& key,
* @param value the value of the property (as any object) const char* value) const;
* @return the property key of this property
*/ /**
size_t AddProperty( const std::string & key, * AddProperty will add a key value pair to the property list
const Any & value ) const; * @param key the key of the property
* @param value the value of the property (as any object)
/** */
* AddProperty will add a property value pair to the property list void AddProperty(size_t key,
* @param key the key of the property const char* value) const;
* @param value the value of the property (as any object)
*/ /**
void AddProperty( size_t key, * ClearProperties will remove all properties from the list
const Any & value ) const; */
void ClearProperties() const;
/**
* AddProperty will add a key value pair to the property lsit /**
* @param key the key of the property * HasKey is deprecated. Use HasProperty instead with exactly the same f
* @param value the value of the property (as any object) unctionality
* @return the property key of this property * The reason for deprecating this function is the misleading name. The
*/ function checks
size_t AddProperty( const std::string & key, * if a given property (with a key) is attached to this item.
const char * value ) const; */
bool HasKey(const std::string& key) const
/**
* AddProperty will add a key value pair to the property list
* @param key the key of the property
* @param value the value of the property (as any object)
*/
void AddProperty( size_t key,
const char * value ) const;
/**
* ClearProperties will remove all properties from the list
*/
void ClearProperties() const;
/**
* HasKey is deprecated. Use HasProperty instead with exactly the same
functionality
* The reason for deprecating this function is the misleading name. Th
e function checks
* if a given property (with a key) is attached to this item.
*/
bool HasKey( const std::string & key ) const
#if defined(__GNUC__) && !defined(__CINT__) #if defined(__GNUC__) && !defined(__CINT__)
__attribute__((deprecated)) __attribute__((deprecated))
#endif #endif
; ;
/**
* HasProperty will return true if the property list contains a valid pr
operty with key
* @param key the property key
* @return true if key exists and property for key is valid
*/
bool HasProperty(const std::string& key) const;
/**
* HasProperty will return true if the property list contains a valid pr
operty with key
* @param key the property key
* @return true if key exists and property for key is valid
*/
bool HasProperty(size_t key) const;
/**
* Key_Begin will return the begin iterator of the key container
* @return begin iterator of key container
*/
static StdString_Iterator Key_Begin();
/**
* Key_End will return the end iterator of the key container
* @return end iterator of key container
*/
static StdString_Iterator Key_End();
/**
* Key_RBegin will return the rbegin iterator of the key container
* @return rbegin iterator of key container
*/
static Reverse_StdString_Iterator Key_RBegin();
/**
* Key_REnd will return the rend iterator of the key container
* @return rend iterator of key container
*/
static Reverse_StdString_Iterator Key_REnd();
/**
* KeysAsString will return a space separated list of all keys
* @return a list of all currently allocated keys
*/
static std::string KeysAsString();
/**
* KeyAt will return the nth key allocated
* @param nth key currently allocated
* @return key as a string
*/
static const std::string& KeyAt(size_t nth);
/**
* Key is the static getter function to return the index of a key. If al
locateNew is
* set to true a new key will be allocated if it doesn't exist and it's
index returned.
* Otherwise if the key exists the function returns it's index or 0 if n
o key exists.
* @param key the key to look for
* @param allocateNew allocate a new key if the key doesn't exist
* @return key index or 0 if no key exists and allocateNew is set to fal
se
*/
static size_t KeyByName(const std::string& key,
bool allocateNew = false);
/**
* KeySize will return the number of currently allocated keys
* @return number of allocated keys
*/
static size_t KeySize();
/**
* PropertyAsString will return the nth property as a string if printabl
e
* @param key the property key
* @return nth property value as string
*/
std::string PropertyAsString(const std::string& key) const;
/** /**
* HasProperty will return true if the property list contains a valid * PropertyAsString will return the property value as a string if it exi
property with key sts
* @param key the property key * The parameter is a property key which can be aquired with the Propert
* @return true if key exists and property for key is valid yKey method.
*/ * @param key property key to look for
bool HasProperty( const std::string & key ) const; * @return string representation of the property
*/
/** std::string PropertyAsString(size_t key) const;
* HasProperty will return true if the property list contains a valid
property with key /**
* @param key the property key * PropertyKey will return the the key value corresponding to the parame
* @return true if key exists and property for key is valid ter given
*/ * @param key the string denoting the key value to lookup
bool HasProperty( size_t key ) const; * @param allocateNew if set to true a new key will be allocated if it d
oesn't exist
/**
* Key_Begin will return the begin iterator of the key container
* @return begin iterator of key container
*/
static StdString_Iterator Key_Begin();
/**
* Key_End will return the end iterator of the key container
* @return end iterator of key container
*/
static StdString_Iterator Key_End();
/**
* Key_RBegin will return the rbegin iterator of the key container
* @return rbegin iterator of key container
*/
static Reverse_StdString_Iterator Key_RBegin();
/**
* Key_REnd will return the rend iterator of the key container
* @return rend iterator of key container
*/
static Reverse_StdString_Iterator Key_REnd();
/**
* KeysAsString will return a space separated list of all keys
* @return a list of all currently allocated keys
*/
static std::string KeysAsString();
/**
* KeyAt will return the nth key allocated
* @param nth key currently allocated
* @return key as a string
*/
static const std::string & KeyAt( size_t nth );
/**
* Key is the static getter function to return the index of a key. If
allocateNew is
* set to true a new key will be allocated if it doesn't exist and it'
s index returned.
* Otherwise if the key exists the function returns it's index or 0 if
no key exists.
* @param key the key to look for
* @param allocateNew allocate a new key if the key doesn't exist
* @return key index or 0 if no key exists and allocateNew is set to f
alse
*/
static size_t KeyByName( const std::string & key,
bool allocateNew = false );
/**
* KeySize will return the number of currently allocated keys
* @return number of allocated keys
*/
static size_t KeySize();
/**
* PropertyAsString will return the nth property as a string if printa
ble
* @param key the property key
* @return nth property value as string
*/
std::string PropertyAsString(const std::string & key) const;
/**
* PropertyAsString will return the property value as a string if it e
xists
* The parameter is a property key which can be aquired with the Prope
rtyKey method.
* @param key property key to look for
* @return string representation of the property
*/
std::string PropertyAsString( size_t key ) const;
/**
* PropertyKey will return the the key value corresponding to the para
meter given
* @param key the string denoting the key value to lookup
* @param allocateNew if set to true a new key will be allocated if it
doesn't exist
if set to false and the key doesn't exist the function returns 0 if set to false and the key doesn't exist the function returns 0
* @return the key value corresponding to the key param * @return the key value corresponding to the key param
*/ */
size_t PropertyKey( const std::string & key, size_t PropertyKey(const std::string& key,
bool allocateNew = false ) const; bool allocateNew = false) const;
/** /**
* PropertyKeys will return all keys of this property list * PropertyKeys will return all keys of this property list
* @return all property keys * @return all property keys
*/ */
std::string PropertyKeys() const; std::string PropertyKeys() const;
/** /**
* PropertyCount will return the number of properties attached * PropertyCount will return the number of properties attached
* to this item. Attention!! Don't use the return value of this functi * to this item. Attention!! Don't use the return value of this function
on for for
* iteration over the properties. Use KeySize() instead. * iteration over the properties. Use KeySize() instead.
* @return number of properties * @return number of properties
*/ */
size_t PropertyCount() const; size_t PropertyCount() const;
/** /**
* This function is deprecated, use PropertyCount instead. The reason * This function is deprecated, use PropertyCount instead. The reason is
is, that , that
* XSize() functions in Reflex usually return the size of a container * XSize() functions in Reflex usually return the size of a container wh
while this ile this
* function now returns only the number of properties attached. The co * function now returns only the number of properties attached. The cont
ntainer it ainer it
* self can be larger, because it may have holes * self can be larger, because it may have holes
*/ */
size_t PropertySize() const size_t PropertySize() const
#if defined(__GNUC__) && !defined(__CINT__) #if defined(__GNUC__) && !defined(__CINT__)
__attribute__((deprecated)) __attribute__((deprecated))
#endif #endif
; ;
/**
* PropertyValue will return the nth property value
* @param key the property key
* @return nth property value
*/
Any& PropertyValue(const std::string& key) const;
/**
* PropertyAsString will return the property value as an Any object if i
t exists
* The parameter is a property key which can be aquired with the Propert
yKey method.
* @param key property key to look for
* @return Any representation of the property
*/
Any& PropertyValue(size_t key) const;
/**
* RemoveProperty will remove property value from the property list
* @param key of the property identified by the string
*/
void RemoveProperty(const std::string& key) const;
/** /**
* PropertyValue will return the nth property value * RemoveProperty will remove a property value from the property list
* @param key the property key * @param key of the property identified by the property key number
* @return nth property value */
*/ void RemoveProperty(size_t key) const;
Any & PropertyValue(const std::string & key) const;
private:
/** /**
* PropertyAsString will return the property value as an Any object if * the properties of the item
it exists * @link aggregation
* The parameter is a property key which can be aquired with the Prope * @clentCardinality 1
rtyKey method. * @supplierCardinality 0..1
* @param key property key to look for * @label propertylist impl
* @return Any representation of the property */
*/ PropertyListImpl* fPropertyListImpl;
Any & PropertyValue( size_t key ) const;
}; // class Propertylist
/**
* RemoveProperty will remove property value from the property list /**
* @param key of the property identified by the string * will put the property (key and value) on the ostream if printable
*/ * @param s the reference to the stream
void RemoveProperty( const std::string & key ) const; * @return the stream
*/
/** RFLX_API std::ostream& operator <<(std::ostream& s,
* RemoveProperty will remove a property value from the property list const PropertyList& p);
* @param key of the property identified by the property key number
*/
void RemoveProperty( size_t key ) const;
private:
/**
* the properties of the item
* @link aggregation
* @clentCardinality 1
* @supplierCardinality 0..1
* @label propertylist impl
*/
PropertyListImpl * fPropertyListImpl;
}; // class Propertylist
/**
* will put the property (key and value) on the ostream if printable
* @param s the reference to the stream
* @return the stream
*/
RFLX_API std::ostream & operator << ( std::ostream & s,
const PropertyList & p );
} //namespace Reflex } //namespace Reflex
#include "Reflex/internal/PropertyListImpl.h" #include "Reflex/internal/PropertyListImpl.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList::operator bool () const { inline
Reflex::PropertyList::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0 != fPropertyListImpl; return 0 != fPropertyListImpl;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList::PropertyList( PropertyListImpl * propertyListI mpl ) inline Reflex::PropertyList::PropertyList(PropertyListImpl* propertyListImp l)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fPropertyListImpl( propertyListImpl ) {} : fPropertyListImpl(propertyListImpl) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList::PropertyList( const PropertyList & pl) inline Reflex::PropertyList::PropertyList(const PropertyList& pl)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fPropertyListImpl( pl.fPropertyListImpl ) {} : fPropertyListImpl(pl.fPropertyListImpl) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList::~PropertyList() { inline Reflex::PropertyList::~PropertyList() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyList::AddProperty( const std::string & key, inline size_t
const Any & value ) Reflex::PropertyList::AddProperty(const std::string& key,
const { const Any& value) const {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
if ( fPropertyListImpl ) return fPropertyListImpl->AddProperty( key, val if (fPropertyListImpl) {
ue ); return fPropertyListImpl->AddProperty(key, value);
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyList::AddProperty( size_t key, inline void
const Any & value ) co Reflex::PropertyList::AddProperty(size_t key,
nst { const Any& value) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->AddProperty( key, val if (fPropertyListImpl) {
ue ); return fPropertyListImpl->AddProperty(key, value);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyList::AddProperty( const std::string & key, inline size_t
const char* value ) Reflex::PropertyList::AddProperty(const std::string& key,
const { const char* value) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->AddProperty( key, val if (fPropertyListImpl) {
ue ); return fPropertyListImpl->AddProperty(key, value);
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyList::AddProperty( size_t key, inline void
const char* value ) co Reflex::PropertyList::AddProperty(size_t key,
nst { const char* value) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->AddProperty( key, val if (fPropertyListImpl) {
ue ); return fPropertyListImpl->AddProperty(key, value);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyList::ClearProperties() const { inline void
Reflex::PropertyList::ClearProperties() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) fPropertyListImpl->ClearProperties(); if (fPropertyListImpl) {
fPropertyListImpl->ClearProperties();
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::PropertyList::HasProperty(const std::string & key) cons inline bool
t { Reflex::PropertyList::HasProperty(const std::string& key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->HasProperty( key ); if (fPropertyListImpl) {
return fPropertyListImpl->HasProperty(key);
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::PropertyList::HasProperty( size_t key) const { inline bool
Reflex::PropertyList::HasProperty(size_t key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->HasProperty( key ); if (fPropertyListImpl) {
return fPropertyListImpl->HasProperty(key);
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::PropertyList::HasKey(const std::string & key) const { inline bool
Reflex::PropertyList::HasKey(const std::string& key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return HasProperty( key ); return HasProperty(key);
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string inline std::string
Reflex::PropertyList::PropertyAsString( const std::string & key ) const { Reflex::PropertyList::PropertyAsString(const std::string& key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->PropertyAsString( key if (fPropertyListImpl) {
); return fPropertyListImpl->PropertyAsString(key);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string inline std::string
Reflex::PropertyList::PropertyAsString( size_t key ) const { Reflex::PropertyList::PropertyAsString(size_t key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->PropertyAsString( key if (fPropertyListImpl) {
); return fPropertyListImpl->PropertyAsString(key);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyList::PropertyKey( const std::string & key, inline size_t
bool allocateNew ) c Reflex::PropertyList::PropertyKey(const std::string& key,
onst { bool allocateNew) const {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
if ( fPropertyListImpl ) return fPropertyListImpl->PropertyKey( key, all if (fPropertyListImpl) {
ocateNew ); return fPropertyListImpl->PropertyKey(key, allocateNew);
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::PropertyList::PropertyKeys() const { inline std::string
Reflex::PropertyList::PropertyKeys() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->PropertyKeys(); if (fPropertyListImpl) {
return fPropertyListImpl->PropertyKeys();
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyList::PropertyCount() const { inline size_t
Reflex::PropertyList::PropertyCount() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) return fPropertyListImpl->PropertyCount(); if (fPropertyListImpl) {
return fPropertyListImpl->PropertyCount();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyList::PropertySize() const { inline size_t
Reflex::PropertyList::PropertySize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return PropertyCount(); return PropertyCount();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyList::RemoveProperty( const std::string & key ) inline void
const { Reflex::PropertyList::RemoveProperty(const std::string& key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) fPropertyListImpl->RemoveProperty( key ); if (fPropertyListImpl) {
fPropertyListImpl->RemoveProperty(key);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyList::RemoveProperty( size_t key ) const { inline void
Reflex::PropertyList::RemoveProperty(size_t key) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fPropertyListImpl ) fPropertyListImpl->RemoveProperty( key ); if (fPropertyListImpl) {
fPropertyListImpl->RemoveProperty(key);
}
} }
#endif // Reflex_PropertyList #endif // Reflex_PropertyList
 End of changes. 44 change blocks. 
321 lines changed or deleted 348 lines changed or added


 PropertyListImpl.h   PropertyListImpl.h 
// @(#)root/reflex:$Id: PropertyListImpl.h 24138 2008-06-04 12:50:27Z axel $ // @(#)root/reflex:$Id: PropertyListImpl.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_PropertyListImpl #ifndef Reflex_PropertyListImpl
#define Reflex_PropertyListImpl #define Reflex_PropertyListImpl
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Any.h" #include "Reflex/Any.h"
#include <map> #include <map>
#include <iostream> #include <iostream>
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( push ) # pragma warning( push )
#pragma warning( disable : 4251 ) # pragma warning( disable : 4251 )
#endif #endif
namespace Reflex { namespace Reflex {
/**
* @class PropertyList PropertyList.h Reflex/PropertyList.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API PropertyListImpl {
friend RFLX_API std::ostream& operator <<(std::ostream& s,
const PropertyListImpl& p);
public:
/** default constructor */
PropertyListImpl();
/** copy constructor */
PropertyListImpl(const PropertyListImpl &pl);
/** destructor */
virtual ~PropertyListImpl();
/**
* AddProperty will add a key value pair to the PropertyNth lsit
* @param key the key of the PropertyNth
* @param value the value of the PropertyNth (as any object)
* @return the property key of this property
*/
size_t AddProperty(const std::string& key,
const Any& value);
/**
* AddProperty will add a property value pair to the property list
* @param key the key of the property
* @param value the value of the property (as any object)
*/
void AddProperty(size_t key,
const Any& value);
/**
* AddProperty will add a key value pair to the PropertyNth lsit
* @param key the key of the PropertyNth
* @param value the value of the PropertyNth (as any object)
* @return the property key of this property
*/
size_t AddProperty(const std::string& key,
const char* value);
/**
* AddProperty will add a key value pair to the property list
* @param key the key of the property
* @param value the value of the property (as any object)
*/
void AddProperty(size_t key,
const char* value);
/**
* ClearProperties will remove all properties from the list
*/
void ClearProperties();
/**
* HasProperty will return true if the property list contains a key "key
" and
* the property for this key is valid
* @param key to look for
* @return true if a valid property for key exists
*/
bool HasProperty(const std::string& key) const;
/** /**
* @class PropertyList PropertyList.h Reflex/PropertyList.h * HasProperty will return true if the property list contains a key "key
* @author Stefan Roiser " and
* @date 24/11/2003 * the property for this key is valid
* @ingroup Ref * @param key to look for
*/ * @return true if a valid property for key exists
class RFLX_API PropertyListImpl { */
bool HasProperty(size_t key) const;
friend RFLX_API std::ostream & operator << ( std::ostream & s,
const PropertyListImpl & p ); /**
public: * Key_Begin will return the begin iterator of the key container
* @return begin iterator of key container
/** default constructor */ */
PropertyListImpl(); static StdString_Iterator Key_Begin();
/** copy constructor */ /**
PropertyListImpl( const PropertyListImpl & pl); * Key_End will return the end iterator of the key container
* @return end iterator of key container
/** destructor */ */
virtual ~PropertyListImpl(); static StdString_Iterator Key_End();
/** /**
* AddProperty will add a key value pair to the PropertyNth lsit * Key_RBegin will return the rbegin iterator of the key container
* @param key the key of the PropertyNth * @return rbegin iterator of key container
* @param value the value of the PropertyNth (as any object) */
* @return the property key of this property static Reverse_StdString_Iterator Key_RBegin();
*/
size_t AddProperty( const std::string & key, /**
const Any & value ); * Key_REnd will return the rend iterator of the key container
* @return rend iterator of key container
/** */
* AddProperty will add a property value pair to the property list static Reverse_StdString_Iterator Key_REnd();
* @param key the key of the property
* @param value the value of the property (as any object) /**
*/ * KeysAsString will return a space separated list of all keys
void AddProperty( size_t key, * @return a list of all currently allocated keys
const Any & value ); */
static std::string KeysAsString();
/**
* AddProperty will add a key value pair to the PropertyNth lsit /**
* @param key the key of the PropertyNth * KeyAt will return the nth key allocated
* @param value the value of the PropertyNth (as any object) * @param nth key currently allocated
* @return the property key of this property * @return key as a string
*/ */
size_t AddProperty( const std::string & key, static const std::string& KeyAt(size_t nth);
const char * value );
/**
/** * Key is the static getter function to return the index of a key. If al
* AddProperty will add a key value pair to the property list locateNew is
* @param key the key of the property * set to true a new key will be allocated if it doesn't exist and it's
* @param value the value of the property (as any object) index returned.
*/ * Otherwise if the key exists the function returns it's index or 0 if n
void AddProperty( size_t key, o key exists.
const char * value ); * @param key the key to look for
* @param allocateNew allocate a new key if the key doesn't exist
/** * @return key index or 0 if no key exists and allocateNew is set to fal
* ClearProperties will remove all properties from the list se
*/ */
void ClearProperties(); static size_t KeyByName(const std::string& key,
bool allocateNew = false);
/**
* HasProperty will return true if the property list contains a key "k /**
ey" and * KeySize will return the number of currently allocated keys
* the property for this key is valid * @return number of allocated keys
* @param key to look for */
* @return true if a valid property for key exists static size_t KeySize();
*/
bool HasProperty( const std::string & key ) const; /**
* propertyNumString will return the nth PropertyNth as a string if prin
/** table
* HasProperty will return true if the property list contains a key "k * @param key the PropertyNth key
ey" and * @return nth PropertyNth value as string
* the property for this key is valid */
* @param key to look for std::string PropertyAsString(const std::string& key) const;
* @return true if a valid property for key exists
*/ /**
bool HasProperty( size_t key ) const; * PropertyAsString will return the property value as a string if it exi
sts
/** * The parameter is a property key which can be aquired with the Propert
* Key_Begin will return the begin iterator of the key container yKey method.
* @return begin iterator of key container * @param key property key to look for
*/ * @return string representation of the property
static StdString_Iterator Key_Begin(); */
std::string PropertyAsString(size_t key) const;
/**
* Key_End will return the end iterator of the key container /**
* @return end iterator of key container * PropertyKey will return the the key value corresponding to the parame
*/ ter given
static StdString_Iterator Key_End(); * @param key the string denoting the key value to lookup
* @param allocateNew if set to true a new key will be allocated if it d
/** oesn't exist
* Key_RBegin will return the rbegin iterator of the key container
* @return rbegin iterator of key container
*/
static Reverse_StdString_Iterator Key_RBegin();
/**
* Key_REnd will return the rend iterator of the key container
* @return rend iterator of key container
*/
static Reverse_StdString_Iterator Key_REnd();
/**
* KeysAsString will return a space separated list of all keys
* @return a list of all currently allocated keys
*/
static std::string KeysAsString();
/**
* KeyAt will return the nth key allocated
* @param nth key currently allocated
* @return key as a string
*/
static const std::string & KeyAt( size_t nth );
/**
* Key is the static getter function to return the index of a key. If
allocateNew is
* set to true a new key will be allocated if it doesn't exist and it'
s index returned.
* Otherwise if the key exists the function returns it's index or 0 if
no key exists.
* @param key the key to look for
* @param allocateNew allocate a new key if the key doesn't exist
* @return key index or 0 if no key exists and allocateNew is set to f
alse
*/
static size_t KeyByName( const std::string & key,
bool allocateNew = false );
/**
* KeySize will return the number of currently allocated keys
* @return number of allocated keys
*/
static size_t KeySize();
/**
* propertyNumString will return the nth PropertyNth as a string if pr
intable
* @param key the PropertyNth key
* @return nth PropertyNth value as string
*/
std::string PropertyAsString(const std::string & key) const;
/**
* PropertyAsString will return the property value as a string if it e
xists
* The parameter is a property key which can be aquired with the Prope
rtyKey method.
* @param key property key to look for
* @return string representation of the property
*/
std::string PropertyAsString( size_t key ) const;
/**
* PropertyKey will return the the key value corresponding to the para
meter given
* @param key the string denoting the key value to lookup
* @param allocateNew if set to true a new key will be allocated if it
doesn't exist
if set to false and the key doesn't exist the function returns 0 if set to false and the key doesn't exist the function returns 0
* @return the key value corresponding to the key param * @return the key value corresponding to the key param
*/ */
size_t PropertyKey( const std::string & key, size_t PropertyKey(const std::string& key,
bool allocateNew = false ) const; bool allocateNew = false) const;
/** /**
* PropertyKeys will return all keys of this PropertyNth list * PropertyKeys will return all keys of this PropertyNth list
* @return all PropertyNth keys * @return all PropertyNth keys
*/ */
std::string PropertyKeys() const; std::string PropertyKeys() const;
/** /**
* PropertyCount will return the number of properties attached * PropertyCount will return the number of properties attached
* to this item * to this item
* @return number of properties * @return number of properties
*/ */
size_t PropertyCount() const; size_t PropertyCount() const;
/** /**
* propertyNumValue will return the nth PropertyNth value * propertyNumValue will return the nth PropertyNth value
* @param key the PropertyNth key * @param key the PropertyNth key
* @return nth PropertyNth value * @return nth PropertyNth value
*/ */
Any & PropertyValue(const std::string & key) const; Any& PropertyValue(const std::string& key) const;
/** /**
* PropertyAsString will return the property value as an Any object if * PropertyAsString will return the property value as an Any object if i
it exists t exists
* The parameter is a property key which can be aquired with the Prope * The parameter is a property key which can be aquired with the Propert
rtyKey method. yKey method.
* @param key property key to look for * @param key property key to look for
* @return Any representation of the property * @return Any representation of the property
*/ */
Any & PropertyValue( size_t key ) const; Any& PropertyValue(size_t key) const;
/** /**
* RemoveProperty will remove a key value pair to the PropertyNth lsit * RemoveProperty will remove a key value pair to the PropertyNth lsit
* @param key the key of the PropertyNth * @param key the key of the PropertyNth
*/ */
void RemoveProperty( const std::string & key ); void RemoveProperty(const std::string& key);
/** /**
* RemoveProperty will remove a property value from the property list * RemoveProperty will remove a property value from the property list
* @param key of the property identified by the property key number * @param key of the property identified by the property key number
*/ */
void RemoveProperty( size_t key ); void RemoveProperty(size_t key);
private: private:
/**
/** * the Property container
* the Property container */
*/ typedef std::vector<Any> Properties;
typedef std::vector< Any > Properties;
/** the properties of the item
/** the properties of the item * @label properties
* @label properties * @link aggregationByValue
* @link aggregationByValue * @clientCardinality 1
* @clientCardinality 1 * @supplierCardinality 0..1
* @supplierCardinality 0..1 */
*/ std::vector<Any>* fProperties;
std::vector< Any > * fProperties;
}; // class PropertyListImpl
}; // class PropertyListImpl
/**
/** * will put the PropertyNth (key and value) on the ostream if printable
* will put the PropertyNth (key and value) on the ostream if printable * @param s the reference to the stream
* @param s the reference to the stream * @return the stream
* @return the stream */
*/ RFLX_API std::ostream& operator <<(std::ostream& s,
RFLX_API std::ostream & operator << ( std::ostream & s, const PropertyListImpl& p);
const PropertyListImpl & p );
} //namespace Reflex } //namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyListImpl::PropertyListImpl() inline Reflex::PropertyListImpl::PropertyListImpl()
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fProperties( 0 ) {} : fProperties(0) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyListImpl::PropertyListImpl( const PropertyListImpl & pl ) inline Reflex::PropertyListImpl::PropertyListImpl(const PropertyListImpl& p l)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fProperties( pl.fProperties ) {} : fProperties(pl.fProperties) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyListImpl::AddProperty( const std::string & ke inline size_t
y, Reflex::PropertyListImpl::AddProperty(const std::string& key,
const Any & valu const Any& value) {
e ) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
size_t k = PropertyKey( key, true ); size_t k = PropertyKey(key, true);
AddProperty( k, value); AddProperty(k, value);
return k; return k;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyListImpl::AddProperty( size_t key, inline void
const Any & value Reflex::PropertyListImpl::AddProperty(size_t key,
) { const Any& value) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
if ( ! fProperties ) fProperties = new Properties(); if (!fProperties) {
if ( key >= fProperties->size() ) fProperties->resize( key+1, Dummy::Any fProperties = new Properties();
()); }
if (key >= fProperties->size()) {
fProperties->resize(key + 1, Dummy::Any());
}
(*fProperties)[key] = value; (*fProperties)[key] = value;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::PropertyListImpl::AddProperty( const std::string & ke inline size_t
y, Reflex::PropertyListImpl::AddProperty(const std::string& key,
const char* valu const char* value) {
e ) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return AddProperty( key, Any(value) ); return AddProperty(key, Any(value));
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyListImpl::AddProperty( size_t key, inline void
const char * value Reflex::PropertyListImpl::AddProperty(size_t key,
) { const char* value) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
AddProperty( key, Any(value)); AddProperty(key, Any(value));
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyListImpl::RemoveProperty( const std::string & k inline void
ey ) { Reflex::PropertyListImpl::RemoveProperty(const std::string& key) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
RemoveProperty( PropertyKey( key )); RemoveProperty(PropertyKey(key));
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::PropertyListImpl::RemoveProperty( size_t key ) { inline void
Reflex::PropertyListImpl::RemoveProperty(size_t key) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fProperties ) fProperties->at(key).Swap(Dummy::Any()); if (fProperties) {
fProperties->at(key).Swap(Dummy::Any());
}
} }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) # pragma warning( pop )
#endif #endif
#endif // Reflex_PropertyListImpl #endif // Reflex_PropertyListImpl
 End of changes. 20 change blocks. 
265 lines changed or deleted 269 lines changed or added


 ProposalFunction.h   ProposalFunction.h 
skipping to change at line 12 skipping to change at line 12
// Authors: Kevin Belasco 17/06/2009 // Authors: Kevin Belasco 17/06/2009
// Authors: Kyle Cranmer 17/06/2009 // Authors: Kyle Cranmer 17/06/2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
//_________________________________________________
/*
BEGIN_HTML
<p>
ProposalFunction is an interface for all proposal functions that would be u
sed with a Markov Chain Monte Carlo algorithm.
Given a current point in the parameter space it proposes a new point.
Proposal functions may or may not be symmetric, in the sense that the proba
bility to propose X1 given we are at X2
need not be the same as the probability to propose X2 given that we are at
X1. In this case, the IsSymmetric method
should return false, and the Metropolis algorithm will need to take into ac
count the proposal density to maintain detailed balance.
</p>
END_HTML
*/
//
#ifndef ROOSTATS_ProposalFunction #ifndef ROOSTATS_ProposalFunction
#define ROOSTATS_ProposalFunction #define ROOSTATS_ProposalFunction
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif
#ifndef ROO_MSG_SERVICE
#include "RooMsgService.h" #include "RooMsgService.h"
#endif
#ifndef ROOT_TIterator
#include "TIterator.h" #include "TIterator.h"
#endif
#ifndef ROO_REAL_VAR
#include "RooRealVar.h" #include "RooRealVar.h"
#endif
using namespace std; using namespace std;
namespace RooStats { namespace RooStats {
class ProposalFunction : public TObject { class ProposalFunction : public TObject {
public: public:
//Default constructor //Default constructor
ProposalFunction() {} ProposalFunction() {}
skipping to change at line 45 skipping to change at line 67
// Populate xPrime with the new proposed point, // Populate xPrime with the new proposed point,
// possibly based on the current point x // possibly based on the current point x
virtual void Propose(RooArgSet& xPrime, RooArgSet& x) = 0; virtual void Propose(RooArgSet& xPrime, RooArgSet& x) = 0;
// Determine whether or not the proposal density is symmetric for // Determine whether or not the proposal density is symmetric for
// points x1 and x2 - that is, whether the probabilty of reaching x2 // points x1 and x2 - that is, whether the probabilty of reaching x2
// from x1 is equal to the probability of reaching x1 from x2 // from x1 is equal to the probability of reaching x1 from x2
virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2) = 0; virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2) = 0;
// Return the probability of reaching the point xPrime given the star // Return the probability of proposing the point x1 given the startin
ting g
// point x // point x2
virtual Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x) virtual Double_t GetProposalDensity(RooArgSet& x1, RooArgSet& x2) = 0
= 0; ;
// Check the parameters for which the ProposalFunction will // Check the parameters for which the ProposalFunction will
// propose values to make sure they are all RooRealVars // propose values to make sure they are all RooRealVars
// Return true if all objects are RooRealVars, false otherwise // Return true if all objects are RooRealVars, false otherwise
virtual bool CheckParameters(RooArgSet& params) virtual bool CheckParameters(RooArgSet& params)
{ {
TIterator* it = params.createIterator(); TIterator* it = params.createIterator();
TObject* obj; TObject* obj;
while ((obj = it->Next()) != NULL) { while ((obj = it->Next()) != NULL) {
if (!dynamic_cast<RooRealVar*>(obj)) { if (!dynamic_cast<RooRealVar*>(obj)) {
skipping to change at line 70 skipping to change at line 92
<< "Object \"" << obj->GetName() << "\" not of t ype " << "Object \"" << obj->GetName() << "\" not of t ype "
<< "RooRealVar" << endl; << "RooRealVar" << endl;
return false; return false;
} }
} }
// Made it here, so all parameters are RooRealVars // Made it here, so all parameters are RooRealVars
return true; return true;
} }
protected: protected:
// Assuming all values in coll are RooRealVars, randomize their value
s.
virtual void randomizeSet(RooArgSet& set);
ClassDef(ProposalFunction,1) // Interface for the proposal function u sed with Markov Chain Monte Carlo ClassDef(ProposalFunction,1) // Interface for the proposal function u sed with Markov Chain Monte Carlo
}; };
} }
#endif #endif
 End of changes. 8 change blocks. 
9 lines changed or deleted 31 lines changed or added


 RConfig.h   RConfig.h 
/* @(#)root/base:$Id: RConfig.h 27658 2009-02-28 05:34:57Z pcanal $ */ /* @(#)root/base:$Id: RConfig.h 29770 2009-08-12 16:40:27Z rdm $ */
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_RConfig #ifndef ROOT_RConfig
skipping to change at line 118 skipping to change at line 118
# define R__NONSCALARFPOS # define R__NONSCALARFPOS
# endif # endif
#endif #endif
#if defined(__sun) && !(defined(linux) || defined(__FCC_VERSION)) #if defined(__sun) && !(defined(linux) || defined(__FCC_VERSION))
# ifdef __SVR4 # ifdef __SVR4
# define R__SOLARIS # define R__SOLARIS
# define R__SEEK64 # define R__SEEK64
# define ANSICPP # define ANSICPP
# ifdef __i386 # ifdef __i386
# define R__I386 # define R__BYTESWAP
# endif
# ifdef __x86_64
# define R__B64
# define R__BYTESWAP # define R__BYTESWAP
# endif # endif
# else # else
# define R__SUN # define R__SUN
# include <stdlib.h> # include <stdlib.h>
# endif # endif
# define R__UNIX # define R__UNIX
# define NEED_STRING # define NEED_STRING
# define NEED_SIGJMP # define NEED_SIGJMP
# if __SUNPRO_CC > 0x420 # if __SUNPRO_CC > 0x420
skipping to change at line 428 skipping to change at line 431
#endif #endif
/* allows symbols to be hidden from the shared library export symbol table */ /* allows symbols to be hidden from the shared library export symbol table */
/* use typically on file statics and private methods */ /* use typically on file statics and private methods */
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
# define R__HIDDEN __attribute__((__visibility__("hidden"))) # define R__HIDDEN __attribute__((__visibility__("hidden")))
#else #else
# define R__HIDDEN # define R__HIDDEN
#endif #endif
#ifdef __KCC
# define R__KCC
# define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
# define R__VECNEWDELETE /* supports overloading of new[] and delete[]
*/
# define R__PLACEMENTDELETE /* supports overloading placement delete */
# define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
# define ANSICPP
#endif
#ifdef __INTEL_COMPILER #ifdef __INTEL_COMPILER
# define R__INTEL_COMPILER # define R__INTEL_COMPILER
# define R__ANSISTREAM /* ANSI C++ Standard Library conformant */ # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */
# define R__VECNEWDELETE /* supports overloading of new[] and delete[] */ # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
# define R__PLACEMENTDELETE /* supports overloading placement delete */ # define R__PLACEMENTDELETE /* supports overloading placement delete */
# define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */ # define R__PLACEMENTINLINE /* placement new/delete is inline in <new> */
# define ANSICPP # define ANSICPP
#endif #endif
#ifdef __HP_aCC #ifdef __HP_aCC
 End of changes. 3 change blocks. 
12 lines changed or deleted 5 lines changed or added


 RConfigOptions.h   RConfigOptions.h 
#ifndef ROOT_RConfigOptions #ifndef ROOT_RConfigOptions
#define ROOT_RConfigOptions #define ROOT_RConfigOptions
#define R__CONFIGUREOPTIONS "QTDIR=/afs/cern.ch/sw/lcg/external/qt/4.4.2/ i686-slc5-gcc43-opt PYTHONDIR=/afs/cern.ch/sw/lcg/external/Python/2.5.4/i68 6-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink -- enable-gdml --enable-genvector --enable-mathmore --enable-minuit2 --enable- mysql --enable-oracle --enable-python --enable-qt --enable-qtgsi --enable-r eflex --enable-roofit --enable-table --enable-unuran --with-castor-incdir=/ afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include /shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i6 86-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/sw/lcg/external/c ernlib/2006a/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/afs/cern.ch/sw/lcg /external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dcap/lib --with-dcap-incd ir=/afs/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dca p/include --with-fftw3-incdir=/afs/cern.ch/user/b/bellenot/scratch0/fftw3/3 .1.2/i686-slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/user/b/be llenot/scratch0/fftw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern .ch/sw/lcg/external/gccxml/0.9.0_20090601/i686-slc5-gcc43-opt/bin --with-gf al-libdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-o pt/lib --with-gfal-incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i 686-slc5-gcc43-opt/include --with-globus-incdir=/afs/cern.ch/sw/lcg/externa l/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-glo bus-libdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-sl c5-gcc43-opt/globus/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/ 1.10/i686-slc5-gcc43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/exte rnal/GSL/1.10/i686-slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/l cg/external/mysql/5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/a fs/cern.ch/sw/lcg/external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-orac le-incdir=/afs/cern.ch/sw/lcg/external/oracle/10.2.0.4-full/i686-slc5-gcc43 -opt/include --with-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/10.2. 0.4-full/i686-slc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/ex ternal/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include/shift --with-shift-l ibdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/ lib" #define R__CONFIGUREOPTIONS "QTDIR=/afs/cern.ch/sw/lcg/external/qt/4.4.2/ i686-slc5-gcc43-opt PYTHONDIR=/afs/cern.ch/sw/lcg/external/Python/2.5.4/i68 6-slc5-gcc43-opt --fail-on-missing --enable-cintex --enable-explicitlink -- enable-gdml --enable-genvector --enable-mathmore --enable-minuit2 --enable- mysql --enable-oracle --enable-python --enable-qt --enable-qtgsi --enable-r eflex --enable-roofit --enable-table --enable-unuran --with-castor-incdir=/ afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/include /shift --with-castor-libdir=/afs/cern.ch/sw/lcg/external/castor/2.1.7-24/i6 86-slc5-gcc43-opt/usr/lib --with-cern-libdir=/afs/cern.ch/sw/lcg/external/c ernlib/2006a/i686-slc5-gcc43-opt/lib --with-dcap-libdir=/afs/cern.ch/sw/lcg /external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dcap/lib --with-dcap-incd ir=/afs/cern.ch/sw/lcg/external/dcache_client/1.9.3/i686-slc5-gcc43-opt/dca p/include --with-fftw3-incdir=/afs/cern.ch/sw/lcg/external/fftw3/3.1.2/i686 -slc5-gcc43-opt/include --with-fftw3-libdir=/afs/cern.ch/sw/lcg/external/ff tw3/3.1.2/i686-slc5-gcc43-opt/lib --with-gccxml=/afs/cern.ch/sw/lcg/externa l/gccxml/0.9.0_20090601/i686-slc5-gcc43-opt/bin --with-gfal-libdir=/afs/cer n.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-opt/lib --with-gfal -incdir=/afs/cern.ch/sw/lcg/external/Grid/gfal/1.11.7-1/i686-slc5-gcc43-opt /include --with-globus-incdir=/afs/cern.ch/sw/lcg/external/Grid/globus/4.0. 3-VDT-1.6.0/i686-slc5-gcc43-opt/globus/include --with-globus-libdir=/afs/ce rn.ch/sw/lcg/external/Grid/globus/4.0.3-VDT-1.6.0/i686-slc5-gcc43-opt/globu s/lib --with-gsl-incdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i686-slc5-gcc 43-opt/include --with-gsl-libdir=/afs/cern.ch/sw/lcg/external/GSL/1.10/i686 -slc5-gcc43-opt/lib --with-mysql-incdir=/afs/cern.ch/sw/lcg/external/mysql/ 5.0.18/i686-slc5-gcc43-opt/include --with-mysql-libdir=/afs/cern.ch/sw/lcg/ external/mysql/5.0.18/i686-slc5-gcc43-opt/lib --with-oracle-incdir=/afs/cer n.ch/sw/lcg/external/oracle/10.2.0.4p1-full/i686-slc5-gcc43-opt/include --w ith-oracle-libdir=/afs/cern.ch/sw/lcg/external/oracle/10.2.0.4p1-full/i686- slc5-gcc43-opt/lib --with-shift-incdir=/afs/cern.ch/sw/lcg/external/castor/ 2.1.7-24/i686-slc5-gcc43-opt/usr/include/shift --with-shift-libdir=/afs/cer n.ch/sw/lcg/external/castor/2.1.7-24/i686-slc5-gcc43-opt/usr/lib"
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RVersion.h   RVersion.h 
skipping to change at line 17 skipping to change at line 17
* These macros can be used in the following way: * These macros can be used in the following way:
* *
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4) * #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h> * #include <newheader.h>
* #else * #else
* #include <oldheader.h> * #include <oldheader.h>
* #endif * #endif
* *
*/ */
#define ROOT_RELEASE "5.24/00" #define ROOT_RELEASE "5.25/02"
#define ROOT_RELEASE_DATE "Jun 29 2009" #define ROOT_RELEASE_DATE "Sep 29 2009"
#define ROOT_RELEASE_TIME "11:40:31" #define ROOT_RELEASE_TIME "06:55:55"
#define ROOT_SVN_REVISION 29252 #define ROOT_SVN_REVISION 30516
#define ROOT_SVN_BRANCH "trunk" #define ROOT_SVN_BRANCH "trunk"
#define ROOT_VERSION_CODE 333824 #define ROOT_VERSION_CODE 334082
#define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 ReflexBuilder.h   ReflexBuilder.h 
// @(#)root/reflex:$Id: ReflexBuilder.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: ReflexBuilder.h 29355 2009-07-06 17:34:05Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 28 skipping to change at line 28
#include "Reflex/Builder/NamespaceBuilder.h" #include "Reflex/Builder/NamespaceBuilder.h"
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Builder/TypedefBuilder.h" #include "Reflex/Builder/TypedefBuilder.h"
#include "Reflex/Builder/EnumBuilder.h" #include "Reflex/Builder/EnumBuilder.h"
#include "Reflex/Builder/UnionBuilder.h" #include "Reflex/Builder/UnionBuilder.h"
#include "Reflex/Builder/FunctionBuilder.h" #include "Reflex/Builder/FunctionBuilder.h"
#include "Reflex/Builder/VariableBuilder.h" #include "Reflex/Builder/VariableBuilder.h"
#include "Reflex/Builder/CollectionProxy.h" #include "Reflex/Builder/CollectionProxy.h"
#include "Reflex/Builder/DictSelection.h" #include "Reflex/Builder/DictSelection.h"
#include "Reflex/Builder/NewDelFunctions.h" #include "Reflex/Builder/NewDelFunctions.h"
#include "Reflex/Builder/GenreflexMemberBuilder.h"
#endif // Reflex_ReflexBuilder #endif // Reflex_ReflexBuilder
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 RooAbsArg.h   RooAbsArg.h 
skipping to change at line 41 skipping to change at line 41
class RooAbsCollection ; class RooAbsCollection ;
class RooTreeData ; class RooTreeData ;
class RooTreeDataStore ; class RooTreeDataStore ;
class RooAbsData ; class RooAbsData ;
class RooAbsDataStore ; class RooAbsDataStore ;
class RooAbsProxy ; class RooAbsProxy ;
class RooArgProxy ; class RooArgProxy ;
class RooSetProxy ; class RooSetProxy ;
class RooListProxy ; class RooListProxy ;
class RooExpensiveObjectCache ; class RooExpensiveObjectCache ;
/* class TGraphStruct ; */
class RooAbsArg : public TNamed, public RooPrintable { class RooAbsArg : public TNamed, public RooPrintable {
public: public:
// Constructors, cloning and assignment // Constructors, cloning and assignment
RooAbsArg() ; RooAbsArg() ;
virtual ~RooAbsArg(); virtual ~RooAbsArg();
RooAbsArg(const char *name, const char *title); RooAbsArg(const char *name, const char *title);
RooAbsArg(const RooAbsArg& other, const char* name=0) ; RooAbsArg(const RooAbsArg& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const = 0 ; virtual TObject* clone(const char* newname) const = 0 ;
skipping to change at line 72 skipping to change at line 73
Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg * ignoreArg=0) const { Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg * ignoreArg=0) const {
// Does this arg depend on the value of any of of the values in serverL ist? // Does this arg depend on the value of any of of the values in serverL ist?
return dependsOn(serverList,ignoreArg,kTRUE) ; return dependsOn(serverList,ignoreArg,kTRUE) ;
} }
Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg =0) const { Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg =0) const {
// Does this arg depend on the value of server? // Does this arg depend on the value of server?
return dependsOn(server,ignoreArg,kTRUE) ; return dependsOn(server,ignoreArg,kTRUE) ;
} }
Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ign oreArg=0, Bool_t valueOnly=kFALSE) const ; Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ign oreArg=0, Bool_t valueOnly=kFALSE) const ;
Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, B ool_t valueOnly=kFALSE) const ; Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, B ool_t valueOnly=kFALSE) const ;
Bool_t overlaps(const RooAbsArg& testArg) const ; Bool_t overlaps(const RooAbsArg& testArg, Bool_t valueOnly=kFALSE) const
;
Bool_t hasClients() const { return _clientList.GetSize()>0 ? kTRUE : kFAL
SE ; }
inline TIterator* clientIterator() const { inline TIterator* clientIterator() const {
// Return iterator over all client RooAbsArgs // Return iterator over all client RooAbsArgs
return _clientList.MakeIterator() ; return _clientList.MakeIterator() ;
} }
inline TIterator* valueClientIterator() const { inline TIterator* valueClientIterator() const {
// Return iterator over all value client RooAbsArgs // Return iterator over all value client RooAbsArgs
return _clientListValue.MakeIterator() ; return _clientListValue.MakeIterator() ;
} }
inline TIterator* shapeClientIterator() const { inline TIterator* shapeClientIterator() const {
// Return iterator over all shape client RooAbsArgs // Return iterator over all shape client RooAbsArgs
skipping to change at line 144 skipping to change at line 146
// as our value. The caller is responsible for deleting the returned obje ct. // as our value. The caller is responsible for deleting the returned obje ct.
virtual RooAbsArg *createFundamental(const char* newname=0) const = 0; virtual RooAbsArg *createFundamental(const char* newname=0) const = 0;
inline virtual Bool_t isLValue() const { inline virtual Bool_t isLValue() const {
// Is this argument an l-value, ie, can it appear on the left-hand side // Is this argument an l-value, ie, can it appear on the left-hand side
// of an assignment expression? LValues are also special since they can // of an assignment expression? LValues are also special since they can
// potentially be analytically integrated and generated. // potentially be analytically integrated and generated.
return kFALSE; return kFALSE;
} }
void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t str
ipDisconnected=kTRUE) const ;
// Parameter & observable interpretation of servers // Parameter & observable interpretation of servers
friend class RooProdPdf ; friend class RooProdPdf ;
friend class RooAddPdf ; friend class RooAddPdf ;
friend class RooAddPdfOrig ; friend class RooAddPdfOrig ;
RooArgSet* getVariables() const ; RooArgSet* getVariables(Bool_t stripDisconnected=kTRUE) const ;
RooArgSet* getParameters(const RooAbsData* data) const ; RooArgSet* getParameters(const RooAbsData* data, Bool_t stripDisconnected
RooArgSet* getParameters(const RooAbsData& data) const { =kTRUE) const ;
RooArgSet* getParameters(const RooAbsData& data, Bool_t stripDisconnected
=kTRUE) const {
// Return the parameters of this p.d.f when used in conjuction with dat aset 'data' // Return the parameters of this p.d.f when used in conjuction with dat aset 'data'
return getParameters(&data) ; return getParameters(&data,stripDisconnected) ;
} }
RooArgSet* getParameters(const RooArgSet& set) const { RooArgSet* getParameters(const RooArgSet& set, Bool_t stripDisconnected=k TRUE) const {
// Return the parameters of the p.d.f given the provided set of observa bles // Return the parameters of the p.d.f given the provided set of observa bles
return getParameters(&set) ; return getParameters(&set,stripDisconnected) ;
} }
virtual RooArgSet* getParameters(const RooArgSet* depList) const ; virtual RooArgSet* getParameters(const RooArgSet* depList, Bool_t stripDi sconnected=kTRUE) const ;
RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) c onst { RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) c onst {
// Return the observables of _this_ pdf given a set of observables // Return the observables of _this_ pdf given a set of observables
return getObservables(&set,valueOnly) ; return getObservables(&set,valueOnly) ;
} }
RooArgSet* getObservables(const RooAbsData* data) const ; RooArgSet* getObservables(const RooAbsData* data) const ;
RooArgSet* getObservables(const RooAbsData& data) const { RooArgSet* getObservables(const RooAbsData& data) const {
// Return the observables of _this_ pdf given the observables defined b y 'data' // Return the observables of _this_ pdf given the observables defined b y 'data'
return getObservables(&data) ; return getObservables(&data) ;
} }
virtual RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueO nly=kTRUE) const ; virtual RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueO nly=kTRUE) const ;
skipping to change at line 282 skipping to change at line 286
// Find constant terms in expression // Find constant terms in expression
Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st) ; Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st) ;
Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st, RooLinkedList& processedNodes) ; Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheLi st, RooLinkedList& processedNodes) ;
// constant term optimization // constant term optimization
virtual void constOptimizeTestStatistic(ConstOpCode opcode) ; virtual void constOptimizeTestStatistic(ConstOpCode opcode) ;
void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ; void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
void graphVizTree(ostream& os, const char* delimiter="\n", bool useTitle= false, bool useLatex=false) ; void graphVizTree(ostream& os, const char* delimiter="\n", bool useTitle= false, bool useLatex=false) ;
/* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.0
3) ; */
void printComponentTree(const char* indent="",const char* namePat=0) ;
void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ; void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
void printCompactTree(ostream& os, const char* indent="", const char* nam ePat=0, RooAbsArg* client=0) ; void printCompactTree(ostream& os, const char* indent="", const char* nam ePat=0, RooAbsArg* client=0) ;
virtual void printCompactTreeHook(ostream& os, const char *ind="") ; virtual void printCompactTreeHook(ostream& os, const char *ind="") ;
// Dirty state accessor // Dirty state accessor
inline Bool_t isShapeDirty() const { inline Bool_t isShapeDirty() const {
// Return true is shape has been invalidated by server value change // Return true is shape has been invalidated by server value change
return isDerived()?_shapeDirty:kFALSE ; return isDerived()?_shapeDirty:kFALSE ;
} }
inline Bool_t isValueDirty() const { inline Bool_t isValueDirty() const {
skipping to change at line 335 skipping to change at line 342
friend class RooAbsReal ; friend class RooAbsReal ;
friend class RooProjectedPdf ; friend class RooProjectedPdf ;
//friend class RooSimCloneTool ; //friend class RooSimCloneTool ;
virtual void operModeHook() {} ; virtual void operModeHook() {} ;
virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ; virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
virtual Bool_t isValid() const ; virtual Bool_t isValid() const ;
virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*li st*/) const {} ; virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*li st*/, Bool_t /*stripDisconnected*/) const {} ;
virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*l ist*/) const {} ; virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*l ist*/) const {} ;
// Dirty state modifiers // Dirty state modifiers
public: public:
inline void setValueDirty() const { setValueDirty(0) ; } inline void setValueDirty() const { setValueDirty(0) ; }
inline void setShapeDirty() const { setShapeDirty(0) ; } inline void setShapeDirty() const { setShapeDirty(0) ; }
inline void clearValueDirty() const { inline void clearValueDirty() const {
_valueDirty=kFALSE ; _valueDirty=kFALSE ;
} }
inline void clearShapeDirty() const { inline void clearShapeDirty() const {
skipping to change at line 379 skipping to change at line 386
virtual void serverNameChangeHook(const RooAbsArg* /*oldServer*/, const R ooAbsArg* /*newServer*/) { } ; virtual void serverNameChangeHook(const RooAbsArg* /*oldServer*/, const R ooAbsArg* /*newServer*/) { } ;
void addServer(RooAbsArg& server, Bool_t valueProp=kTRUE, Bool_t shapePro p=kFALSE) ; void addServer(RooAbsArg& server, Bool_t valueProp=kTRUE, Bool_t shapePro p=kFALSE) ;
void addServerList(RooAbsCollection& serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE) ; void addServerList(RooAbsCollection& serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE) ;
void replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t val ueProp, Bool_t shapeProp) ; void replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t val ueProp, Bool_t shapeProp) ;
void changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp) ; void changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp) ;
void removeServer(RooAbsArg& server, Bool_t force=kFALSE) ; void removeServer(RooAbsArg& server, Bool_t force=kFALSE) ;
RooAbsArg *findNewServer(const RooAbsCollection &newSet, Bool_t nameChang e) const; RooAbsArg *findNewServer(const RooAbsCollection &newSet, Bool_t nameChang e) const;
RooExpensiveObjectCache& expensiveObjectCache() const ; RooExpensiveObjectCache& expensiveObjectCache() const ;
void setExpensiveObjectCache(RooExpensiveObjectCache& cache) { _eocache = &cache ; }
protected: protected:
// Proxy management // Proxy management
friend class RooAddModel ; friend class RooAddModel ;
friend class RooArgProxy ; friend class RooArgProxy ;
friend class RooSetProxy ; friend class RooSetProxy ;
friend class RooListProxy ; friend class RooListProxy ;
friend class RooObjectFactory ; friend class RooObjectFactory ;
void registerProxy(RooArgProxy& proxy) ; void registerProxy(RooArgProxy& proxy) ;
skipping to change at line 406 skipping to change at line 414
Int_t numProxies() const ; Int_t numProxies() const ;
// Attribute list // Attribute list
std::set<std::string> _boolAttrib ; // Boolean attributes std::set<std::string> _boolAttrib ; // Boolean attributes
std::map<std::string,std::string> _stringAttrib ; // String attributes std::map<std::string,std::string> _stringAttrib ; // String attributes
std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib utes (not copied in ctor) std::set<std::string> _boolAttribTransient ; //! Transient boolean attrib utes (not copied in ctor)
void printAttribList(ostream& os) const; void printAttribList(ostream& os) const;
// Hooks for RooTreeData interface // Hooks for RooTreeData interface
friend class RooCompositeDataStore ;
friend class RooTreeDataStore ; friend class RooTreeDataStore ;
friend class RooTreeData ; friend class RooTreeData ;
friend class RooDataSet ; friend class RooDataSet ;
friend class RooRealMPFE ; friend class RooRealMPFE ;
friend class RooHistPdf ; friend class RooHistPdf ;
virtual void syncCache(const RooArgSet* nset=0) = 0 ; virtual void syncCache(const RooArgSet* nset=0) = 0 ;
virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) = 0 ; virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) = 0 ;
virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ; virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ; virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
virtual void fillTreeBranch(TTree& t) = 0 ; virtual void fillTreeBranch(TTree& t) = 0 ;
skipping to change at line 444 skipping to change at line 453
mutable Bool_t _valueDirty ; // Flag set if value needs recalculating be cause input values modified mutable Bool_t _valueDirty ; // Flag set if value needs recalculating be cause input values modified
mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating be cause input shapes modified mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating be cause input shapes modified
mutable OperMode _operMode ; // Dirty state propagation mode mutable OperMode _operMode ; // Dirty state propagation mode
// Owned components // Owned components
RooArgSet* _ownedComponents ; //! Set of owned component RooArgSet* _ownedComponents ; //! Set of owned component
mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
void setExpensiveObjectCache(RooExpensiveObjectCache& cache) { _eocache = &cache ; }
mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma nager for any expensive components created by this object mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma nager for any expensive components created by this object
ClassDef(RooAbsArg,4) // Abstract variable ClassDef(RooAbsArg,4) // Abstract variable
}; };
ostream& operator<<(ostream& os, const RooAbsArg &arg); ostream& operator<<(ostream& os, const RooAbsArg &arg);
istream& operator>>(istream& is, RooAbsArg &arg) ; istream& operator>>(istream& is, RooAbsArg &arg) ;
#endif #endif
 End of changes. 13 change blocks. 
10 lines changed or deleted 24 lines changed or added


 RooAbsBinning.h   RooAbsBinning.h 
skipping to change at line 48 skipping to change at line 48
// Return number of bins // Return number of bins
return numBoundaries()-1 ; return numBoundaries()-1 ;
} }
virtual Int_t numBoundaries() const = 0 ; virtual Int_t numBoundaries() const = 0 ;
virtual Int_t binNumber(Double_t x) const = 0 ; virtual Int_t binNumber(Double_t x) const = 0 ;
virtual Int_t rawBinNumber(Double_t x) const { return binNumber(x) ; } virtual Int_t rawBinNumber(Double_t x) const { return binNumber(x) ; }
virtual Double_t binCenter(Int_t bin) const = 0 ; virtual Double_t binCenter(Int_t bin) const = 0 ;
virtual Double_t binWidth(Int_t bin) const = 0 ; virtual Double_t binWidth(Int_t bin) const = 0 ;
virtual Double_t binLow(Int_t bin) const = 0 ; virtual Double_t binLow(Int_t bin) const = 0 ;
virtual Double_t binHigh(Int_t bin) const = 0 ; virtual Double_t binHigh(Int_t bin) const = 0 ;
virtual Bool_t isUniform() const { return kFALSE ; }
virtual void setRange(Double_t xlo, Double_t xhi) = 0 ; virtual void setRange(Double_t xlo, Double_t xhi) = 0 ;
virtual void setMin(Double_t xlo) { virtual void setMin(Double_t xlo) {
// Change lower bound to xlo // Change lower bound to xlo
setRange(xlo,highBound()) ; setRange(xlo,highBound()) ;
} }
virtual void setMax(Double_t xhi) { virtual void setMax(Double_t xhi) {
// Change upper bound to xhi // Change upper bound to xhi
setRange(lowBound(),xhi) ; setRange(lowBound(),xhi) ;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooAbsCollection.h   RooAbsCollection.h 
skipping to change at line 44 skipping to change at line 44
virtual TObject* Clone(const char* newname=0) const { virtual TObject* Clone(const char* newname=0) const {
return clone(newname?newname:GetName()) ; return clone(newname?newname:GetName()) ;
} }
virtual ~RooAbsCollection(); virtual ~RooAbsCollection();
// Create a copy of an existing list. New variables cannot be added // Create a copy of an existing list. New variables cannot be added
// to a copied list. The variables in the copied list are independent // to a copied list. The variables in the copied list are independent
// of the original variables. // of the original variables.
RooAbsCollection(const RooAbsCollection& other, const char *name=""); RooAbsCollection(const RooAbsCollection& other, const char *name="");
RooAbsCollection& operator=(const RooAbsCollection& other); RooAbsCollection& operator=(const RooAbsCollection& other);
RooAbsCollection& assignValueOnly(const RooAbsCollection& other) ;
RooAbsCollection& assignFast(const RooAbsCollection& other) ; RooAbsCollection& assignFast(const RooAbsCollection& other) ;
// Copy list and contents (and optionally 'deep' servers) // Copy list and contents (and optionally 'deep' servers)
RooAbsCollection *snapshot(Bool_t deepCopy=kTRUE) const ; RooAbsCollection *snapshot(Bool_t deepCopy=kTRUE) const ;
Bool_t snapshot(RooAbsCollection& output, Bool_t deepCopy=kTRUE) const ; Bool_t snapshot(RooAbsCollection& output, Bool_t deepCopy=kTRUE) const ;
// Hash table control // Hash table control
void setHashTableSize(Int_t i) { void setHashTableSize(Int_t i) {
// Set size of internal hash table to i (should be a prime number) // Set size of internal hash table to i (should be a prime number)
_list.setHashTableSize(i) ; _list.setHashTableSize(i) ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooAbsData.h   RooAbsData.h 
skipping to change at line 23 skipping to change at line 23
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_ABS_DATA #ifndef ROO_ABS_DATA
#define ROO_ABS_DATA #define ROO_ABS_DATA
#include "TNamed.h" #include "TNamed.h"
#include "RooPrintable.h" #include "RooPrintable.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "RooFormulaVar.h" #include "RooFormulaVar.h"
#include <math.h>
#include "TMatrixDSym.h"
class RooAbsArg; class RooAbsArg;
class RooAbsReal ; class RooAbsReal ;
class RooAbsCategory ; class RooAbsCategory ;
class Roo1DTable ; class Roo1DTable ;
class RooPlot; class RooPlot;
class RooArgList; class RooArgList;
class TH1; class TH1;
class RooAbsBinning ; class RooAbsBinning ;
class Roo1DTable ; class Roo1DTable ;
skipping to change at line 55 skipping to change at line 57
// Reduction methods // Reduction methods
RooAbsData* reduce(RooCmdArg arg1,RooCmdArg arg2=RooCmdArg(),RooCmdArg ar g3=RooCmdArg(),RooCmdArg arg4=RooCmdArg(), RooAbsData* reduce(RooCmdArg arg1,RooCmdArg arg2=RooCmdArg(),RooCmdArg ar g3=RooCmdArg(),RooCmdArg arg4=RooCmdArg(),
RooCmdArg arg5=RooCmdArg(),RooCmdArg arg6=RooCmdArg(), RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ; RooCmdArg arg5=RooCmdArg(),RooCmdArg arg6=RooCmdArg(), RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ;
RooAbsData* reduce(const char* cut) ; RooAbsData* reduce(const char* cut) ;
RooAbsData* reduce(const RooFormulaVar& cutVar) ; RooAbsData* reduce(const RooFormulaVar& cutVar) ;
RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ; RooAbsData* reduce(const RooArgSet& varSubset, const char* cut=0) ;
RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVa r) ; RooAbsData* reduce(const RooArgSet& varSubset, const RooFormulaVar& cutVa r) ;
RooAbsDataStore* store() { return _dstore ; } RooAbsDataStore* store() { return _dstore ; }
const RooAbsDataStore* store() const { return _dstore ; } const RooAbsDataStore* store() const { return _dstore ; }
const TTree* tree() const ;
virtual void Draw(Option_t* option = "") ;
void checkInit() const ; void checkInit() const ;
// Change name of observable // Change name of observable
virtual Bool_t changeObservableName(const char* from, const char* to) ; virtual Bool_t changeObservableName(const char* from, const char* to) ;
// Add one ore more rows of data // Add one ore more rows of data
virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weight Error=0) = 0 ; // DERIVED virtual void add(const RooArgSet& row, Double_t weight=1, Double_t weight Error=0) = 0 ; // DERIVED
virtual void fill() ; virtual void fill() ;
skipping to change at line 124 skipping to change at line 129
const char* addToHistName ; const char* addToHistName ;
Double_t addToWgtSelf ; Double_t addToWgtSelf ;
Double_t addToWgtOther ; Double_t addToWgtOther ;
Double_t xErrorSize ; Double_t xErrorSize ;
Bool_t refreshFrameNorm ; Bool_t refreshFrameNorm ;
Bool_t correctForBinWidth ; Bool_t correctForBinWidth ;
Double_t scaleFactor ; Double_t scaleFactor ;
} ; } ;
// Split a dataset by a category // Split a dataset by a category
virtual TList* split(const RooAbsCategory& splitCat) const ; virtual TList* split(const RooAbsCategory& splitCat, Bool_t createEmptyDa taSets=kFALSE) const ;
// Create 1,2, and 3D histograms from and fill it // Create 1,2, and 3D histograms from and fill it
TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ;
TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, cons t RooLinkedList& argList) const ; TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, cons t RooLinkedList& argList) const ;
TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ; TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ;
skipping to change at line 158 skipping to change at line 163
virtual Int_t defaultPrintContents(Option_t* opt) const ; virtual Int_t defaultPrintContents(Option_t* opt) const ;
void setDirtyProp(Bool_t flag) ; void setDirtyProp(Bool_t flag) ;
Double_t moment(RooRealVar &var, Double_t order, const char* cutSpec=0, c onst char* cutRange=0) const ; Double_t moment(RooRealVar &var, Double_t order, const char* cutSpec=0, c onst char* cutRange=0) const ;
Double_t moment(RooRealVar &var, Double_t order, Double_t offset, const c har* cutSpec=0, const char* cutRange=0) const ; Double_t moment(RooRealVar &var, Double_t order, Double_t offset, const c har* cutSpec=0, const char* cutRange=0) const ;
Double_t standMoment(RooRealVar &var, Double_t order, const char* cutSpec =0, const char* cutRange=0) const ; Double_t standMoment(RooRealVar &var, Double_t order, const char* cutSpec =0, const char* cutRange=0) const ;
Double_t mean(RooRealVar& var, const char* cutSpec=0, const char* cutRang e=0) const { return moment(var,1,0,cutSpec,cutRange) ; } Double_t mean(RooRealVar& var, const char* cutSpec=0, const char* cutRang e=0) const { return moment(var,1,0,cutSpec,cutRange) ; }
Double_t sigma(RooRealVar& var, const char* cutSpec=0, const char* cutRan ge=0) const { return moment(var,2,cutSpec,cutRange) ; } Double_t sigma(RooRealVar& var, const char* cutSpec=0, const char* cutRan ge=0) const { return sqrt(moment(var,2,cutSpec,cutRange)) ; }
Double_t skewness(RooRealVar& var, const char* cutSpec=0, const char* cut Range=0) const { return standMoment(var,3,cutSpec,cutRange) ; } Double_t skewness(RooRealVar& var, const char* cutSpec=0, const char* cut Range=0) const { return standMoment(var,3,cutSpec,cutRange) ; }
Double_t kurtosis(RooRealVar& var, const char* cutSpec=0, const char* cut Range=0) const { return standMoment(var,4,cutSpec,cutRange) ; } Double_t kurtosis(RooRealVar& var, const char* cutSpec=0, const char* cut Range=0) const { return standMoment(var,4,cutSpec,cutRange) ; }
Double_t covariance(RooRealVar &x,RooRealVar &y, const char* cutSpec=0, c
onst char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kFALSE)
; }
Double_t correlation(RooRealVar &x,RooRealVar &y, const char* cutSpec=0,
const char* cutRange=0) const { return corrcov(x,y,cutSpec,cutRange,kTRUE)
; }
TMatrixDSym* covarianceMatrix(const char* cutSpec=0, const char* cutRange
=0) const { return covarianceMatrix(*get(),cutSpec,cutRange) ; }
TMatrixDSym* correlationMatrix(const char* cutSpec=0, const char* cutRang
e=0) const { return correlationMatrix(*get(),cutSpec,cutRange) ; }
TMatrixDSym* covarianceMatrix(const RooArgList& vars, const char* cutSpec
=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutRa
nge,kFALSE) ; }
TMatrixDSym* correlationMatrix(const RooArgList& vars, const char* cutSpe
c=0, const char* cutRange=0) const { return corrcovMatrix(vars,cutSpec,cutR
ange,kTRUE) ; }
RooRealVar* meanVar(RooRealVar &var, const char* cutSpec=0, const char* c utRange=0) const ; RooRealVar* meanVar(RooRealVar &var, const char* cutSpec=0, const char* c utRange=0) const ;
RooRealVar* rmsVar(RooRealVar &var, const char* cutSpec=0, const char* cu tRange=0) const ; RooRealVar* rmsVar(RooRealVar &var, const char* cutSpec=0, const char* cu tRange=0) const ;
virtual RooPlot* statOn(RooPlot* frame, virtual RooPlot* statOn(RooPlot* frame,
const RooCmdArg& arg1=RooCmdArg::none(), const Ro oCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const Ro oCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const Ro oCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const Ro oCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const Ro oCmdArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const Ro oCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const Ro oCmdArg& arg8=RooCmdArg::none()) ; const RooCmdArg& arg7=RooCmdArg::none(), const Ro oCmdArg& arg8=RooCmdArg::none()) ;
virtual RooPlot* statOn(RooPlot* frame, const char *what, virtual RooPlot* statOn(RooPlot* frame, const char *what,
const char *label= "", Int_t sigDigits= 2, const char *label= "", Int_t sigDigits= 2,
Option_t *options= "NELU", Double_t xmin=0.15, Option_t *options= "NELU", Double_t xmin=0.15,
Double_t xmax= 0.65,Double_t ymax=0.85, Double_t xmax= 0.65,Double_t ymax=0.85,
const char* cutSpec=0, const char* cutRange=0, const char* cutSpec=0, const char* cutRange=0,
const RooCmdArg* formatCmd=0); const RooCmdArg* formatCmd=0);
Bool_t hasFilledCache() const ;
protected: protected:
Double_t corrcov(RooRealVar &x,RooRealVar &y, const char* cutSpec, const
char* cutRange, Bool_t corr) const ;
TMatrixDSym* corrcovMatrix(const RooArgList& vars, const char* cutSpec, c
onst char* cutRange, Bool_t corr) const ;
virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& cacheList, const RooArgSet& keepObsList) ; virtual void optimizeReadingWithCaching(RooAbsArg& arg, const RooArgSet& cacheList, const RooArgSet& keepObsList) ;
Bool_t allClientsCached(RooAbsArg*, const RooArgSet&) ; Bool_t allClientsCached(RooAbsArg*, const RooArgSet&) ;
// PlotOn implementation // PlotOn implementation
virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ; virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const ;
virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& a symCat, PlotOpt o) const ; virtual RooPlot *plotAsymOn(RooPlot* frame, const RooAbsCategoryLValue& a symCat, PlotOpt o) const ;
virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& ef fCat, PlotOpt o) const ; virtual RooPlot *plotEffOn(RooPlot* frame, const RooAbsCategoryLValue& ef fCat, PlotOpt o) const ;
// Constant term optimizer interface // Constant term optimizer interface
friend class RooAbsArg ; friend class RooAbsArg ;
friend class RooAbsReal ; friend class RooAbsReal ;
friend class RooAbsOptTestStatistic ; friend class RooAbsOptTestStatistic ;
friend class RooAbsCachedPdf ; friend class RooAbsCachedPdf ;
virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) ; virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R ooArgSet* nset=0) ;
virtual void resetCache() ; virtual void resetCache() ;
virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; virtual void setArgStatus(const RooArgSet& set, Bool_t active) ;
virtual void initCache(const RooArgSet& cachedVars) ; virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach edVars) ;
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) = 0 ; // DERIVED virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooA rgSet* newCacheVars, const char* newName=0) = 0 ; // DERIVED
virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormul aVar* cutVar, const char* cutRange=0, virtual RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormul aVar* cutVar, const char* cutRange=0,
Int_t nStart=0, Int_t nStop=2000000000, Bool _t copyCache=kTRUE) = 0 ; // DERIVED Int_t nStart=0, Int_t nStop=2000000000, Bool _t copyCache=kTRUE) = 0 ; // DERIVED
RooRealVar* dataRealVar(const char* methodname, RooRealVar& extVar) const
;
// Column structure definition // Column structure definition
RooArgSet _vars; // Dimensions of this data set RooArgSet _vars; // Dimensions of this data set
RooArgSet _cachedVars ; //! External variables cached with this data set RooArgSet _cachedVars ; //! External variables cached with this data set
TIterator *_iterator; //! Iterator over dimension variables TIterator *_iterator; //! Iterator over dimension variables
TIterator *_cacheIter ; //! Iterator over cached variables TIterator *_cacheIter ; //! Iterator over cached variables
RooAbsDataStore* _dstore ; // Data storage implementation RooAbsDataStore* _dstore ; // Data storage implementation
private: private:
 End of changes. 11 change blocks. 
5 lines changed or deleted 38 lines changed or added


 RooAbsDataStore.h   RooAbsDataStore.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooAbsDataStore.h 28963 2009-06-12 15:47:45Z wouter $ * File: $Id: RooAbsDataStore.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 27 skipping to change at line 27
#define ROO_ABS_DATA_STORE #define ROO_ABS_DATA_STORE
#include "Rtypes.h" #include "Rtypes.h"
#include "RooArgSet.h" #include "RooArgSet.h"
#include "TNamed.h" #include "TNamed.h"
#include <list> #include <list>
class RooAbsArg ; class RooAbsArg ;
class RooArgList ; class RooArgList ;
class TIterator ; class TIterator ;
class TTree ;
class RooAbsDataStore : public TNamed, public RooPrintable { class RooAbsDataStore : public TNamed, public RooPrintable {
public: public:
RooAbsDataStore() ; RooAbsDataStore() ;
RooAbsDataStore(const char* name, const char* title, const RooArgSet& var s) ; RooAbsDataStore(const char* name, const char* title, const RooArgSet& var s) ;
RooAbsDataStore(const RooAbsDataStore& other, const char* newname=0) ; RooAbsDataStore(const RooAbsDataStore& other, const char* newname=0) ;
RooAbsDataStore(const RooAbsDataStore& other, const RooArgSet& vars, cons t char* newname=0) ; RooAbsDataStore(const RooAbsDataStore& other, const RooArgSet& vars, cons t char* newname=0) ;
virtual RooAbsDataStore* clone(const RooArgSet& vars, const char* newname =0) const = 0 ; virtual RooAbsDataStore* clone(const RooArgSet& vars, const char* newname =0) const = 0 ;
virtual ~RooAbsDataStore() ; virtual ~RooAbsDataStore() ;
skipping to change at line 79 skipping to change at line 80
virtual void printName(ostream& os) const ; virtual void printName(ostream& os) const ;
virtual void printTitle(ostream& os) const ; virtual void printTitle(ostream& os) const ;
virtual void printClassName(ostream& os) const ; virtual void printClassName(ostream& os) const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
void printMultiline(ostream& os, Int_t content, Bool_t verbose, TString i ndent) const ; void printMultiline(ostream& os, Int_t content, Bool_t verbose, TString i ndent) const ;
virtual Int_t defaultPrintContents(Option_t* opt) const ; virtual Int_t defaultPrintContents(Option_t* opt) const ;
// Constant term optimizer interface // Constant term optimizer interface
virtual void initCache(const RooArgSet& cachedVars) = 0 ; virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, co
virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) = 0 ; nst RooArgSet* nset=0) = 0 ;
virtual const RooAbsArg* cacheOwner() = 0 ;
virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) = 0 ;
virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ; virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ;
const RooArgSet& cachedVars() const { return _cachedVars ; }
virtual void resetCache() = 0 ; virtual void resetCache() = 0 ;
virtual void setDirtyProp(Bool_t flag) { _doDirtyProp = flag ; } virtual void setDirtyProp(Bool_t flag) { _doDirtyProp = flag ; }
virtual void checkInit() const {} ; virtual void checkInit() const {} ;
Bool_t hasFilledCache() const { return _cachedVars.getSize()>0 ; }
virtual const TTree* tree() const { return 0 ; }
protected: protected:
RooArgSet _vars ; RooArgSet _vars ;
RooArgSet _cachedVars ; RooArgSet _cachedVars ;
TIterator *_iterator; //! Iterator over dimension variables TIterator *_iterator; //! Iterator over dimension variables
TIterator *_cacheIter ; //! Iterator over cached variables TIterator *_cacheIter ; //! Iterator over cached variables
Bool_t _doDirtyProp ; // Switch do (de)activate dirty state propagatio n when loading a data point Bool_t _doDirtyProp ; // Switch do (de)activate dirty state propagatio n when loading a data point
ClassDef(RooAbsDataStore,1) // Abstract Data Storage class ClassDef(RooAbsDataStore,1) // Abstract Data Storage class
 End of changes. 5 change blocks. 
3 lines changed or deleted 12 lines changed or added


 RooAbsPdf.h   RooAbsPdf.h 
skipping to change at line 62 skipping to change at line 62
const RooCmdArg& arg2=RooCmdArg::none(), const RooCm dArg& arg3=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(), const RooCm dArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCm dArg& arg5=RooCmdArg::none()) ; const RooCmdArg& arg4=RooCmdArg::none(), const RooCm dArg& arg5=RooCmdArg::none()) ;
RooDataSet *generate(const RooArgSet &whatVars, RooDataSet *generate(const RooArgSet &whatVars,
const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd Arg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(),const RooCmd Arg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd Arg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),const RooCmd Arg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd Arg& arg6=RooCmdArg::none()) ; const RooCmdArg& arg5=RooCmdArg::none(),const RooCmd Arg& arg6=RooCmdArg::none()) ;
RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t verbose=kFALSE) const; RooDataSet *generate(const RooArgSet &whatVars, Int_t nEvents = 0, Bool_t verbose=kFALSE) const;
RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy pe, Int_t nEvents= 0, RooDataSet *generate(const RooArgSet &whatVars, const RooDataSet &prototy pe, Int_t nEvents= 0,
Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE, Bool_t resampleProto=kFALSE) const; Bool_t verbose=kFALSE, Bool_t randProtoOrder=kFALSE, Bool_t resampleProto=kFALSE) const;
class GenSpec {
public:
~GenSpec() ;
private:
GenSpec(RooAbsGenContext* context, const RooArgSet& whatVars, RooDataSe
t* protoData, Int_t nGen, Bool_t extended,
Bool_t randProto, Bool_t resampleProto, TString dsetName) ;
GenSpec(const GenSpec& other) ;
friend class RooAbsPdf ;
RooAbsGenContext* _genContext ;
RooArgSet _whatVars ;
RooDataSet* _protoData ;
Int_t _nGen ;
Bool_t _extended ;
Bool_t _randProto ;
Bool_t _resampleProto ;
TString _dsetName ;
} ;
GenSpec* prepareMultiGen(const RooArgSet &whatVars,
const RooCmdArg& arg1=RooCmdArg::none(),const Roo
CmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const Roo
CmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const Roo
CmdArg& arg6=RooCmdArg::none()) ;
RooDataSet* generate(GenSpec&) const ;
RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, con st RooCmdArg& arg1, RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, con st RooCmdArg& arg1,
const RooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none()) ; const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none()) ;
RooDataHist *generateBinned(const RooArgSet &whatVars, RooDataHist *generateBinned(const RooArgSet &whatVars,
const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(),const RooCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none()) ; const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none()) ;
RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, Boo l_t expectedData=kFALSE, Bool_t extended=kFALSE) const; RooDataHist *generateBinned(const RooArgSet &whatVars, Int_t nEvents, Boo l_t expectedData=kFALSE, Bool_t extended=kFALSE) const;
virtual RooPlot* plotOn(RooPlot* frame, virtual RooPlot* plotOn(RooPlot* frame,
skipping to change at line 128 skipping to change at line 153
using RooAbsReal::createChi2 ; using RooAbsReal::createChi2 ;
virtual RooFitResult* chi2FitTo(RooDataHist& data, const RooLinkedList& c mdList) ; virtual RooFitResult* chi2FitTo(RooDataHist& data, const RooLinkedList& c mdList) ;
virtual RooAbsReal* createChi2(RooDataHist& data, RooCmdArg arg1=RooCmdAr g::none(), RooCmdArg arg2=RooCmdArg::none(), virtual RooAbsReal* createChi2(RooDataHist& data, RooCmdArg arg1=RooCmdAr g::none(), RooCmdArg arg2=RooCmdArg::none(),
RooCmdArg arg3=RooCmdArg::none(), RooCmdAr g arg4=RooCmdArg::none(), RooCmdArg arg5=RooCmdArg::none(), RooCmdArg arg3=RooCmdArg::none(), RooCmdAr g arg4=RooCmdArg::none(), RooCmdArg arg5=RooCmdArg::none(),
RooCmdArg arg6=RooCmdArg::none(), RooCmdAr g arg7=RooCmdArg::none(), RooCmdArg arg8=RooCmdArg::none()) ; RooCmdArg arg6=RooCmdArg::none(), RooCmdAr g arg7=RooCmdArg::none(), RooCmdArg arg8=RooCmdArg::none()) ;
// Chi^2 fits to X-Y datasets // Chi^2 fits to X-Y datasets
virtual RooAbsReal* createChi2(RooDataSet& data, const RooLinkedList& cmd List) ; virtual RooAbsReal* createChi2(RooDataSet& data, const RooLinkedList& cmd List) ;
// Constraint management // Constraint management
virtual RooArgSet* getConstraints(const RooArgSet& /*observables*/, const RooArgSet& /*constrainedParams*/) const { virtual RooArgSet* getConstraints(const RooArgSet& /*observables*/, const RooArgSet& /*constrainedParams*/, Bool_t /*stripDisconnected*/) const {
// Interface to retrieve constraint terms on this pdf. Default implemen tation returns null // Interface to retrieve constraint terms on this pdf. Default implemen tation returns null
return 0 ; return 0 ;
} }
virtual RooArgSet* getAllConstraints(const RooArgSet& observables, const RooArgSet& constrainedParams) const ; virtual RooArgSet* getAllConstraints(const RooArgSet& observables, const RooArgSet& constrainedParams, Bool_t stripDisconnected=kTRUE) const ;
// Project p.d.f into lower dimensional p.d.f // Project p.d.f into lower dimensional p.d.f
virtual RooAbsPdf* createProjection(const RooArgSet& iset) ; virtual RooAbsPdf* createProjection(const RooArgSet& iset) ;
// Create cumulative density function from p.d.f // Create cumulative density function from p.d.f
RooAbsReal* createCdf(const RooArgSet& iset, const RooArgSet& nset=RooArg Set()) ; RooAbsReal* createCdf(const RooArgSet& iset, const RooArgSet& nset=RooArg Set()) ;
RooAbsReal* createCdf(const RooArgSet& iset, const RooCmdArg arg1, const RooCmdArg arg2=RooCmdArg::none(), RooAbsReal* createCdf(const RooArgSet& iset, const RooCmdArg arg1, const RooCmdArg arg2=RooCmdArg::none(),
const RooCmdArg arg3=RooCmdArg::none(), const RooCmd Arg arg4=RooCmdArg::none(), const RooCmdArg arg3=RooCmdArg::none(), const RooCmd Arg arg4=RooCmdArg::none(),
const RooCmdArg arg5=RooCmdArg::none(), const RooCmd Arg arg6=RooCmdArg::none(), const RooCmdArg arg5=RooCmdArg::none(), const RooCmd Arg arg6=RooCmdArg::none(),
const RooCmdArg arg7=RooCmdArg::none(), const RooCmd Arg arg8=RooCmdArg::none()) ; const RooCmdArg arg7=RooCmdArg::none(), const RooCmd Arg arg8=RooCmdArg::none()) ;
skipping to change at line 212 skipping to change at line 237
static void clearEvalError() ; static void clearEvalError() ;
static Bool_t evalError() ; static Bool_t evalError() ;
protected: protected:
public: public:
virtual const RooAbsReal* getNormObj(const RooArgSet* set, const RooArgSe t* iset, const TNamed* rangeName=0) const ; virtual const RooAbsReal* getNormObj(const RooArgSet* set, const RooArgSe t* iset, const TNamed* rangeName=0) const ;
protected: protected:
RooDataSet *generate(RooAbsGenContext& context, const RooArgSet& whatVars
, const RooDataSet* prototype,
Int_t nEvents, Bool_t verbose, Bool_t randProtoOrder,
Bool_t resampleProto) const ;
// Implementation version // Implementation version
virtual RooPlot* paramOn(RooPlot* frame, const RooArgSet& params, Bool_t showConstants=kFALSE, virtual RooPlot* paramOn(RooPlot* frame, const RooArgSet& params, Bool_t showConstants=kFALSE,
const char *label= "", Int_t sigDigits = 2, Opti on_t *options = "NELU", Double_t xmin=0.65, const char *label= "", Int_t sigDigits = 2, Opti on_t *options = "NELU", Double_t xmin=0.65,
Double_t xmax= 0.99,Double_t ymax=0.95, const Roo CmdArg* formatCmd=0) ; Double_t xmax= 0.99,Double_t ymax=0.95, const Roo CmdArg* formatCmd=0) ;
virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ; virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ;
void plotOnCompSelect(RooArgSet* selNodes) const ; void plotOnCompSelect(RooArgSet* selNodes) const ;
virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const; virtual RooPlot *plotOn(RooPlot *frame, PlotOpt o) const;
 End of changes. 4 change blocks. 
2 lines changed or deleted 36 lines changed or added


 RooAbsReal.h   RooAbsReal.h 
skipping to change at line 40 skipping to change at line 40
class RooAbsFunc; class RooAbsFunc;
class RooAbsCategoryLValue ; class RooAbsCategoryLValue ;
class RooCategory ; class RooCategory ;
class RooLinkedList ; class RooLinkedList ;
class RooNumIntConfig ; class RooNumIntConfig ;
class RooDataHist ; class RooDataHist ;
class RooFunctor ; class RooFunctor ;
class RooGenFunction ; class RooGenFunction ;
class RooMultiGenFunction ; class RooMultiGenFunction ;
class RooFitResult ; class RooFitResult ;
class RooMoment ;
class RooDerivative ;
class TH1; class TH1;
class TH1F; class TH1F;
class TH2F; class TH2F;
class TH3F; class TH3F;
#include <list> #include <list>
#include <string> #include <string>
#include <iostream> #include <iostream>
skipping to change at line 66 skipping to change at line 68
const char *unit= "") ; const char *unit= "") ;
RooAbsReal(const RooAbsReal& other, const char* name=0); RooAbsReal(const RooAbsReal& other, const char* name=0);
virtual ~RooAbsReal(); virtual ~RooAbsReal();
// Return value and unit accessors // Return value and unit accessors
virtual Double_t getVal(const RooArgSet* set=0) const ; virtual Double_t getVal(const RooArgSet* set=0) const ;
inline Double_t getVal(const RooArgSet& set) const { inline Double_t getVal(const RooArgSet& set) const {
// Return value with given choice of observables // Return value with given choice of observables
return getVal(&set) ; return getVal(&set) ;
} }
Double_t getPropagatedError(const RooFitResult& fr) ;
Bool_t operator==(Double_t value) const ; Bool_t operator==(Double_t value) const ;
virtual Bool_t operator==(const RooAbsArg& other) ; virtual Bool_t operator==(const RooAbsArg& other) ;
inline const Text_t *getUnit() const { inline const Text_t *getUnit() const {
// Return string with unit description // Return string with unit description
return _unit.Data(); return _unit.Data();
} }
inline void setUnit(const char *unit) { inline void setUnit(const char *unit) {
// Set unit description to given string // Set unit description to given string
_unit= unit; _unit= unit;
} }
skipping to change at line 202 skipping to change at line 207
enum ScaleType { Raw, Relative, NumEvent, RelativeExpected } ; enum ScaleType { Raw, Relative, NumEvent, RelativeExpected } ;
// Forwarder function for backward compatibility // Forwarder function for backward compatibility
virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, O ption_t* drawOptions="L", virtual RooPlot *plotSliceOn(RooPlot *frame, const RooArgSet& sliceSet, O ption_t* drawOptions="L",
Double_t scaleFactor=1.0, ScaleType stype=Rel ative, const RooAbsData* projData=0) const; Double_t scaleFactor=1.0, ScaleType stype=Rel ative, const RooAbsData* projData=0) const;
// Fill an existing histogram // Fill an existing histogram
TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars, TH1 *fillHistogram(TH1 *hist, const RooArgList &plotVars,
Double_t scaleFactor= 1, const RooArgSet *projectedVars = 0, Bool_t scaling=kTRUE, Double_t scaleFactor= 1, const RooArgSet *projectedVars = 0, Bool_t scaling=kTRUE,
const RooArgSet* condObs=0) const; const RooArgSet* condObs=0, Bool_t setError=kTRUE) cons t;
// Create 1,2, and 3D histograms from and fill it // Create 1,2, and 3D histograms from and fill it
TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ; TH1 *createHistogram(const char* varNameList, Int_t xbins=0, Int_t ybins= 0, Int_t zbins=0) const ;
TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooL inkedList& argList) const ; TH1* createHistogram(const char *name, const RooAbsRealLValue& xvar, RooL inkedList& argList) const ;
TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar, TH1 *createHistogram(const char *name, const RooAbsRealLValue& xvar,
const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(), const RooCmdArg& arg1=RooCmdArg::none(), const RooCm dArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(), const RooCm dArg& arg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(), const RooCm dArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ; const RooCmdArg& arg7=RooCmdArg::none(), const RooCm dArg& arg8=RooCmdArg::none()) const ;
skipping to change at line 232 skipping to change at line 237
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k FALSE, TString indent="") const ; virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k FALSE, TString indent="") const ;
static void setCacheCheck(Bool_t flag) ; static void setCacheCheck(Bool_t flag) ;
// Evaluation error logging // Evaluation error logging
class EvalError { class EvalError {
public: public:
EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; } EvalError() { _msg[0] = 0 ; _srvval[0] = 0 ; }
EvalError(const EvalError& other) { strcpy(_msg,other._msg) ; strcpy(_s rvval,other._srvval) ; } ; EvalError(const EvalError& other) { strcpy(_msg,other._msg) ; strcpy(_s rvval,other._srvval) ; } ;
void setMessage(const char* tmp) { strcpy(_msg,tmp) ; } void setMessage(const char* tmp) ;
void setServerValues(const char* tmp) { strcpy(_srvval,tmp) ; } void setServerValues(const char* tmp) ;
char _msg[1024] ; char _msg[1024] ;
char _srvval[1024] ; char _srvval[1024] ;
} ; } ;
static Bool_t evalErrorLoggingEnabled() { return _doLogEvalError ; } static Bool_t evalErrorLoggingEnabled() { return _doLogEvalError ; }
static void enableEvalErrorLogging(Bool_t flag) { _doLogEvalError = flag ; } static void enableEvalErrorLogging(Bool_t flag) { _doLogEvalError = flag ; }
void logEvalError(const char* message, const char* serverValueString=0) c onst ; void logEvalError(const char* message, const char* serverValueString=0) c onst ;
static void logEvalError(const RooAbsReal* originator, const char* origNa me, const char* message, const char* serverValueString=0) ; static void logEvalError(const RooAbsReal* originator, const char* origNa me, const char* message, const char* serverValueString=0) ;
static void printEvalErrors(ostream&os=std::cout, Int_t maxPerNode=100000 00) ; static void printEvalErrors(ostream&os=std::cout, Int_t maxPerNode=100000 00) ;
static Int_t numEvalErrors() ; static Int_t numEvalErrors() ;
static Int_t numEvalErrorItems() { return _evalErrorList.size() ; } static Int_t numEvalErrorItems() { return _evalErrorList.size() ; }
skipping to change at line 262 skipping to change at line 267
// projected on observable. // projected on observable.
return 0 ; return 0 ;
} }
RooGenFunction* iGenFunction(RooRealVar& x, const RooArgSet& nset=RooArgS et()) ; RooGenFunction* iGenFunction(RooRealVar& x, const RooArgSet& nset=RooArgS et()) ;
RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const Roo ArgSet& nset=RooArgSet()) ; RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const Roo ArgSet& nset=RooArgSet()) ;
RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgL ist(), const RooArgSet& nset=RooArgSet()) const ; RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgL ist(), const RooArgSet& nset=RooArgSet()) const ;
TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), con st RooArgSet& nset=RooArgSet()) const ; TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), con st RooArgSet& nset=RooArgSet()) const ;
RooAbsReal* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0.001 RooDerivative* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0.
) ; 001) ;
RooDerivative* derivative(RooRealVar& obs, const RooArgSet& normSet, Int_
t order, Double_t eps=0.001) ;
RooMoment* moment(RooRealVar& obs, Int_t order, Bool_t central, Bool_t ta
keRoot) ;
RooMoment* moment(RooRealVar& obs, const RooArgSet& normObs, Int_t order,
Bool_t central, Bool_t takeRoot, Bool_t intNormObs) ;
RooMoment* mean(RooRealVar& obs) { return moment(obs,1,kFALSE,kFALSE) ; }
RooMoment* mean(RooRealVar& obs, const RooArgSet& nset) { return moment(o
bs,nset,1,kFALSE,kFALSE,kTRUE) ; }
RooMoment* sigma(RooRealVar& obs) { return moment(obs,2,kTRUE,kTRUE) ; }
RooMoment* sigma(RooRealVar& obs, const RooArgSet& nset) { return moment(
obs,nset,2,kTRUE,kTRUE,kTRUE) ; }
Double_t findRoot(RooRealVar& x, Double_t xmin, Double_t xmax, Double_t y
val) ;
protected: protected:
// PlotOn with command list // PlotOn with command list
virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ; virtual RooPlot* plotOn(RooPlot* frame, RooLinkedList& cmdList) const ;
// Hook for objects with normalization-dependent parameters interperetati on // Hook for objects with normalization-dependent parameters interperetati on
virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force= kFALSE) ; virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force= kFALSE) ;
virtual void selectNormalizationRange(const char* rangeName=0, Bool_t for ce=kFALSE) ; virtual void selectNormalizationRange(const char* rangeName=0, Bool_t for ce=kFALSE) ;
skipping to change at line 362 skipping to change at line 378
static Bool_t _cacheCheck ; // If true, always validate contents of clean which outcome of evaluate() static Bool_t _cacheCheck ; // If true, always validate contents of clean which outcome of evaluate()
friend class RooDataProjBinding ; friend class RooDataProjBinding ;
friend class RooAbsOptGoodnessOfFit ; friend class RooAbsOptGoodnessOfFit ;
struct PlotOpt { struct PlotOpt {
PlotOpt() : drawOptions("L"), scaleFactor(1.0), stype(Relative), projDat a(0), binProjData(kFALSE), projSet(0), precision(1e-3), PlotOpt() : drawOptions("L"), scaleFactor(1.0), stype(Relative), projDat a(0), binProjData(kFALSE), projSet(0), precision(1e-3),
shiftToZero(kFALSE),projDataSet(0),normRangeName(0),rangeLo( 0),rangeHi(0),postRangeFracScale(kFALSE),wmode(RooCurve::Extended), shiftToZero(kFALSE),projDataSet(0),normRangeName(0),rangeLo( 0),rangeHi(0),postRangeFracScale(kFALSE),wmode(RooCurve::Extended),
projectionRangeName(0),curveInvisible(kFALSE), curveName(0), addToCurveName(0),addToWgtSelf(1.),addToWgtOther(1.), projectionRangeName(0),curveInvisible(kFALSE), curveName(0), addToCurveName(0),addToWgtSelf(1.),addToWgtOther(1.),
numCPU(1),interleave(kTRUE),curveNameSuffix(""), numee(10), eeval(0), doeeval(kFALSE) {} ; numCPU(1),interleave(kTRUE),curveNameSuffix(""), numee(10), eeval(0), doeeval(kFALSE), progress(kFALSE) {} ;
Option_t* drawOptions ; Option_t* drawOptions ;
Double_t scaleFactor ; Double_t scaleFactor ;
ScaleType stype ; ScaleType stype ;
const RooAbsData* projData ; const RooAbsData* projData ;
Bool_t binProjData ; Bool_t binProjData ;
const RooArgSet* projSet ; const RooArgSet* projSet ;
Double_t precision ; Double_t precision ;
Bool_t shiftToZero ; Bool_t shiftToZero ;
const RooArgSet* projDataSet ; const RooArgSet* projDataSet ;
const char* normRangeName ; const char* normRangeName ;
skipping to change at line 389 skipping to change at line 405
const char* curveName ; const char* curveName ;
const char* addToCurveName ; const char* addToCurveName ;
Double_t addToWgtSelf ; Double_t addToWgtSelf ;
Double_t addToWgtOther ; Double_t addToWgtOther ;
Int_t numCPU ; Int_t numCPU ;
Bool_t interleave ; Bool_t interleave ;
const char* curveNameSuffix ; const char* curveNameSuffix ;
Int_t numee ; Int_t numee ;
Double_t eeval ; Double_t eeval ;
Bool_t doeeval ; Bool_t doeeval ;
Bool_t progress ;
} ; } ;
// Plot implementation functions // Plot implementation functions
virtual RooPlot *plotOn(RooPlot* frame, PlotOpt o) const; virtual RooPlot *plotOn(RooPlot* frame, PlotOpt o) const;
virtual RooPlot *plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue& a symCat, PlotOpt o) const; virtual RooPlot *plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue& a symCat, PlotOpt o) const;
private: private:
static Bool_t _doLogEvalError ; static Bool_t _doLogEvalError ;
static std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErro r> > > _evalErrorList ; static std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalErro r> > > _evalErrorList ;
skipping to change at line 415 skipping to change at line 432
friend class RooAddPdf ; friend class RooAddPdf ;
friend class RooAddModel ; friend class RooAddModel ;
void selectComp(Bool_t flag) { void selectComp(Bool_t flag) {
// If flag is true, only selected component will be included in evaluat es of RooAddPdf components // If flag is true, only selected component will be included in evaluat es of RooAddPdf components
_selectComp = flag ; _selectComp = flag ;
} }
static void globalSelectComp(Bool_t flag) ; static void globalSelectComp(Bool_t flag) ;
Bool_t _selectComp ; //! Component selection flag for RooAb sPdf::plotCompOn Bool_t _selectComp ; //! Component selection flag for RooAb sPdf::plotCompOn
static Bool_t _globalSelectComp ; // Global activation switch for compon ent selection static Bool_t _globalSelectComp ; // Global activation switch for compon ent selection
mutable RooArgSet* _lastNSet ; //!
ClassDef(RooAbsReal,2) // Abstract real-valued variable ClassDef(RooAbsReal,2) // Abstract real-valued variable
}; };
#endif #endif
 End of changes. 8 change blocks. 
6 lines changed or deleted 31 lines changed or added


 RooAdaptiveIntegratorND.h   RooAdaptiveIntegratorND.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooAdaptiveIntegratorND.h 28259 2009-04-16 16:21:16Z woute r $ * File: $Id: RooAdaptiveIntegratorND.h 30333 2009-09-21 15:39:17Z woute r $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_ADAPTIVE_INTEGRATOR_ND #ifndef ROO_ADAPTIVE_INTEGRATOR_ND
#define ROO_ADAPTIVE_INTEGRATOR_ND #define ROO_ADAPTIVE_INTEGRATOR_ND
#include "RooAbsIntegrator.h" #include "RooAbsIntegrator.h"
#include "RooNumIntConfig.h" #include "RooNumIntConfig.h"
#include "TString.h"
namespace ROOT { namespace Math { class AdaptiveIntegratorMultiDim ; } } ; namespace ROOT { namespace Math { class AdaptiveIntegratorMultiDim ; } } ;
class RooMultiGenFunction ; class RooMultiGenFunction ;
class RooAdaptiveIntegratorND : public RooAbsIntegrator { class RooAdaptiveIntegratorND : public RooAbsIntegrator {
public: public:
// Constructors, assignment etc // Constructors, assignment etc
RooAdaptiveIntegratorND() ; RooAdaptiveIntegratorND() ;
RooAdaptiveIntegratorND(const RooAbsFunc& function, const RooNumIntConfig & config) ; RooAdaptiveIntegratorND(const RooAbsFunc& function, const RooNumIntConfig & config) ;
skipping to change at line 63 skipping to change at line 64
mutable Double_t* _xmin ; // Lower bound in each dimension mutable Double_t* _xmin ; // Lower bound in each dimension
mutable Double_t* _xmax ; // Upper bound in each dimension mutable Double_t* _xmax ; // Upper bound in each dimension
Double_t _epsRel ; // Relative precision Double_t _epsRel ; // Relative precision
Double_t _epsAbs ; // Absolute precision Double_t _epsAbs ; // Absolute precision
Int_t _nmax ; // Max number of divisions Int_t _nmax ; // Max number of divisions
Int_t _nError ; // Number of error occurrences Int_t _nError ; // Number of error occurrences
Int_t _nWarn ; // Max number of warnings to be issued ; Int_t _nWarn ; // Max number of warnings to be issued ;
RooMultiGenFunction* _func ; //! ROOT::Math multi-parameter function bind ing RooMultiGenFunction* _func ; //! ROOT::Math multi-parameter function bind ing
ROOT::Math::AdaptiveIntegratorMultiDim* _integrator ; ROOT::Math::AdaptiveIntegratorMultiDim* _integrator ;
TString _intName ; // Integrand name
friend class RooNumIntFactory ; friend class RooNumIntFactory ;
static void registerIntegrator(RooNumIntFactory& fact) ; static void registerIntegrator(RooNumIntFactory& fact) ;
ClassDef(RooAdaptiveIntegratorND,0) // N-dimensional adaptive integration (interface to MathCore integrator) ClassDef(RooAdaptiveIntegratorND,0) // N-dimensional adaptive integration (interface to MathCore integrator)
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 RooAddPdf.h   RooAddPdf.h 
skipping to change at line 77 skipping to change at line 77
// Return list of component p.d.fs // Return list of component p.d.fs
return _pdfList ; return _pdfList ;
} }
const RooArgList& coefList() const { const RooArgList& coefList() const {
// Return list of coefficients of component p.d.f.s // Return list of coefficients of component p.d.f.s
return _coefList ; return _coefList ;
} }
void fixCoefNormalization(const RooArgSet& refCoefNorm) ; void fixCoefNormalization(const RooArgSet& refCoefNorm) ;
void fixCoefRange(const char* rangeName) ; void fixCoefRange(const char* rangeName) ;
virtual void resetErrorCounters(Int_t resetValue=10) ; virtual void resetErrorCounters(Int_t resetValue=10) ;
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ;
void printMetaArgs(ostream& os) const ; void printMetaArgs(ostream& os) const ;
protected: protected:
virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force= kFALSE) ; virtual void selectNormalization(const RooArgSet* depSet=0, Bool_t force= kFALSE) ;
virtual void selectNormalizationRange(const char* rangeName=0, Bool_t for ce=kFALSE) ; virtual void selectNormalizationRange(const char* rangeName=0, Bool_t for ce=kFALSE) ;
mutable RooSetProxy _refCoefNorm ; //! Reference observable set for coe mutable RooSetProxy _refCoefNorm ; // Reference observable set for coef
fficient interpretation ficient interpretation
mutable TNamed* _refCoefRangeName ; //! Reference range name for coeffic mutable TNamed* _refCoefRangeName ; // Reference range name for coeffici
ient interpreation ent interpreation
Bool_t _projectCoefs ; // If true coefficients need to be project ed for use in evaluate() Bool_t _projectCoefs ; // If true coefficients need to be project ed for use in evaluate()
mutable Double_t* _coefCache ; //! Transiet cache with transformed values of coefficients mutable Double_t* _coefCache ; //! Transiet cache with transformed values of coefficients
class CacheElem : public RooAbsCacheElement { class CacheElem : public RooAbsCacheElement {
public: public:
virtual ~CacheElem() {} ; virtual ~CacheElem() {} ;
RooArgList _suppNormList ; // Supplemental normalization list RooArgList _suppNormList ; // Supplemental normalization list
skipping to change at line 131 skipping to change at line 132
TIterator* _pdfIter ; //! Iterator over PDF list TIterator* _pdfIter ; //! Iterator over PDF list
TIterator* _coefIter ; //! Iterator over coefficient list TIterator* _coefIter ; //! Iterator over coefficient list
Bool_t _haveLastCoef ; // Flag indicating if last PDFs coefficient wa s supplied in the ctor Bool_t _haveLastCoef ; // Flag indicating if last PDFs coefficient wa s supplied in the ctor
Bool_t _allExtendable ; // Flag indicating if all PDF components are e xtendable Bool_t _allExtendable ; // Flag indicating if all PDF components are e xtendable
mutable Int_t _coefErrCount ; //! Coefficient error counter mutable Int_t _coefErrCount ; //! Coefficient error counter
private: private:
ClassDef(RooAddPdf,1) // PDF representing a sum of PDFs ClassDef(RooAddPdf,2) // PDF representing a sum of PDFs
}; };
#endif #endif
 End of changes. 3 change blocks. 
5 lines changed or deleted 6 lines changed or added


 RooArgList.h   RooArgList.h 
skipping to change at line 81 skipping to change at line 81
RooArgList& operator=(const RooArgList& other) { RooAbsCollection::operat or=(other) ; return *this ; } RooArgList& operator=(const RooArgList& other) { RooAbsCollection::operat or=(other) ; return *this ; }
inline void sort(Bool_t reverse=kFALSE) { inline void sort(Bool_t reverse=kFALSE) {
// Sort list in requested order // Sort list in requested order
_list.Sort(!reverse) ; _list.Sort(!reverse) ;
} }
inline Int_t index(const RooAbsArg* arg) const { inline Int_t index(const RooAbsArg* arg) const {
// Returns index of given arg, or -1 if arg is not in list // Returns index of given arg, or -1 if arg is not in list
return _list.IndexOf(arg) ; return _list.IndexOf(arg) ;
} }
inline Int_t index(const char* name) const {
// Returns index of given arg, or -1 if arg is not in list
return _list.IndexOf(name) ;
}
inline RooAbsArg* at(Int_t idx) const { inline RooAbsArg* at(Int_t idx) const {
// Return object at given index, or 0 if index is out of range // Return object at given index, or 0 if index is out of range
return (RooAbsArg*) _list.At(idx) ; return (RooAbsArg*) _list.At(idx) ;
} }
// I/O streaming interface (machine readable) // I/O streaming interface (machine readable)
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose =kFALSE) ; virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose =kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) ; virtual void writeToStream(ostream& os, Bool_t compact) ;
RooAbsArg& operator[](Int_t idx) const ; RooAbsArg& operator[](Int_t idx) const ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 RooArgSet.h   RooArgSet.h 
skipping to change at line 22 skipping to change at line 22
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#define ROO_ARG_SET #define ROO_ARG_SET
#include "RooAbsCollection.h" #include "RooAbsCollection.h"
#include "RooErrorHandler.h" #include "RooErrorHandler.h"
#include <map> #include <map>
#include <iostream>
using namespace std ;
class RooArgList ; class RooArgList ;
#define USEMEMPOOL #define USEMEMPOOL
class RooArgSet : public RooAbsCollection { class RooArgSet : public RooAbsCollection {
public: public:
#ifdef USEMEMPOOL #ifdef USEMEMPOOL
void* operator new (size_t bytes); void* operator new (size_t bytes);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 RooBinning.h   RooBinning.h 
skipping to change at line 24 skipping to change at line 24
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_BINNING #ifndef ROO_BINNING
#define ROO_BINNING #define ROO_BINNING
#include "Rtypes.h" #include "Rtypes.h"
#include "TList.h" #include "TList.h"
#include "RooDouble.h" #include "RooDouble.h"
#include "RooAbsBinning.h" #include "RooAbsBinning.h"
#include "RooNumber.h" #include "RooNumber.h"
#include <set>
class RooAbsPdf ; class RooAbsPdf ;
class RooRealVar ; class RooRealVar ;
class RooBinning : public RooAbsBinning { class RooBinning : public RooAbsBinning {
public: public:
RooBinning(Double_t xlo=-RooNumber::infinity(), Double_t xhi=RooNumber::i nfinity(), const char* name=0) ; RooBinning(Double_t xlo=-RooNumber::infinity(), Double_t xhi=RooNumber::i nfinity(), const char* name=0) ;
RooBinning(Int_t nBins, Double_t xlo, Double_t xhi, const char* name=0) ; RooBinning(Int_t nBins, Double_t xlo, Double_t xhi, const char* name=0) ;
RooBinning(Int_t nBins, const Double_t* boundaries, const char* name=0) ; RooBinning(Int_t nBins, const Double_t* boundaries, const char* name=0) ;
RooBinning(const RooBinning& other, const char* name=0) ; RooBinning(const RooBinning& other, const char* name=0) ;
skipping to change at line 71 skipping to change at line 72
virtual Double_t binCenter(Int_t bin) const ; virtual Double_t binCenter(Int_t bin) const ;
virtual Double_t binWidth(Int_t bin) const ; virtual Double_t binWidth(Int_t bin) const ;
virtual Double_t binLow(Int_t bin) const ; virtual Double_t binLow(Int_t bin) const ;
virtual Double_t binHigh(Int_t bin) const ; virtual Double_t binHigh(Int_t bin) const ;
Bool_t addBoundary(Double_t boundary) ; Bool_t addBoundary(Double_t boundary) ;
void addBoundaryPair(Double_t boundary, Double_t mirrorPoint=0) ; void addBoundaryPair(Double_t boundary, Double_t mirrorPoint=0) ;
void addUniform(Int_t nBins, Double_t xlo, Double_t xhi) ; void addUniform(Int_t nBins, Double_t xlo, Double_t xhi) ;
Bool_t removeBoundary(Double_t boundary) ; Bool_t removeBoundary(Double_t boundary) ;
TIterator* binIterator() const ;
Bool_t hasBoundary(Double_t boundary) ; Bool_t hasBoundary(Double_t boundary) ;
protected: protected:
Bool_t binEdges(Int_t bin, Double_t& xlo, Double_t& xhi) const ; Bool_t binEdges(Int_t bin, Double_t& xlo, Double_t& xhi) const ;
void updateBinCount() ; void updateBinCount() ;
Double_t _xlo ; // Lower bound Double_t _xlo ; // Lower bound
Double_t _xhi ; // Upper bound Double_t _xhi ; // Upper bound
Bool_t _ownBoundLo ; // Does the lower bound coincide with a bin boun dary Bool_t _ownBoundLo ; // Does the lower bound coincide with a bin boun dary
Bool_t _ownBoundHi ; // Does the upper bound coincide with a bin boun dary Bool_t _ownBoundHi ; // Does the upper bound coincide with a bin boun dary
Int_t _nbins ; // Numer of bins Int_t _nbins ; // Numer of bins
TList _boundaries ; // List with boundaries std::set<Double_t> _boundaries ; // Boundaries
TIterator* _bIter ; //! Iterator over boundaries mutable Double_t* _array ; //! Array of boundaries
mutable Double_t* _array ; //! Array of boundaries
ClassDef(RooBinning,1) // Generic binning specification ClassDef(RooBinning,2) // Generic binning specification
}; };
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 4 lines changed or added


 RooCachedPdf.h   RooCachedPdf.h 
skipping to change at line 21 skipping to change at line 21
#ifndef ROOCACHEDPDF #ifndef ROOCACHEDPDF
#define ROOCACHEDPDF #define ROOCACHEDPDF
#include "RooAbsCachedPdf.h" #include "RooAbsCachedPdf.h"
#include "RooRealProxy.h" #include "RooRealProxy.h"
#include "RooAbsReal.h" #include "RooAbsReal.h"
class RooCachedPdf : public RooAbsCachedPdf { class RooCachedPdf : public RooAbsCachedPdf {
public: public:
RooCachedPdf() {} ;
RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf, const RooArgSet& cacheObs); RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf, const RooArgSet& cacheObs);
RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf); RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf);
RooCachedPdf(const RooCachedPdf& other, const char* name=0) ; RooCachedPdf(const RooCachedPdf& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooCachedP df(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooCachedP df(*this,newname); }
virtual ~RooCachedPdf() ; virtual ~RooCachedPdf() ;
virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet & orderedObs) const ; virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet & orderedObs) const ;
protected: protected:
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooCintUtils.h   RooCintUtils.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooCintUtils.h 28259 2009-04-16 16:21:16Z wouter $ * File: $Id: RooCintUtils.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 29 skipping to change at line 29
#include "Rtypes.h" #include "Rtypes.h"
#include <list> #include <list>
#include <string> #include <string>
namespace RooCintUtils { namespace RooCintUtils {
std::pair<std::list<std::string>,unsigned int> ctorArgs(const char* class name, UInt_t nMinArgs=0) ; std::pair<std::list<std::string>,unsigned int> ctorArgs(const char* class name, UInt_t nMinArgs=0) ;
Bool_t isEnum(const char* typeName) ; Bool_t isEnum(const char* typeName) ;
Bool_t isValidEnumValue(const char* typeName, const char* value) ; Bool_t isValidEnumValue(const char* typeName, const char* value) ;
const char* functionName(void* func) ; const char* functionName(void* func) ;
Bool_t matchFuncPtrArgs(void* func, const char* args) ; Bool_t matchFuncPtrArgs(void* func, const char* args) ;
Bool_t isTypeDef(const char* trueName, const char* aliasName) ;
std::string trueName(const char* typeDefName) ;
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 RooCmdArg.h   RooCmdArg.h 
skipping to change at line 20 skipping to change at line 20
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_CMD_ARG #ifndef ROO_CMD_ARG
#define ROO_CMD_ARG #define ROO_CMD_ARG
#include <string>
#include "TNamed.h" #include "TNamed.h"
#include "TString.h" #include "TString.h"
#include "RooLinkedList.h" #include "RooLinkedList.h"
class RooAbsData ; class RooAbsData ;
class RooArgSet ; class RooArgSet ;
class RooCmdArg : public TNamed { class RooCmdArg : public TNamed {
public: public:
RooCmdArg(); RooCmdArg();
skipping to change at line 88 skipping to change at line 89
Int_t getInt(Int_t idx) const { Int_t getInt(Int_t idx) const {
// Return integer stored in slot idx // Return integer stored in slot idx
return _i[idx] ; return _i[idx] ;
} }
Double_t getDouble(Int_t idx) const { Double_t getDouble(Int_t idx) const {
// Return double stored in slot idx // Return double stored in slot idx
return _d[idx] ; return _d[idx] ;
} }
const char* getString(Int_t idx) const { const char* getString(Int_t idx) const {
// Return string stored in slot idx // Return string stored in slot idx
return _s[idx] ; return (_s[idx].size()>0) ? _s[idx].c_str() : 0 ;
} }
const TObject* getObject(Int_t idx) const { const TObject* getObject(Int_t idx) const {
// Return TObject stored in slot idx // Return TObject stored in slot idx
return _o[idx] ; return _o[idx] ;
} }
const RooArgSet* getSet(Int_t idx) const ; const RooArgSet* getSet(Int_t idx) const ;
protected: protected:
static const RooCmdArg _none ; // Static instance of null object static const RooCmdArg _none ; // Static instance of null object
friend class RooCmdConfig ; friend class RooCmdConfig ;
private: private:
friend class RooAbsCollection ; friend class RooAbsCollection ;
// Payload // Payload
Double_t _d[2] ; // Payload doubles Double_t _d[2] ; // Payload doubles
Int_t _i[2] ; // Payload integers Int_t _i[2] ; // Payload integers
const char* _s[3] ; // Payload strings std::string _s[3] ; // Payload strings
TObject* _o[2] ; // Payload objects TObject* _o[2] ; // Payload objects
Bool_t _procSubArgs ; // If true argument requires recursive processing Bool_t _procSubArgs ; // If true argument requires recursive processing
RooArgSet* _c ; // Payload RooArgSets RooArgSet* _c ; // Payload RooArgSets
RooLinkedList _argList ; // Payload sub-arguments RooLinkedList _argList ; // Payload sub-arguments
ClassDef(RooCmdArg,0) // Generic named argument container ClassDef(RooCmdArg,1) // Generic named argument container
}; };
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 RooCmdConfig.h   RooCmdConfig.h 
skipping to change at line 47 skipping to change at line 47
void allowUndefined(Bool_t flag=kTRUE) { void allowUndefined(Bool_t flag=kTRUE) {
// If flag is true the processing of unrecognized RooCmdArgs // If flag is true the processing of unrecognized RooCmdArgs
// is not considered an error // is not considered an error
_allowUndefined = flag ; _allowUndefined = flag ;
} }
void defineDependency(const char* refArgName, const char* neededArgName) ; void defineDependency(const char* refArgName, const char* neededArgName) ;
void defineMutex(const char* argName1, const char* argName2) ; void defineMutex(const char* argName1, const char* argName2) ;
void defineMutex(const char* argName1, const char* argName2, const char* argName3) ; void defineMutex(const char* argName1, const char* argName2, const char* argName3) ;
void defineMutex(const char* argName1, const char* argName2, const char* argName3, const char* argName4) ; void defineMutex(const char* argName1, const char* argName2, const char* argName3, const char* argName4) ;
void defineMutex(const char* argName1, const char* argName2, const char* argName3, const char* argName4, const char* argName5) ;
void defineRequiredArgs(const char* argName1, const char* argName2=0, void defineRequiredArgs(const char* argName1, const char* argName2=0,
const char* argName3=0, const char* argName4=0, const char* argName3=0, const char* argName4=0,
const char* argName5=0, const char* argName6=0, const char* argName5=0, const char* argName6=0,
const char* argName7=0, const char* argName8=0) ; const char* argName7=0, const char* argName8=0) ;
Bool_t defineInt(const char* name, const char* argName, Int_t intNum, Int _t defValue=0) ; Bool_t defineInt(const char* name, const char* argName, Int_t intNum, Int _t defValue=0) ;
Bool_t defineDouble(const char* name, const char* argName, Int_t doubleNu m, Double_t defValue=0.) ; Bool_t defineDouble(const char* name, const char* argName, Int_t doubleNu m, Double_t defValue=0.) ;
Bool_t defineString(const char* name, const char* argName, Int_t stringNu m, const char* defValue="",Bool_t appendMode=kFALSE) ; Bool_t defineString(const char* name, const char* argName, Int_t stringNu m, const char* defValue="",Bool_t appendMode=kFALSE) ;
Bool_t defineObject(const char* name, const char* argName, Int_t setNum, const TObject* obj=0, Bool_t isArray=kFALSE) ; Bool_t defineObject(const char* name, const char* argName, Int_t setNum, const TObject* obj=0, Bool_t isArray=kFALSE) ;
Bool_t defineSet(const char* name, const char* argName, Int_t setNum, con st RooArgSet* set=0) ; Bool_t defineSet(const char* name, const char* argName, Int_t setNum, con st RooArgSet* set=0) ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooCurve.h   RooCurve.h 
skipping to change at line 38 skipping to change at line 38
class RooArgSet; class RooArgSet;
class RooAbsRealLValue ; class RooAbsRealLValue ;
class RooHist ; class RooHist ;
class RooCurve : public TGraph, public RooPlotable { class RooCurve : public TGraph, public RooPlotable {
public: public:
RooCurve(); RooCurve();
enum WingMode { NoWings=0 ,Straight=1, Extended=2 } ; enum WingMode { NoWings=0 ,Straight=1, Extended=2 } ;
RooCurve(const RooAbsReal &func, RooAbsRealLValue &x, Double_t xlo, Doubl e_t xhi, Int_t xbins, RooCurve(const RooAbsReal &func, RooAbsRealLValue &x, Double_t xlo, Doubl e_t xhi, Int_t xbins,
Double_t scaleFactor= 1, const RooArgSet *normVars= 0, Double_t p rec= 1e-3, Double_t resolution= 1e-3, Double_t scaleFactor= 1, const RooArgSet *normVars= 0, Double_t p rec= 1e-3, Double_t resolution= 1e-3,
Bool_t shiftToZero=kFALSE, WingMode wmode=Extended, Int_t nEvalEr Bool_t shiftToZero=kFALSE, WingMode wmode=Extended, Int_t nEvalEr
ror=-1, Int_t doEEVal=kFALSE, Double_t eeVal=0); ror=-1, Int_t doEEVal=kFALSE, Double_t eeVal=0,
Bool_t showProgress=kFALSE);
RooCurve(const char *name, const char *title, const RooAbsFunc &func, Dou ble_t xlo, RooCurve(const char *name, const char *title, const RooAbsFunc &func, Dou ble_t xlo,
Double_t xhi, UInt_t minPoints, Double_t prec= 1e-3, Double_t res olution= 1e-3, Double_t xhi, UInt_t minPoints, Double_t prec= 1e-3, Double_t res olution= 1e-3,
Bool_t shiftToZero=kFALSE, WingMode wmode=Extended, Int_t nEvalEr ror=-1, Int_t doEEVal=kFALSE, Double_t eeVal=0); Bool_t shiftToZero=kFALSE, WingMode wmode=Extended, Int_t nEvalEr ror=-1, Int_t doEEVal=kFALSE, Double_t eeVal=0);
virtual ~RooCurve(); virtual ~RooCurve();
RooCurve(const char* name, const char* title, const RooCurve& c1, const R ooCurve& c2, Double_t scale1=1., Double_t scale2=1.) ; RooCurve(const char* name, const char* title, const RooCurve& c1, const R ooCurve& c2, Double_t scale1=1., Double_t scale2=1.) ;
void addPoint(Double_t x, Double_t y); void addPoint(Double_t x, Double_t y);
Double_t getFitRangeBinW() const; Double_t getFitRangeBinW() const;
skipping to change at line 88 skipping to change at line 89
void initialize(); void initialize();
void addPoints(const RooAbsFunc &func, Double_t xlo, Double_t xhi, void addPoints(const RooAbsFunc &func, Double_t xlo, Double_t xhi,
Int_t minPoints, Double_t prec, Double_t resolution, WingMo de wmode, Int_t minPoints, Double_t prec, Double_t resolution, WingMo de wmode,
Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.,std ::list<Double_t>* samplingHint=0) ; Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.,std ::list<Double_t>* samplingHint=0) ;
void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1, void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1,
Double_t y2, Double_t minDy, Double_t minDx, Double_t y2, Double_t minDy, Double_t minDx,
Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.) ; Int_t numee=0, Bool_t doEEVal=kFALSE, Double_t eeVal=0.) ;
void shiftCurveToZero(Double_t prevYMax) ; void shiftCurveToZero(Double_t prevYMax) ;
Bool_t _showProgress ; //! Show progress indication when adding points
ClassDef(RooCurve,1) // 1-dimensional smooth curve for use in RooPlots ClassDef(RooCurve,1) // 1-dimensional smooth curve for use in RooPlots
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 5 lines changed or added


 RooDataHist.h   RooDataHist.h 
skipping to change at line 48 skipping to change at line 48
class RooDataHist : public RooAbsData, public RooDirItem { class RooDataHist : public RooAbsData, public RooDirItem {
public: public:
// Constructors, factory methods etc. // Constructors, factory methods etc.
RooDataHist() ; RooDataHist() ;
RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst char* binningName=0) ; RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst char* binningName=0) ;
RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst RooAbsData& data, Double_t initWgt=1.0) ; RooDataHist(const char *name, const char *title, const RooArgSet& vars, c onst RooAbsData& data, Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, const TH1* hist, Double_t initWgt=1.0) ; RooDataHist(const char *name, const char *title, const RooArgList& vars, const TH1* hist, Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt =1.0) ; RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt =1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCategory& indexCat, std::map<std::string,RooDataHist*> dhistMap, Double_ t wgt=1.0) ;
//RooDataHist(const char *name, const char *title, const RooArgList& vars , Double_t initWgt=1.0) ; //RooDataHist(const char *name, const char *title, const RooArgList& vars , Double_t initWgt=1.0) ;
RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCmdArg arg1, RooCmdArg arg2=RooCmdArg(), RooCmdArg arg3=RooCmdArg(), RooDataHist(const char *name, const char *title, const RooArgList& vars, RooCmdArg arg1, RooCmdArg arg2=RooCmdArg(), RooCmdArg arg3=RooCmdArg(),
RooCmdArg arg4=RooCmdArg(),RooCmdArg arg5=RooCmdArg(),RooCmdAr g arg6=RooCmdArg(),RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ; RooCmdArg arg4=RooCmdArg(),RooCmdArg arg5=RooCmdArg(),RooCmdAr g arg6=RooCmdArg(),RooCmdArg arg7=RooCmdArg(),RooCmdArg arg8=RooCmdArg()) ;
RooDataHist(const RooDataHist& other, const char* newname = 0) ; RooDataHist(const RooDataHist& other, const char* newname = 0) ;
virtual TObject* Clone(const char* newname=0) const { return new RooDataH ist(*this,newname?newname:GetName()) ; } virtual TObject* Clone(const char* newname=0) const { return new RooDataH ist(*this,newname?newname:GetName()) ; }
virtual ~RooDataHist() ; virtual ~RooDataHist() ;
virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet*vars=0) const { virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl e=0, const RooArgSet*vars=0) const {
// Return empty clone of this RooDataHist // Return empty clone of this RooDataHist
skipping to change at line 150 skipping to change at line 151
RooDataHist(const char* name, const char* title, RooDataHist* h, const Ro oArgSet& varSubset, RooDataHist(const char* name, const char* title, RooDataHist* h, const Ro oArgSet& varSubset,
const RooFormulaVar* cutVar, const char* cutRange, Int_t nStar t, Int_t nStop, Bool_t copyCache) ; const RooFormulaVar* cutVar, const char* cutRange, Int_t nStar t, Int_t nStop, Bool_t copyCache) ;
RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0, RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0,
Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ; Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ;
Double_t interpolateDim(RooRealVar& dim, const RooAbsBinning* binning, Do uble_t xval, Int_t intOrder, Bool_t correctForBinSize, Bool_t cdfBoundaries ) ; Double_t interpolateDim(RooRealVar& dim, const RooAbsBinning* binning, Do uble_t xval, Int_t intOrder, Bool_t correctForBinSize, Bool_t cdfBoundaries ) ;
void calculatePartialBinVolume(const RooArgSet& dimSet) const ; void calculatePartialBinVolume(const RooArgSet& dimSet) const ;
void adjustBinning(const RooArgList& vars, TH1& href, Int_t* offset=0) ; void adjustBinning(const RooArgList& vars, TH1& href, Int_t* offset=0) ;
void importTH1(const RooArgList& vars, TH1& histo, Double_t initWgt) ; void importTH1(const RooArgList& vars, TH1& histo, Double_t initWgt) ;
void importTH1Set(const RooArgList& vars, RooCategory& indexCat, std::map <std::string,TH1*> hmap, Double_t initWgt) ; void importTH1Set(const RooArgList& vars, RooCategory& indexCat, std::map <std::string,TH1*> hmap, Double_t initWgt) ;
void importDHistSet(const RooArgList& vars, RooCategory& indexCat, std::m ap<std::string,RooDataHist*> dmap, Double_t initWgt) ;
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ; virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooA rgSet* newCacheVars, const char* newName=0) ;
Int_t _arrSize ; // Size of the weight array Int_t _arrSize ; // Size of the weight array
Int_t* _idxMult ; //! Multiplier jump table for index calculation std::vector<Int_t> _idxMult ; // Multiplier jump table for index calculat ion
Double_t* _wgt ; //[_arrSize] Weight array Double_t* _wgt ; //[_arrSize] Weight array
Double_t* _errLo ; //[_arrSize] Low-side error on weight array Double_t* _errLo ; //[_arrSize] Low-side error on weight array
Double_t* _errHi ; //[_arrSize] High-side error on weight array Double_t* _errHi ; //[_arrSize] High-side error on weight array
Double_t* _sumw2 ; //[_arrSize] Sum of weights^2 Double_t* _sumw2 ; //[_arrSize] Sum of weights^2
Double_t* _binv ; //[_arrSize] Bin volume array Double_t* _binv ; //[_arrSize] Bin volume array
RooArgSet _realVars ; // Real dimensions of the dataset RooArgSet _realVars ; // Real dimensions of the dataset
TIterator* _realIter ; //! Iterator over realVars TIterator* _realIter ; //! Iterator over realVars
Bool_t* _binValid ; //! Valid bins with current range definition Bool_t* _binValid ; //! Valid bins with current range definition
skipping to change at line 180 skipping to change at line 182
mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te
mutable Int_t _curIndex ; // Current index mutable Int_t _curIndex ; // Current index
mutable std::vector<Double_t>* _pbinv ; //! Partial bin volume array mutable std::vector<Double_t>* _pbinv ; //! Partial bin volume array
mutable RooCacheManager<std::vector<Double_t> > _pbinvCacheMgr ; //! Cach e manager for arrays of partial bin volumes mutable RooCacheManager<std::vector<Double_t> > _pbinvCacheMgr ; //! Cach e manager for arrays of partial bin volumes
std::list<RooAbsLValue*> _lvvars ; //! List of observables casted as RooA bsLValue std::list<RooAbsLValue*> _lvvars ; //! List of observables casted as RooA bsLValue
std::list<const RooAbsBinning*> _lvbins ; //! List of used binnings assoc iated with lvalues std::list<const RooAbsBinning*> _lvbins ; //! List of used binnings assoc iated with lvalues
private: private:
ClassDef(RooDataHist,2) // Binned data set ClassDef(RooDataHist,4) // Binned data set
}; };
#endif #endif
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added


 RooDataSet.h   RooDataSet.h 
skipping to change at line 123 skipping to change at line 123
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ; void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
void SetName(const char *name) ; void SetName(const char *name) ;
void SetNameTitle(const char *name, const char* title) ; void SetNameTitle(const char *name, const char* title) ;
protected: protected:
virtual RooAbsData* cacheClone(const RooArgSet* newCacheVars, const char* newName=0) ; virtual RooAbsData* cacheClone(const RooAbsArg* newCacheOwner, const RooA rgSet* newCacheVars, const char* newName=0) ;
friend class RooProdGenContext ; friend class RooProdGenContext ;
void initialize(const char* wgtVarName) ; void initialize(const char* wgtVarName) ;
// Cache copy feature is not publicly accessible // Cache copy feature is not publicly accessible
RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0, RooAbsData* reduceEng(const RooArgSet& varSubset, const RooFormulaVar* cu tVar, const char* cutRange=0,
Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ; Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyC ache=kTRUE) ;
RooDataSet(const char *name, const char *title, RooDataSet *ntuple, RooDataSet(const char *name, const char *title, RooDataSet *ntuple,
const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, int nStart, int nStop, Bool_t copyCache); const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, int nStart, int nStop, Bool_t copyCache);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooDataWeightedAverage.h   RooDataWeightedAverage.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooDataWeightedAverage.h 28259 2009-04-16 16:21:16Z wouter $ * File: $Id: RooDataWeightedAverage.h 30378 2009-09-23 13:42:12Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 30 skipping to change at line 30
#include "RooCmdArg.h" #include "RooCmdArg.h"
class RooDataWeightedAverage : public RooAbsOptTestStatistic { class RooDataWeightedAverage : public RooAbsOptTestStatistic {
public: public:
// Constructors, assignment etc // Constructors, assignment etc
RooDataWeightedAverage() { RooDataWeightedAverage() {
// Default constructor // Default constructor
} ; } ;
RooDataWeightedAverage(const char *name, const char *title, RooAbsReal& r eal, RooAbsData& data, RooDataWeightedAverage(const char *name, const char *title, RooAbsReal& r eal, RooAbsData& data, const RooArgSet& projDeps,
Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t show Progress=kFALSE, Bool_t verbose=kTRUE) ; Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t show Progress=kFALSE, Bool_t verbose=kTRUE) ;
RooDataWeightedAverage(const RooDataWeightedAverage& other, const char* n ame=0); RooDataWeightedAverage(const RooDataWeightedAverage& other, const char* n ame=0);
virtual TObject* clone(const char* newname) const { return new RooDataWei ghtedAverage(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooDataWei ghtedAverage(*this,newname); }
virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& real, RooAbsData& adata, virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& real, RooAbsData& adata,
const RooArgSet& /*projDeps*/, const c har* /*rangeName*/=0, const char* /*addCoefRangeName*/=0, const RooArgSet& projDeps, const char* /*rangeName*/=0, const char* /*addCoefRangeName*/=0,
Int_t nCPU=1, Bool_t interleave=kFALSE , Bool_t verbose=kTRUE, Bool_t /*splitCutRange*/=kFALSE) { Int_t nCPU=1, Bool_t interleave=kFALSE , Bool_t verbose=kTRUE, Bool_t /*splitCutRange*/=kFALSE) {
// Virtual constructor // Virtual constructor
return new RooDataWeightedAverage(name,title,real,adata,nCPU,interleave ,verbose) ; return new RooDataWeightedAverage(name,title,real,adata,projDeps,nCPU,i nterleave,verbose) ;
} }
virtual Double_t globalNormalization() const ; virtual Double_t globalNormalization() const ;
virtual ~RooDataWeightedAverage(); virtual ~RooDataWeightedAverage();
protected: protected:
Double_t _sumWeight ; // Global sum of weights needed for normalization Double_t _sumWeight ; // Global sum of weights needed for normalization
Bool_t _showProgress ; // Show progress indication during evaluation if t rue Bool_t _showProgress ; // Show progress indication during evaluation if t rue
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 RooFactoryWSTool.h   RooFactoryWSTool.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooFactoryWSTool.h 28266 2009-04-16 21:12:50Z wouter $ * File: $Id: RooFactoryWSTool.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 106 skipping to change at line 106
static RooAbsCategoryLValue& as_CATLV(UInt_t idx) { checkIndex(idx) ; ret urn _of->asCATLV(_of->_args[idx].c_str()) ; } static RooAbsCategoryLValue& as_CATLV(UInt_t idx) { checkIndex(idx) ; ret urn _of->asCATLV(_of->_args[idx].c_str()) ; }
static RooAbsCategory& as_CATFUNC(UInt_t idx) { checkIndex(idx) ; return _of->asCATFUNC(_of->_args[idx].c_str()) ; } static RooAbsCategory& as_CATFUNC(UInt_t idx) { checkIndex(idx) ; return _of->asCATFUNC(_of->_args[idx].c_str()) ; }
static RooArgSet as_SET(UInt_t idx) { checkIndex(idx) ; return _of->asSET (_of->_args[idx].c_str()) ; } static RooArgSet as_SET(UInt_t idx) { checkIndex(idx) ; return _of->asSET (_of->_args[idx].c_str()) ; }
static RooArgList as_LIST(UInt_t idx) { checkIndex(idx) ; return _of->asL IST(_of->_args[idx].c_str()) ; } static RooArgList as_LIST(UInt_t idx) { checkIndex(idx) ; return _of->asL IST(_of->_args[idx].c_str()) ; }
static RooAbsData& as_DATA(UInt_t idx) { checkIndex(idx) ; return _of->as DATA(_of->_args[idx].c_str()) ; } static RooAbsData& as_DATA(UInt_t idx) { checkIndex(idx) ; return _of->as DATA(_of->_args[idx].c_str()) ; }
static RooDataHist& as_DHIST(UInt_t idx) { checkIndex(idx) ; return _of-> asDHIST(_of->_args[idx].c_str()) ; } static RooDataHist& as_DHIST(UInt_t idx) { checkIndex(idx) ; return _of-> asDHIST(_of->_args[idx].c_str()) ; }
static RooDataSet& as_DSET(UInt_t idx) { checkIndex(idx) ; return _of->as DSET(_of->_args[idx].c_str()) ; } static RooDataSet& as_DSET(UInt_t idx) { checkIndex(idx) ; return _of->as DSET(_of->_args[idx].c_str()) ; }
static TObject& as_OBJ(UInt_t idx) { checkIndex(idx) ; return _of->asOBJ(
_of->_args[idx].c_str()) ; }
static const char* as_STRING(UInt_t idx) { checkIndex(idx) ; return _of-> asSTRING(_of->_args[idx].c_str()) ; } static const char* as_STRING(UInt_t idx) { checkIndex(idx) ; return _of-> asSTRING(_of->_args[idx].c_str()) ; }
static Int_t as_INT(UInt_t idx) { checkIndex(idx) ; return _of->asINT(_of ->_args[idx].c_str()) ; } static Int_t as_INT(UInt_t idx) { checkIndex(idx) ; return _of->asINT(_of ->_args[idx].c_str()) ; }
static Double_t as_DOUBLE(UInt_t idx) { checkIndex(idx) ; return _of->asD OUBLE(_of->_args[idx].c_str()) ; } static Double_t as_DOUBLE(UInt_t idx) { checkIndex(idx) ; return _of->asD OUBLE(_of->_args[idx].c_str()) ; }
static Int_t as_INT(UInt_t idx, Int_t defVal) { checkIndex(idx) ; if (i dx>_of->_args.size()-1) return defVal ; return _of->asINT(_of->_args[idx].c _str()) ; } static Int_t as_INT(UInt_t idx, Int_t defVal) { checkIndex(idx) ; if (i dx>_of->_args.size()-1) return defVal ; return _of->asINT(_of->_args[idx].c _str()) ; }
static Double_t as_DOUBLE(UInt_t idx, Double_t defVal) { checkIndex(idx) ; if (idx>_of->_args.size()-1) return defVal ; return _of->asDOUBLE(_of-> _args[idx].c_str()) ; } static Double_t as_DOUBLE(UInt_t idx, Double_t defVal) { checkIndex(idx) ; if (idx>_of->_args.size()-1) return defVal ; return _of->asDOUBLE(_of-> _args[idx].c_str()) ; }
RooAbsArg& asARG(const char*) ; RooAbsArg& asARG(const char*) ;
RooAbsPdf& asPDF(const char*) ; RooAbsPdf& asPDF(const char*) ;
RooAbsReal& asFUNC(const char*) ; RooAbsReal& asFUNC(const char*) ;
skipping to change at line 131 skipping to change at line 133
RooAbsCategoryLValue& asCATLV(const char*) ; RooAbsCategoryLValue& asCATLV(const char*) ;
RooAbsCategory& asCATFUNC(const char*) ; RooAbsCategory& asCATFUNC(const char*) ;
RooArgSet asSET(const char*) ; RooArgSet asSET(const char*) ;
RooArgList asLIST(const char*) ; RooArgList asLIST(const char*) ;
RooAbsData& asDATA(const char*) ; RooAbsData& asDATA(const char*) ;
RooDataHist& asDHIST(const char*) ; RooDataHist& asDHIST(const char*) ;
RooDataSet& asDSET(const char*) ; RooDataSet& asDSET(const char*) ;
TObject& asOBJ(const char*) ;
const char* asSTRING(const char*) ; const char* asSTRING(const char*) ;
Int_t asINT(const char*) ; Int_t asINT(const char*) ;
Double_t asDOUBLE(const char*) ; Double_t asDOUBLE(const char*) ;
class IFace { class IFace {
public: public:
virtual ~IFace() {} ; virtual ~IFace() {} ;
virtual std::string create(RooFactoryWSTool& ft, const char* typeName, const char* instanceName, std::vector<std::string> args) = 0 ; virtual std::string create(RooFactoryWSTool& ft, const char* typeName, const char* instanceName, std::vector<std::string> args) = 0 ;
} ; } ;
skipping to change at line 153 skipping to change at line 157
virtual ~SpecialsIFace() {} ; virtual ~SpecialsIFace() {} ;
std::string create(RooFactoryWSTool& ft, const char* typeName, const ch ar* instanceName, std::vector<std::string> args) ; std::string create(RooFactoryWSTool& ft, const char* typeName, const ch ar* instanceName, std::vector<std::string> args) ;
} ; } ;
static void registerSpecial(const char* typeName, RooFactoryWSTool::IFace * iface) ; static void registerSpecial(const char* typeName, RooFactoryWSTool::IFace * iface) ;
void logError() { _errorCount++ ; } void logError() { _errorCount++ ; }
protected: protected:
std::string varTag(std::string& func, std::vector<std::string>& args) ;
std::stack<std::string> _autoNamePrefix ; std::stack<std::string> _autoNamePrefix ;
std::map<std::string,std::string> _typeAliases ; std::map<std::string,std::string> _typeAliases ;
static void checkIndex(UInt_t index) ; static void checkIndex(UInt_t index) ;
std::string processCompositeExpression(const char* arg) ; std::string processCompositeExpression(const char* arg) ;
std::string processSingleExpression(const char* arg) ; std::string processSingleExpression(const char* arg) ;
std::string processListExpression(const char* arg) ; std::string processListExpression(const char* arg) ;
std::string processAliasExpression(const char* arg) ; std::string processAliasExpression(const char* arg) ;
 End of changes. 4 change blocks. 
1 lines changed or deleted 8 lines changed or added


 RooFitResult.h   RooFitResult.h 
skipping to change at line 42 skipping to change at line 42
class RooPlot; class RooPlot;
class TObject ; class TObject ;
class TH2 ; class TH2 ;
typedef RooArgSet* pRooArgSet ; typedef RooArgSet* pRooArgSet ;
class RooFitResult : public TNamed, public RooPrintable, public RooDirItem { class RooFitResult : public TNamed, public RooPrintable, public RooDirItem {
public: public:
// Constructors, assignment etc. // Constructors, assignment etc.
RooFitResult(const char* name=0, const char* title=0) ; RooFitResult(const char* name=0, const char* title=0) ;
RooFitResult(const RooFitResult& other) ; // a RooFitResult(const RooFitResult& other) ;
dded, FMV 08/13/03 virtual TObject* Clone(const char* newname = 0) const {
virtual TObject* clone() const { return new RooFitResult(*this); } RooFitResult* r = new RooFitResult(*this) ;
// added, FMV 08/13/03 if (newname && *newname) r->SetName(newname) ;
return r ;
}
virtual TObject* clone() const { return new RooFitResult(*this); }
virtual ~RooFitResult() ; virtual ~RooFitResult() ;
static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList() ) ; static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList() ) ;
// Printing interface (human readable) // Printing interface (human readable)
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
virtual void printName(ostream& os) const ; virtual void printName(ostream& os) const ;
virtual void printTitle(ostream& os) const ; virtual void printTitle(ostream& os) const ;
virtual void printClassName(ostream& os) const ; virtual void printClassName(ostream& os) const ;
virtual void printArgs(ostream& os) const ; virtual void printArgs(ostream& os) const ;
skipping to change at line 115 skipping to change at line 120
} }
const RooArgList* correlation(const RooAbsArg& par) const { const RooArgList* correlation(const RooAbsArg& par) const {
// Return pointer to list of correlations of all parameters with par // Return pointer to list of correlations of all parameters with par
return correlation(par.GetName()) ; return correlation(par.GetName()) ;
} }
Double_t correlation(const char* parname1, const char* parname2) const ; Double_t correlation(const char* parname1, const char* parname2) const ;
const RooArgList* correlation(const char* parname) const ; const RooArgList* correlation(const char* parname) const ;
const TMatrixDSym& covarianceMatrix() const ; const TMatrixDSym& covarianceMatrix() const ;
TMatrixDSym reducedCovarianceMatrix(const RooArgSet& params) const ; TMatrixDSym reducedCovarianceMatrix(const RooArgList& params) const ;
const TMatrixDSym& correlationMatrix() const ; const TMatrixDSym& correlationMatrix() const ;
// Global correlation accessors // Global correlation accessors
Double_t globalCorr(const RooAbsArg& par) { return globalCorr(par.GetName ()) ; } Double_t globalCorr(const RooAbsArg& par) { return globalCorr(par.GetName ()) ; }
Double_t globalCorr(const char* parname) ; Double_t globalCorr(const char* parname) ;
const RooArgList* globalCorr() ; const RooArgList* globalCorr() ;
// Add objects to a 2D plot // Add objects to a 2D plot
inline RooPlot *plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAb sArg &par2, inline RooPlot *plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAb sArg &par2,
const char *options= "ME") const { const char *options= "ME") const {
skipping to change at line 156 skipping to change at line 161
void setConstParList(const RooArgList& list) ; void setConstParList(const RooArgList& list) ;
void setInitParList(const RooArgList& list) ; void setInitParList(const RooArgList& list) ;
void setFinalParList(const RooArgList& list) ; void setFinalParList(const RooArgList& list) ;
inline void setMinNLL(Double_t val) { _minNLL = val ; } inline void setMinNLL(Double_t val) { _minNLL = val ; }
inline void setEDM(Double_t val) { _edm = val ; } inline void setEDM(Double_t val) { _edm = val ; }
inline void setStatus(Int_t val) { _status = val ; } inline void setStatus(Int_t val) { _status = val ; }
inline void setCovQual(Int_t val) { _covQual = val ; } inline void setCovQual(Int_t val) { _covQual = val ; }
inline void setNumInvalidNLL(Int_t val) { _numBadNLL=val ; } inline void setNumInvalidNLL(Int_t val) { _numBadNLL=val ; }
void fillCorrMatrix() ; void fillCorrMatrix() ;
void fillCorrMatrix(const std::vector<double>& globalCC, const TMatrixDSy m& corrs, const TMatrixDSym& covs) ; void fillCorrMatrix(const std::vector<double>& globalCC, const TMatrixDSy m& corrs, const TMatrixDSym& covs) ;
void fillLegacyCorrMatrix() const ;
Double_t correlation(Int_t row, Int_t col) const; Double_t correlation(Int_t row, Int_t col) const;
Double_t covariance(Int_t row, Int_t col) const; Double_t covariance(Int_t row, Int_t col) const;
Int_t _status ; // MINUIT status code Int_t _status ; // MINUIT status code
Int_t _covQual ; // MINUIT quality code of covariance matrix Int_t _covQual ; // MINUIT quality code of covariance matrix
Int_t _numBadNLL ; // Number calls with bad (zero,negative) like lihood Int_t _numBadNLL ; // Number calls with bad (zero,negative) like lihood
Double_t _minNLL ; // NLL at minimum Double_t _minNLL ; // NLL at minimum
Double_t _edm ; // Estimated distance to minimum Double_t _edm ; // Estimated distance to minimum
RooArgList* _constPars ; // List of constant parameters RooArgList* _constPars ; // List of constant parameters
RooArgList* _initPars ; // List of floating parameters with initial v alues RooArgList* _initPars ; // List of floating parameters with initial v alues
RooArgList* _finalPars ; // List of floating parameters with final val ues RooArgList* _finalPars ; // List of floating parameters with final val ues
RooArgList* _globalCorr ; // List of global correlation coefficients
TList _corrMatrix ; // Correlation matrix (list of RooArgLists) mutable RooArgList* _globalCorr ; //! List of global correlation coeffi
cients
mutable TList _corrMatrix ; //! Correlation matrix (list of RooAr
gLists)
mutable RooArgList *_randomPars; //! List of floating parameters with mos t recent random perturbation applied mutable RooArgList *_randomPars; //! List of floating parameters with mos t recent random perturbation applied
mutable TMatrixF* _Lt; //! triangular matrix used for generate random perturbations mutable TMatrixF* _Lt; //! triangular matrix used for generate random perturbations
TMatrixDSym* _CM ; //! Correlation matrix ; TMatrixDSym* _CM ; // Correlation matrix
TMatrixDSym* _VM ; //! Covariance matrix ; TMatrixDSym* _VM ; // Covariance matrix
TVectorD* _GC ; // Global correlation coefficients
ClassDef(RooFitResult,1) // Container class for fit result ClassDef(RooFitResult,4) // Container class for fit result
}; };
#endif #endif
 End of changes. 6 change blocks. 
10 lines changed or deleted 18 lines changed or added


 RooGlobalFunc.h   RooGlobalFunc.h 
skipping to change at line 88 skipping to change at line 88
RooCmdArg FillStyle(Style_t style) ; RooCmdArg FillStyle(Style_t style) ;
RooCmdArg ProjectionRange(const char* rangeName) ; RooCmdArg ProjectionRange(const char* rangeName) ;
RooCmdArg Name(const char* name) ; RooCmdArg Name(const char* name) ;
RooCmdArg Invisible() ; RooCmdArg Invisible() ;
RooCmdArg AddTo(const char* name, double wgtSel=1.0, double wgtOther=1.0) ; RooCmdArg AddTo(const char* name, double wgtSel=1.0, double wgtOther=1.0) ;
RooCmdArg EvalErrorValue(Double_t value) ; RooCmdArg EvalErrorValue(Double_t value) ;
RooCmdArg MoveToBack() ; RooCmdArg MoveToBack() ;
RooCmdArg VisualizeError(const RooDataSet& paramData, Double_t Z=1) ; RooCmdArg VisualizeError(const RooDataSet& paramData, Double_t Z=1) ;
RooCmdArg VisualizeError(const RooFitResult& fitres, Double_t Z=1, Bool_t l inearMethod=kTRUE) ; RooCmdArg VisualizeError(const RooFitResult& fitres, Double_t Z=1, Bool_t l inearMethod=kTRUE) ;
RooCmdArg VisualizeError(const RooFitResult& fitres, const RooArgSet& param , Double_t Z=1, Bool_t linearMethod=kTRUE) ; RooCmdArg VisualizeError(const RooFitResult& fitres, const RooArgSet& param , Double_t Z=1, Bool_t linearMethod=kTRUE) ;
RooCmdArg ShowProgress() ;
// RooAbsPdf::plotOn arguments // RooAbsPdf::plotOn arguments
RooCmdArg Normalization(Double_t scaleFactor, Int_t scaleType) ; RooCmdArg Normalization(Double_t scaleFactor, Int_t scaleType) ;
RooCmdArg Components(const RooArgSet& compSet) ; RooCmdArg Components(const RooArgSet& compSet) ;
RooCmdArg Components(const char* compSpec) ; RooCmdArg Components(const char* compSpec) ;
// RooAbsData::plotOn arguments // RooAbsData::plotOn arguments
RooCmdArg Cut(const char* cutSpec) ; RooCmdArg Cut(const char* cutSpec) ;
RooCmdArg Cut(const RooFormulaVar& cutVar) ; RooCmdArg Cut(const RooFormulaVar& cutVar) ;
RooCmdArg Binning(const RooAbsBinning& binning) ; RooCmdArg Binning(const RooAbsBinning& binning) ;
skipping to change at line 113 skipping to change at line 114
RooCmdArg CutRange(const char* rangeName) ; RooCmdArg CutRange(const char* rangeName) ;
RooCmdArg XErrorSize(Double_t width) ; RooCmdArg XErrorSize(Double_t width) ;
RooCmdArg RefreshNorm() ; RooCmdArg RefreshNorm() ;
RooCmdArg Efficiency(const RooCategory& cat) ; RooCmdArg Efficiency(const RooCategory& cat) ;
RooCmdArg Rescale(Double_t factor) ; RooCmdArg Rescale(Double_t factor) ;
// RooDataHist::ctor arguments // RooDataHist::ctor arguments
RooCmdArg Weight(Double_t wgt) ; RooCmdArg Weight(Double_t wgt) ;
RooCmdArg Index(RooCategory& icat) ; RooCmdArg Index(RooCategory& icat) ;
RooCmdArg Import(const char* state, TH1& histo) ; RooCmdArg Import(const char* state, TH1& histo) ;
RooCmdArg Import(const char* state, RooDataHist& dhist) ;
RooCmdArg Import(TH1& histo) ; RooCmdArg Import(TH1& histo) ;
// RooDataSet::ctor arguments // RooDataSet::ctor arguments
RooCmdArg WeightVar(const char* name) ; RooCmdArg WeightVar(const char* name) ;
RooCmdArg WeightVar(const RooRealVar& arg) ; RooCmdArg WeightVar(const RooRealVar& arg) ;
RooCmdArg Import(const char* state, RooDataSet& data) ; RooCmdArg Import(const char* state, RooDataSet& data) ;
RooCmdArg Link(const char* state, RooDataSet& data) ;
RooCmdArg Import(RooDataSet& data) ; RooCmdArg Import(RooDataSet& data) ;
RooCmdArg Import(TTree& tree) ; RooCmdArg Import(TTree& tree) ;
RooCmdArg ImportFromFile(const char* fname, const char* tname) ;
RooCmdArg StoreError(const RooArgSet& aset) ; RooCmdArg StoreError(const RooArgSet& aset) ;
RooCmdArg StoreAsymError(const RooArgSet& aset) ; RooCmdArg StoreAsymError(const RooArgSet& aset) ;
// RooChi2Var::ctor arguments // RooChi2Var::ctor arguments
RooCmdArg Extended(Bool_t flag=kTRUE) ; RooCmdArg Extended(Bool_t flag=kTRUE) ;
RooCmdArg DataError(Int_t) ; RooCmdArg DataError(Int_t) ;
RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ; RooCmdArg NumCPU(Int_t nCPU, Bool_t interleave=kFALSE) ;
// RooAbsPdf::printLatex arguments // RooAbsPdf::printLatex arguments
RooCmdArg Columns(Int_t ncol) ; RooCmdArg Columns(Int_t ncol) ;
RooCmdArg OutputFile(const char* fileName) ; RooCmdArg OutputFile(const char* fileName) ;
RooCmdArg Format(const char* format, Int_t sigDigit) ; RooCmdArg Format(const char* format, Int_t sigDigit) ;
RooCmdArg Format(const char* what, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(), RooCmdArg Format(const char* what, const RooCmdArg& arg1=RooCmdArg::none(), const RooCmdArg& arg2=RooCmdArg::none(),
const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& a rg4=RooCmdArg::none(), const RooCmdArg& arg3=RooCmdArg::none(),const RooCmdArg& a rg4=RooCmdArg::none(),
const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& a rg6=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& a rg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(),const RooCmdArg& a rg8=RooCmdArg::none()) ; const RooCmdArg& arg7=RooCmdArg::none(),const RooCmdArg& a rg8=RooCmdArg::none()) ;
RooCmdArg Sibling(const RooAbsCollection& sibling) ; RooCmdArg Sibling(const RooAbsCollection& sibling) ;
// RooAbsReal::fillHistogram arguments
RooCmdArg IntegratedObservables(const RooArgSet& intObs) ;
// RooAbsRealLValue::frame arguments // RooAbsRealLValue::frame arguments
RooCmdArg Title(const char* name) ; RooCmdArg Title(const char* name) ;
RooCmdArg Bins(Int_t nbin) ; RooCmdArg Bins(Int_t nbin) ;
RooCmdArg AutoSymRange(const RooAbsData& data, Double_t marginFactor=0.1) ; RooCmdArg AutoSymRange(const RooAbsData& data, Double_t marginFactor=0.1) ;
RooCmdArg AutoRange(const RooAbsData& data, Double_t marginFactor=0.1) ; RooCmdArg AutoRange(const RooAbsData& data, Double_t marginFactor=0.1) ;
// RooAbsData::createHistogram arguments // RooAbsData::createHistogram arguments
RooCmdArg AutoSymBinning(Int_t nbins=100, Double_t marginFactor=0.1) ; RooCmdArg AutoSymBinning(Int_t nbins=100, Double_t marginFactor=0.1) ;
RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1) ; RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1) ;
// RooAbsReal::fillHistogram arguments
RooCmdArg IntegratedObservables(const RooArgSet& intObs) ;
// RooAbsData::reduce arguments // RooAbsData::reduce arguments
RooCmdArg SelectVars(const RooArgSet& vars) ; RooCmdArg SelectVars(const RooArgSet& vars) ;
RooCmdArg EventRange(Int_t nStart, Int_t nStop) ; RooCmdArg EventRange(Int_t nStart, Int_t nStop) ;
// RooAbsPdf::fitTo arguments // RooAbsPdf::fitTo arguments
RooCmdArg FitOptions(const char* opts) ; RooCmdArg FitOptions(const char* opts) ;
RooCmdArg Optimize(Bool_t flag=kTRUE) ; RooCmdArg Optimize(Bool_t flag=kTRUE) ;
RooCmdArg ProjectedObservables(const RooArgSet& set) ; // obsolete, for bac kward compatibility RooCmdArg ProjectedObservables(const RooArgSet& set) ; // obsolete, for bac kward compatibility
RooCmdArg ConditionalObservables(const RooArgSet& set) ; RooCmdArg ConditionalObservables(const RooArgSet& set) ;
RooCmdArg Verbose(Bool_t flag=kTRUE) ; RooCmdArg Verbose(Bool_t flag=kTRUE) ;
skipping to change at line 249 skipping to change at line 253
RooCmdArg BaseClassName(const char* name) ; RooCmdArg BaseClassName(const char* name) ;
RooCmdArg TagName(const char* name) ; RooCmdArg TagName(const char* name) ;
RooCmdArg OutputStream(ostream& os) ; RooCmdArg OutputStream(ostream& os) ;
RooCmdArg Prefix(Bool_t flag) ; RooCmdArg Prefix(Bool_t flag) ;
RooCmdArg Color(Color_t color) ; RooCmdArg Color(Color_t color) ;
// RooWorkspace::import() arguments // RooWorkspace::import() arguments
RooCmdArg RenameConflictNodes(const char* suffix) ; RooCmdArg RenameConflictNodes(const char* suffix) ;
RooCmdArg RenameAllNodes(const char* suffix) ; RooCmdArg RenameAllNodes(const char* suffix) ;
RooCmdArg RenameAllVariables(const char* suffix) ; RooCmdArg RenameAllVariables(const char* suffix) ;
RooCmdArg RenameAllVariablesExcept(const char* suffix,const char* exception List) ;
RooCmdArg RenameVariable(const char* inputName, const char* outputName) ; RooCmdArg RenameVariable(const char* inputName, const char* outputName) ;
RooCmdArg Rename(const char* suffix) ; RooCmdArg Rename(const char* suffix) ;
RooCmdArg RecycleConflictNodes(Bool_t flag=kTRUE) ; RooCmdArg RecycleConflictNodes(Bool_t flag=kTRUE) ;
// RooSimCloneTool::build() arguments // RooSimCloneTool::build() arguments
RooCmdArg SplitParam(const char* varname, const char* catname) ; RooCmdArg SplitParam(const char* varname, const char* catname) ;
RooCmdArg SplitParam(const RooRealVar& var, const RooAbsCategory& cat) ; RooCmdArg SplitParam(const RooRealVar& var, const RooAbsCategory& cat) ;
RooCmdArg SplitParamConstrained(const char* varname, const char* catname, c onst char* rsname) ; RooCmdArg SplitParamConstrained(const char* varname, const char* catname, c onst char* rsname) ;
RooCmdArg SplitParamConstrained(const RooRealVar& var, const RooAbsCategory & cat, const char* rsname) ; RooCmdArg SplitParamConstrained(const RooRealVar& var, const RooAbsCategory & cat, const char* rsname) ;
RooCmdArg Restrict(const char* catName, const char* stateNameList) ; RooCmdArg Restrict(const char* catName, const char* stateNameList) ;
 End of changes. 7 change blocks. 
3 lines changed or deleted 8 lines changed or added


 RooHist.h   RooHist.h 
skipping to change at line 32 skipping to change at line 32
class TH1; class TH1;
class RooCurve ; class RooCurve ;
class RooHist : public TGraphAsymmErrors, public RooPlotable { class RooHist : public TGraphAsymmErrors, public RooPlotable {
public: public:
RooHist() ; RooHist() ;
RooHist(Double_t nominalBinWidth, Double_t nSigma= 1, Double_t xErrorFrac =1.0, Double_t scaleFactor=1.0); RooHist(Double_t nominalBinWidth, Double_t nSigma= 1, Double_t xErrorFrac =1.0, Double_t scaleFactor=1.0);
RooHist(const TH1 &data, Double_t nominalBinWidth= 0, Double_t nSigma= 1, RooAbsData::ErrorType=RooAbsData::Poisson, RooHist(const TH1 &data, Double_t nominalBinWidth= 0, Double_t nSigma= 1, RooAbsData::ErrorType=RooAbsData::Poisson,
Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.); Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.);
RooHist(const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth= 0, RooHist(const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth= 0,
Double_t nSigma= 1, Double_t xErrorFrac=1.0, Double_t nSigma= 1, RooAbsData::ErrorType=RooAbsData::Poisson,
Bool_t efficiency=kFALSE, Double_t scaleFactor=1.0); Double_t xErrorFrac=1.0, Bool_t efficiency=kFALSE, Double_t scaleF
actor=1.0);
RooHist(const RooHist& hist1, const RooHist& hist2, Double_t wgt1=1.0, Do uble_t wgt2=1.0, RooHist(const RooHist& hist1, const RooHist& hist2, Double_t wgt1=1.0, Do uble_t wgt2=1.0,
RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFr ac=1.0) ; RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFr ac=1.0) ;
virtual ~RooHist(); virtual ~RooHist();
// add a datapoint for a bin with n entries, using a Poisson error // add a datapoint for a bin with n entries, using a Poisson error
void addBin(Axis_t binCenter, Int_t n, Double_t binWidth= 0, Double_t xEr rorFrac=1.0, Double_t scaleFactor=1.0); void addBin(Axis_t binCenter, Double_t n, Double_t binWidth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0);
// add a datapoint for a bin with n entries, using a given error // add a datapoint for a bin with n entries, using a given error
void addBinWithError(Axis_t binCenter, Double_t n, Double_t elow, Double_ t ehigh, Double_t binWidth= 0, void addBinWithError(Axis_t binCenter, Double_t n, Double_t elow, Double_ t ehigh, Double_t binWidth= 0,
Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kT RUE, Double_t scaleFactor=1.0); Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kT RUE, Double_t scaleFactor=1.0);
// add a datapoint for a bin with n entries, using a given x and y error // add a datapoint for a bin with n entries, using a given x and y error
void addBinWithXYError(Axis_t binCenter, Double_t n, Double_t exlow, Doub le_t exhigh, Double_t eylow, Double_t eyhigh, void addBinWithXYError(Axis_t binCenter, Double_t n, Double_t exlow, Doub le_t exhigh, Double_t eylow, Double_t eyhigh,
Double_t scaleFactor=1.0); Double_t scaleFactor=1.0);
// add a datapoint for the asymmetry (n1-n2)/(n1+n2), using a binomial er ror // add a datapoint for the asymmetry (n1-n2)/(n1+n2), using a binomial er ror
void addAsymmetryBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWi dth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); void addAsymmetryBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWi dth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0);
// add a datapoint for the asymmetry (n1-n2)/(n1+n2), using sum-of-weight
s error
void addAsymmetryBinWithError(Axis_t binCenter, Double_t n1, Double_t n2,
Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0,
Double_t scaleFactor=1.0);
// add a datapoint for the efficiency (n1)/(n1+n2), using a binomial erro r // add a datapoint for the efficiency (n1)/(n1+n2), using a binomial erro r
void addEfficiencyBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binW idth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0); void addEfficiencyBin(Axis_t binCenter, Int_t n1, Int_t n2, Double_t binW idth= 0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0);
// add a datapoint for the efficiency (n1)/(n1+n2), using a sum-of-weight
s error
void addEfficiencyBinWithError(Axis_t binCenter, Double_t n1, Double_t n2
, Double_t en1, Double_t en2, Double_t binWidth= 0, Double_t xErrorFrac=1.0
, Double_t scaleFactor=1.0);
virtual void printName(ostream& os) const ; virtual void printName(ostream& os) const ;
virtual void printTitle(ostream& os) const ; virtual void printTitle(ostream& os) const ;
virtual void printClassName(ostream& os) const ; virtual void printClassName(ostream& os) const ;
virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent= "") const; virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF ALSE, TString indent= "") const;
inline virtual void Print(Option_t *options= 0) const { inline virtual void Print(Option_t *options= 0) const {
// Printing interface // Printing interface
printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options)); printStream(defaultPrintStream(),defaultPrintContents(options),defaultP rintStyle(options));
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 16 lines changed or added


 RooHistPdf.h   RooHistPdf.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooHistPdf.h 28259 2009-04-16 16:21:16Z wouter $ * File: $Id: RooHistPdf.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 90 skipping to change at line 90
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ;
protected: protected:
Double_t evaluate() const; Double_t evaluate() const;
Double_t totalVolume() const ; Double_t totalVolume() const ;
friend class RooAbsCachedPdf ; friend class RooAbsCachedPdf ;
Double_t totVolume() const ; Double_t totVolume() const ;
RooSetProxy _histObsList ; // List of observables defining dimensio ns of histogram RooArgSet _histObsList ; // List of observables defining dimensio ns of histogram
RooSetProxy _pdfObsList ; // List of observables mapped onto histo gram observables RooSetProxy _pdfObsList ; // List of observables mapped onto histo gram observables
RooDataHist* _dataHist ; // Unowned pointer to underlying histogram RooDataHist* _dataHist ; // Unowned pointer to underlying histogram
TIterator* _histObsIter ; //! TIterator* _histObsIter ; //!
TIterator* _pdfObsIter ; //! TIterator* _pdfObsIter ; //!
mutable RooAICRegistry _codeReg ; //! Auxiliary class keeping tracking of analytical integration code mutable RooAICRegistry _codeReg ; //! Auxiliary class keeping tracking of analytical integration code
Int_t _intOrder ; // Interpolation order Int_t _intOrder ; // Interpolation order
Bool_t _cdfBoundaries ; // Use boundary conditions for CDFs. Bool_t _cdfBoundaries ; // Use boundary conditions for CDFs.
mutable Double_t _totVolume ; //! Total volume of space (product of rang es of observables) mutable Double_t _totVolume ; //! Total volume of space (product of rang es of observables)
Bool_t _unitNorm ; //! Assume contents is unit normalized (fo r use as pdf cache) Bool_t _unitNorm ; // Assume contents is unit normalized (for use as pdf cache)
ClassDef(RooHistPdf,2) // Histogram based PDF ClassDef(RooHistPdf,4) // Histogram based PDF
}; };
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 RooLinkedList.h   RooLinkedList.h 
skipping to change at line 19 skipping to change at line 19
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_LINKED_LIST #ifndef ROO_LINKED_LIST
#define ROO_LINKED_LIST #define ROO_LINKED_LIST
#include "TObject.h" #include "TNamed.h"
#include "RooLinkedListElem.h" #include "RooLinkedListElem.h"
#include "RooHashTable.h" #include "RooHashTable.h"
class RooLinkedListIter ; class RooLinkedListIter ;
class TIterator ; class TIterator ;
class RooLinkedList : public TObject { class RooLinkedList : public TObject {
public: public:
// Constructor // Constructor
RooLinkedList(Int_t htsize=0) ; RooLinkedList(Int_t htsize=0) ;
skipping to change at line 59 skipping to change at line 59
virtual Bool_t Remove(TObject* arg) ; virtual Bool_t Remove(TObject* arg) ;
TObject* At(Int_t index) const ; TObject* At(Int_t index) const ;
Bool_t Replace(const TObject* oldArg, const TObject* newArg) ; Bool_t Replace(const TObject* oldArg, const TObject* newArg) ;
TIterator* MakeIterator(Bool_t dir=kTRUE) const ; TIterator* MakeIterator(Bool_t dir=kTRUE) const ;
RooLinkedListIter iterator(Bool_t dir=kTRUE) const ; RooLinkedListIter iterator(Bool_t dir=kTRUE) const ;
void Clear(Option_t *o=0) ; void Clear(Option_t *o=0) ;
void Delete(Option_t *o=0) ; void Delete(Option_t *o=0) ;
TObject* find(const char* name) const ; TObject* find(const char* name) const ;
TObject* FindObject(const char* name) const ; TObject* FindObject(const char* name) const ;
TObject* FindObject(const TObject* obj) const ; TObject* FindObject(const TObject* obj) const ;
Int_t IndexOf(const char* name) const ;
Int_t IndexOf(const TObject* arg) const ; Int_t IndexOf(const TObject* arg) const ;
TObject* First() const { TObject* First() const {
return _first?_first->_arg:0 ; return _first?_first->_arg:0 ;
} }
void Print(const char* opt) const ; void Print(const char* opt) const ;
void Sort(Bool_t ascend=kTRUE) ; void Sort(Bool_t ascend=kTRUE) ;
const char* GetName() const { return _name.Data() ; }
void SetName(const char* name) { _name = name ; }
protected: protected:
friend class RooLinkedListIter ; friend class RooLinkedListIter ;
virtual void Add(TObject* arg, Int_t refCount) ; virtual void Add(TObject* arg, Int_t refCount) ;
void swapWithNext(RooLinkedListElem* elem) ; void swapWithNext(RooLinkedListElem* elem) ;
RooLinkedListElem* findLink(const TObject* arg) const ; RooLinkedListElem* findLink(const TObject* arg) const ;
Int_t _hashThresh ; // Size threshold for hashing Int_t _hashThresh ; // Size threshold for hashing
Int_t _size ; // Current size of list Int_t _size ; // Current size of list
RooLinkedListElem* _first ; //! Link to first element of list RooLinkedListElem* _first ; //! Link to first element of list
RooLinkedListElem* _last ; //! Link to last element of list RooLinkedListElem* _last ; //! Link to last element of list
RooHashTable* _htableName ; //! Hash table by name RooHashTable* _htableName ; //! Hash table by name
RooHashTable* _htableLink ; //! Hash table by link pointer RooHashTable* _htableLink ; //! Hash table by link pointer
ClassDef(RooLinkedList,1) // Doubly linked list for storage of RooAbsArg TString _name ;
objects
ClassDef(RooLinkedList,2) // Doubly linked list for storage of RooAbsArg
objects
}; };
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 9 lines changed or added


 RooMinimizer.h   RooMinimizer.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooMinimizer.h 28965 2009-06-12 16:17:43Z wouter $ * File: $Id: RooMinimizer.h 30378 2009-09-23 13:42:12Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it *
* * * *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef __ROOFIT_NOROOMINIMIZER
#ifndef ROO_MINIMIZER #ifndef ROO_MINIMIZER
#define ROO_MINIMIZER #define ROO_MINIMIZER
#include "TObject.h" #include "TObject.h"
#include "TStopwatch.h" #include "TStopwatch.h"
#include <fstream> #include <fstream>
#include "TMatrixDSymfwd.h" #include "TMatrixDSymfwd.h"
#include "Fit/Fitter.h" #include "Fit/Fitter.h"
#include "RooMinimizerFcn.h" #include "RooMinimizerFcn.h"
skipping to change at line 113 skipping to change at line 116
std::string _minimizerType; std::string _minimizerType;
static ROOT::Fit::Fitter *_theFitter ; static ROOT::Fit::Fitter *_theFitter ;
RooMinimizer(const RooMinimizer&) ; RooMinimizer(const RooMinimizer&) ;
ClassDef(RooMinimizer,0) // RooFit interface to ROOT::Fit::Fitter ClassDef(RooMinimizer,0) // RooFit interface to ROOT::Fit::Fitter
} ; } ;
#endif #endif
#endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 RooMinimizerFcn.h   RooMinimizerFcn.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* @(#)root/roofitcore:$Id: RooMinimizerFcn.h 28965 2009-06-12 16:17:43Z wo uter $ * @(#)root/roofitcore:$Id: RooMinimizerFcn.h 30408 2009-09-24 15:03:37Z wo uter $
* Authors: * * Authors: *
* AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it *
* * * *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef __ROOFIT_NOROOMINIMIZER
#ifndef ROO_MINIMIZER_FCN #ifndef ROO_MINIMIZER_FCN
#define ROO_MINIMIZER_FCN #define ROO_MINIMIZER_FCN
#include "Math/IFunction.h" #include "Math/IFunction.h"
#include "Fit/ParameterSettings.h" #include "Fit/ParameterSettings.h"
#include "Fit/FitResult.h" #include "Fit/FitResult.h"
#include "TMatrixDSym.h" #include "TMatrixDSym.h"
#include "RooAbsReal.h" #include "RooAbsReal.h"
skipping to change at line 95 skipping to change at line 97
bool _verbose; bool _verbose;
RooArgList* _floatParamList; RooArgList* _floatParamList;
RooArgList* _constParamList; RooArgList* _constParamList;
RooArgList* _initFloatParamList; RooArgList* _initFloatParamList;
RooArgList* _initConstParamList; RooArgList* _initConstParamList;
}; };
#endif #endif
#endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 RooMsgService.h   RooMsgService.h 
skipping to change at line 24 skipping to change at line 24
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_MSG_SERVICE #ifndef ROO_MSG_SERVICE
#define ROO_MSG_SERVICE #define ROO_MSG_SERVICE
#include "Riosfwd.h" #include "Riosfwd.h"
#include <assert.h> #include <assert.h>
#include "TObject.h" #include "TObject.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include <stack>
#include <map> #include <map>
#include "RooCmdArg.h" #include "RooCmdArg.h"
#include "RooGlobalFunc.h" #include "RooGlobalFunc.h"
class RooAbsArg ; class RooAbsArg ;
// Shortcut definitions // Shortcut definitions
#define coutI(a) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a) #define coutI(a) RooMsgService::instance().log(this,RooFit::INFO,RooFit::a)
#define coutP(a) RooMsgService::instance().log(this,RooFit::PROGRESS,RooFit ::a) #define coutP(a) RooMsgService::instance().log(this,RooFit::PROGRESS,RooFit ::a)
#define coutW(a) RooMsgService::instance().log(this,RooFit::WARNING,RooFit: :a) #define coutW(a) RooMsgService::instance().log(this,RooFit::WARNING,RooFit: :a)
#define coutE(a) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::a ) #define coutE(a) RooMsgService::instance().log(this,RooFit::ERROR,RooFit::a )
skipping to change at line 181 skipping to change at line 182
static void cleanup() ; static void cleanup() ;
// Print level support for RooFit-related messages that are not routed th rough RooMsgService (such as Minuit printouts) // Print level support for RooFit-related messages that are not routed th rough RooMsgService (such as Minuit printouts)
Bool_t silentMode() const { return _silentMode ; } Bool_t silentMode() const { return _silentMode ; }
void setSilentMode(Bool_t flag) { _silentMode = flag ; } void setSilentMode(Bool_t flag) { _silentMode = flag ; }
Int_t errorCount() const { return _errorCount ; } Int_t errorCount() const { return _errorCount ; }
void clearErrorCount() { _errorCount = 0 ; } void clearErrorCount() { _errorCount = 0 ; }
void saveState() ;
void restoreState() ;
protected: protected:
Int_t activeStream(const RooAbsArg* self, RooFit::MsgTopic facility, RooF it::MsgLevel level) ; Int_t activeStream(const RooAbsArg* self, RooFit::MsgTopic facility, RooF it::MsgLevel level) ;
Int_t activeStream(const TObject* self, RooFit::MsgTopic facility, RooFit ::MsgLevel level) ; Int_t activeStream(const TObject* self, RooFit::MsgTopic facility, RooFit ::MsgLevel level) ;
std::vector<StreamConfig> _streams ; std::vector<StreamConfig> _streams ;
std::stack<std::vector<StreamConfig> > _streamsSaved ;
std::ostream* _devnull ; std::ostream* _devnull ;
std::map<std::string,std::ostream*> _files ; std::map<std::string,std::ostream*> _files ;
RooFit::MsgLevel _globMinLevel ; RooFit::MsgLevel _globMinLevel ;
RooFit::MsgLevel _lastMsgLevel ; RooFit::MsgLevel _lastMsgLevel ;
Bool_t _silentMode ; Bool_t _silentMode ;
Bool_t _showPid ; Bool_t _showPid ;
Int_t _errorCount ; Int_t _errorCount ;
 End of changes. 3 change blocks. 
0 lines changed or deleted 5 lines changed or added


 RooMultiVarGaussian.h   RooMultiVarGaussian.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitModels * * Package: RooFitModels *
* File: $Id: RooMultiVarGaussian.h 28259 2009-04-16 16:21:16Z wouter $ * File: $Id: RooMultiVarGaussian.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 26 skipping to change at line 26
#ifndef ROO_MULTI_VAR_GAUSSIAN #ifndef ROO_MULTI_VAR_GAUSSIAN
#define ROO_MULTI_VAR_GAUSSIAN #define ROO_MULTI_VAR_GAUSSIAN
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "RooListProxy.h" #include "RooListProxy.h"
#include "TMatrixDSym.h" #include "TMatrixDSym.h"
#include "TMatrixD.h" #include "TMatrixD.h"
#include "TVectorD.h" #include "TVectorD.h"
class RooRealVar; class RooRealVar;
class RooFitResult ;
class RooMultiVarGaussian : public RooAbsPdf { class RooMultiVarGaussian : public RooAbsPdf {
public: public:
RooMultiVarGaussian() {} ; RooMultiVarGaussian() {} ;
RooMultiVarGaussian(const char *name, const char *title, const RooArgList
& xvec, const RooFitResult& fr) ;
RooMultiVarGaussian(const char *name, const char *title, const RooArgList
& xvec, const RooArgList& mu, const TMatrixDSym& covMatrix) ;
RooMultiVarGaussian(const char *name, const char *title, const RooArgList & xvec, const TVectorD& mu, const TMatrixDSym& covMatrix) ; RooMultiVarGaussian(const char *name, const char *title, const RooArgList & xvec, const TVectorD& mu, const TMatrixDSym& covMatrix) ;
RooMultiVarGaussian(const char *name, const char *title, const RooArgList & xvec,const TMatrixDSym& covMatrix) ; RooMultiVarGaussian(const char *name, const char *title, const RooArgList & xvec,const TMatrixDSym& covMatrix) ;
void setAnaIntZ(Double_t z) { _z = z ; } void setAnaIntZ(Double_t z) { _z = z ; }
RooMultiVarGaussian(const RooMultiVarGaussian& other, const char* name=0) ; RooMultiVarGaussian(const RooMultiVarGaussian& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooMultiVa rGaussian(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooMultiVa rGaussian(*this,newname); }
inline virtual ~RooMultiVarGaussian() { } inline virtual ~RooMultiVarGaussian() { }
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ; Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ;
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ; Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const; Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
void initGenerator(Int_t code) ;
void generateEvent(Int_t code); void generateEvent(Int_t code);
const TMatrixDSym& covarianceMatrix() const { return _cov ; }
class AnaIntData { class AnaIntData {
public: public:
TMatrixD S22bar ; TMatrixD S22bar ;
Double_t S22det ; Double_t S22det ;
vector<int> pmap ; vector<int> pmap ;
Int_t nint ; Int_t nint ;
} ; } ;
class GenData { class GenData {
public: public:
skipping to change at line 75 skipping to change at line 81
protected: protected:
void decodeCode(Int_t code, vector<int>& map1, vector<int>& map2) const; void decodeCode(Int_t code, vector<int>& map1, vector<int>& map2) const;
AnaIntData& anaIntData(Int_t code) const ; AnaIntData& anaIntData(Int_t code) const ;
GenData& genData(Int_t code) const ; GenData& genData(Int_t code) const ;
mutable map<int,AnaIntData> _anaIntCache ; //! mutable map<int,AnaIntData> _anaIntCache ; //!
mutable map<int,GenData> _genCache ; //! mutable map<int,GenData> _genCache ; //!
RooListProxy _x ; RooListProxy _x ;
TVectorD _mu ; RooListProxy _mu ;
TMatrixDSym _cov ; TMatrixDSym _cov ;
TMatrixDSym _covI ; TMatrixDSym _covI ;
Double_t _det ; Double_t _det ;
Double_t _z ; Double_t _z ;
void syncMuVec() const ;
mutable TVectorD _muVec ; //! Do not persist
Double_t evaluate() const ; Double_t evaluate() const ;
private: private:
ClassDef(RooMultiVarGaussian,1) // Multivariate Gaussian PDF with correla tions ClassDef(RooMultiVarGaussian,1) // Multivariate Gaussian PDF with correla tions
}; };
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 13 lines changed or added


 RooNDKeysPdf.h   RooNDKeysPdf.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitModels * * Package: RooFitModels *
* File: $Id: RooNDKeysPdf.h 24286 2008-06-16 15:47:04Z wouter $ * File: $Id: RooNDKeysPdf.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* GR, Gerhard Raven, UC San Diego, raven@slac.stanford.edu * Max Baak, CERN, mbaak@cern.ch *
*
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu
*
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
*
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
************************************************************************** ***/ ************************************************************************** ***/
#ifndef ROO_KEYS_PDF #ifndef ROO_KEYS_PDF
#define ROO_KEYS_PDF #define ROO_KEYS_PDF
skipping to change at line 59 skipping to change at line 57
public: public:
enum Mirror {NoMirror, MirrorLeft, MirrorRight, MirrorBoth, enum Mirror {NoMirror, MirrorLeft, MirrorRight, MirrorBoth,
MirrorAsymLeft, MirrorAsymLeftRight, MirrorAsymLeft, MirrorAsymLeftRight,
MirrorAsymRight, MirrorLeftAsymRight, MirrorAsymRight, MirrorLeftAsymRight,
MirrorAsymBoth }; MirrorAsymBoth };
RooNDKeysPdf(const char *name, const char *title, RooNDKeysPdf(const char *name, const char *title,
const RooArgList& varList, RooDataSet& data, const RooArgList& varList, RooDataSet& data,
TString options="a", Double_t rho=1, Double_t nSigma=3, TString options="a", Double_t rho=1, Double_t nSigma=3, Bool_
RooAbsReal& weight=RooRealConstant::value(1)); t rotate=kTRUE) ;
RooNDKeysPdf(const char *name, const char *title, RooNDKeysPdf(const char *name, const char *title,
RooAbsReal& x, RooDataSet& data, RooAbsReal& x, RooDataSet& data,
Mirror mirror= NoMirror, Double_t rho=1, Double_t nSigma=3, Mirror mirror= NoMirror, Double_t rho=1, Double_t nSigma=3,
RooAbsReal& weight=RooRealConstant::value(1)); Bool_t rotate=kTRUE) ;
RooNDKeysPdf(const char *name, const char *title, RooNDKeysPdf(const char *name, const char *title,
RooAbsReal& x, RooAbsReal &y, RooDataSet& data, RooAbsReal& x, RooAbsReal &y, RooDataSet& data,
TString options="a", Double_t rho = 1.0, Double_t nSigma=3, TString options="a", Double_t rho = 1.0, Double_t nSigma=3,
RooAbsReal& weight=RooRealConstant::value(1)); Bool_t rotate=kTRUE);
RooNDKeysPdf(const RooNDKeysPdf& other, const char* name=0); RooNDKeysPdf(const RooNDKeysPdf& other, const char* name=0);
virtual ~RooNDKeysPdf(); virtual ~RooNDKeysPdf();
virtual TObject* clone(const char* newname) const { return new RooNDKeysP df(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooNDKeysP df(*this,newname); }
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ; Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ;
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ; Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
inline void fixShape(Bool_t fix) { inline void fixShape(Bool_t fix) {
skipping to change at line 102 skipping to change at line 97
map<Int_t,Bool_t> bpsIdcs; map<Int_t,Bool_t> bpsIdcs;
vector<Int_t> sIdcs; vector<Int_t> sIdcs;
vector<Int_t> bIdcs; vector<Int_t> bIdcs;
vector<Int_t> bmsIdcs; vector<Int_t> bmsIdcs;
} ; } ;
protected: protected:
RooListProxy _varList ; RooListProxy _varList ;
TIterator* _varItr ; //! do not persist TIterator* _varItr ; //! do not persist
TIterator* _weightItr; //!
Double_t evaluate() const; Double_t evaluate() const;
void createPdf(Bool_t firstCall=kTRUE) const; void createPdf(Bool_t firstCall=kTRUE) const;
void setOptions() const; void setOptions() const;
void initialize() const; void initialize() const;
void loadDataSet(Bool_t firstCall) const; void loadDataSet(Bool_t firstCall) const;
void mirrorDataSet() const; void mirrorDataSet() const;
void loadWeightSet() const; void loadWeightSet() const;
void calculateShell(BoxInfo* bi) const; void calculateShell(BoxInfo* bi) const;
void calculatePreNorm(BoxInfo* bi) const; void calculatePreNorm(BoxInfo* bi) const;
void sortDataIndices(BoxInfo* bi=0) const; void sortDataIndices(BoxInfo* bi=0) const;
void calculateBandWidth() const; void calculateBandWidth() const;
Double_t gauss(vector<Double_t>& x, vector<vector<Double_t> >& weights) c onst; Double_t gauss(vector<Double_t>& x, vector<vector<Double_t> >& weights) c onst;
void loopRange(vector<Double_t>& x, map<Int_t,Bool_t>& ibMap) const; void loopRange(vector<Double_t>& x, map<Int_t,Bool_t>& ibMap) const;
void boxInfoInit(BoxInfo* bi, const char* rangeName, Int_t code) cons t; void boxInfoInit(BoxInfo* bi, const char* rangeName, Int_t code) cons t;
virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLi
st*/, Bool_t /*mustReplaceAll*/,
Bool_t /*nameChange*/, Bool_t /*isRecu
rsive*/) ;
mutable RooDataSet& _data; mutable RooDataSet& _data;
mutable TString _options; mutable TString _options;
mutable Double_t _widthFactor; mutable Double_t _widthFactor;
mutable Double_t _nSigma; mutable Double_t _nSigma;
mutable RooRealProxy _weight ;
mutable RooSetProxy _weightParams ;
mutable RooAbsReal* _weightDep ;
mutable Bool_t _fixedShape; mutable Bool_t _fixedShape;
mutable Bool_t _mirror; mutable Bool_t _mirror;
mutable Bool_t _debug; mutable Bool_t _debug;
mutable Bool_t _verbose; mutable Bool_t _verbose;
mutable Double_t _sqrt2pi; mutable Double_t _sqrt2pi;
mutable Int_t _nDim; mutable Int_t _nDim;
mutable Int_t _nEvents; mutable Int_t _nEvents;
mutable Int_t _nEventsM; mutable Int_t _nEventsM;
mutable Double_t _nEventsW; mutable Double_t _nEventsW;
skipping to change at line 192 skipping to change at line 179
mutable Double_t _maxWeight; mutable Double_t _maxWeight;
mutable map<Int_t,Double_t> _wMap; mutable map<Int_t,Double_t> _wMap;
mutable TMatrixDSym* _covMat; mutable TMatrixDSym* _covMat;
mutable TMatrixDSym* _corrMat; mutable TMatrixDSym* _corrMat;
mutable TMatrixD* _rotMat; mutable TMatrixD* _rotMat;
mutable TVectorD* _sigmaR; mutable TVectorD* _sigmaR;
mutable TVectorD* _dx; mutable TVectorD* _dx;
mutable Double_t _sigmaAvgR; mutable Double_t _sigmaAvgR;
mutable Bool_t _rotate;
/// sorter function /// sorter function
struct SorterTV_L2H { struct SorterTV_L2H {
Int_t idx; Int_t idx;
SorterTV_L2H (Int_t index) : idx(index) {} SorterTV_L2H (Int_t index) : idx(index) {}
bool operator() (const itPair& a, const itPair& b) { bool operator() (const itPair& a, const itPair& b) {
const TVectorD& aVec = *(a.second); const TVectorD& aVec = *(a.second);
const TVectorD& bVec = *(b.second); const TVectorD& bVec = *(b.second);
return (aVec[idx]<bVec[idx]); return (aVec[idx]<bVec[idx]);
} }
 End of changes. 9 change blocks. 
23 lines changed or deleted 10 lines changed or added


 RooNLLVar.h   RooNLLVar.h 
skipping to change at line 58 skipping to change at line 58
} }
virtual ~RooNLLVar(); virtual ~RooNLLVar();
void applyWeightSquared(Bool_t flag) { _weightSq = flag ; setValueDirty() ; } void applyWeightSquared(Bool_t flag) { _weightSq = flag ; setValueDirty() ; }
virtual Double_t defaultErrorLevel() const { return 0.5 ; } virtual Double_t defaultErrorLevel() const { return 0.5 ; }
protected: protected:
virtual Bool_t processEmptyDataSets() const { return _extended ; }
static RooArgSet _emptySet ; // Supports named argument constructor static RooArgSet _emptySet ; // Supports named argument constructor
Bool_t _extended ; Bool_t _extended ;
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int _t stepSize) const ; virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int _t stepSize) const ;
Bool_t _weightSq ; // Apply weights squared? Bool_t _weightSq ; // Apply weights squared?
ClassDef(RooNLLVar,1) // Function representing (extended) -log(L) of p.d. f and dataset ClassDef(RooNLLVar,1) // Function representing (extended) -log(L) of p.d. f and dataset
}; };
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 RooProdGenContext.h   RooProdGenContext.h 
skipping to change at line 57 skipping to change at line 57
void updateCCDTable() ; void updateCCDTable() ;
RooProdGenContext(const RooProdGenContext& other) ; RooProdGenContext(const RooProdGenContext& other) ;
RooArgSet _commonCats ; // Common category dependents RooArgSet _commonCats ; // Common category dependents
RooArgSet* _ccdCloneSet ; RooArgSet* _ccdCloneSet ;
RooSuperCategory* _ccdSuper ; // SuperCategory of Common category depend ents RooSuperCategory* _ccdSuper ; // SuperCategory of Common category depend ents
RooArgSet* _pdfCloneSet ; RooArgSet* _pdfCloneSet ;
RooAbsPdf* _pdfClone ; RooAbsPdf* _pdfClone ;
RooRealIntegral* _pdfCcdInt ; RooRealIntegral* _pdfCcdInt ;
RooArgSet _uniObs ; // Observable to be generated with flat di
stribution
TIterator* _uniIter ; // Iterator over uniform observables
Bool_t _ccdRefresh ; Bool_t _ccdRefresh ;
Double_t * _ccdTable ; Double_t * _ccdTable ;
const RooProdPdf *_pdf ; // Original PDF const RooProdPdf *_pdf ; // Original PDF
TList _gcList ; // List of component generator contexts TList _gcList ; // List of component generator contexts
TIterator* _gcIter ; //! Iterator over gcList TIterator* _gcIter ; //! Iterator over gcList
RooArgSet _ownedMultiProds ; // Owned auxilary multi-term product PDFs RooArgSet _ownedMultiProds ; // Owned auxilary multi-term product PDFs
ClassDef(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf ClassDef(RooProdGenContext,0) // Context for efficient generation of a a dataset from a RooProdPdf
}; };
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 RooProdPdf.h   RooProdPdf.h 
skipping to change at line 77 skipping to change at line 77
virtual Double_t expectedEvents(const RooArgSet& nset) const { return exp ectedEvents(&nset) ; } virtual Double_t expectedEvents(const RooArgSet& nset) const { return exp ectedEvents(&nset) ; }
const RooArgList& pdfList() const { return _pdfList ; } const RooArgList& pdfList() const { return _pdfList ; }
virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet &genera teVars, Bool_t staticInitOK=kTRUE) const; virtual Int_t getGenerator(const RooArgSet& directVars, RooArgSet &genera teVars, Bool_t staticInitOK=kTRUE) const;
virtual void initGenerator(Int_t code) ; virtual void initGenerator(Int_t code) ;
virtual void generateEvent(Int_t code); virtual void generateEvent(Int_t code);
virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ; virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ;
// Constraint management // Constraint management
virtual RooArgSet* getConstraints(const RooArgSet& observables, const Roo ArgSet& constrainedParams) const ; virtual RooArgSet* getConstraints(const RooArgSet& observables, const Roo ArgSet& constrainedParams, Bool_t stripDisconnected) const ;
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ;
void printMetaArgs(ostream& os) const ; void printMetaArgs(ostream& os) const ;
protected: protected:
virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*li
st*/, Bool_t stripDisconnected) const ;
void initializeFromCmdArgList(const RooArgSet& fullPdfSet, const RooLinke dList& l) ; void initializeFromCmdArgList(const RooArgSet& fullPdfSet, const RooLinke dList& l) ;
void factorizeProduct(const RooArgSet& normSet, const RooArgSet& intSet, void factorizeProduct(const RooArgSet& normSet, const RooArgSet& intSet,
RooLinkedList& termList, RooLinkedList& normList, RooLinkedList& termList, RooLinkedList& normList,
RooLinkedList& impDepList, RooLinkedList& crossDepL ist, RooLinkedList& impDepList, RooLinkedList& crossDepL ist,
RooLinkedList& intList) const; RooLinkedList& intList) const;
const char* makeRGPPName(const char* pfx, const RooArgSet& term, const Ro oArgSet& iset, const RooArgSet& nset, const char* isetRangeName) const ; const char* makeRGPPName(const char* pfx, const RooArgSet& term, const Ro oArgSet& iset, const RooArgSet& nset, const char* isetRangeName) const ;
void groupProductTerms(RooLinkedList& groupedTerms, RooArgSet& outerIntDe ps, void groupProductTerms(RooLinkedList& groupedTerms, RooArgSet& outerIntDe ps,
const RooLinkedList& terms, const RooLinkedList& n orms, const RooLinkedList& terms, const RooLinkedList& n orms,
const RooLinkedList& imps, const RooLinkedList& in ts, const RooLinkedList& cross) const ; const RooLinkedList& imps, const RooLinkedList& in ts, const RooLinkedList& cross) const ;
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 RooProfileLL.h   RooProfileLL.h 
skipping to change at line 34 skipping to change at line 34
public: public:
RooProfileLL(const char *name, const char *title, RooAbsReal& nll, const RooArgSet& observables); RooProfileLL(const char *name, const char *title, RooAbsReal& nll, const RooArgSet& observables);
RooProfileLL(const RooProfileLL& other, const char* name=0) ; RooProfileLL(const RooProfileLL& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooProfile LL(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooProfile LL(*this,newname); }
virtual ~RooProfileLL() ; virtual ~RooProfileLL() ;
void setAlwaysStartFromMin(Bool_t flag) { _startFromMin = flag ; } void setAlwaysStartFromMin(Bool_t flag) { _startFromMin = flag ; }
Bool_t alwaysStartFromMin() const { return _startFromMin ; } Bool_t alwaysStartFromMin() const { return _startFromMin ; }
RooMinuit* minuit() { return _minuit ; }
RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; } RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
const RooArgSet& bestFitParams() const ; const RooArgSet& bestFitParams() const ;
virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ; virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLis t*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive */) ; virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLis t*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive */) ;
protected: protected:
void validateAbsMin() const ; void validateAbsMin() const ;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooRealIntegral.h   RooRealIntegral.h 
skipping to change at line 53 skipping to change at line 53
Bool_t isValid() const { return _valid; } Bool_t isValid() const { return _valid; }
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ; void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, T String indent="") const ;
void printMetaArgs(ostream& os) const ; void printMetaArgs(ostream& os) const ;
const RooArgSet& numIntCatVars() const { return _sumList ; } const RooArgSet& numIntCatVars() const { return _sumList ; }
const RooArgSet& numIntRealVars() const { return _intList ; } const RooArgSet& numIntRealVars() const { return _intList ; }
const RooArgSet& anaIntVars() const { return _anaList ; } const RooArgSet& anaIntVars() const { return _anaList ; }
void setCacheExpensive(Bool_t flag) { void setCacheNumeric(Bool_t flag) {
// If true, expensive integrals (those with >1 dimension numerically in // If true, value of this interal is cached if it is (partially numeric
tegrated) )
// have there values cached in the global expensive object repository _cacheNum = flag ;
_cacheExpensive = flag ;
} }
Bool_t getCacheExpensive() const { Bool_t getCacheNumeric() {
// If true, expensive integrals (those with >1 dimension numerically in // If true, value of this interal is cached if it is (partially numeric
tegrated) )
// have there values cached in the global expensive object repository return _cacheNum ;
return _cacheExpensive ; }
static void setCacheAllNumeric(Int_t ndim) {
// Global switch to cache all integral values that integrate at least n
dim dimensions numerically
_cacheAllNDim = ndim ;
}
static Int_t getCacheAllNumeric() {
// Return minimum dimensions of numeric integration for which values ar
e cached.
return _cacheAllNDim ;
} }
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const { virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const {
// Forward plot sampling hint of integrand // Forward plot sampling hint of integrand
return _function.arg().plotSamplingHint(obs,xlo,xhi) ; return _function.arg().plotSamplingHint(obs,xlo,xhi) ;
} }
virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet * nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ; virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet * nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ;
protected: protected:
skipping to change at line 128 skipping to change at line 136
IntOperMode _intOperMode ; // integration operation mode IntOperMode _intOperMode ; // integration operation mode
mutable Bool_t _restartNumIntEngine ; //! do not persist mutable Bool_t _restartNumIntEngine ; //! do not persist
mutable RooAbsIntegrator* _numIntEngine ; //! do not persist mutable RooAbsIntegrator* _numIntEngine ; //! do not persist
mutable RooAbsFunc *_numIntegrand; //! do not persist mutable RooAbsFunc *_numIntegrand; //! do not persist
TNamed* _rangeName ; TNamed* _rangeName ;
mutable RooArgSet* _params ; //! cache for set of parameters mutable RooArgSet* _params ; //! cache for set of parameters
static Bool_t _cacheExpensive ; //! Cache expensive integrals (>=1D numer Bool_t _cacheNum ; // Cache integral if numeric
ic) in global expensive object cache? static Int_t _cacheAllNDim ; //! Cache all integrals with given numeric d
imension
virtual void operModeHook() ; // cache operation mode virtual void operModeHook() ; // cache operation mode
ClassDef(RooRealIntegral,1) // Real-valued function representing an integ ral over a RooAbsReal object ClassDef(RooRealIntegral,2) // Real-valued function representing an integ ral over a RooAbsReal object
}; };
#endif #endif
 End of changes. 4 change blocks. 
13 lines changed or deleted 24 lines changed or added


 RooStatsUtils.h   RooStatsUtils.h 
// @(#)root/roostats:$Id: RooStatsUtils.h 29107 2009-06-19 14:26:42Z moneta $ // @(#)root/roostats:$Id: RooStatsUtils.h 30462 2009-09-25 16:05:55Z moneta $
// Author: Kyle Cranmer 28/07/2008 // Author: Kyle Cranmer 28/07/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 25 skipping to change at line 25
#ifndef ROOT_TMath #ifndef ROOT_TMath
#include "TMath.h" #include "TMath.h"
#endif #endif
#ifndef ROOT_Math_DistFunc #ifndef ROOT_Math_DistFunc
#include"Math/DistFunc.h" #include"Math/DistFunc.h"
#endif #endif
#include "RooArgSet.h" #include "RooArgSet.h"
#include "RooRealVar.h" #include "RooRealVar.h"
#include "RooAbsCollection.h"
#include "TIterator.h"
#include <iostream>
using namespace std ;
namespace RooStats { namespace RooStats {
// returns one-sided significance corresponding to a p-value // returns one-sided significance corresponding to a p-value
inline Double_t PValueToSignificance(Double_t pvalue){ inline Double_t PValueToSignificance(Double_t pvalue){
// return sqrt(2.)*TMath::ErfInverse(1 - 2.*pvalue); // return sqrt(2.)*TMath::ErfInverse(1 - 2.*pvalue);
return TMath::Abs(::ROOT::Math::normal_quantile(pvalue,1) ); return TMath::Abs(::ROOT::Math::normal_quantile(pvalue,1) );
} }
// returns p-value corresponding to a 1-sided significance // returns p-value corresponding to a 1-sided significance
inline Double_t SignificanceToPValue(Double_t Z){ inline Double_t SignificanceToPValue(Double_t Z){
// return .5*TMath::Erfc( Z /sqrt(2.)); // return .5*TMath::Erfc( Z /sqrt(2.));
return ::ROOT::Math::normal_cdf_c(Z); return ::ROOT::Math::normal_cdf_c(Z);
} }
inline void SetParameters(const RooArgSet* desiredVals, RooArgSet* params ToChange){ inline void SetParameters(const RooArgSet* desiredVals, RooArgSet* params ToChange){
TIter it = desiredVals->createIterator(); *paramsToChange=*desiredVals ;
RooRealVar *myarg;
RooRealVar *mytarget;
while ((myarg = (RooRealVar *)it.Next())) {
if(!myarg) continue;
mytarget = (RooRealVar*) paramsToChange->find(myarg->GetName());
if(!mytarget) continue;
mytarget->setVal( myarg->getVal() );
mytarget->setConstant(myarg->isConstant());
}
} }
inline void RemoveConstantParameters(RooArgSet* set){ inline void RemoveConstantParameters(RooArgSet* set){
RooArgSet constSet; RooArgSet constSet;
TIter it = set->createIterator(); TIter it = set->createIterator();
RooRealVar *myarg; RooRealVar *myarg;
while ((myarg = (RooRealVar *)it.Next())) { while ((myarg = (RooRealVar *)it.Next())) {
if(!myarg) continue; if(!myarg) continue;
if(myarg->isConstant()) constSet.add(*myarg); if(myarg->isConstant()) constSet.add(*myarg);
} }
set->remove(constSet); set->remove(constSet);
} }
// Assuming all values in set are RooRealVars, randomize their values.
// Do not
inline void RandomizeCollection(RooAbsCollection& set,
Bool_t randomizeConstants = kTRUE)
{
TIterator* it = set.createIterator();
RooRealVar* var;
while ((var = (RooRealVar*)it->Next()) != NULL)
if (!var->isConstant() || randomizeConstants)
var->randomize();
}
} }
#endif #endif
 End of changes. 4 change blocks. 
11 lines changed or deleted 20 lines changed or added


 RooTFnBinding.h   RooTFnBinding.h 
skipping to change at line 21 skipping to change at line 21
#include "RooListProxy.h" #include "RooListProxy.h"
#include "RooAbsReal.h" #include "RooAbsReal.h"
class TF1 ; class TF1 ;
class TF2 ; class TF2 ;
class TF3 ; class TF3 ;
class RooTFnBinding : public RooAbsReal { class RooTFnBinding : public RooAbsReal {
public: public:
RooTFnBinding() {} ; RooTFnBinding() {} ;
RooTFnBinding(const char *name, const char *title, TF1* _func, const RooA rgList& _list); RooTFnBinding(const char *name, const char *title, TF1* _func, const RooA rgList& _list);
RooTFnBinding(const char *name, const char *title, TF1* _func, const RooA rgList& _list, const RooArgList& _plist);
RooTFnBinding(const RooTFnBinding& other, const char* name=0) ; RooTFnBinding(const RooTFnBinding& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooTFnBind ing(*this,newname); } virtual TObject* clone(const char* newname) const { return new RooTFnBind ing(*this,newname); }
inline virtual ~RooTFnBinding() { } inline virtual ~RooTFnBinding() { }
void printArgs(ostream& os) const ; void printArgs(ostream& os) const ;
protected: protected:
RooListProxy list ; RooListProxy olist ;
RooListProxy plist ;
TF1* func ; TF1* func ;
Double_t evaluate() const ; Double_t evaluate() const ;
private: private:
ClassDef(RooTFnBinding,1) // RooAbsReal binding to ROOT TF[123] functions ClassDef(RooTFnBinding,1) // RooAbsReal binding to ROOT TF[123] functions
}; };
namespace RooFit { namespace RooFit {
RooAbsReal* bindFunction(TF1* func,RooAbsReal& x) ; RooAbsReal* bindFunction(TF1* func,RooAbsReal& x) ;
RooAbsReal* bindFunction(TF2* func,RooAbsReal& x, RooAbsReal& y) ; RooAbsReal* bindFunction(TF2* func,RooAbsReal& x, RooAbsReal& y) ;
RooAbsReal* bindFunction(TF3* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal & z) ; RooAbsReal* bindFunction(TF3* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal & z) ;
RooAbsReal* bindFunction(TF1* func,RooAbsReal& x, const RooArgList& params)
;
RooAbsReal* bindFunction(TF2* func,RooAbsReal& x, RooAbsReal& y, const RooA
rgList& params) ;
RooAbsReal* bindFunction(TF3* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal
& z, const RooArgList& params) ;
} }
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 RooTObjWrap.h   RooTObjWrap.h 
skipping to change at line 26 skipping to change at line 26
#ifndef ROO_TOBJ_WRAP #ifndef ROO_TOBJ_WRAP
#define ROO_TOBJ_WRAP #define ROO_TOBJ_WRAP
#include "Rtypes.h" #include "Rtypes.h"
#include "TNamed.h" #include "TNamed.h"
#include "RooLinkedList.h" #include "RooLinkedList.h"
class RooTObjWrap : public TNamed { class RooTObjWrap : public TNamed {
public: public:
RooTObjWrap(Bool_t isArray=kFALSE) : _isArray(isArray) {} ; RooTObjWrap(Bool_t isArray=kFALSE) : _isArray(isArray), _owning(kFALSE) {
RooTObjWrap(TObject* inObj, Bool_t isArray=kFALSE) : TNamed(), _isArray(i } ;
sArray) { _list.Add(inObj) ; } RooTObjWrap(TObject* inObj, Bool_t isArray=kFALSE) : TNamed(), _isArray(i
RooTObjWrap(const RooTObjWrap& other) : TNamed(other), _list(other._list) sArray), _owning(kFALSE) { _list.Add(inObj) ; }
{} RooTObjWrap(const RooTObjWrap& other) : TNamed(other), _isArray(other._i
virtual ~RooTObjWrap() {} ; sArray), _owning(kFALSE), _list(other._list) {}
virtual ~RooTObjWrap() { if (_owning) _list.Delete() ; } ;
void setOwning(Bool_t flag) { _owning = flag ; }
TObject* obj() const { return _list.At(0) ; } TObject* obj() const { return _list.At(0) ; }
const RooLinkedList& objList() const { return _list ; } const RooLinkedList& objList() const { return _list ; }
void setObj(TObject* inObj) { void setObj(TObject* inObj) {
if (!_isArray) { if (!_isArray) {
_list.Clear() ; _list.Clear() ;
} }
_list.Add(inObj) ; _list.Add(inObj) ;
} }
protected: protected:
Bool_t _isArray ; Bool_t _isArray ;
Bool_t _owning ;
RooLinkedList _list ; RooLinkedList _list ;
ClassDef(RooTObjWrap,1) // Container class for Int_t ClassDef(RooTObjWrap,2) // Container class for Int_t
}; };
#endif #endif
 End of changes. 4 change blocks. 
7 lines changed or deleted 10 lines changed or added


 RooTreeDataStore.h   RooTreeDataStore.h 
/************************************************************************** *** /************************************************************************** ***
* Project: RooFit * * Project: RooFit *
* Package: RooFitCore * * Package: RooFitCore *
* File: $Id: RooTreeDataStore.h 28963 2009-06-12 15:47:45Z wouter $ * File: $Id: RooTreeDataStore.h 30333 2009-09-21 15:39:17Z wouter $
* Authors: * * Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* * * *
* Copyright (c) 2000-2005, Regents of the University of California * * Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. * * and Stanford University. All rights reserved. *
* * * *
* Redistribution and use in source and binary forms, * * Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms * * with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
skipping to change at line 81 skipping to change at line 81
// Add rows // Add rows
virtual void append(RooAbsDataStore& other) ; virtual void append(RooAbsDataStore& other) ;
// General & bookkeeping methods // General & bookkeeping methods
virtual Bool_t valid() const ; virtual Bool_t valid() const ;
virtual Int_t numEntries() const ; virtual Int_t numEntries() const ;
virtual void reset() ; virtual void reset() ;
// Tree access // Tree access
TTree& tree() { return *_tree ; } TTree& tree() { return *_tree ; }
virtual const TTree* tree() const { return _tree ; }
// Forwarded from TTree // Forwarded from TTree
Stat_t GetEntries() const; Stat_t GetEntries() const;
void Reset(Option_t* option=0); void Reset(Option_t* option=0);
Int_t Fill(); Int_t Fill();
Int_t GetEntry(Int_t entry = 0, Int_t getall = 0); Int_t GetEntry(Int_t entry = 0, Int_t getall = 0);
void Draw(Option_t* option = "") ;
// Constant term optimizer interface // Constant term optimizer interface
virtual void cacheArgs(RooArgSet& varSet, const RooArgSet* nset=0) ; virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ;
virtual const RooAbsArg* cacheOwner() { return _cacheOwner ; }
virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; virtual void setArgStatus(const RooArgSet& set, Bool_t active) ;
virtual void resetCache() ; virtual void resetCache() ;
void loadValues(const TTree *t, const RooFormulaVar* select=0, const char * rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; void loadValues(const TTree *t, const RooFormulaVar* select=0, const char * rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ;
void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0 , const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0 , const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ;
virtual void checkInit() const; virtual void checkInit() const;
protected: protected:
void initialize(); void initialize();
void initCache(const RooArgSet& cachedVars) ; void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars) ;
// TTree Branch buffer size control // TTree Branch buffer size control
void setBranchBufferSize(Int_t size) { _defTreeBufSize = size ; } void setBranchBufferSize(Int_t size) { _defTreeBufSize = size ; }
Int_t getBranchBufferSize() const { return _defTreeBufSize ; } Int_t getBranchBufferSize() const { return _defTreeBufSize ; }
static Int_t _defTreeBufSize ; static Int_t _defTreeBufSize ;
void createTree(const char* name, const char* title) ; void createTree(const char* name, const char* title) ;
TTree *_tree ; // TTree holding the data points TTree *_tree ; // TTree holding the data points
TTree *_cacheTree ; //! TTree holding the cached function values TTree *_cacheTree ; //! TTree holding the cached function values
const RooAbsArg* _cacheOwner ; //! Object owning cache contents
mutable Bool_t _defCtor ;//! Was object constructed with default ctor? mutable Bool_t _defCtor ;//! Was object constructed with default ctor?
ClassDef(RooTreeDataStore,1) // TTree-based Data Storage class ClassDef(RooTreeDataStore,1) // TTree-based Data Storage class
}; };
#endif #endif
 End of changes. 6 change blocks. 
3 lines changed or deleted 9 lines changed or added


 RooUniformBinning.h   RooUniformBinning.h 
skipping to change at line 36 skipping to change at line 36
RooUniformBinning(const char* name=0) ; RooUniformBinning(const char* name=0) ;
RooUniformBinning(Double_t xlo, Double_t xhi, Int_t nBins, const char* na me=0) ; RooUniformBinning(Double_t xlo, Double_t xhi, Int_t nBins, const char* na me=0) ;
RooUniformBinning(const RooUniformBinning& other, const char* name=0) ; RooUniformBinning(const RooUniformBinning& other, const char* name=0) ;
RooAbsBinning* clone(const char* name=0) const { return new RooUniformBin ning(*this,name?name:GetName()) ; } RooAbsBinning* clone(const char* name=0) const { return new RooUniformBin ning(*this,name?name:GetName()) ; }
virtual ~RooUniformBinning() ; virtual ~RooUniformBinning() ;
virtual void setRange(Double_t xlo, Double_t xhi) ; virtual void setRange(Double_t xlo, Double_t xhi) ;
virtual Int_t numBoundaries() const { return _nbins + 1 ; } virtual Int_t numBoundaries() const { return _nbins + 1 ; }
virtual Int_t binNumber(Double_t x) const ; virtual Int_t binNumber(Double_t x) const ;
virtual Bool_t isUniform() const { return kTRUE ; }
virtual Double_t lowBound() const { return _xlo ; } virtual Double_t lowBound() const { return _xlo ; }
virtual Double_t highBound() const { return _xhi ; } virtual Double_t highBound() const { return _xhi ; }
virtual Double_t binCenter(Int_t bin) const ; virtual Double_t binCenter(Int_t bin) const ;
virtual Double_t binWidth(Int_t bin) const ; virtual Double_t binWidth(Int_t bin) const ;
virtual Double_t binLow(Int_t bin) const ; virtual Double_t binLow(Int_t bin) const ;
virtual Double_t binHigh(Int_t bin) const ; virtual Double_t binHigh(Int_t bin) const ;
virtual Double_t averageBinWidth() const { return _binw ; } virtual Double_t averageBinWidth() const { return _binw ; }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 RooWorkspace.h   RooWorkspace.h 
skipping to change at line 37 skipping to change at line 37
#include <string> #include <string>
class TClass ; class TClass ;
class RooAbsPdf ; class RooAbsPdf ;
class RooAbsData ; class RooAbsData ;
class RooRealVar ; class RooRealVar ;
class RooCategory ; class RooCategory ;
class RooAbsReal ; class RooAbsReal ;
class RooAbsCategory ; class RooAbsCategory ;
class RooFactoryWSTool ; class RooFactoryWSTool ;
//class RooModelView ; class RooAbsStudy ;
#include "TNamed.h" #include "TNamed.h"
#include "TDirectoryFile.h" #include "TDirectoryFile.h"
class RooWorkspace : public TNamed { class RooWorkspace : public TNamed {
public: public:
RooWorkspace() ; RooWorkspace() ;
RooWorkspace(const char* name, Bool_t doCINTExport) ; RooWorkspace(const char* name, Bool_t doCINTExport) ;
RooWorkspace(const char* name, const char* title=0) ; RooWorkspace(const char* name, const char* title=0) ;
RooWorkspace(const RooWorkspace& other) ; RooWorkspace(const RooWorkspace& other) ;
~RooWorkspace() ; ~RooWorkspace() ;
void exportToCint(const char* namespaceName=0) ; void exportToCint(const char* namespaceName=0) ;
Bool_t importClassCode(const char* pat="*", Bool_t doReplace=kFALSE) ; Bool_t importClassCode(const char* pat="*", Bool_t doReplace=kFALSE) ;
Bool_t importClassCode(TClass* theClass, Bool_t doReplace=kFALSE) ; Bool_t importClassCode(TClass* theClass, Bool_t doReplace=kFALSE) ;
// Import functions for dataset, functions // Import functions for dataset, functions, generic objects
Bool_t import(const RooAbsArg& arg, const RooCmdArg& arg1=RooCmdArg(),con st RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ; Bool_t import(const RooAbsArg& arg, const RooCmdArg& arg1=RooCmdArg(),con st RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(const RooArgSet& args, const RooCmdArg& arg1=RooCmdArg(),co nst RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ; Bool_t import(const RooArgSet& args, const RooCmdArg& arg1=RooCmdArg(),co nst RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg(),const R ooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ; Bool_t import(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg(),const R ooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(const char *fileSpec, const RooCmdArg& arg1=RooCmdArg(),con
st RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(TObject& object, Bool_t replaceExisting=kFALSE) ;
Bool_t import(TObject& object, const char* aliasName, Bool_t replaceExist
ing=kFALSE) ;
// Transaction management interface for multi-step import operations // Transaction management interface for multi-step import operations
Bool_t startTransaction() ; Bool_t startTransaction() ;
Bool_t cancelTransaction() ; Bool_t cancelTransaction() ;
Bool_t commitTransaction() ; Bool_t commitTransaction() ;
// Named set management // Named set management
Bool_t defineSet(const char* name, const RooArgSet& aset, Bool_t importMi ssing=kFALSE) ; Bool_t defineSet(const char* name, const RooArgSet& aset, Bool_t importMi ssing=kFALSE) ;
Bool_t defineSet(const char* name, const char* contentList) ; Bool_t defineSet(const char* name, const char* contentList) ;
Bool_t extendSet(const char* name, const char* newContents) ; Bool_t extendSet(const char* name, const char* newContents) ;
const RooArgSet* set(const char* name) ; const RooArgSet* set(const char* name) ;
// Import, load and save parameter value snapshots // Import, load and save parameter value snapshots
Bool_t saveSnapshot(const char* name, const char* paramNames) ;
Bool_t saveSnapshot(const char* name, const RooArgSet& params, Bool_t imp ortValues=kFALSE) ; Bool_t saveSnapshot(const char* name, const RooArgSet& params, Bool_t imp ortValues=kFALSE) ;
Bool_t loadSnapshot(const char* name) ; Bool_t loadSnapshot(const char* name) ;
void merge(const RooWorkspace& /*other*/) {} ; void merge(const RooWorkspace& /*other*/) {} ;
// Join p.d.f.s and datasets for simultaneous analysis // Join p.d.f.s and datasets for simultaneous analysis
// RooAbsPdf* joinPdf(const char* jointPdfName, const char* indexName, const char* inputMapping) ; // RooAbsPdf* joinPdf(const char* jointPdfName, const char* indexName, const char* inputMapping) ;
// RooAbsData* joinData(const char* jointDataName, const char* indexNam e, const char* inputMapping) ; // RooAbsData* joinData(const char* jointDataName, const char* indexNam e, const char* inputMapping) ;
// Accessor functions // Accessor functions
RooAbsPdf* pdf(const char* name) ; RooAbsPdf* pdf(const char* name) const ;
RooAbsReal* function(const char* name) ; RooAbsReal* function(const char* name) const ;
RooRealVar* var(const char* name) ; RooRealVar* var(const char* name) const ;
RooCategory* cat(const char* name) ; RooCategory* cat(const char* name) const ;
RooAbsCategory* catfunc(const char* name) ; RooAbsCategory* catfunc(const char* name) const ;
RooAbsData* data(const char* name) ; RooAbsData* data(const char* name) const ;
RooAbsArg* arg(const char* name) ; RooAbsArg* arg(const char* name) const ;
RooAbsArg* fundArg(const char* name) ; RooAbsArg* fundArg(const char* name) const ;
TIterator* componentIterator() { return _allOwnedNodes.createIterator() ; RooArgSet argSet(const char* nameList) const ;
} TIterator* componentIterator() const { return _allOwnedNodes.createIterat
or() ; }
const RooArgSet& components() const { return _allOwnedNodes ; } const RooArgSet& components() const { return _allOwnedNodes ; }
TObject* genobj(const char* name) const ;
TObject* obj(const char* name) const ;
// Group accessors
RooArgSet allVars() const;
RooArgSet allCats() const ;
RooArgSet allFunctions() const ;
RooArgSet allCatFunctions() const ;
RooArgSet allPdfs() const ;
RooArgSet allResolutionModels() const ;
std::list<RooAbsData*> allData() const ;
std::list<TObject*> allGenericObjects() const ;
Bool_t makeDir() ; Bool_t makeDir() ;
Bool_t cd(const char* path = 0) ; Bool_t cd(const char* path = 0) ;
Bool_t writeToFile(const char* fileName, Bool_t recreate=kTRUE) ; Bool_t writeToFile(const char* fileName, Bool_t recreate=kTRUE) ;
// Tools management // Tools management
RooFactoryWSTool& factory() ; RooFactoryWSTool& factory() ;
RooAbsArg* factory(const char* expr) ; RooAbsArg* factory(const char* expr) ;
// Generic objects // RooStudyManager modules
Bool_t import(TObject& object, Bool_t replaceExisting=kFALSE) ; Bool_t addStudy(RooAbsStudy& study) ;
TObject* obj(const char* name) ; TIterator* studyIterator() { return _studyMods.MakeIterator() ; }
void clearStudies() ;
// Print function // Print function
void Print(Option_t* opts=0) const ; void Print(Option_t* opts=0) const ;
static void autoImportClassCode(Bool_t flag) ; static void autoImportClassCode(Bool_t flag) ;
static void addClassDeclImportDir(const char* dir) ; static void addClassDeclImportDir(const char* dir) ;
static void addClassImplImportDir(const char* dir) ; static void addClassImplImportDir(const char* dir) ;
static void setClassFileExportDir(const char* dir=0) ; static void setClassFileExportDir(const char* dir=0) ;
skipping to change at line 204 skipping to change at line 222
static Bool_t _autoClass ; // Automatic import of non-distribution class code static Bool_t _autoClass ; // Automatic import of non-distribution class code
CodeRepo _classes ; // Repository of embedded class code. This data membe r _must_ be first CodeRepo _classes ; // Repository of embedded class code. This data membe r _must_ be first
RooArgSet _allOwnedNodes ; // List of owned pdfs and components RooArgSet _allOwnedNodes ; // List of owned pdfs and components
RooLinkedList _dataList ; // List of owned datasets RooLinkedList _dataList ; // List of owned datasets
RooLinkedList _views ; // List of model views RooLinkedList _views ; // List of model views
RooLinkedList _snapshots ; // List of parameter snapshots RooLinkedList _snapshots ; // List of parameter snapshots
RooLinkedList _genObjects ; // List of generic objects RooLinkedList _genObjects ; // List of generic objects
RooLinkedList _studyMods ; // List if StudyManager modules
std::map<std::string,RooArgSet> _namedSets ; // Map of named RooArgSets std::map<std::string,RooArgSet> _namedSets ; // Map of named RooArgSets
WSDir* _dir ; //! Transient ROOT directory representation of workspace WSDir* _dir ; //! Transient ROOT directory representation of workspace
RooExpensiveObjectCache _eocache ; // Cache for expensive objects RooExpensiveObjectCache _eocache ; // Cache for expensive objects
RooFactoryWSTool* _factory ; //! Factory tool associated with workspace RooFactoryWSTool* _factory ; //! Factory tool associated with workspace
Bool_t _doExport ; //! Export contents of workspace to CINT? Bool_t _doExport ; //! Export contents of workspace to CINT?
std::string _exportNSName ; //! Name of CINT namespace to which contents are exported std::string _exportNSName ; //! Name of CINT namespace to which contents are exported
Bool_t _openTrans ; //! Is there a transaction open? Bool_t _openTrans ; //! Is there a transaction open?
RooArgSet _sandboxNodes ; //! Sandbox for incoming objects in a transac tion RooArgSet _sandboxNodes ; //! Sandbox for incoming objects in a transac tion
ClassDef(RooWorkspace,6) // Persistable project container for (composite ) pdfs, functions, variables and datasets ClassDef(RooWorkspace,7) // Persistable project container for (composite ) pdfs, functions, variables and datasets
} ; } ;
#endif #endif
 End of changes. 9 change blocks. 
16 lines changed or deleted 37 lines changed or added


 Rpair.h   Rpair.h 
// @(#)root/base:$Id: Rpair.h 20877 2007-11-19 11:17:07Z rdm $ // @(#)root/base:$Id: Rpair.h 29770 2009-08-12 16:40:27Z rdm $
// Author: Philippe Canal 12/3/04 // Author: Philippe Canal 12/3/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun, Fons Rademakers, and al. * * Copyright (C) 1995-2004, Rene Brun, Fons Rademakers, and al. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Rpair #ifndef ROOT_Rpair
#define ROOT_Rpair #define ROOT_Rpair
// Include the definition of pairs // Include the definition of pairs
#include <utility> #include <utility>
// Import pairs (and string) into the global namespace to satisfy // Import pairs (and string) into the global namespace to satisfy
// the current CINT implementation of dictionary generation. // the current CINT implementation of dictionary generation.
#if defined(R__SOLARIS) && !defined(R__KCC) #if defined(R__SOLARIS)
using std::pair; using std::pair;
using std::string; using std::string;
#else #else
namespace std {} namespace std {}
using namespace std; using namespace std;
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Rtypeinfo.h   Rtypeinfo.h 
// @(#)root/base:$Id: Rtypeinfo.h 20877 2007-11-19 11:17:07Z rdm $ // @(#)root/base:$Id: Rtypeinfo.h 29770 2009-08-12 16:40:27Z rdm $
// Author: Philippe Canal 23/2/02 // Author: Philippe Canal 23/2/02
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and al. * * Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and al. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_Rtypeinfo #ifndef ROOT_Rtypeinfo
#define ROOT_Rtypeinfo #define ROOT_Rtypeinfo
#ifndef ROOT_RConfig #ifndef ROOT_RConfig
#include "RConfig.h" #include "RConfig.h"
#endif #endif
#if defined(R__SOLARIS) && !defined(R__KCC) #if defined(R__SOLARIS)
// <typeinfo> includes <exception> which clashes with <math.h> // <typeinfo> includes <exception> which clashes with <math.h>
//#include <typeinfo.h> //#include <typeinfo.h>
namespace std { class type_info; } namespace std { class type_info; }
using std::type_info; using std::type_info;
#elif defined(R__GLOBALSTL) #elif defined(R__GLOBALSTL)
#include <typeinfo> #include <typeinfo>
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Scope.h   Scope.h 
// @(#)root/reflex:$Id: Scope.h 28733 2009-05-28 04:34:44Z pcanal $ // @(#)root/reflex:$Id: Scope.h 29355 2009-07-06 17:34:05Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_Scope #ifndef Reflex_Scope
#define Reflex_Scope #define Reflex_Scope
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
namespace Reflex { namespace Reflex {
// forward declarations
class Base;
class Member;
class PropertyList;
class Type;
class ScopeBase;
class ScopeName;
class TypeTemplate;
class MemberTemplate;
class DictionaryGenerator;
/**
* @class Scope Scope.h Reflex/Scope.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API Scope {
public:
/** constructor */
Scope(const ScopeName * scopeName = 0);
// forward declarations /** copy constructor */
class Base; Scope(const Scope &rh);
class Member;
class PropertyList; /** destructor */
class Type; ~Scope();
class ScopeBase;
class ScopeName; /**
class TypeTemplate; * inequal operator
class MemberTemplate; */
class DictionaryGenerator; bool operator !=(const Scope& rh) const;
/** /**
* @class Scope Scope.h Reflex/Scope.h * the bool operator will return true if the Scope is resolved (implemen
* @author Stefan Roiser ted)
* @date 24/11/2003 * @return true if Scope is implemented
* @ingroup Ref */
*/ operator bool() const;
class RFLX_API Scope {
public:
/** constructor */
Scope( const ScopeName * scopeName = 0 );
/** copy constructor */
Scope( const Scope & rh );
/** destructor */
~Scope();
/**
* inequal operator
*/
bool operator != ( const Scope & rh ) const;
/**
* the bool operator will return true if the Scope is resolved (implem
ented)
* @return true if Scope is implemented
*/
operator bool () const;
#if defined(REFLEX_CINT_MERGE) #if defined(REFLEX_CINT_MERGE)
// To prevent any un-authorized use as the old type // To prevent any un-authorized use as the old type
bool operator!() const { return !operator bool(); } bool
bool operator&&(bool right) const { return operator bool() && right; operator !() const { return !operator bool(); }
}
bool operator&&(int right) const { return operator bool() && right; } bool
bool operator&&(long right) const { return operator bool() && right; operator &&(bool right) const { return operator bool() && right; }
}
bool operator&&(const Scope &right) const; bool
bool operator&&(const Type &right) const; operator &&(int right) const { return operator bool() && right; }
bool operator&&(const Member &right) const;
bool operator||(bool right) const { return operator bool() || right; bool
} operator &&(long right) const { return operator bool() && right; }
bool operator||(int right) const { return operator bool() || right; }
bool operator||(long right) const { return operator bool() || right; bool operator &&(const Scope& right) const;
} bool operator &&(const Type& right) const;
bool operator||(const Scope &right) const; bool operator &&(const Member& right) const;
bool operator||(const Type &right) const; bool
bool operator||(const Member &right) const; operator ||(bool right) const { return operator bool() || right; }
private:
operator int () const; bool
public: operator ||(int right) const { return operator bool() || right; }
bool
operator ||(long right) const { return operator bool() || right; }
bool operator ||(const Scope& right) const;
bool operator ||(const Type& right) const;
bool operator ||(const Member& right) const;
private:
operator int() const;
public:
#endif #endif
/** /**
* the operator Type will return a corresponding type object to the sc * the operator Type will return a corresponding type object to the scop
ope if e if
* applicable (i.e. if the Scope is also a Type e.g. Class, Union, Enu * applicable (i.e. if the Scope is also a Type e.g. Class, Union, Enum)
m) */
*/ operator Type() const;
operator Type () const;
/**
/** * BaseAt will return the nth base class information
* BaseAt will return the nth base class information * @param nth base class
* @param nth base class * @return pointer to base class information
* @return pointer to base class information */
*/ Base BaseAt(size_t nth) const;
Base BaseAt( size_t nth ) const;
/**
/** * BaseSize will return the number of base classes
* BaseSize will return the number of base classes * @return number of base classes
* @return number of base classes */
*/ size_t BaseSize() const;
size_t BaseSize() const;
/**
/** * Base_Begin returns the begin of the container of bases
* Base_Begin returns the begin of the container of bases * @return begin of container of bases
* @return begin of container of bases */
*/ Base_Iterator Base_Begin() const;
Base_Iterator Base_Begin() const;
/**
/** * Base_End returns the end of the container of bases
* Base_End returns the end of the container of bases * @return end of container of bases
* @return end of container of bases */
*/ Base_Iterator Base_End() const;
Base_Iterator Base_End() const;
/**
/** * Base_RBegin returns the reverse begin of the container of bases
* Base_RBegin returns the reverse begin of the container of bases * @return reverse begin of container of bases
* @return reverse begin of container of bases */
*/ Reverse_Base_Iterator Base_RBegin() const;
Reverse_Base_Iterator Base_RBegin() const;
/**
/** * Base_REnd returns the reverse end of the container of bases
* Base_REnd returns the reverse end of the container of bases * @return reverse end of container of bases
* @return reverse end of container of bases */
*/ Reverse_Base_Iterator Base_REnd() const;
Reverse_Base_Iterator Base_REnd() const;
/**
/** * ByName will return reflection information of the scope passed as argu
* ByName will return reflection information of the scope passed as ar ment
gument * @param name fully qualified name of the scope
* @param name fully qualified name of the scope * @return reflection information of the scope
* @return reflection information of the scope */
*/ static Scope ByName(const std::string& name);
static Scope ByName( const std::string & name );
/**
/** * DataMemberAt will return the nth data member of the type
* DataMemberAt will return the nth data member of the type * @param nth the nth data member
* @param nth the nth data member * @return nth data member
* @return nth data member */
*/ Member DataMemberAt(size_t nth,
Member DataMemberAt( size_t nth, EMEMBERQUERY inh = INHERITEDMEMBERS_ EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
DEFAULT ) const;
/**
/** * DataMemberByName will lookup a data member by name
* DataMemberByName will lookup a data member by name * @param name of data member
* @param name of data member * @return data member
* @return data member */
*/ Member DataMemberByName(const std::string& name,
Member DataMemberByName( const std::string & name, EMEMBERQUERY inh =
INHERITEDMEMBERS_DEFAULT ) const;
/**
* DataMemberSize will return the number of data members of this type
* @return number of data members
*/
size_t DataMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) co
nst;
/**
* Member_Begin returns the begin of the container of members
* @return begin of container of members
*/
Member_Iterator DataMember_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_
DEFAULT) const;
/**
* Member_End returns the end of the container of members
* @return end of container of members
*/
Member_Iterator DataMember_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DE
FAULT) const;
/**
* Member_RBegin returns the reverse begin of the container of members
* @return reverse begin of container of members
*/
Reverse_Member_Iterator DataMember_RBegin(EMEMBERQUERY inh = INHERITE
DMEMBERS_DEFAULT) const;
/**
* Member_REnd returns the reverse end of the container of members
* @return reverse end of container of members
*/
Reverse_Member_Iterator DataMember_REnd(EMEMBERQUERY inh = INHERITEDM
EMBERS_DEFAULT) const;
/**
* DeclaringScope will return the declaring socpe of this type
* @return declaring scope of this type
*/
Scope DeclaringScope() const;
/**
* FunctionMemberAt will return the nth function member of the type
* @param nth function member
* @return reflection information of nth function member
*/
Member FunctionMemberAt( size_t nth, EMEMBERQUERY inh = INHERITEDMEMB
ERS_DEFAULT ) const;
/**
* FunctionMemberByName will return the member with the name,
* optionally the signature of the function may be given as a type
* @param name of function member
* @return reflection information of the function member
*/
Member FunctionMemberByName( const std::string & name, EMEMBERQUERY i
nh = INHERITEDMEMBERS_DEFAULT ) const;
/**
* FunctionMemberByName will return the member with the name,
* optionally the signature of the function may be given as a type
* @param name of function member
* @param signature of the member function
* @modifiers_mask When matching, do not compare the listed modifiers
* @return reflection information of the function member
*/
// this overloading is unfortunate but I can't include Type.h here
Member FunctionMemberByName( const std::string & name,
const Type & signature,
unsigned int modifers_mask = 0,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA
ULT) const;
/**
* FunctionMemberByNameAndSignature will return the member with the na
me,
* optionally the signature of the function may be given as a type
* @param name of function member
* @param signature of the member function
* @modifiers_mask When matching, do not compare the listed modifiers
* @return reflection information of the function member
*/
// this overloading is unfortunate but I can't include Type.h here
Member FunctionMemberByNameAndSignature( const std::string & name,
const Type & signature,
unsigned int modifers_mask =
0,
EMEMBERQUERY inh = INHERITED
MEMBERS_DEFAULT) const;
/**
* FunctionMemberSize will return the number of function members of
* this type
* @return number of function members
*/
size_t FunctionMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT
) const;
/**
* FunctionMember_Begin returns the begin of the container of function
members
* @return begin of container of function members
*/
Member_Iterator FunctionMember_Begin(EMEMBERQUERY inh = INHERITEDMEMB
ERS_DEFAULT) const;
/**
* FunctionMember_End returns the end of the container of function mem
bers
* @return end of container of function members
*/
Member_Iterator FunctionMember_End(EMEMBERQUERY inh = INHERITEDMEMBER
S_DEFAULT) const;
/**
* FunctionMember_RBegin returns the reverse begin of the container of
function members
* @return reverse begin of container of function members
*/
Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY inh = INHE
RITEDMEMBERS_DEFAULT) const;
/**
* FunctionMember_RBegin returns the reverse begin of the container of
function members
* @return reverse begin of container of function members
*/
Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = INHERI
TEDMEMBERS_DEFAULT) const;
/**
* GenerateDict will produce the dictionary information of this type
* @param generator a reference to the dictionary generator instance
*/
void GenerateDict(DictionaryGenerator & generator) const;
/**
* GlobalScope will return the global scope representation\
* @return global scope
*/
static Scope GlobalScope();
/**
* HasBase will check whether this class has a base class given
* as argument
* @param cl the base-class to check for
* @return the Base info if it is found, an empty base otherwise (can
be tested for bool)
*/
bool HasBase( const Type & cl ) const;
/**
* Id returns a unique identifier of the type in the system
* @return unique identifier
*/
void * Id() const;
/**
* IsClass returns true if the type represents a class
* @return true if type represents a class
*/
bool IsClass() const;
/**
* IsEnum returns true if the type represents a enum
* @return true if type represents a enum
*/
bool IsEnum() const;
/**
* IsNamespace returns true if the scope represents a namespace
* @return true if scope represents a namespace
*/
bool IsNamespace() const;
/**
* IsPrivate will check if the scope access is private
* @return true if scope access is private
*/
bool IsPrivate() const;
/**
* IsProtected will check if the scope access is protected
* @return true if scope access is protected
*/
bool IsProtected() const;
/**
* IsPublic will check if the scope access is public
* @return true if scope access is public
*/
bool IsPublic() const;
/**
* IsTemplateInstance will return true if the the class is templated
* @return true if the class is templated
*/
bool IsTemplateInstance() const;
/**
* IsTopScope returns true if this scope is the top scope
* @return true if this scope is the top scope
*/
bool IsTopScope() const;
/**
* IsUnion returns true if the type represents a union
* @return true if type represents a union
*/
bool IsUnion() const;
/**
* LookupMember will lookup a member in the current scope
* @param nam the string representation of the member to lookup
* @return if a matching member is found return it, otherwise return e
mpty member
*/
Member LookupMember( const std::string & nam ) const;
/**
* LookupType will lookup a type in the current scope
* @param nam the string representation of the type to lookup
* @return if a matching type is found return it, otherwise return emp
ty type
*/
Type LookupType( const std::string & nam ) const;
/**
* LookupScope will lookup a scope in the current scope
* @param nam the string representation of the scope to lookup
* @return if a matching scope is found return it, otherwise return em
pty scope
*/
Scope LookupScope( const std::string & nam ) const;
/**
* MemberAt will return the nth member of the type
* @param nth member
* @return reflection information nth member
*/
Member MemberAt( size_t nth, EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA
ULT ) const;
/**
* MemberByName will return the first member with a given Name
* @param member name
* @return reflection information of the member
*/
Member MemberByName( const std::string & name, EMEMBERQUERY inh = INH
ERITEDMEMBERS_DEFAULT ) const;
/**
* MemberByName will return the first member with a given Name
* @param member name
* @param signature of the (function) member
* @return reflection information of the member
*/
// this overloading is unfortunate but I can't include Type.h here
Member MemberByName( const std::string & name,
const Type & signature,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) con st; EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) con st;
/** /**
* MemberSize will return the number of members * DataMemberSize will return the number of data members of this type
* @return number of members * @return number of data members
*/ */
size_t MemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const; size_t DataMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const
;
/**
* Member_Begin returns the begin of the container of members /**
* @return begin of container of members * Member_Begin returns the begin of the container of members
*/ * @return begin of container of members
Member_Iterator Member_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA */
ULT) const; Member_Iterator DataMember_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEF
AULT) const;
/**
* Member_End returns the end of the container of members /**
* @return end of container of members * Member_End returns the end of the container of members
*/ * @return end of container of members
Member_Iterator Member_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAUL */
T) const; Member_Iterator DataMember_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAU
LT) const;
/**
* Member_RBegin returns the reverse begin of the container of members /**
* @return reverse begin of container of members * Member_RBegin returns the reverse begin of the container of members
*/ * @return reverse begin of container of members
Reverse_Member_Iterator Member_RBegin(EMEMBERQUERY inh = INHERITEDMEM */
BERS_DEFAULT) const; Reverse_Member_Iterator DataMember_RBegin(EMEMBERQUERY inh = INHERITEDME
MBERS_DEFAULT) const;
/**
* Member_REnd returns the reverse end of the container of members /**
* @return reverse end of container of members * Member_REnd returns the reverse end of the container of members
*/ * @return reverse end of container of members
Reverse_Member_Iterator Member_REnd(EMEMBERQUERY inh = INHERITEDMEMBE */
RS_DEFAULT) const; Reverse_Member_Iterator DataMember_REnd(EMEMBERQUERY inh = INHERITEDMEMB
ERS_DEFAULT) const;
/**
* MemberTemplateAt will return the nth member template of this type /**
* @param nth member template * DeclaringScope will return the declaring socpe of this type
* @return nth member template * @return declaring scope of this type
*/ */
MemberTemplate MemberTemplateAt( size_t nth ) const; Scope DeclaringScope() const;
/** /**
* MemberTemplateSize will return the number of member templates in th * FunctionMemberAt will return the nth function member of the type
is scope * @param nth function member
* @return number of defined member templates * @return reflection information of nth function member
*/ */
size_t MemberTemplateSize() const; Member FunctionMemberAt(size_t nth,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) con
/** st;
* MemberTemplateByName will return the member template representation
in this /**
* scope * FunctionMemberByName will return the member with the name,
* @param string representing the member template to look for * optionally the signature of the function may be given as a type
* @return member template representation of the looked up member * @param name of function member
*/ * @return reflection information of the function member
MemberTemplate MemberTemplateByName( const std::string & nam ) const; */
Member FunctionMemberByName(const std::string& name,
/** EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT,
* MemberTemplate_Begin returns the begin of the container of member t EDELAYEDLOADSETTING allowDelayedLoad = DELAY
emplates EDLOAD_ON) const;
* @return begin of container of member templates
*/ /**
MemberTemplate_Iterator MemberTemplate_Begin() const; * FunctionMemberByName will return the member with the name,
* optionally the signature of the function may be given as a type
/** * @param name of function member
* MemberTemplate_End returns the end of the container of member templ * @param signature of the member function
ates * @modifiers_mask When matching, do not compare the listed modifiers
* @return end of container of member templates * @return reflection information of the function member
*/ */
MemberTemplate_Iterator MemberTemplate_End() const; // this overloading is unfortunate but I can't include Type.h here
Member FunctionMemberByName(const std::string& name,
/** const Type& signature,
* MemberTemplate_End returns the end of the container of member templ unsigned int modifers_mask = 0,
ates EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT,
* @return end of container of member templates EDELAYEDLOADSETTING allowDelayedLoad = DELAY
*/ EDLOAD_ON) const;
Reverse_MemberTemplate_Iterator MemberTemplate_RBegin() const;
/**
/** * FunctionMemberByNameAndSignature will return the member with the name
* MemberTemplate_REnd returns the reverse end of the container of mem ,
ber templates * optionally the signature of the function may be given as a type
* @return reverse end of container of member templates * @param name of function member
*/ * @param signature of the member function
Reverse_MemberTemplate_Iterator MemberTemplate_REnd() const; * @modifiers_mask When matching, do not compare the listed modifiers
* @return reflection information of the function member
/** */
* Name returns the name of the type // this overloading is unfortunate but I can't include Type.h here
* @param mod qualifiers can be or'ed Member FunctionMemberByNameAndSignature(const std::string& name,
* FINAL - resolve typedefs const Type& signature,
* SCOPED - fully scoped name unsigned int modifers_mask = 0,
* QUALIFIED - cv, reference qualification EMEMBERQUERY inh = INHERITEDMEMB
* @return name of the type ERS_DEFAULT,
*/ EDELAYEDLOADSETTING allowDelayed
std::string Name( unsigned int mod = 0 ) const; Load = DELAYEDLOAD_ON) const;
/** /**
* Name_c_str returns a char* pointer to the qualified type name * FunctionMemberSize will return the number of function members of
* @return c string to unqualified type name * this type
*/ * @return number of function members
const char * Name_c_str() const; */
size_t FunctionMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) c
/** onst;
* Properties will return a PropertyList attached to this item
* @return PropertyList of this type /**
*/ * FunctionMember_Begin returns the begin of the container of function m
PropertyList Properties() const; embers
* @return begin of container of function members
/** */
* ScopeAt will return the nth scope defined in the system Member_Iterator FunctionMember_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS
* @param nth scope defined in the system _DEFAULT) const;
* @return nth scope defined in the system
*/ /**
static Scope ScopeAt( size_t nth ); * FunctionMember_End returns the end of the container of function membe
rs
/** * @return end of container of function members
* ScopeSize will return the number of currently defined scopes */
* @return number of currently defined scopes Member_Iterator FunctionMember_End(EMEMBERQUERY inh = INHERITEDMEMBERS_D
*/ EFAULT) const;
static size_t ScopeSize();
/**
/** * FunctionMember_RBegin returns the reverse begin of the container of f
* Scope_Begin returns the begin of the container of scopes defined in unction members
the systems * @return reverse begin of container of function members
* @return begin of container of scopes defined in the systems */
*/ Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY inh = INHERIT
static Scope_Iterator Scope_Begin(); EDMEMBERS_DEFAULT) const;
/** /**
* Scope_End returns the end of the container of scopes defined in the * FunctionMember_RBegin returns the reverse begin of the container of f
systems unction members
* @return end of container of scopes defined in the systems * @return reverse begin of container of function members
*/ */
static Scope_Iterator Scope_End(); Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = INHERITED
MEMBERS_DEFAULT) const;
/**
* Scope_RBegin returns the reverse begin of the container of scopes d /**
efined in the systems * GenerateDict will produce the dictionary information of this type
* @return reverse begin of container of scopes defined in the systems * @param generator a reference to the dictionary generator instance
*/ */
static Reverse_Scope_Iterator Scope_RBegin(); void GenerateDict(DictionaryGenerator& generator) const;
/** /**
* Scope_REnd returns the reverse end of the container of scopes defin * GlobalScope will return the global scope representation\
ed in the systems * @return global scope
* @return reverse end of container of scopes defined in the systems */
*/ static Scope GlobalScope();
static Reverse_Scope_Iterator Scope_REnd();
/**
/** * HasBase will check whether this class has a base class given
* ScopeType will return the enum information about this scope * as argument
* @return enum information of this scope * @param cl the base-class to check for
*/ * @return the Base info if it is found, an empty base otherwise (can be
TYPE ScopeType() const; tested for bool)
*/
/** bool HasBase(const Type& cl) const;
* ScopeTypeAsString will return the string representation of the ENUM
* representing the real type of the scope (e.g. "CLASS") /**
* @return string representation of the TYPE enum of the scope * Id returns a unique identifier of the type in the system
*/ * @return unique identifier
std::string ScopeTypeAsString() const; */
void* Id() const;
/**
* SubScopeAt will return a pointer to a sub scopes /**
* @param nth sub scope * IsClass returns true if the type represents a class
* @return reflection information of nth sub scope * @return true if type represents a class
*/ */
Scope SubScopeAt( size_t nth ) const; bool IsClass() const;
/** /**
* SubScopeLevel will return the number of declaring scopes * IsEnum returns true if the type represents a enum
* this scope lives in. * @return true if type represents a enum
* @return number of declaring scopes above this scope. */
*/ bool IsEnum() const;
size_t SubScopeLevel() const;
/**
/** * IsNamespace returns true if the scope represents a namespace
* SubScopeSize will return the number of sub scopes * @return true if scope represents a namespace
* @return number of sub scopes */
*/ bool IsNamespace() const;
size_t SubScopeSize() const;
/**
/** * IsPrivate will check if the scope access is private
* SubScopeByName will return a sub scope representing the unscoped na * @return true if scope access is private
me passed */
* as argument bool IsPrivate() const;
* @param unscoped name of the sub scope to look for
* @return Scope representation of the sub scope /**
*/ * IsProtected will check if the scope access is protected
Scope SubScopeByName( const std::string & nam ) const; * @return true if scope access is protected
*/
/** bool IsProtected() const;
* SubScope_Begin returns the begin of the container of sub scopes
* @return begin of container of sub scopes /**
*/ * IsPublic will check if the scope access is public
Scope_Iterator SubScope_Begin() const; * @return true if scope access is public
*/
/** bool IsPublic() const;
* SubScope_End returns the end of the container of sub scopes
* @return end of container of sub scopes /**
*/ * IsTemplateInstance will return true if the the class is templated
Scope_Iterator SubScope_End() const; * @return true if the class is templated
*/
/** bool IsTemplateInstance() const;
* SubScope_RBegin returns the reverse begin of the container of sub s
copes /**
* @return reverse begin of container of sub scopes * IsTopScope returns true if this scope is the top scope
*/ * @return true if this scope is the top scope
Reverse_Scope_Iterator SubScope_RBegin() const; */
bool IsTopScope() const;
/**
* SubScope_REnd returns the reverse end of the container of sub scope /**
s * IsUnion returns true if the type represents a union
* @return reverse end of container of sub scopes * @return true if type represents a union
*/ */
Reverse_Scope_Iterator SubScope_REnd() const; bool IsUnion() const;
/** /**
* SubTypeAt will return the nth sub type * LookupMember will lookup a member in the current scope
* @param nth sub type * @param nam the string representation of the member to lookup
* @return reflection information of nth sub type * @return if a matching member is found return it, otherwise return emp
*/ ty member
Type SubTypeAt( size_t nth ) const; */
Member LookupMember(const std::string& nam) const;
/**
* SubTypeSize will return he number of sub types /**
* @return number of sub types * LookupType will lookup a type in the current scope
*/ * @param nam the string representation of the type to lookup
size_t SubTypeSize() const; * @return if a matching type is found return it, otherwise return empty
type
/** */
* SubTypeByName will return the Type representing the sub type Type LookupType(const std::string& nam) const;
* @param string of the unscoped sub type to look for
* @return Type representation of the sub type /**
*/ * LookupScope will lookup a scope in the current scope
Type SubTypeByName( const std::string & nam ) const; * @param nam the string representation of the scope to lookup
* @return if a matching scope is found return it, otherwise return empt
/** y scope
* SubType_Begin returns the begin of the container of sub types */
* @return begin of container of sub types Scope LookupScope(const std::string& nam) const;
*/
Type_Iterator SubType_Begin() const; /**
* MemberAt will return the nth member of the type
/** * @param nth member
* SubType_End returns the end of the container of sub types * @return reflection information nth member
* @return end of container of sub types */
*/ Member MemberAt(size_t nth,
Type_Iterator SubType_End() const; EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
/** /**
* SubType_RBegin returns the reverse begin of the container of sub ty * MemberByName will return the first member with a given Name
pes * @param member name
* @return reverse begin of container of sub types * @return reflection information of the member
*/ */
Reverse_Type_Iterator SubType_RBegin() const; Member MemberByName(const std::string& name,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
/**
* SubType_REnd returns the reverse end of the container of sub types /**
* @return reverse end of container of sub types * MemberByName will return the first member with a given Name
*/ * @param member name
Reverse_Type_Iterator SubType_REnd() const; * @param signature of the (function) member
* @return reflection information of the member
/** */
* SubTypeTemplateAt will return the nth type template of this type // this overloading is unfortunate but I can't include Type.h here
* @param nth type template Member MemberByName(const std::string& name,
* @return nth type template const Type& signature,
*/ EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
TypeTemplate SubTypeTemplateAt( size_t nth ) const;
/**
/** * MemberSize will return the number of members
* SubTypeTemplateSize will return the number of type templates in thi * @return number of members
s scope */
* @return number of defined type templates size_t MemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
*/
size_t SubTypeTemplateSize() const; /**
* Member_Begin returns the begin of the container of members
/** * @return begin of container of members
* SubTypeTemplateByName will return a type template defined in this s */
cope looked up by Member_Iterator Member_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT
* it's unscoped name ) const;
* @param unscoped name of the type template to look for
* @return TypeTemplate representation of the sub type template /**
*/ * Member_End returns the end of the container of members
TypeTemplate SubTypeTemplateByName( const std::string & nam ) const; * @return end of container of members
*/
/** Member_Iterator Member_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT)
* SubTypeTemplate_Begin returns the begin of the container of sub typ const;
e templates
* @return begin of container of sub type templates /**
*/ * Member_RBegin returns the reverse begin of the container of members
TypeTemplate_Iterator SubTypeTemplate_Begin() const; * @return reverse begin of container of members
*/
/** Reverse_Member_Iterator Member_RBegin(EMEMBERQUERY inh = INHERITEDMEMBER
* SubTypeTemplate_End returns the end of the container of sub type te S_DEFAULT) const;
mplates
* @return end of container of sub type templates /**
*/ * Member_REnd returns the reverse end of the container of members
TypeTemplate_Iterator SubTypeTemplate_End() const; * @return reverse end of container of members
*/
/** Reverse_Member_Iterator Member_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_
* SubTypeTemplate_RBegin returns the reverse begin of the container o DEFAULT) const;
f sub type templates
* @return reverse begin of container of sub type templates /**
*/ * MemberTemplateAt will return the nth member template of this type
Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const; * @param nth member template
* @return nth member template
/** */
* SubTypeTemplate_REnd returns the reverse end of the container of su MemberTemplate MemberTemplateAt(size_t nth) const;
b type templates
* @return reverse end of container of sub type templates /**
*/ * MemberTemplateSize will return the number of member templates in this
Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const; scope
* @return number of defined member templates
/** */
* TemplateArgumentAt will return a pointer to the nth template argume size_t MemberTemplateSize() const;
nt
* @param nth nth template argument /**
* @return reflection information of nth template argument * MemberTemplateByName will return the member template representation i
*/ n this
Type TemplateArgumentAt( size_t nth ) const; * scope
* @param string representing the member template to look for
/** * @return member template representation of the looked up member
* TemplateArgumentSize will return the number of template arguments */
* @return number of template arguments MemberTemplate MemberTemplateByName(const std::string& nam) const;
*/
size_t TemplateArgumentSize() const; /**
* MemberTemplate_Begin returns the begin of the container of member tem
/** plates
* TemplateArgument_Begin returns the begin of the container of templa * @return begin of container of member templates
te arguments */
* @return begin of container of template arguments MemberTemplate_Iterator MemberTemplate_Begin() const;
*/
Type_Iterator TemplateArgument_Begin() const; /**
* MemberTemplate_End returns the end of the container of member templat
/** es
* TemplateArgument_End returns the end of the container of template a * @return end of container of member templates
rguments */
* @return end of container of template arguments MemberTemplate_Iterator MemberTemplate_End() const;
*/
Type_Iterator TemplateArgument_End() const; /**
* MemberTemplate_End returns the end of the container of member templat
/** es
* TemplateArgument_RBegin returns the reverse begin of the container * @return end of container of member templates
of template arguments */
* @return reverse begin of container of template arguments Reverse_MemberTemplate_Iterator MemberTemplate_RBegin() const;
*/
Reverse_Type_Iterator TemplateArgument_RBegin() const; /**
* MemberTemplate_REnd returns the reverse end of the container of membe
/** r templates
* TemplateArgument_REnd returns the reverse end of the container of t * @return reverse end of container of member templates
emplate arguments */
* @return reverse end of container of template arguments Reverse_MemberTemplate_Iterator MemberTemplate_REnd() const;
*/
Reverse_Type_Iterator TemplateArgument_REnd() const; /**
* Name returns the name of the type
/** * @param mod qualifiers can be or'ed
* TemplateFamily returns the corresponding TypeTemplate if any * FINAL - resolve typedefs
* @return corresponding TypeTemplate * SCOPED - fully scoped name
*/ * QUALIFIED - cv, reference qualification
TypeTemplate TemplateFamily() const; * @return name of the type
*/
/** std::string Name(unsigned int mod = 0) const;
* Unload will unload the dictionary information of a scope
*/ /**
void Unload() const; * Name_c_str returns a char* pointer to the qualified type name
* @return c string to unqualified type name
/** */
* UpdateMembers will update the list of Function/Data/Members with al const char* Name_c_str() const;
l
* members of base classes currently availabe in the system, switching /**
* INHERITEDMEMBERS_DEFAULT to INHERITEDMEMBERS_ALSO. * Properties will return a PropertyList attached to this item
*/ * @return PropertyList of this type
void UpdateMembers() const; */
PropertyList Properties() const;
/**
* UsingDirectiveAt will return the nth using directive /**
* @param nth using directive * ScopeAt will return the nth scope defined in the system
* @return nth using directive * @param nth scope defined in the system
*/ * @return nth scope defined in the system
Scope UsingDirectiveAt( size_t nth ) const; */
static Scope ScopeAt(size_t nth);
/**
* UsingDirectiveSize will return the number of using directives of th /**
is scope * ScopeSize will return the number of currently defined scopes
* @return number of using directives declared in this scope * @return number of currently defined scopes
*/ */
size_t UsingDirectiveSize() const; static size_t ScopeSize();
Scope_Iterator UsingDirective_Begin() const; /**
Scope_Iterator UsingDirective_End() const; * Scope_Begin returns the begin of the container of scopes defined in t
Reverse_Scope_Iterator UsingDirective_RBegin() const; he systems
Reverse_Scope_Iterator UsingDirective_REnd() const; * @return begin of container of scopes defined in the systems
*/
public: static Scope_Iterator Scope_Begin();
/** /**
* AddBase will add information about a Base class * Scope_End returns the end of the container of scopes defined in the s
* @param base type of the base class ystems
* @param offsFP pointer to a function stub for calculating the base c * @return end of container of scopes defined in the systems
lass offset */
* @param modifiers the modifiers of the base class static Scope_Iterator Scope_End();
*/
void AddBase(const Type & bas, OffsetFunction offsFP, unsigned int mo /**
difiers = 0) const; * Scope_RBegin returns the reverse begin of the container of scopes def
ined in the systems
/** * @return reverse begin of container of scopes defined in the systems
* AddBase will add the information about a Base class */
* @param b pointer to the base class static Reverse_Scope_Iterator Scope_RBegin();
*/
void AddBase(const Base & b) const; /**
* Scope_REnd returns the reverse end of the container of scopes defined
/** in the systems
* AddDataMember will add the information about a data member * @return reverse end of container of scopes defined in the systems
* @param dm data member to add */
*/ static Reverse_Scope_Iterator Scope_REnd();
void AddDataMember( const Member & dm ) const;
/**
/** * ScopeType will return the enum information about this scope
* AddDataMember will add the information about a data member * @return enum information of this scope
* @param nam the name of the data member */
* @param typ the type of the data member TYPE ScopeType() const;
* @param offs the offset of the data member relative to the beginning
of the scope /**
* @param modifiers of the data member * ScopeTypeAsString will return the string representation of the ENUM
*/ * representing the real type of the scope (e.g. "CLASS")
Member AddDataMember( const char * name, * @return string representation of the TYPE enum of the scope
const Type & type, */
size_t offset, std::string ScopeTypeAsString() const;
unsigned int modifiers = 0,
char * interpreterOffset = 0 ) const; /**
* SubScopeAt will return a pointer to a sub scopes
/** * @param nth sub scope
* AddFunctionMember will add the information about a function member * @return reflection information of nth sub scope
* @param fm function member to add */
*/ Scope SubScopeAt(size_t nth) const;
void AddFunctionMember( const Member & fm ) const;
/**
/** * SubScopeLevel will return the number of declaring scopes
* AddFunctionMember will add the information about a function member * this scope lives in.
* @param nam the name of the function member * @return number of declaring scopes above this scope.
* @param typ the type of the function member */
* @param stubFP a pointer to the stub function size_t SubScopeLevel() const;
* @param stubCtx a pointer to the context of the function member
* @param params a semi colon separated list of parameters
* @param modifiers of the function member
*/
Member AddFunctionMember( const char * name,
const Type & type,
StubFunction stubFP,
void * stubCtx = 0,
const char * params = 0,
unsigned int modifiers = 0 ) const;
/**
* AddMemberTemplate will add a member template to this scope
* @param mt member template to add
*/
void AddMemberTemplate( const MemberTemplate & mt ) const ;
/**
* AddSubScope will add a sub scope to this one
* @param sc sub scope to add
*/
void AddSubScope( const Scope & sc ) const;
/**
* AddSubScope will add a sub scope to this one
* @param scop the name of the sub scope
* @param scopeType enum value of the scope type
*/
void AddSubScope( const char * scope,
TYPE scopeType = NAMESPACE ) const;
/**
* AddSubType will add a sub type to this type
* @param ty sub type to add
*/
void AddSubType( const Type & ty ) const;
/**
* AddSubType will add a sub type to this type
* @param typ the name of the sub type
* @param size the sizeof of the sub type
* @param typeType the enum specifying the sub type
* @param ti the type_info of the sub type
* @param modifiers of the sub type
*/
void AddSubType( const char * type,
size_t size,
TYPE typeType,
const std::type_info & typeInfo,
unsigned int modifiers = 0 ) const;
/**
* AddTypeTemplate will add a sub type template to this scope
* @param tt type template to add
*/
void AddSubTypeTemplate( const TypeTemplate & mt ) const ;
/**
* AddUsingDirective will add a using namespace directive to this scop
e
* @param ud using directive to add
*/
void AddUsingDirective( const Scope & ud ) const;
/**
* RemoveDataMember will remove the information about a data member
* @param dm data member to remove
*/
void RemoveDataMember( const Member & dm ) const;
/**
* RemoveFunctionMember will remove the information about a function m
ember
* @param fm function member to remove
*/
void RemoveFunctionMember( const Member & fm ) const;
/**
* RemoveMemberTemplate will remove a member template from this scope
* @param mt member template to remove
*/
void RemoveMemberTemplate( const MemberTemplate & mt ) const;
/**
* RemoveSubScope will remove a sub scope from this type
* @param sc sub scope to remove
*/
void RemoveSubScope( const Scope & sc ) const;
/**
* RemoveSubType will remove a sub type from this type
* @param sc sub type to remove
*/
void RemoveSubType( const Type & ty ) const;
/**
* RemoveSubTypeTemplate will remove a sub type template from this sco
pe
* @param tt sub type template to remove
*/
void RemoveSubTypeTemplate( const TypeTemplate & tt ) const;
/**
* RemoveUsingDirective will remove a using namespace directive from t
his scope
* @param ud using namespace directive to remove
*/
void RemoveUsingDirective( const Scope & ud ) const;
/** */
const ScopeBase * ToScopeBase() const;
public:
/**
* @label __NIRVANA__
* @link association
*/
static Scope & __NIRVANA__();
private:
/**
* pointer to the resolved scope
* @label scope name
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
const ScopeName * fScopeName;
}; // class Scope /**
* SubScopeSize will return the number of sub scopes
* @return number of sub scopes
*/
size_t SubScopeSize() const;
bool operator < ( const Scope & lh, /**
const Scope & rh); * SubScopeByName will return a sub scope representing the unscoped name
passed
* as argument
* @param unscoped name of the sub scope to look for
* @return Scope representation of the sub scope
*/
Scope SubScopeByName(const std::string& nam) const;
/**
* SubScope_Begin returns the begin of the container of sub scopes
* @return begin of container of sub scopes
*/
Scope_Iterator SubScope_Begin() const;
/**
* SubScope_End returns the end of the container of sub scopes
* @return end of container of sub scopes
*/
Scope_Iterator SubScope_End() const;
/**
* SubScope_RBegin returns the reverse begin of the container of sub sco
pes
* @return reverse begin of container of sub scopes
*/
Reverse_Scope_Iterator SubScope_RBegin() const;
/**
* SubScope_REnd returns the reverse end of the container of sub scopes
* @return reverse end of container of sub scopes
*/
Reverse_Scope_Iterator SubScope_REnd() const;
/**
* SubTypeAt will return the nth sub type
* @param nth sub type
* @return reflection information of nth sub type
*/
Type SubTypeAt(size_t nth) const;
/**
* SubTypeSize will return he number of sub types
* @return number of sub types
*/
size_t SubTypeSize() const;
/**
* SubTypeByName will return the Type representing the sub type
* @param string of the unscoped sub type to look for
* @return Type representation of the sub type
*/
Type SubTypeByName(const std::string& nam) const;
bool operator == ( const Scope & lh, /**
const Scope & rh ); * SubType_Begin returns the begin of the container of sub types
* @return begin of container of sub types
*/
Type_Iterator SubType_Begin() const;
/**
* SubType_End returns the end of the container of sub types
* @return end of container of sub types
*/
Type_Iterator SubType_End() const;
/**
* SubType_RBegin returns the reverse begin of the container of sub type
s
* @return reverse begin of container of sub types
*/
Reverse_Type_Iterator SubType_RBegin() const;
/**
* SubType_REnd returns the reverse end of the container of sub types
* @return reverse end of container of sub types
*/
Reverse_Type_Iterator SubType_REnd() const;
/**
* SubTypeTemplateAt will return the nth type template of this type
* @param nth type template
* @return nth type template
*/
TypeTemplate SubTypeTemplateAt(size_t nth) const;
/**
* SubTypeTemplateSize will return the number of type templates in this
scope
* @return number of defined type templates
*/
size_t SubTypeTemplateSize() const;
/**
* SubTypeTemplateByName will return a type template defined in this sco
pe looked up by
* it's unscoped name
* @param unscoped name of the type template to look for
* @return TypeTemplate representation of the sub type template
*/
TypeTemplate SubTypeTemplateByName(const std::string& nam) const;
/**
* SubTypeTemplate_Begin returns the begin of the container of sub type
templates
* @return begin of container of sub type templates
*/
TypeTemplate_Iterator SubTypeTemplate_Begin() const;
/**
* SubTypeTemplate_End returns the end of the container of sub type temp
lates
* @return end of container of sub type templates
*/
TypeTemplate_Iterator SubTypeTemplate_End() const;
/**
* SubTypeTemplate_RBegin returns the reverse begin of the container of
sub type templates
* @return reverse begin of container of sub type templates
*/
Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const;
/**
* SubTypeTemplate_REnd returns the reverse end of the container of sub
type templates
* @return reverse end of container of sub type templates
*/
Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const;
/**
* TemplateArgumentAt will return a pointer to the nth template argument
* @param nth nth template argument
* @return reflection information of nth template argument
*/
Type TemplateArgumentAt(size_t nth) const;
/**
* TemplateArgumentSize will return the number of template arguments
* @return number of template arguments
*/
size_t TemplateArgumentSize() const;
/**
* TemplateArgument_Begin returns the begin of the container of template
arguments
* @return begin of container of template arguments
*/
Type_Iterator TemplateArgument_Begin() const;
/**
* TemplateArgument_End returns the end of the container of template arg
uments
* @return end of container of template arguments
*/
Type_Iterator TemplateArgument_End() const;
/**
* TemplateArgument_RBegin returns the reverse begin of the container of
template arguments
* @return reverse begin of container of template arguments
*/
Reverse_Type_Iterator TemplateArgument_RBegin() const;
/**
* TemplateArgument_REnd returns the reverse end of the container of tem
plate arguments
* @return reverse end of container of template arguments
*/
Reverse_Type_Iterator TemplateArgument_REnd() const;
/**
* TemplateFamily returns the corresponding TypeTemplate if any
* @return corresponding TypeTemplate
*/
TypeTemplate TemplateFamily() const;
/**
* Unload will unload the dictionary information of a scope
*/
void Unload() const;
/**
* UpdateMembers will update the list of Function/Data/Members with all
* members of base classes currently availabe in the system, switching
* INHERITEDMEMBERS_DEFAULT to INHERITEDMEMBERS_ALSO.
*/
void UpdateMembers() const;
/**
* UsingDirectiveAt will return the nth using directive
* @param nth using directive
* @return nth using directive
*/
Scope UsingDirectiveAt(size_t nth) const;
/**
* UsingDirectiveSize will return the number of using directives of this
scope
* @return number of using directives declared in this scope
*/
size_t UsingDirectiveSize() const;
Scope_Iterator UsingDirective_Begin() const;
Scope_Iterator UsingDirective_End() const;
Reverse_Scope_Iterator UsingDirective_RBegin() const;
Reverse_Scope_Iterator UsingDirective_REnd() const;
public:
/**
* AddBase will add information about a Base class
* @param base type of the base class
* @param offsFP pointer to a function stub for calculating the base cla
ss offset
* @param modifiers the modifiers of the base class
*/
void AddBase(const Type& bas,
OffsetFunction offsFP,
unsigned int modifiers = 0) const;
/**
* AddBase will add the information about a Base class
* @param b pointer to the base class
*/
void AddBase(const Base& b) const;
/**
* AddDataMember will add the information about a data member
* @param dm data member to add
*/
void AddDataMember(const Member& dm) const;
/**
* AddDataMember will add the information about a data member
* @param nam the name of the data member
* @param typ the type of the data member
* @param offs the offset of the data member relative to the beginning o
f the scope
* @param modifiers of the data member
*/
Member AddDataMember(const char* name,
const Type& type,
size_t offset,
unsigned int modifiers = 0,
char* interpreterOffset = 0) const;
/**
* AddFunctionMember will add the information about a function member
* @param fm function member to add
*/
void AddFunctionMember(const Member& fm) const;
/**
* AddFunctionMember will add the information about a function member
* @param nam the name of the function member
* @param typ the type of the function member
* @param stubFP a pointer to the stub function
* @param stubCtx a pointer to the context of the function member
* @param params a semi colon separated list of parameters
* @param modifiers of the function member
*/
Member AddFunctionMember(const char* name,
const Type& type,
StubFunction stubFP,
void* stubCtx = 0,
const char* params = 0,
unsigned int modifiers = 0) const;
/**
* AddMemberTemplate will add a member template to this scope
* @param mt member template to add
*/
void AddMemberTemplate(const MemberTemplate& mt) const;
/**
* AddSubScope will add a sub scope to this one
* @param sc sub scope to add
*/
void AddSubScope(const Scope& sc) const;
/**
* AddSubScope will add a sub scope to this one
* @param scop the name of the sub scope
* @param scopeType enum value of the scope type
*/
void AddSubScope(const char* scope,
TYPE scopeType = NAMESPACE) const;
/**
* AddSubType will add a sub type to this type
* @param ty sub type to add
*/
void AddSubType(const Type& ty) const;
/**
* AddSubType will add a sub type to this type
* @param typ the name of the sub type
* @param size the sizeof of the sub type
* @param typeType the enum specifying the sub type
* @param ti the type_info of the sub type
* @param modifiers of the sub type
*/
void AddSubType(const char* type,
size_t size,
TYPE typeType,
const std::type_info& typeInfo,
unsigned int modifiers = 0) const;
/**
* AddTypeTemplate will add a sub type template to this scope
* @param tt type template to add
*/
void AddSubTypeTemplate(const TypeTemplate& mt) const;
/**
* AddUsingDirective will add a using namespace directive to this scope
* @param ud using directive to add
*/
void AddUsingDirective(const Scope& ud) const;
/**
* RemoveDataMember will remove the information about a data member
* @param dm data member to remove
*/
void RemoveDataMember(const Member& dm) const;
/**
* RemoveFunctionMember will remove the information about a function mem
ber
* @param fm function member to remove
*/
void RemoveFunctionMember(const Member& fm) const;
/**
* RemoveMemberTemplate will remove a member template from this scope
* @param mt member template to remove
*/
void RemoveMemberTemplate(const MemberTemplate& mt) const;
/**
* RemoveSubScope will remove a sub scope from this type
* @param sc sub scope to remove
*/
void RemoveSubScope(const Scope& sc) const;
/**
* RemoveSubType will remove a sub type from this type
* @param sc sub type to remove
*/
void RemoveSubType(const Type& ty) const;
/**
* RemoveSubTypeTemplate will remove a sub type template from this scope
* @param tt sub type template to remove
*/
void RemoveSubTypeTemplate(const TypeTemplate& tt) const;
/**
* RemoveUsingDirective will remove a using namespace directive from thi
s scope
* @param ud using namespace directive to remove
*/
void RemoveUsingDirective(const Scope& ud) const;
/** */
const ScopeBase* ToScopeBase() const;
public:
/**
* @label __NIRVANA__
* @link association
*/
static Scope& __NIRVANA__();
private:
/**
* pointer to the resolved scope
* @label scope name
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
const ScopeName* fScopeName;
}; // class Scope
bool operator <(const Scope& lh,
const Scope& rh);
bool operator ==(const Scope& lh,
const Scope& rh);
} // namespace Reflex } // namespace Reflex
#include "Reflex/internal/ScopeBase.h" #include "Reflex/internal/ScopeBase.h"
#include "Reflex/internal/ScopeName.h" #include "Reflex/internal/ScopeName.h"
#include "Reflex/PropertyList.h" #include "Reflex/PropertyList.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::operator != ( const Scope & rh ) const { inline bool
Reflex::Scope::operator !=(const Scope& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeName != rh.fScopeName ); return fScopeName != rh.fScopeName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::operator < ( const Scope & lh, inline bool
const Scope & rh ) { Reflex::operator <(const Scope& lh,
const Scope& rh) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return const_cast<Scope*>(&lh)->Id() < const_cast<Scope*>(&rh)->Id(); return const_cast<Scope*>(&lh)->Id() < const_cast<Scope*>(&rh)->Id();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::operator == ( const Scope & lh, inline bool
const Scope & rh ) { Reflex::operator ==(const Scope& lh,
const Scope& rh) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return const_cast<Scope*>(&lh)->Id() == const_cast<Scope*>(&rh)->Id(); return const_cast<Scope*>(&lh)->Id() == const_cast<Scope*>(&rh)->Id();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope::Scope( const ScopeName * scopeName ) inline Reflex::Scope::Scope(const ScopeName* scopeName)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fScopeName( scopeName ) {} : fScopeName(scopeName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope::Scope( const Scope & rh ) inline Reflex::Scope::Scope(const Scope& rh)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fScopeName( rh.fScopeName ) {} : fScopeName(rh.fScopeName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope::~Scope() { inline Reflex::Scope::~Scope() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope::operator bool () const { inline
Reflex::Scope::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( this->fScopeName && this->fScopeName->fScopeBase ) return true; if (this->fScopeName && this->fScopeName->fScopeBase) {
return true;
}
//throw RuntimeError("Scope is not implemented"); //throw RuntimeError("Scope is not implemented");
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base_Iterator Reflex::Scope::Base_Begin() const { inline Reflex::Base_Iterator
Reflex::Scope::Base_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->Base_Begin(); if (*this) {
return fScopeName->fScopeBase->Base_Begin();
}
return Dummy::BaseCont().begin(); return Dummy::BaseCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base_Iterator Reflex::Scope::Base_End() const { inline Reflex::Base_Iterator
Reflex::Scope::Base_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->Base_End(); if (*this) {
return fScopeName->fScopeBase->Base_End();
}
return Dummy::BaseCont().end(); return Dummy::BaseCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Base_Iterator Reflex::Scope::Base_RBegin() const { inline Reflex::Reverse_Base_Iterator
Reflex::Scope::Base_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->Base_RBegin(); if (*this) {
return fScopeName->fScopeBase->Base_RBegin();
}
return Dummy::BaseCont().rbegin(); return Dummy::BaseCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Base_Iterator Reflex::Scope::Base_REnd() const { inline Reflex::Reverse_Base_Iterator
Reflex::Scope::Base_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->Base_REnd(); if (*this) {
return fScopeName->fScopeBase->Base_REnd();
}
return Dummy::BaseCont().rend(); return Dummy::BaseCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::Scope::DataMember_Begin(EMEMBERQUERY inline Reflex::Member_Iterator
inh) const { Reflex::Scope::DataMember_Begin(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->DataMember_Begin(inh); if (*this) {
return fScopeName->fScopeBase->DataMember_Begin(inh);
}
return Dummy::MemberCont().begin(); return Dummy::MemberCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::Scope::DataMember_End(EMEMBERQUERY i inline Reflex::Member_Iterator
nh) const { Reflex::Scope::DataMember_End(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->DataMember_End(inh); if (*this) {
return fScopeName->fScopeBase->DataMember_End(inh);
}
return Dummy::MemberCont().end(); return Dummy::MemberCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::Scope::DataMember_RBegin(EME inline Reflex::Reverse_Member_Iterator
MBERQUERY inh) const { Reflex::Scope::DataMember_RBegin(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->DataMember_RBegin(inh); if (*this) {
return fScopeName->fScopeBase->DataMember_RBegin(inh);
}
return Dummy::MemberCont().rbegin(); return Dummy::MemberCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::Scope::DataMember_REnd(EMEMB inline Reflex::Reverse_Member_Iterator
ERQUERY inh) const { Reflex::Scope::DataMember_REnd(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->DataMember_REnd(inh); if (*this) {
return fScopeName->fScopeBase->DataMember_REnd(inh);
}
return Dummy::MemberCont().rend(); return Dummy::MemberCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Scope::DeclaringScope() const { inline Reflex::Scope
Reflex::Scope::DeclaringScope() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->DeclaringScope(); if (*this) {
return fScopeName->fScopeBase->DeclaringScope();
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::Scope::FunctionMember_Begin(EMEMBERQ inline Reflex::Member_Iterator
UERY inh) const { Reflex::Scope::FunctionMember_Begin(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->FunctionMember_Begin(inh); if (*this) {
return fScopeName->fScopeBase->FunctionMember_Begin(inh);
}
return Dummy::MemberCont().begin(); return Dummy::MemberCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::Scope::FunctionMember_End(EMEMBERQUE inline Reflex::Member_Iterator
RY inh) const { Reflex::Scope::FunctionMember_End(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->FunctionMember_End(inh); if (*this) {
return fScopeName->fScopeBase->FunctionMember_End(inh);
}
return Dummy::MemberCont().end(); return Dummy::MemberCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::Scope::FunctionMember_RBegin inline Reflex::Reverse_Member_Iterator
(EMEMBERQUERY inh) const { Reflex::Scope::FunctionMember_RBegin(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->FunctionMember_RBegin(inh); if (*this) {
return fScopeName->fScopeBase->FunctionMember_RBegin(inh);
}
return Dummy::MemberCont().rbegin(); return Dummy::MemberCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::Scope::FunctionMember_REnd(E inline Reflex::Reverse_Member_Iterator
MEMBERQUERY inh) const { Reflex::Scope::FunctionMember_REnd(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->FunctionMember_REnd(inh); if (*this) {
return fScopeName->fScopeBase->FunctionMember_REnd(inh);
}
return Dummy::MemberCont().rend(); return Dummy::MemberCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Scope::GlobalScope() { inline Reflex::Scope
Reflex::Scope::GlobalScope() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ScopeBase::GlobalScope(); return ScopeBase::GlobalScope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::Scope::Id() const { inline void*
Reflex::Scope::Id() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return (void*)fScopeName; return (void*) fScopeName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsClass() const { inline bool
Reflex::Scope::IsClass() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsClass(); if (*this) {
return fScopeName->fScopeBase->IsClass();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsEnum() const { inline bool
Reflex::Scope::IsEnum() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsEnum(); if (*this) {
return fScopeName->fScopeBase->IsEnum();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsNamespace() const { inline bool
Reflex::Scope::IsNamespace() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsNamespace(); if (*this) {
return fScopeName->fScopeBase->IsNamespace();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsTemplateInstance() const { inline bool
Reflex::Scope::IsTemplateInstance() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsTemplateInstance(); if (*this) {
return fScopeName->fScopeBase->IsTemplateInstance();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsTopScope() const { inline bool
Reflex::Scope::IsTopScope() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsTopScope(); if (*this) {
return fScopeName->fScopeBase->IsTopScope();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::Scope::IsUnion() const { inline bool
Reflex::Scope::IsUnion() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->IsUnion(); if (*this) {
return fScopeName->fScopeBase->IsUnion();
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Scope::MemberSize(EMEMBERQUERY inh) const { inline size_t
Reflex::Scope::MemberSize(EMEMBERQUERY inh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->MemberSize(inh); if (*this) {
return fScopeName->fScopeBase->MemberSize(inh);
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate_Iterator Reflex::Scope::MemberTemplate_Begin( inline Reflex::MemberTemplate_Iterator
) const { Reflex::Scope::MemberTemplate_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->MemberTemplate_Begin(); if (*this) {
return fScopeName->fScopeBase->MemberTemplate_Begin();
}
return Dummy::MemberTemplateCont().begin(); return Dummy::MemberTemplateCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::MemberTemplate_Iterator Reflex::Scope::MemberTemplate_End() inline Reflex::MemberTemplate_Iterator
const { Reflex::Scope::MemberTemplate_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->MemberTemplate_End(); if (*this) {
return fScopeName->fScopeBase->MemberTemplate_End();
}
return Dummy::MemberTemplateCont().end(); return Dummy::MemberTemplateCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_MemberTemplate_Iterator Reflex::Scope::MemberTemplat inline Reflex::Reverse_MemberTemplate_Iterator
e_RBegin() const { Reflex::Scope::MemberTemplate_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->MemberTemplate_RBegin(); if (*this) {
return fScopeName->fScopeBase->MemberTemplate_RBegin();
}
return Dummy::MemberTemplateCont().rbegin(); return Dummy::MemberTemplateCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_MemberTemplate_Iterator Reflex::Scope::MemberTemplat inline Reflex::Reverse_MemberTemplate_Iterator
e_REnd() const { Reflex::Scope::MemberTemplate_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->MemberTemplate_REnd(); if (*this) {
return fScopeName->fScopeBase->MemberTemplate_REnd();
}
return Dummy::MemberTemplateCont().rend(); return Dummy::MemberTemplateCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::Scope::Name_c_str() const { inline const char*
Reflex::Scope::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fScopeName ) return fScopeName->Name_c_str(); if (fScopeName) {
return fScopeName->Name_c_str();
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::PropertyList Reflex::Scope::Properties() const { inline Reflex::PropertyList
Reflex::Scope::Properties() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->Properties(); if (*this) {
return fScopeName->fScopeBase->Properties();
}
return Dummy::PropertyList(); return Dummy::PropertyList();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TYPE Reflex::Scope::ScopeType() const { inline Reflex::TYPE
Reflex::Scope::ScopeType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->ScopeType(); if (*this) {
return fScopeName->fScopeBase->ScopeType();
}
return UNRESOLVED; return UNRESOLVED;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::Scope::ScopeTypeAsString() const { inline std::string
Reflex::Scope::ScopeTypeAsString() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->ScopeTypeAsString(); if (*this) {
return fScopeName->fScopeBase->ScopeTypeAsString();
}
return "UNRESOLVED"; return "UNRESOLVED";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::Scope_Begin() { inline Reflex::Scope_Iterator
Reflex::Scope::Scope_Begin() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ScopeName::Scope_Begin(); return ScopeName::Scope_Begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::Scope_End() { inline Reflex::Scope_Iterator
Reflex::Scope::Scope_End() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ScopeName::Scope_End(); return ScopeName::Scope_End();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::Scope_RBegin() { inline Reflex::Reverse_Scope_Iterator
Reflex::Scope::Scope_RBegin() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ScopeName::Scope_RBegin(); return ScopeName::Scope_RBegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::Scope_REnd() { inline Reflex::Reverse_Scope_Iterator
Reflex::Scope::Scope_REnd() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ScopeName::Scope_REnd(); return ScopeName::Scope_REnd();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Scope::SubScopeAt( size_t nth ) const { inline Reflex::Scope
Reflex::Scope::SubScopeAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScopeAt( nth ); if (*this) {
return fScopeName->fScopeBase->SubScopeAt(nth);
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Scope::SubScopeLevel() const { inline size_t
Reflex::Scope::SubScopeLevel() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScopeLevel(); if (*this) {
return fScopeName->fScopeBase->SubScopeLevel();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Scope::SubScopeSize() const { inline size_t
Reflex::Scope::SubScopeSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScopeSize(); if (*this) {
return fScopeName->fScopeBase->SubScopeSize();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Scope::SubScopeByName( const std::string & nam inline Reflex::Scope
) const { Reflex::Scope::SubScopeByName(const std::string& nam) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScopeByName( nam ); if (*this) {
return fScopeName->fScopeBase->SubScopeByName(nam);
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::SubScope_Begin() const { inline Reflex::Scope_Iterator
Reflex::Scope::SubScope_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScope_Begin(); if (*this) {
return fScopeName->fScopeBase->SubScope_Begin();
}
return Dummy::ScopeCont().begin(); return Dummy::ScopeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::SubScope_End() const { inline Reflex::Scope_Iterator
Reflex::Scope::SubScope_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScope_End(); if (*this) {
return fScopeName->fScopeBase->SubScope_End();
}
return Dummy::ScopeCont().end(); return Dummy::ScopeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::SubScope_RBegin() cons inline Reflex::Reverse_Scope_Iterator
t { Reflex::Scope::SubScope_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScope_RBegin(); if (*this) {
return fScopeName->fScopeBase->SubScope_RBegin();
}
return Dummy::ScopeCont().rbegin(); return Dummy::ScopeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::SubScope_REnd() const inline Reflex::Reverse_Scope_Iterator
{ Reflex::Scope::SubScope_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubScope_REnd(); if (*this) {
return fScopeName->fScopeBase->SubScope_REnd();
}
return Dummy::ScopeCont().rend(); return Dummy::ScopeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::Scope::SubType_Begin() const { inline Reflex::Type_Iterator
Reflex::Scope::SubType_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubType_Begin(); if (*this) {
return fScopeName->fScopeBase->SubType_Begin();
}
return Dummy::TypeCont().begin(); return Dummy::TypeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::Scope::SubType_End() const { inline Reflex::Type_Iterator
Reflex::Scope::SubType_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubType_End(); if (*this) {
return fScopeName->fScopeBase->SubType_End();
}
return Dummy::TypeCont().end(); return Dummy::TypeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::Scope::SubType_RBegin() const inline Reflex::Reverse_Type_Iterator
{ Reflex::Scope::SubType_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubType_RBegin(); if (*this) {
return fScopeName->fScopeBase->SubType_RBegin();
}
return Dummy::TypeCont().rbegin(); return Dummy::TypeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::Scope::SubType_REnd() const { inline Reflex::Reverse_Type_Iterator
Reflex::Scope::SubType_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubType_REnd(); if (*this) {
return fScopeName->fScopeBase->SubType_REnd();
}
return Dummy::TypeCont().rend(); return Dummy::TypeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const Reflex::ScopeBase * Reflex::Scope::ToScopeBase() const { inline const Reflex::ScopeBase*
Reflex::Scope::ToScopeBase() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase; if (*this) {
return fScopeName->fScopeBase;
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate_Iterator Reflex::Scope::SubTypeTemplate_Begin() inline Reflex::TypeTemplate_Iterator
const { Reflex::Scope::SubTypeTemplate_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubTypeTemplate_Begin(); if (*this) {
return fScopeName->fScopeBase->SubTypeTemplate_Begin();
}
return Dummy::TypeTemplateCont().begin(); return Dummy::TypeTemplateCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate_Iterator Reflex::Scope::SubTypeTemplate_End() c inline Reflex::TypeTemplate_Iterator
onst { Reflex::Scope::SubTypeTemplate_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubTypeTemplate_End(); if (*this) {
return fScopeName->fScopeBase->SubTypeTemplate_End();
}
return Dummy::TypeTemplateCont().end(); return Dummy::TypeTemplateCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_TypeTemplate_Iterator Reflex::Scope::SubTypeTemplate inline Reflex::Reverse_TypeTemplate_Iterator
_RBegin() const { Reflex::Scope::SubTypeTemplate_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubTypeTemplate_RBegin(); if (*this) {
return fScopeName->fScopeBase->SubTypeTemplate_RBegin();
}
return Dummy::TypeTemplateCont().rbegin(); return Dummy::TypeTemplateCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_TypeTemplate_Iterator Reflex::Scope::SubTypeTemplate inline Reflex::Reverse_TypeTemplate_Iterator
_REnd() const { Reflex::Scope::SubTypeTemplate_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->SubTypeTemplate_REnd(); if (*this) {
return fScopeName->fScopeBase->SubTypeTemplate_REnd();
}
return Dummy::TypeTemplateCont().rend(); return Dummy::TypeTemplateCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::Scope::UsingDirectiveAt( size_t nth ) const { inline Reflex::Scope
Reflex::Scope::UsingDirectiveAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirectiveAt( nth ); if (*this) {
return fScopeName->fScopeBase->UsingDirectiveAt(nth);
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::Scope::UsingDirectiveSize() const { inline size_t
Reflex::Scope::UsingDirectiveSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirectiveSize(); if (*this) {
return fScopeName->fScopeBase->UsingDirectiveSize();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::UsingDirective_Begin() const { inline Reflex::Scope_Iterator
Reflex::Scope::UsingDirective_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirective_Begin(); if (*this) {
return fScopeName->fScopeBase->UsingDirective_Begin();
}
return Dummy::ScopeCont().begin(); return Dummy::ScopeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::Scope::UsingDirective_End() const { inline Reflex::Scope_Iterator
Reflex::Scope::UsingDirective_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirective_End(); if (*this) {
return fScopeName->fScopeBase->UsingDirective_End();
}
return Dummy::ScopeCont().end(); return Dummy::ScopeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::UsingDirective_RBegin( inline Reflex::Reverse_Scope_Iterator
) const { Reflex::Scope::UsingDirective_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirective_RBegin(); if (*this) {
return fScopeName->fScopeBase->UsingDirective_RBegin();
}
return Dummy::ScopeCont().rbegin(); return Dummy::ScopeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::Scope::UsingDirective_REnd() inline Reflex::Reverse_Scope_Iterator
const { Reflex::Scope::UsingDirective_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fScopeName->fScopeBase->UsingDirective_REnd(); if (*this) {
return fScopeName->fScopeBase->UsingDirective_REnd();
}
return Dummy::ScopeCont().rend(); return Dummy::ScopeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddBase( const Type & bas, inline void
OffsetFunction offsFP, Reflex::Scope::AddBase(const Type& bas,
unsigned int modifiers /* = 0 */) const OffsetFunction offsFP,
{ unsigned int modifiers /* = 0 */) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this) fScopeName->fScopeBase->AddBase( bas, offsFP, modifiers ); if (*this) {
fScopeName->fScopeBase->AddBase(bas, offsFP, modifiers);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddBase(const Base & b) const { inline void
Reflex::Scope::AddBase(const Base& b) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this) fScopeName->fScopeBase->AddBase( b ); if (*this) {
fScopeName->fScopeBase->AddBase(b);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddSubScope( const Scope & sc ) const { inline void
Reflex::Scope::AddSubScope(const Scope& sc) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this) fScopeName->fScopeBase->AddSubScope( sc ); if (*this) {
fScopeName->fScopeBase->AddSubScope(sc);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddSubScope( const char * scope, inline void
TYPE scopeType ) const { Reflex::Scope::AddSubScope(const char* scope,
TYPE scopeType) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) fScopeName->fScopeBase->AddSubScope( scope, scopeType ); if (*this) {
fScopeName->fScopeBase->AddSubScope(scope, scopeType);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::RemoveSubScope( const Scope & sc ) const { inline void
Reflex::Scope::RemoveSubScope(const Scope& sc) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this) fScopeName->fScopeBase->RemoveSubScope( sc ); if (*this) {
fScopeName->fScopeBase->RemoveSubScope(sc);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::AddUsingDirective( const Scope & ud ) const { inline void
Reflex::Scope::AddUsingDirective(const Scope& ud) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) fScopeName->fScopeBase->AddUsingDirective( ud ); if (*this) {
fScopeName->fScopeBase->AddUsingDirective(ud);
}
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::Scope::RemoveUsingDirective( const Scope & ud ) const { inline void
Reflex::Scope::RemoveUsingDirective(const Scope& ud) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) fScopeName->fScopeBase->RemoveUsingDirective( ud ); if (*this) {
fScopeName->fScopeBase->RemoveUsingDirective(ud);
}
} }
#ifdef REFLEX_CINT_MERGE #ifdef REFLEX_CINT_MERGE
inline bool operator&&(bool b, const Reflex::Scope & rh) { inline bool
operator &&(bool b,
const Reflex::Scope& rh) {
return b && rh.operator bool(); return b && rh.operator bool();
} }
inline bool operator&&(int i, const Reflex::Scope & rh) {
inline bool
operator &&(int i,
const Reflex::Scope& rh) {
return i && rh.operator bool(); return i && rh.operator bool();
} }
inline bool operator||(bool b, const Reflex::Scope & rh) {
inline bool
operator ||(bool b,
const Reflex::Scope& rh) {
return b || rh.operator bool(); return b || rh.operator bool();
} }
inline bool operator||(int i, const Reflex::Scope & rh) {
inline bool
operator ||(int i,
const Reflex::Scope& rh) {
return i || rh.operator bool(); return i || rh.operator bool();
} }
inline bool operator&&(char *c, const Reflex::Scope & rh) {
inline bool
operator &&(char* c,
const Reflex::Scope& rh) {
return c && rh.operator bool(); return c && rh.operator bool();
} }
inline bool operator||(char *c, const Reflex::Scope & rh) {
return c ||rh.operator bool(); inline bool
operator ||(char* c,
const Reflex::Scope& rh) {
return c || rh.operator bool();
} }
#endif #endif
#endif // Reflex_Scope #endif // Reflex_Scope
 End of changes. 150 change blocks. 
1137 lines changed or deleted 1326 lines changed or added


 ScopeBase.h   ScopeBase.h 
// @(#)root/reflex:$Id: ScopeBase.h 28733 2009-05-28 04:34:44Z pcanal $ // @(#)root/reflex:$Id: ScopeBase.h 29355 2009-07-06 17:34:05Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ScopeBase #ifndef Reflex_ScopeBase
#define Reflex_ScopeBase #define Reflex_ScopeBase
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
#include "Reflex/internal/OwnedPropertyList.h" #include "Reflex/internal/OwnedPropertyList.h"
#include "Reflex/internal/BuilderContainer.h"
#include <vector> #include <vector>
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( push ) # pragma warning( push )
#pragma warning( disable : 4251 ) # pragma warning( disable : 4251 )
#endif #endif
namespace Reflex { namespace Reflex {
// forward declarations
class Scope;
class ScopeName;
class Namespace;
class Class;
class Member;
class OwnedMember;
class TypeTemplate;
class MemberTemplate;
class OwnedMemberTemplate;
class Type;
class DictionaryGenerator;
class OnDemandBuilder;
/**
* @class ScopeBase ScopeBase.h Reflex/ScopeBase.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API ScopeBase {
public:
enum EBuilderKind {
kBuildDataMembers,
kBuildFunctionMembers,
kNumBuilderKinds
};
/** constructor within a At*/
ScopeBase(const char* scope,
TYPE scopeType);
// forward declarations /** destructor */
class Scope; virtual ~ScopeBase();
class ScopeName;
class Namespace; /**
class Class; * operator Scope will return the corresponding Scope object
class Member; * @return Scope corresponding to this ScopeBase
class OwnedMember; */
class TypeTemplate; operator Scope() const;
class MemberTemplate;
class OwnedMemberTemplate; /**
class Type; * the operator Type will return a corresponding Type object to the At i
class DictionaryGenerator; f
* applicable (i.e. if the Scope is also a Type e.g. Class, Union, Enum)
/** */
* @class ScopeBase ScopeBase.h Reflex/ScopeBase.h operator Type() const;
* @author Stefan Roiser
* @date 24/11/2003 /**
* @ingroup Ref * nthBase will return the nth BaseAt class information
*/ * @param nth nth BaseAt class
class RFLX_API ScopeBase { * @return pointer to BaseAt class information
*/
public: virtual Base BaseAt(size_t nth) const;
/** constructor within a At*/ /**
ScopeBase( const char * scope, * BaseSize will return the number of BaseAt classes
TYPE scopeType ); * @return number of BaseAt classes
*/
/** destructor */ virtual size_t BaseSize() const;
virtual ~ScopeBase();
virtual Base_Iterator Base_Begin() const;
/** virtual Base_Iterator Base_End() const;
* operator Scope will return the corresponding Scope object virtual Reverse_Base_Iterator Base_RBegin() const;
* @return Scope corresponding to this ScopeBase virtual Reverse_Base_Iterator Base_REnd() const;
*/
operator Scope () const; /**
* nthDataMember will return the nth data MemberAt of the At
/** * @param nth data MemberAt
* the operator Type will return a corresponding Type object to the At * @return pointer to data MemberAt
if */
* applicable (i.e. if the Scope is also a Type e.g. Class, Union, Enu virtual Member DataMemberAt(size_t nth,
m) EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT)
*/ const;
operator Type () const;
/**
/** * DataMemberByName will return the MemberAt with Name
* nthBase will return the nth BaseAt class information * @param Name of data MemberAt
* @param nth nth BaseAt class * @return data MemberAt
* @return pointer to BaseAt class information */
*/ virtual Member DataMemberByName(const std::string& nam,
virtual Base BaseAt( size_t nth ) const; EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA
ULT) const;
/**
* BaseSize will return the number of BaseAt classes /**
* @return number of BaseAt classes * DataMemberSize will return the number of data members of this At
*/ * @return number of data members
virtual size_t BaseSize() const; */
virtual size_t DataMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAUL
virtual Base_Iterator Base_Begin() const; T) const;
virtual Base_Iterator Base_End() const;
virtual Reverse_Base_Iterator Base_RBegin() const; virtual Member_Iterator DataMember_Begin(EMEMBERQUERY inh = INHERITEDMEM
virtual Reverse_Base_Iterator Base_REnd() const; BERS_DEFAULT) const;
virtual Member_Iterator DataMember_End(EMEMBERQUERY inh = INHERITEDMEMBE
/** RS_DEFAULT) const;
* nthDataMember will return the nth data MemberAt of the At virtual Reverse_Member_Iterator DataMember_RBegin(EMEMBERQUERY inh = INH
* @param nth data MemberAt ERITEDMEMBERS_DEFAULT) const;
* @return pointer to data MemberAt virtual Reverse_Member_Iterator DataMember_REnd(EMEMBERQUERY inh = INHER
*/ ITEDMEMBERS_DEFAULT) const;
virtual Member DataMemberAt( size_t nth, EMEMBERQUERY inh = INHERITED
MEMBERS_DEFAULT ) const; /**
* DeclaringScope will return a pointer to the At of this one
/** * @return pointer to declaring At
* DataMemberByName will return the MemberAt with Name */
* @param Name of data MemberAt virtual Scope DeclaringScope() const;
* @return data MemberAt
*/ /**
virtual Member DataMemberByName( const std::string & nam, EMEMBERQUER * nthFunctionMember will return the nth function MemberAt of the At
Y inh = INHERITEDMEMBERS_DEFAULT ) const; * @param nth function MemberAt
* @return pointer to function MemberAt
/** */
* DataMemberSize will return the number of data members of this At virtual Member FunctionMemberAt(size_t nth,
* @return number of data members
*/
virtual size_t DataMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEF
AULT) const;
virtual Member_Iterator DataMember_Begin(EMEMBERQUERY inh = INHERITED
MEMBERS_DEFAULT) const;
virtual Member_Iterator DataMember_End(EMEMBERQUERY inh = INHERITEDME
MBERS_DEFAULT) const;
virtual Reverse_Member_Iterator DataMember_RBegin(EMEMBERQUERY inh =
INHERITEDMEMBERS_DEFAULT) const;
virtual Reverse_Member_Iterator DataMember_REnd(EMEMBERQUERY inh = IN
HERITEDMEMBERS_DEFAULT) const;
/**
* DeclaringScope will return a pointer to the At of this one
* @return pointer to declaring At
*/
virtual Scope DeclaringScope() const;
/**
* nthFunctionMember will return the nth function MemberAt of the At
* @param nth function MemberAt
* @return pointer to function MemberAt
*/
virtual Member FunctionMemberAt( size_t nth, EMEMBERQUERY inh = INHER
ITEDMEMBERS_DEFAULT ) const;
/**
* FunctionMemberByName will return the MemberAt with the Name,
* optionally the signature of the function may be given
* @param Name of function MemberAt
* @param signature of the MemberAt function
* @modifiers_mask When matching, do not compare the listed modifiers
* @return function MemberAt
*/
virtual Member FunctionMemberByName( const std::string & name,
const Type & signature,
unsigned int modifiers_mask = 0,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA ULT) const; EMEMBERQUERY inh = INHERITEDMEMBERS_DEFA ULT) const;
/** /**
* FunctionMemberByNameAndSignature will return the MemberAt with the * FunctionMemberByName will return the MemberAt with the Name,
Name, * optionally the signature of the function may be given
* optionally the signature of the function may be given * @param Name of function MemberAt
* @param Name of function MemberAt * @param signature of the MemberAt function
* @param signature of the MemberAt function * @modifiers_mask When matching, do not compare the listed modifiers
* @modifiers_mask When matching, do not compare the listed modifiers * @return function MemberAt
* @return function MemberAt */
*/ virtual Member FunctionMemberByName(const std::string& name,
virtual Member FunctionMemberByNameAndSignature( const std::string & const Type& signature,
name, unsigned int modifiers_mask = 0,
const Type & signature, EMEMBERQUERY inh = INHERITEDMEMBERS_
unsigned int modifiers_mask DEFAULT,
= 0, EDELAYEDLOADSETTING allowDelayedLoad
EMEMBERQUERY inh = INHERITED = DELAYEDLOAD_ON) const;
MEMBERS_DEFAULT) const;
/**
/** * FunctionMemberByNameAndSignature will return the MemberAt with the Na
* FunctionMemberSize will return the number of function members of me,
* this type * optionally the signature of the function may be given
* @return number of function members * @param Name of function MemberAt
*/ * @param signature of the MemberAt function
virtual size_t FunctionMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS * @modifiers_mask When matching, do not compare the listed modifiers
_DEFAULT) const; * @return function MemberAt
*/
virtual Member_Iterator FunctionMember_Begin(EMEMBERQUERY inh = INHER virtual Member FunctionMemberByNameAndSignature(const std::string& name,
ITEDMEMBERS_DEFAULT) const; const Type& signature,
virtual Member_Iterator FunctionMember_End(EMEMBERQUERY inh = INHERIT unsigned int modifiers_m
EDMEMBERS_DEFAULT) const; ask = 0,
virtual Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY in EMEMBERQUERY inh = INHER
h = INHERITEDMEMBERS_DEFAULT) const; ITEDMEMBERS_DEFAULT,
virtual Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh EDELAYEDLOADSETTING allo
= INHERITEDMEMBERS_DEFAULT) const; wDelayedLoad = DELAYEDLOAD_ON) const;
/** /**
* GenerateDict will produce the dictionary information of this type * FunctionMemberSize will return the number of function members of
* @param generator a reference to the dictionary generator instance * this type
*/ * @return number of function members
virtual void GenerateDict(DictionaryGenerator &generator) const; */
virtual size_t FunctionMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DE
/** FAULT) const;
* GetBasePosition will return fBasePosition
* @return The position where the unscoped Name starts in the typename virtual Member_Iterator FunctionMember_Begin(EMEMBERQUERY inh = INHERITE
*/ DMEMBERS_DEFAULT) const;
size_t GetBasePosition() const; virtual Member_Iterator FunctionMember_End(EMEMBERQUERY inh = INHERITEDM
EMBERS_DEFAULT) const;
/** virtual Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY inh =
* GlobalScope will return the global scope representation\ INHERITEDMEMBERS_DEFAULT) const;
* @return global scope virtual Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = I
*/ NHERITEDMEMBERS_DEFAULT) const;
static Scope GlobalScope();
/**
/** * GenerateDict will produce the dictionary information of this type
* HasBase will check whether this class has a base class given * @param generator a reference to the dictionary generator instance
* as argument */
* @param cl the base-class to check for virtual void GenerateDict(DictionaryGenerator& generator) const;
* @return the Base info if it is found, an empty base otherwise (can
be tested for bool) /**
*/ * GetBasePosition will return fBasePosition
virtual bool HasBase( const Type & cl ) const; * @return The position where the unscoped Name starts in the typename
*/
/** size_t GetBasePosition() const;
* IsClass returns true if the At represents a Class
* @return true if At represents a Class /**
*/ * GlobalScope will return the global scope representation\
bool IsClass() const; * @return global scope
*/
/** static Scope GlobalScope();
* IsEnum returns true if the At represents a Enum
* @return true if At represents a Enum /**
*/ * HasBase will check whether this class has a base class given
bool IsEnum() const; * as argument
* @param cl the base-class to check for
/** * @return the Base info if it is found, an empty base otherwise (can be
* IsNamespace returns true if the At represents a Namespace tested for bool)
* @return true if At represents a Namespace */
*/ virtual bool HasBase(const Type& cl) const;
bool IsNamespace() const;
/**
/** * IsClass returns true if the At represents a Class
* IsTemplateInstance returns true if the At represents a * @return true if At represents a Class
* ClassTemplateInstance */
* @return true if At represents a InstantiatedTemplateClass bool IsClass() const;
*/
bool IsTemplateInstance() const; /**
* IsEnum returns true if the At represents a Enum
/** * @return true if At represents a Enum
* IsTopScope will return true if the current At is the top */
* (Empty) namespace bool IsEnum() const;
* @return true if current sope is top namespace
*/ /**
bool IsTopScope() const; * IsNamespace returns true if the At represents a Namespace
* @return true if At represents a Namespace
/** */
* IsUnion returns true if the At represents a Union bool IsNamespace() const;
* @return true if At represents a
*/ /**
bool IsUnion() const; * IsTemplateInstance returns true if the At represents a
* ClassTemplateInstance
/** * @return true if At represents a InstantiatedTemplateClass
* LookupMember will lookup a member in the current scope */
* @param nam the string representation of the member to lookup bool IsTemplateInstance() const;
* @param current the current scope
* @return if a matching member is found return it, otherwise return e /**
mpty member * IsTopScope will return true if the current At is the top
*/ * (Empty) namespace
Member LookupMember( const std::string & nam, * @return true if current sope is top namespace
const Scope & current ) const; */
bool IsTopScope() const;
/**
* LookupType will lookup a type in the current scope /**
* @param nam the string representation of the type to lookup * IsUnion returns true if the At represents a Union
* @param current the current scope * @return true if At represents a
* @return if a matching type is found return it, otherwise return emp */
ty type bool IsUnion() const;
*/
Type LookupType( const std::string & nam, /**
const Scope & current ) const; * LookupMember will lookup a member in the current scope
* @param nam the string representation of the member to lookup
/** * @param current the current scope
* LookupType will lookup a scope in the current scope * @return if a matching member is found return it, otherwise return emp
* @param nam the string representation of the scope to lookup ty member
* @param current the current scope */
* @return if a matching scope is found return it, otherwise return em Member LookupMember(const std::string& nam,
pty scope const Scope& current) const;
*/
Scope LookupScope( const std::string & nam, /**
const Scope & current ) const; * LookupType will lookup a type in the current scope
* @param nam the string representation of the type to lookup
/** * @param current the current scope
* MemberByName will return the first MemberAt with a given Name * @return if a matching type is found return it, otherwise return empty
* @param Name MemberAt Name type
* @return pointer to MemberAt */
*/ Type LookupType(const std::string& nam,
virtual Member MemberByName( const std::string & name, const Scope& current) const;
const Type & signature,
/**
* LookupType will lookup a scope in the current scope
* @param nam the string representation of the scope to lookup
* @param current the current scope
* @return if a matching scope is found return it, otherwise return empt
y scope
*/
Scope LookupScope(const std::string& nam,
const Scope& current) const;
/**
* MemberByName will return the first MemberAt with a given Name
* @param Name MemberAt Name
* @return pointer to MemberAt
*/
virtual Member MemberByName(const std::string& name,
const Type& signature,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT)
const;
/**
* MemberAt will return the nth MemberAt of the At
* @param nth MemberAt
* @return pointer to nth MemberAt
*/
virtual Member MemberAt(size_t nth,
EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) con st; EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) con st;
/** virtual Member_Iterator Member_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS
* MemberAt will return the nth MemberAt of the At _DEFAULT) const;
* @param nth MemberAt virtual Member_Iterator Member_End(EMEMBERQUERY inh = INHERITEDMEMBERS_D
* @return pointer to nth MemberAt EFAULT) const;
*/ virtual Reverse_Member_Iterator Member_RBegin(EMEMBERQUERY inh = INHERIT
virtual Member MemberAt( size_t nth, EMEMBERQUERY inh = INHERITEDMEMB EDMEMBERS_DEFAULT) const;
ERS_DEFAULT ) const; virtual Reverse_Member_Iterator Member_REnd(EMEMBERQUERY inh = INHERITED
MEMBERS_DEFAULT) const;
virtual Member_Iterator Member_Begin(EMEMBERQUERY inh = INHERITEDMEMB
ERS_DEFAULT) const; /**
virtual Member_Iterator Member_End(EMEMBERQUERY inh = INHERITEDMEMBER * MemberSize will return the number of members
S_DEFAULT) const; * @return number of members
virtual Reverse_Member_Iterator Member_RBegin(EMEMBERQUERY inh = INHE */
RITEDMEMBERS_DEFAULT) const; virtual size_t MemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) c
virtual Reverse_Member_Iterator Member_REnd(EMEMBERQUERY inh = INHERI onst;
TEDMEMBERS_DEFAULT) const;
/**
/** * MemberTemplateAt will return the nth MemberAt template of this At
* MemberSize will return the number of members * @param nth MemberAt template
* @return number of members * @return nth MemberAt template
*/ */
virtual size_t MemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT MemberTemplate MemberTemplateAt(size_t nth) const;
) const;
/**
/** * MemberTemplateSize will return the number of MemberAt templates in th
* MemberTemplateAt will return the nth MemberAt template of this At is socpe
* @param nth MemberAt template * @return number of defined MemberAt templates
* @return nth MemberAt template */
*/ size_t MemberTemplateSize() const;
MemberTemplate MemberTemplateAt( size_t nth ) const;
/**
/** * MemberTemplateByName will return the member template representation i
* MemberTemplateSize will return the number of MemberAt templates in n this
this socpe * scope
* @return number of defined MemberAt templates * @param string representing the member template to look for
*/ * @return member template representation of the looked up member
size_t MemberTemplateSize() const; */
MemberTemplate MemberTemplateByName(const std::string& nam) const;
/**
* MemberTemplateByName will return the member template representation MemberTemplate_Iterator MemberTemplate_Begin() const;
in this MemberTemplate_Iterator MemberTemplate_End() const;
* scope Reverse_MemberTemplate_Iterator MemberTemplate_RBegin() const;
* @param string representing the member template to look for Reverse_MemberTemplate_Iterator MemberTemplate_REnd() const;
* @return member template representation of the looked up member
*/ /**
MemberTemplate MemberTemplateByName( const std::string & nam ) const; * Name will return the Name of the At
* @return Name of At
MemberTemplate_Iterator MemberTemplate_Begin() const; */
MemberTemplate_Iterator MemberTemplate_End() const; virtual std::string Name(unsigned int mod = 0) const;
Reverse_MemberTemplate_Iterator MemberTemplate_RBegin() const;
Reverse_MemberTemplate_Iterator MemberTemplate_REnd() const; /**
* SimpleName returns the name of the type as a reference. It provides a
/** * simplified but faster generation of a type name. Attention currently
* Name will return the Name of the At it
* @return Name of At * is not guaranteed that Name() and SimpleName() return the same charac
*/ ter
virtual std::string Name( unsigned int mod = 0 ) const; * layout of a name (ie. spacing, commas, etc. )
* @param pos will indicate where in the returned reference the requeste
/** d name starts
* SimpleName returns the name of the type as a reference. It provides * @param mod The only 'mod' support is SCOPED
a * @return name of type
* simplified but faster generation of a type name. Attention currentl */
y it virtual const std::string& SimpleName(size_t& pos,
* is not guaranteed that Name() and SimpleName() return the same char unsigned int mod = 0) const;
acter
* layout of a name (ie. spacing, commas, etc. ) /**
* @param pos will indicate where in the returned reference the reques * Properties will return a pointer to the PropertyNth list attached
ted name starts * to this item
* @param mod The only 'mod' support is SCOPED * @return pointer to PropertyNth list
* @return name of type */
*/ virtual PropertyList Properties() const;
virtual const std::string & SimpleName( size_t & pos,
unsigned int mod = 0 ) const; /**
* At will return the At Object of this ScopeBase
/** * @return corresponding Scope
* Properties will return a pointer to the PropertyNth list attached */
* to this item Scope ThisScope() const;
* @return pointer to PropertyNth list
*/ /**
virtual PropertyList Properties() const; * ScopeType will return which kind of At is represented
* @return At of At
/** */
* At will return the At Object of this ScopeBase TYPE ScopeType() const;
* @return corresponding Scope
*/ /**
Scope ThisScope() const; * ScopeTypeAsString will return the string representation of the enum
* representing the current Scope (e.g. "CLASS")
/** * @return string representation of enum for Scope
* ScopeType will return which kind of At is represented */
* @return At of At std::string ScopeTypeAsString() const;
*/
TYPE ScopeType() const; /**
* SubScopeAt will return a pointer to a sub-scopes
/** * @param nth sub-At
* ScopeTypeAsString will return the string representation of the enum * @return pointer to nth sub-At
* representing the current Scope (e.g. "CLASS") */
* @return string representation of enum for Scope Scope SubScopeAt(size_t nth) const;
*/
std::string ScopeTypeAsString() const; /**
* SubScopeLevel will return the number of declaring scopes
/** * this scope lives in.
* SubScopeAt will return a pointer to a sub-scopes * @return number of declaring scopes above this scope.
* @param nth sub-At */
* @return pointer to nth sub-At size_t SubScopeLevel() const;
*/
Scope SubScopeAt( size_t nth ) const; /**
* ScopeSize will return the number of sub-scopes
/** * @return number of sub-scopes
* SubScopeLevel will return the number of declaring scopes */
* this scope lives in. size_t SubScopeSize() const;
* @return number of declaring scopes above this scope.
*/ /**
size_t SubScopeLevel() const; * SubScopeByName will return a sub scope representing the unscoped name
passed
/** * as argument
* ScopeSize will return the number of sub-scopes * @param unscoped name of the sub scope to look for
* @return number of sub-scopes * @return Scope representation of the sub scope
*/ */
size_t SubScopeSize() const; Scope SubScopeByName(const std::string& nam) const;
/** Scope_Iterator SubScope_Begin() const;
* SubScopeByName will return a sub scope representing the unscoped na Scope_Iterator SubScope_End() const;
me passed Reverse_Scope_Iterator SubScope_RBegin() const;
* as argument Reverse_Scope_Iterator SubScope_REnd() const;
* @param unscoped name of the sub scope to look for
* @return Scope representation of the sub scope /**
*/ * At will return a pointer to the nth sub-At
Scope SubScopeByName( const std::string & nam ) const; * @param nth sub-At
* @return pointer to nth sub-At
Scope_Iterator SubScope_Begin() const; */
Scope_Iterator SubScope_End() const; Type SubTypeAt(size_t nth) const;
Reverse_Scope_Iterator SubScope_RBegin() const;
Reverse_Scope_Iterator SubScope_REnd() const; /**
* TypeSize will returnt he number of sub-types
/** * @return number of sub-types
* At will return a pointer to the nth sub-At */
* @param nth sub-At size_t SubTypeSize() const;
* @return pointer to nth sub-At
*/ /**
Type SubTypeAt( size_t nth ) const; * SubTypeByName will return the Type representing the sub type
* @param string of the unscoped sub type to look for
/** * @return Type representation of the sub type
* TypeSize will returnt he number of sub-types */
* @return number of sub-types Type SubTypeByName(const std::string& nam) const;
*/
size_t SubTypeSize() const; Type_Iterator SubType_Begin() const;
Type_Iterator SubType_End() const;
/** Reverse_Type_Iterator SubType_RBegin() const;
* SubTypeByName will return the Type representing the sub type Reverse_Type_Iterator SubType_REnd() const;
* @param string of the unscoped sub type to look for
* @return Type representation of the sub type /**
*/ * SubTypeTemplateAt will return the nth At template of this At
Type SubTypeByName( const std::string & nam ) const; * @param nth sub type template
* @return nth sub type template
Type_Iterator SubType_Begin() const; */
Type_Iterator SubType_End() const; TypeTemplate SubTypeTemplateAt(size_t nth) const;
Reverse_Type_Iterator SubType_RBegin() const;
Reverse_Type_Iterator SubType_REnd() const; /**
* SubTypeTemplateSize will return the number of At templates in this so
/** cpe
* SubTypeTemplateAt will return the nth At template of this At * @return number of defined sub type templates
* @param nth sub type template */
* @return nth sub type template size_t SubTypeTemplateSize() const;
*/
TypeTemplate SubTypeTemplateAt( size_t nth ) const; /**
* SubTypeTemplateByName will return a type template defined in this sco
/** pe looked up by
* SubTypeTemplateSize will return the number of At templates in this * it's unscoped name
socpe * @param unscoped name of the type template to look for
* @return number of defined sub type templates * @return TypeTemplate representation of the sub type template
*/ */
size_t SubTypeTemplateSize() const; TypeTemplate SubTypeTemplateByName(const std::string& nam) const;
/** TypeTemplate_Iterator SubTypeTemplate_Begin() const;
* SubTypeTemplateByName will return a type template defined in this s TypeTemplate_Iterator SubTypeTemplate_End() const;
cope looked up by Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const;
* it's unscoped name Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const;
* @param unscoped name of the type template to look for
* @return TypeTemplate representation of the sub type template /**
*/ * UsingDirectiveAt will return the nth using directive
TypeTemplate SubTypeTemplateByName( const std::string & nam ) const; * @param nth using directive
* @return nth using directive
TypeTemplate_Iterator SubTypeTemplate_Begin() const; */
TypeTemplate_Iterator SubTypeTemplate_End() const; Scope UsingDirectiveAt(size_t nth) const;
Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const;
Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const; /**
* UsingDirectiveSize will return the number of using directives of this
/** scope
* UsingDirectiveAt will return the nth using directive * @return number of using directives declared in this scope
* @param nth using directive */
* @return nth using directive size_t UsingDirectiveSize() const;
*/
Scope UsingDirectiveAt( size_t nth ) const; Scope_Iterator UsingDirective_Begin() const;
Scope_Iterator UsingDirective_End() const;
/** Reverse_Scope_Iterator UsingDirective_RBegin() const;
* UsingDirectiveSize will return the number of using directives of th Reverse_Scope_Iterator UsingDirective_REnd() const;
is scope
* @return number of using directives declared in this scope protected:
*/ /** protected constructor for initialisation of the global namespace */
size_t UsingDirectiveSize() const; ScopeBase();
Scope_Iterator UsingDirective_Begin() const; public:
Scope_Iterator UsingDirective_End() const; /**
Reverse_Scope_Iterator UsingDirective_RBegin() const; * AddBase will add information about a Base class
Reverse_Scope_Iterator UsingDirective_REnd() const; * @param base type of the base class
* @param offsFP pointer to a function stub for calculating the base cla
protected: ss offset
* @param modifiers the modifiers of the base class
/** protected constructor for initialisation of the global namespace */
*/ virtual void AddBase(const Type& bas,
ScopeBase(); OffsetFunction offsFP,
unsigned int modifiers = 0) const;
public:
/**
/** * AddBase will add the information about a Base class
* AddBase will add information about a Base class * @param b pointer to the base class
* @param base type of the base class */
* @param offsFP pointer to a function stub for calculating the base c virtual void AddBase(const Base& b) const;
lass offset
* @param modifiers the modifiers of the base class /**
*/ * AddDataMember will add the information about a data MemberAt
virtual void AddBase(const Type& bas, OffsetFunction offsFP, unsigned * @param dm pointer to data MemberAt
int modifiers = 0) const; */
virtual void AddDataMember(const Member& dm) const;
/** virtual Member AddDataMember(const char* name,
* AddBase will add the information about a Base class const Type& type,
* @param b pointer to the base class size_t offset,
*/ unsigned int modifiers = 0,
virtual void AddBase(const Base& b) const; char* interpreterOffset = 0) const;
/** /**
* AddDataMember will add the information about a data MemberAt * AddFunctionMember will add the information about a function MemberAt
* @param dm pointer to data MemberAt * @param fm pointer to function MemberAt
*/ */
virtual void AddDataMember(const Member& dm) const; virtual void AddFunctionMember(const Member& fm) const;
virtual Member AddDataMember(const char * name, virtual Member AddFunctionMember(const char* name,
const Type & type, const Type& type,
size_t offset, StubFunction stubFP,
unsigned int modifiers = 0, void* stubCtx = 0,
char * interpreterOffset = 0 ) const; const char* params = 0,
unsigned int modifiers = 0) const;
/**
* AddFunctionMember will add the information about a function MemberA virtual void AddMemberTemplate(const MemberTemplate& mt) const;
t
* @param fm pointer to function MemberAt /**
*/ * AddSubScope will add a sub-At to this one
virtual void AddFunctionMember( const Member & fm ) const; * @param sc pointer to Scope
virtual Member AddFunctionMember( const char * name, */
const Type & type, virtual void AddSubScope(const Scope& sc) const;
StubFunction stubFP, virtual void AddSubScope(const char* scope,
void * stubCtx = 0, TYPE scopeType) const;
const char * params = 0,
unsigned int modifiers = 0 ) const; /**
* AddSubType will add a sub-At to this At
virtual void AddMemberTemplate( const MemberTemplate & mt ) const ; * @param sc pointer to Type
*/
/** virtual void AddSubType(const Type& ty) const;
* AddSubScope will add a sub-At to this one virtual void AddSubType(const char* type,
* @param sc pointer to Scope size_t size,
*/ TYPE typeType,
virtual void AddSubScope( const Scope & sc ) const; const std::type_info& ti,
virtual void AddSubScope( const char * scope, unsigned int modifiers = 0) const;
TYPE scopeType ) const;
void AddSubTypeTemplate(const TypeTemplate& tt) const;
/**
* AddSubType will add a sub-At to this At void AddUsingDirective(const Scope& ud) const;
* @param sc pointer to Type
*/ /**
virtual void AddSubType( const Type & ty ) const; * RemoveDataMember will remove the information about a data MemberAt
virtual void AddSubType( const char * type, * @param dm pointer to data MemberAt
size_t size, */
TYPE typeType, virtual void RemoveDataMember(const Member& dm) const;
const std::type_info & ti,
unsigned int modifiers = 0 ) const; /**
* RemoveFunctionMember will remove the information about a function Mem
void AddSubTypeTemplate( const TypeTemplate & tt ) const; berAt
* @param fm pointer to function MemberAt
void AddUsingDirective( const Scope & ud ) const; */
virtual void RemoveFunctionMember(const Member& fm) const;
/**
* RemoveDataMember will remove the information about a data MemberAt virtual void RemoveMemberTemplate(const MemberTemplate& mt) const;
* @param dm pointer to data MemberAt
*/ /**
virtual void RemoveDataMember( const Member & dm ) const; * RemoveSubScope will remove a sub-At to this one
* @param sc pointer to Scope
/** */
* RemoveFunctionMember will remove the information about a function M virtual void RemoveSubScope(const Scope& sc) const;
emberAt
* @param fm pointer to function MemberAt /**
*/ * RemoveSubType will remove a sub-At to this At
virtual void RemoveFunctionMember( const Member & fm ) const; * @param sc pointer to Type
*/
virtual void RemoveMemberTemplate( const MemberTemplate & mt ) const; virtual void RemoveSubType(const Type& ty) const;
/** virtual void RemoveSubTypeTemplate(const TypeTemplate& tt) const;
* RemoveSubScope will remove a sub-At to this one
* @param sc pointer to Scope void RemoveUsingDirective(const Scope& ud) const;
*/
virtual void RemoveSubScope( const Scope & sc ) const; /**
* Hide this scope from any lookup by appending the string " @HIDDEN@" t
/** o its name.
* RemoveSubType will remove a sub-At to this At */
* @param sc pointer to Type virtual void HideName() const;
*/
virtual void RemoveSubType( const Type & ty ) const; /**
* Un-Hide this scope from any lookup by removing the string " @HIDDEN@"
virtual void RemoveSubTypeTemplate( const TypeTemplate & tt ) const; to its name.
*/
void RemoveUsingDirective( const Scope & ud ) const; virtual void UnhideName() const;
/** /** Initialize the vector of inherited members.
* Hide this scope from any lookup by appending the string " @HIDDEN@ Returns false if one of the bases is not complete. */
" to its name. virtual bool UpdateMembers() const;
*/
virtual void HideName() const; void RegisterOnDemandBuilder(OnDemandBuilder* builder,
EBuilderKind kind);
/**
* Un-Hide this scope from any lookup by removing the string " @HIDDE protected:
N@" to its name. /** The MemberByName work-horse: find a member called name in members,
*/ if signature also compare its signature, and if matchReturnType
virtual void UnhideName() const; also compare the signature's return types. */
Member MemberByName2(const std::vector<Member>& members,
/** Initialize the vector of inherited members. const std::string& name,
Returns false if one of the bases is not complete. */ const Type* signature = 0,
virtual bool UpdateMembers() const; unsigned int modifiers_mask = 0,
bool matchReturnType = true) const;
protected:
void ExecuteFunctionMemberDelayLoad() const {
/** The MemberByName work-horse: find a member called name in members if (!fOnDemandBuilder[kBuildFunctionMembers].Empty())
, fOnDemandBuilder[kBuildFunctionMembers].BuildAll();
if signature also compare its signature, and if matchReturnType }
also compare the signature's return types. */
Member MemberByName2( const std::vector<Member>& members, void ExecuteDataMemberDelayLoad() const {
const std::string & name, if (!fOnDemandBuilder[kBuildDataMembers].Empty())
const Type * signature = 0, fOnDemandBuilder[kBuildDataMembers].BuildAll();
unsigned int modifiers_mask = 0, }
bool matchReturnType = true) const;
private:
private: /* no copying */
ScopeBase(const ScopeBase &);
/* no copying */
ScopeBase( const ScopeBase & ); /* no assignment */
ScopeBase& operator =(const ScopeBase&);
/* no assignment */
ScopeBase & operator = ( const ScopeBase & ); protected:
/** container for all members of the Scope */
protected: typedef std::vector<Member> Members;
typedef std::vector<OwnedMember> OMembers;
/** container for all members of the Scope */
typedef std::vector < Member > Members; /**
typedef std::vector < OwnedMember > OMembers; * pointers to members
* @label scope members
/** * @link aggregationByValue
* pointers to members * @supplierCardinality 0..*
* @label scope members * @clientCardinality 1
* @link aggregationByValue */
* @supplierCardinality 0..* mutable
* @clientCardinality 1 std::vector<OwnedMember> fMembers;
*/
mutable /**
std::vector< OwnedMember > fMembers; * container with pointers to all data members in this scope
* @label scope datamembers
/** * @link aggregation
* container with pointers to all data members in this scope * @clientCardinality 1
* @label scope datamembers * @supplierCardinality 0..*
* @link aggregation */
* @clientCardinality 1 mutable
* @supplierCardinality 0..* std::vector<Member> fDataMembers;
*/
mutable /**
std::vector< Member > fDataMembers; * container with pointers to all function members in this scope
* @label scope functionmembers
/** * @link aggregation
* container with pointers to all function members in this scope * @supplierCardinality 0..*
* @label scope functionmembers * @clientCardinality 1
* @link aggregation */
* @supplierCardinality 0..* mutable
* @clientCardinality 1 std::vector<Member> fFunctionMembers;
*/
mutable private:
std::vector< Member > fFunctionMembers; /**
* pointer to the Scope Name
private: * @label scope name
* @link aggregation
/** * @clientCardinality 1
* pointer to the Scope Name * @supplierCardinality 1
* @label scope name */
* @link aggregation ScopeName* fScopeName;
* @clientCardinality 1
* @supplierCardinality 1 /**
*/ * Type of the scope
ScopeName * fScopeName; * @link aggregation
* @label scope type
/** * @clientCardinality 1
* Type of the scope * @supplierCardinality 1
* @link aggregation */
* @label scope type TYPE fScopeType;
* @clientCardinality 1
* @supplierCardinality 1 /**
*/ * pointer to declaring Scope
TYPE fScopeType; * @label declaring scope
* @link aggregation
/** * @clientCardinality 1
* pointer to declaring Scope * @supplierCardinality 1
* @label declaring scope */
* @link aggregation Scope fDeclaringScope;
* @clientCardinality 1
* @supplierCardinality 1 /**
*/ * pointers to sub-scopes
Scope fDeclaringScope; * @label sub scopes
* @link aggregation
/** * @supplierCardinality 0..*
* pointers to sub-scopes * @clientCardinality 1
* @label sub scopes */
* @link aggregation mutable
* @supplierCardinality 0..* std::vector<Scope> fSubScopes;
* @clientCardinality 1
*/ /**
mutable * pointer to types
std::vector< Scope > fSubScopes; * @label sub types
* @link aggregation
/** * @supplierCardinality 0..*
* pointer to types * @clientCardinality 1
* @label sub types */
* @link aggregation mutable
* @supplierCardinality 0..* std::vector<Type> fSubTypes;
* @clientCardinality 1
*/ /**
mutable * container for type templates defined in this scope
std::vector < Type > fSubTypes; * @label type templates
* @link aggregation
/** * @supplierCardinality 0..*
* container for type templates defined in this scope * @clientCardinality 1
* @label type templates */
* @link aggregation mutable
* @supplierCardinality 0..* std::vector<TypeTemplate> fTypeTemplates;
* @clientCardinality 1
*/ /**
mutable * container for member templates defined in this scope
std::vector < TypeTemplate > fTypeTemplates; * @label member templates
* @link aggregation
/** * @supplierCardinality 0..*
* container for member templates defined in this scope * @clientCardinality 1
* @label member templates */
* @link aggregation mutable
* @supplierCardinality 0..* std::vector<OwnedMemberTemplate> fMemberTemplates;
* @clientCardinality 1
*/ /**
mutable * container for using directives of this scope
std::vector < OwnedMemberTemplate > fMemberTemplates; * @label using directives
* @linkScope aggregation
/** * @supplierCardinality 0..*
* container for using directives of this scope * @clientCardinality 1
* @label using directives */
* @linkScope aggregation mutable
* @supplierCardinality 0..* std::vector<Scope> fUsingDirectives;
* @clientCardinality 1
*/ /**
mutable * The position where the unscoped Name starts in the scopename
std::vector < Scope > fUsingDirectives; */
size_t fBasePosition;
/**
* The position where the unscoped Name starts in the scopename /**
*/ * Containers for on-demand builders of function and data members.
size_t fBasePosition; */
mutable
BuilderContainer fOnDemandBuilder[kNumBuilderKinds];
}; // class ScopeBase }; // class ScopeBase
} //namespace Reflex } //namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::ScopeBase::BaseSize() const { inline size_t
Reflex::ScopeBase::BaseSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base_Iterator Reflex::ScopeBase::Base_Begin() const { inline Reflex::Base_Iterator
Reflex::ScopeBase::Base_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::BaseCont().begin(); return Dummy::BaseCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Base_Iterator Reflex::ScopeBase::Base_End() const { inline Reflex::Base_Iterator
Reflex::ScopeBase::Base_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::BaseCont().end(); return Dummy::BaseCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Base_Iterator Reflex::ScopeBase::Base_RBegin() const inline Reflex::Reverse_Base_Iterator
{ Reflex::ScopeBase::Base_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::BaseCont().rbegin(); return Dummy::BaseCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Base_Iterator Reflex::ScopeBase::Base_REnd() const { inline Reflex::Reverse_Base_Iterator
Reflex::ScopeBase::Base_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::BaseCont().rend(); return Dummy::BaseCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::ScopeBase::DeclaringScope() const { inline Reflex::Scope
Reflex::ScopeBase::DeclaringScope() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fDeclaringScope; return fDeclaringScope;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::ScopeBase::DataMember_Begin(EMEMBERQ inline Reflex::Member_Iterator
UERY) const { Reflex::ScopeBase::DataMember_Begin(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
ExecuteDataMemberDelayLoad();
return fDataMembers.begin(); return fDataMembers.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::ScopeBase::DataMember_End(EMEMBERQUE inline Reflex::Member_Iterator
RY) const { Reflex::ScopeBase::DataMember_End(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
ExecuteDataMemberDelayLoad();
return fDataMembers.end(); return fDataMembers.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::DataMember_RBegin inline Reflex::Reverse_Member_Iterator
(EMEMBERQUERY) const { Reflex::ScopeBase::DataMember_RBegin(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Member>&)fDataMembers).rbegin(); ExecuteDataMemberDelayLoad();
return ((const std::vector<Member> &)fDataMembers).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::DataMember_REnd(E inline Reflex::Reverse_Member_Iterator
MEMBERQUERY) const { Reflex::ScopeBase::DataMember_REnd(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Member>&)fDataMembers).rend(); ExecuteDataMemberDelayLoad();
return ((const std::vector<Member> &)fDataMembers).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::ScopeBase::FunctionMember_Begin(EMEM inline Reflex::Member_Iterator
BERQUERY) const { Reflex::ScopeBase::FunctionMember_Begin(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
ExecuteFunctionMemberDelayLoad();
return fFunctionMembers.begin(); return fFunctionMembers.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Member_Iterator Reflex::ScopeBase::FunctionMember_End(EMEMBE inline Reflex::Member_Iterator
RQUERY) const { Reflex::ScopeBase::FunctionMember_End(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
ExecuteFunctionMemberDelayLoad();
return fFunctionMembers.end(); return fFunctionMembers.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::FunctionMember_RB inline Reflex::Reverse_Member_Iterator
egin(EMEMBERQUERY) const { Reflex::ScopeBase::FunctionMember_RBegin(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Member>&)fFunctionMembers).rbegin(); ExecuteFunctionMemberDelayLoad();
return ((const std::vector<Member> &)fFunctionMembers).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Member_Iterator Reflex::ScopeBase::FunctionMember_RE inline Reflex::Reverse_Member_Iterator
nd(EMEMBERQUERY) const { Reflex::ScopeBase::FunctionMember_REnd(EMEMBERQUERY) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Member>&)fFunctionMembers).rend(); ExecuteFunctionMemberDelayLoad();
return ((const std::vector<Member> &)fFunctionMembers).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::ScopeBase::GetBasePosition() const { inline size_t
Reflex::ScopeBase::GetBasePosition() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fBasePosition; return fBasePosition;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_Begin() const { inline Reflex::Scope_Iterator
Reflex::ScopeBase::SubScope_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubScopes.begin(); return fSubScopes.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::ScopeBase::SubScope_End() const { inline Reflex::Scope_Iterator
Reflex::ScopeBase::SubScope_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubScopes.end(); return fSubScopes.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::ScopeBase::SubScope_RBegin() inline Reflex::Reverse_Scope_Iterator
const { Reflex::ScopeBase::SubScope_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Scope>&)fSubScopes).rbegin(); return ((const std::vector<Scope> &)fSubScopes).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::ScopeBase::SubScope_REnd() co inline Reflex::Reverse_Scope_Iterator
nst { Reflex::ScopeBase::SubScope_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Scope>&)fSubScopes).rend(); return ((const std::vector<Scope> &)fSubScopes).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::ScopeBase::SubType_Begin() const { inline Reflex::Type_Iterator
Reflex::ScopeBase::SubType_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubTypes.begin(); return fSubTypes.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::ScopeBase::SubType_End() const { inline Reflex::Type_Iterator
Reflex::ScopeBase::SubType_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubTypes.end(); return fSubTypes.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::ScopeBase::SubType_RBegin() co inline Reflex::Reverse_Type_Iterator
nst { Reflex::ScopeBase::SubType_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Type>&)fSubTypes).rbegin(); return ((const std::vector<Type> &)fSubTypes).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::ScopeBase::SubType_REnd() cons inline Reflex::Reverse_Type_Iterator
t { Reflex::ScopeBase::SubType_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Type>&)fSubTypes).rend(); return ((const std::vector<Type> &)fSubTypes).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate_Iterator Reflex::ScopeBase::SubTypeTemplate_Beg inline Reflex::TypeTemplate_Iterator
in() const { Reflex::ScopeBase::SubTypeTemplate_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fTypeTemplates.begin(); return fTypeTemplates.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate_Iterator Reflex::ScopeBase::SubTypeTemplate_End inline Reflex::TypeTemplate_Iterator
() const { Reflex::ScopeBase::SubTypeTemplate_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fTypeTemplates.end(); return fTypeTemplates.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_TypeTemplate_Iterator Reflex::ScopeBase::SubTypeTemp inline Reflex::Reverse_TypeTemplate_Iterator
late_RBegin() const { Reflex::ScopeBase::SubTypeTemplate_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<TypeTemplate>&)fTypeTemplates).rbegin(); return ((const std::vector<TypeTemplate> &)fTypeTemplates).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_TypeTemplate_Iterator Reflex::ScopeBase::SubTypeTemp inline Reflex::Reverse_TypeTemplate_Iterator
late_REnd() const { Reflex::ScopeBase::SubTypeTemplate_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<TypeTemplate>&)fTypeTemplates).rend(); return ((const std::vector<TypeTemplate> &)fTypeTemplates).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline inline
bool bool
Reflex::ScopeBase::HasBase( const Type &) const { Reflex::ScopeBase::HasBase(const Type&) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::ScopeBase::UpdateMembers() const { inline bool
Reflex::ScopeBase::UpdateMembers() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
// Initialize the vector of inherited members. // Initialize the vector of inherited members.
// Return false if one of the bases is not complete. // Return false if one of the bases is not complete.
return true; return true;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::ScopeBase::IsClass() const { inline bool
Reflex::ScopeBase::IsClass() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeType == CLASS || return fScopeType == CLASS ||
fScopeType == TYPETEMPLATEINSTANCE || fScopeType == TYPETEMPLATEINSTANCE ||
fScopeType == STRUCT ); fScopeType == STRUCT;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::ScopeBase::IsEnum() const { inline bool
Reflex::ScopeBase::IsEnum() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeType == ENUM ); return fScopeType == ENUM;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::ScopeBase::IsNamespace() const { inline bool
Reflex::ScopeBase::IsNamespace() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeType == NAMESPACE ); return fScopeType == NAMESPACE;
} }
inline bool ROOT::Reflex::ScopeBase::IsTemplateInstance() const { inline bool
ROOT::Reflex::ScopeBase::IsTemplateInstance() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeType == TYPETEMPLATEINSTANCE ); return fScopeType == TYPETEMPLATEINSTANCE;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::ScopeBase::IsUnion() const { inline bool
Reflex::ScopeBase::IsUnion() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fScopeType == UNION ); return fScopeType == UNION;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TYPE Reflex::ScopeBase::ScopeType() const { inline Reflex::TYPE
Reflex::ScopeBase::ScopeType() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fScopeType; return fScopeType;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::ScopeBase::SubScopeAt( size_t nth ) const { inline Reflex::Scope
Reflex::ScopeBase::SubScopeAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fSubScopes.size() ) { return fSubScopes[ nth ]; } if (nth < fSubScopes.size()) {
return fSubScopes[nth];
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::ScopeBase::SubScopeSize() const { inline size_t
Reflex::ScopeBase::SubScopeSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSubScopes.size(); return fSubScopes.size();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope Reflex::ScopeBase::UsingDirectiveAt( size_t nth ) cons inline Reflex::Scope
t { Reflex::ScopeBase::UsingDirectiveAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fUsingDirectives.size() ) { return fUsingDirectives[ nth ]; } if (nth < fUsingDirectives.size()) {
return fUsingDirectives[nth];
}
return Dummy::Scope(); return Dummy::Scope();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::ScopeBase::UsingDirectiveSize() const { inline size_t
Reflex::ScopeBase::UsingDirectiveSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fUsingDirectives.size(); return fUsingDirectives.size();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::ScopeBase::UsingDirective_Begin() con inline Reflex::Scope_Iterator
st { Reflex::ScopeBase::UsingDirective_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fUsingDirectives.begin(); return fUsingDirectives.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Scope_Iterator Reflex::ScopeBase::UsingDirective_End() const inline Reflex::Scope_Iterator
{ Reflex::ScopeBase::UsingDirective_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fUsingDirectives.end(); return fUsingDirectives.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::ScopeBase::UsingDirective_RBe inline Reflex::Reverse_Scope_Iterator
gin() const { Reflex::ScopeBase::UsingDirective_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Scope>&)fUsingDirectives).rbegin(); return ((const std::vector<Scope> &)fUsingDirectives).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Scope_Iterator Reflex::ScopeBase::UsingDirective_REn inline Reflex::Reverse_Scope_Iterator
d() const { Reflex::ScopeBase::UsingDirective_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<Scope>&)fUsingDirectives).rend(); return ((const std::vector<Scope> &)fUsingDirectives).rend();
} }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) # pragma warning( pop )
#endif #endif
#endif // Reflex_ScopeBase #endif // Reflex_ScopeBase
 End of changes. 76 change blocks. 
813 lines changed or deleted 867 lines changed or added


 ScopeName.h   ScopeName.h 
// @(#)root/reflex:$Id: ScopeName.h 27197 2009-01-21 07:45:07Z pcanal $ // @(#)root/reflex:$Id: ScopeName.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ScopeName #ifndef Reflex_ScopeName
#define Reflex_ScopeName #define Reflex_ScopeName
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include <string> #include <string>
namespace Reflex { namespace Reflex {
// forward declarations
class ScopeBase;
class Scope;
/**
* @class ScopeName ScopeName.h Reflex/ScopeName.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API ScopeName {
friend class Scope;
friend class ScopeBase;
public:
/** constructor */
ScopeName(const char* name,
ScopeBase * scopeBase);
// forward declarations /**
class ScopeBase; * ByName will return a pointer to a At which is given as an argument
class Scope; * or 0 if none is found
* @param Name fully qualified Name of At
/** * @return pointer to At or 0 if none is found
* @class ScopeName ScopeName.h Reflex/ScopeName.h */
* @author Stefan Roiser static Scope ByName(const std::string& name);
* @date 24/11/2003
* @ingroup Ref static void CleanUp();
*/
class RFLX_API ScopeName { /**
* DeleteScope will call the destructor of the ScopeBase this ScopeName
friend class Scope; is
friend class ScopeBase; * pointing to and aremove it's information from the data structures. Th
e
public: * ScopeName information will remain.
*/
/** constructor */ void DeleteScope() const;
ScopeName( const char * name,
ScopeBase * scopeBase ); /**
* Hide this scope from any lookup by appending the string " @HIDDEN@" t
/** o its name.
* ByName will return a pointer to a At which is given as an argument */
* or 0 if none is found void HideName();
* @param Name fully qualified Name of At
* @return pointer to At or 0 if none is found /**
*/ * Un-Hide this scope from any lookup by removing the string " @HIDDEN@"
static Scope ByName( const std::string & name ); to its name.
*/
static void CleanUp(); void UnhideName();
/** /**
* DeleteScope will call the destructor of the ScopeBase this ScopeNam * Name will return a string representation of Name of the Scope
e is * @return string representation of the Scope
* pointing to and aremove it's information from the data structures. */
The const std::string& Name() const;
* ScopeName information will remain.
*/ /**
void DeleteScope() const; * Name_c_str returns a char* pointer to the qualified Scope Name
* @return c string to unqualified Scope Name
/** */
* Hide this scope from any lookup by appending the string " @HIDDEN@ const char* Name_c_str() const;
" to its name.
*/ /**
void HideName(); * ThisScope will return the unqualified Scope object of this ScopeName
* @return corresponding Scope
/** */
* Un-Hide this scope from any lookup by removing the string " @HIDDE Scope ThisScope() const;
N@" to its name.
*/ /**
void UnhideName(); * ScopeAt will return the nth defined scope
* @param nth scope defined in the system
/** * @return nth scope defined in the system
* Name will return a string representation of Name of the Scope */
* @return string representation of the Scope static Scope ScopeAt(size_t nth);
*/
const std::string & Name() const; /**
* ScopeSize will return the number of currently defined scopes
/** * (resolved and unresolved ones)
* Name_c_str returns a char* pointer to the qualified Scope Name * @return number of currently defined scopes
* @return c string to unqualified Scope Name */
*/ static size_t ScopeSize();
const char * Name_c_str() const;
static Scope_Iterator Scope_Begin();
/** static Scope_Iterator Scope_End();
* ThisScope will return the unqualified Scope object of this ScopeNam static Reverse_Scope_Iterator Scope_RBegin();
e static Reverse_Scope_Iterator Scope_REnd();
* @return corresponding Scope
*/ private:
Scope ThisScope() const; /** destructor */
~ScopeName();
/**
* ScopeAt will return the nth defined scope private:
* @param nth scope defined in the system /** pointer to the Name of the At in the static map */
* @return nth scope defined in the system std::string fName;
*/
static Scope ScopeAt( size_t nth ); /**
* pointer to the resolved Scope
/** * @label scope base
* ScopeSize will return the number of currently defined scopes * @link aggregation
* (resolved and unresolved ones) * @supplierCardinality 0..1
* @return number of currently defined scopes * @clientCardinality 1
*/ */
static size_t ScopeSize(); mutable
ScopeBase * fScopeBase;
static Scope_Iterator Scope_Begin();
static Scope_Iterator Scope_End(); /**
static Reverse_Scope_Iterator Scope_RBegin(); * This scope
static Reverse_Scope_Iterator Scope_REnd(); */
Scope* fThisScope;
private:
/** destructor */
~ScopeName();
private:
/** pointer to the Name of the At in the static map */
std::string fName;
/**
* pointer to the resolved Scope
* @label scope base
* @link aggregation
* @supplierCardinality 0..1
* @clientCardinality 1
*/
mutable
ScopeBase * fScopeBase;
/**
* This scope
*/
Scope * fThisScope;
}; // class ScopeName }; // class ScopeName
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const std::string & Reflex::ScopeName::Name() const { inline const std::string&
Reflex::ScopeName::Name() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName; return fName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::ScopeName::Name_c_str() const { inline const char*
Reflex::ScopeName::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName.c_str(); return fName.c_str();
} }
#endif //Reflex_ScopeName #endif //Reflex_ScopeName
 End of changes. 6 change blocks. 
118 lines changed or deleted 114 lines changed or added


 SharedLibrary.h   SharedLibrary.h 
// @(#)root/reflex:$Id: SharedLibrary.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: SharedLibrary.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2006 // Author: Stefan Roiser 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_SharedLibrary #ifndef Reflex_SharedLibrary
#define Reflex_SharedLibrary #define Reflex_SharedLibrary
// Include files // Include files
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> # include <windows.h>
#else #else
#include <dlfcn.h> # include <dlfcn.h>
#include <errno.h> # include <errno.h>
#endif #endif
namespace Reflex { namespace Reflex {
/**
* @class SharedLibrary SharedLibrary.h Reflex/SharedLibrary.h
* @author Stefan Roiser
* @date 24/11/2006
* @ingroup Ref
* Parts of this implementation are copyied from SEAL (http://cern.ch/seal)
*/
class SharedLibrary {
public:
SharedLibrary(const std::string& libname);
/** bool Load();
* @class SharedLibrary SharedLibrary.h Reflex/SharedLibrary.h
* @author Stefan Roiser
* @date 24/11/2006
* @ingroup Ref
* Parts of this implementation are copyied from SEAL (http://cern.ch/sea
l)
*/
class SharedLibrary {
public: bool Unload();
SharedLibrary( const std::string & libname ); bool Symbol(const std::string& symname,
void*& sym);
bool Load(); const std::string Error();
bool Unload(); private:
/** a handle to the loaded library */
bool Symbol( const std::string & symname, void * & sym );
const std::string Error();
private:
/** a handle to the loaded library */
#ifdef _WIN32 #ifdef _WIN32
HMODULE fHandle; HMODULE fHandle;
#else #else
void* fHandle; void* fHandle;
#endif #endif
/** the name of the shared library to handle */ /** the name of the shared library to handle */
std::string fLibName; std::string fLibName;
}; };
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::SharedLibrary::SharedLibrary( const std::string & libname ) : inline Reflex::SharedLibrary::SharedLibrary(const std::string& libname):
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fHandle(0), fLibName(libname) {} fHandle(0),
fLibName(libname) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const std::string Reflex::SharedLibrary::Error() { inline const std::string
Reflex::SharedLibrary::Error() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
std::string errString = ""; std::string errString = "";
#ifdef _WIN32 #ifdef _WIN32
int error = ::GetLastError(); int error = ::GetLastError();
LPVOID lpMessageBuffer; LPVOID lpMessageBuffer;
::FormatMessage( ::FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, NULL,
error, error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default language MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //The user default languag
(LPTSTR) &lpMessageBuffer, e
0, (LPTSTR) &lpMessageBuffer,
NULL ); 0,
errString = (const char*)lpMessageBuffer; NULL);
// Free the buffer allocated by the system errString = (const char*) lpMessageBuffer;
::LocalFree( lpMessageBuffer ); // Free the buffer allocated by the system
::LocalFree(lpMessageBuffer);
#else #else
errString = std::string(dlerror()); errString = std::string(dlerror());
#endif #endif
return errString; return errString;
} } // Error
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::SharedLibrary::Load() { inline bool
Reflex::SharedLibrary::Load() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
#ifdef _WIN32 #ifdef _WIN32
::SetErrorMode(0); ::SetErrorMode(0);
fHandle = ::LoadLibrary(fLibName.c_str()); fHandle = ::LoadLibrary(fLibName.c_str());
#else #else
fHandle = ::dlopen(fLibName.c_str(), RTLD_LAZY | RTLD_GLOBAL ); fHandle = ::dlopen(fLibName.c_str(), RTLD_LAZY | RTLD_GLOBAL);
#endif #endif
if ( ! fHandle ) return false; if (!fHandle) {
else return true; return false;
} else { return true; }
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::SharedLibrary::Symbol( const std::string & symname, inline bool
void * & sym ) { Reflex::SharedLibrary::Symbol(const std::string& symname,
void*& sym) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( fHandle ) { if (fHandle) {
#ifdef _WIN32 #ifdef _WIN32
sym = GetProcAddress(fHandle, symname.c_str()); sym = GetProcAddress(fHandle, symname.c_str());
#else #else
sym = dlsym(fHandle, symname.c_str()); sym = dlsym(fHandle, symname.c_str());
#endif #endif
if ( sym ) return true;
if (sym) {
return true;
}
} }
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::SharedLibrary::Unload() { inline bool
Reflex::SharedLibrary::Unload() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
#ifdef _WIN32 #ifdef _WIN32
if ( FreeLibrary(fHandle) == 0 ) return false;
if (FreeLibrary(fHandle) == 0) {
return false;
}
#else #else
if ( dlclose(fHandle) == -1 ) return false;
if (dlclose(fHandle) == -1) {
return false;
}
#endif #endif
else return true; else { return true; }
} }
#endif // Reflex_SharedLibrary #endif // Reflex_SharedLibrary
 End of changes. 29 change blocks. 
62 lines changed or deleted 75 lines changed or added


 SimpleInterval.h   SimpleInterval.h 
// @(#)root/roostats:$Id: SimpleInterval.h 26324 2008-11-20 17:17:32Z monet a $ // @(#)root/roostats:$Id: SimpleInterval.h 30512 2009-09-28 17:24:48Z monet a $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef RooStats_SimpleInterval #ifndef RooStats_SimpleInterval
skipping to change at line 23 skipping to change at line 23
#ifndef ROO_ARG_SET #ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif #endif
#ifndef RooStats_ConfInterval #ifndef RooStats_ConfInterval
#include "RooStats/ConfInterval.h" #include "RooStats/ConfInterval.h"
#endif #endif
namespace RooStats { namespace RooStats {
class SimpleInterval : public ConfInterval { class SimpleInterval : public ConfInterval {
private: protected:
RooArgSet* fParameters; // parameter of interest RooArgSet* fParameters; // parameter of interest
Double_t fLowerLimit; // lower limit Double_t fLowerLimit; // lower limit
Double_t fUpperLimit; // upper limit Double_t fUpperLimit; // upper limit
Double_t fConfidenceLevel; // confidence level Double_t fConfidenceLevel; // confidence level
public: public:
// constructors,destructors // constructors,destructors
SimpleInterval(); SimpleInterval();
SimpleInterval(const char* name); SimpleInterval(const char* name);
SimpleInterval(const char* name, const char* title); SimpleInterval(const char* name, const char* title);
SimpleInterval(const char* name, RooAbsArg*, Double_t, Double_t); SimpleInterval(const char* name, RooAbsArg* var, Double_t, Double_t);
SimpleInterval(const char* name, const char* title, RooAbsArg*, Double_ SimpleInterval(const char* name, const char* title, RooAbsArg* var, Dou
t, Double_t); ble_t, Double_t);
virtual ~SimpleInterval(); virtual ~SimpleInterval();
virtual Bool_t IsInInterval(RooArgSet&); virtual Bool_t IsInInterval(const RooArgSet&);
virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;}
virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
// Method to return lower limit // Method to return lower limit
Double_t LowerLimit() {return fLowerLimit;} virtual Double_t LowerLimit() {return fLowerLimit;}
// Method to return upper limit // Method to return upper limit
Double_t UpperLimit() {return fUpperLimit;} virtual Double_t UpperLimit() {return fUpperLimit;}
// do we want it to return list of parameters // do we want it to return list of parameters
virtual RooArgSet* GetParameters() const; virtual RooArgSet* GetParameters() const;
// check if parameters are correct. (dummy implementation to start) // check if parameters are correct. (dummy implementation to start)
Bool_t CheckParameters(RooArgSet&) const ; Bool_t CheckParameters(const RooArgSet&) const ;
protected: protected:
ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b] ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b]
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
9 lines changed or deleted 9 lines changed or added


 TBranch.h   TBranch.h 
// @(#)root/tree:$Id: TBranch.h 25980 2008-10-27 18:17:39Z pcanal $ // @(#)root/tree:$Id: TBranch.h 29934 2009-08-27 13:54:34Z brun $
// Author: Rene Brun 12/01/96 // Author: Rene Brun 12/01/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 76 skipping to change at line 76
Int_t fNleaves; //! Number of leaves Int_t fNleaves; //! Number of leaves
Int_t fReadBasket; //! Current basket number when reading Int_t fReadBasket; //! Current basket number when reading
Long64_t fReadEntry; //! Current entry number when reading Long64_t fReadEntry; //! Current entry number when reading
Long64_t fEntries; // Number of entries Long64_t fEntries; // Number of entries
Long64_t fFirstEntry; // Number of the first entry in this bran ch Long64_t fFirstEntry; // Number of the first entry in this bran ch
Long64_t fTotBytes; // Total number of bytes in all leaves be fore compression Long64_t fTotBytes; // Total number of bytes in all leaves be fore compression
Long64_t fZipBytes; // Total number of bytes in all leaves af ter compression Long64_t fZipBytes; // Total number of bytes in all leaves af ter compression
TObjArray fBranches; //-> List of Branches of this branch TObjArray fBranches; //-> List of Branches of this branch
TObjArray fLeaves; //-> List of leaves of this branch TObjArray fLeaves; //-> List of leaves of this branch
TObjArray fBaskets; //-> List of baskets of this branch TObjArray fBaskets; //-> List of baskets of this branch
Int_t fNBasketRAM; //! Number of baskets in fBasketRAM
Int_t *fBasketRAM; //! [fNBasketRAM] table of basket numbers
in memory
Int_t *fBasketBytes; //[fMaxBaskets] Lenght of baskets on file Int_t *fBasketBytes; //[fMaxBaskets] Lenght of baskets on file
Long64_t *fBasketEntry; //[fMaxBaskets] Table of first entry in ea ck basket Long64_t *fBasketEntry; //[fMaxBaskets] Table of first entry in ea ck basket
Long64_t *fBasketSeek; //[fMaxBaskets] Addresses of baskets on fi le Long64_t *fBasketSeek; //[fMaxBaskets] Addresses of baskets on fi le
TTree *fTree; //! Pointer to Tree header TTree *fTree; //! Pointer to Tree header
TBranch *fMother; //! Pointer to top-level parent branch in the tree. TBranch *fMother; //! Pointer to top-level parent branch in the tree.
TBranch *fParent; //! Pointer to parent branch. TBranch *fParent; //! Pointer to parent branch.
char *fAddress; //! Address of 1st leaf (variable or objec t) char *fAddress; //! Address of 1st leaf (variable or objec t)
TDirectory *fDirectory; //! Pointer to directory where this branch buffers are stored TDirectory *fDirectory; //! Pointer to directory where this branch buffers are stored
TString fFileName; // Name of file where buffers are stored ("" if in same file as Tree header) TString fFileName; // Name of file where buffers are stored ("" if in same file as Tree header)
TBuffer *fEntryBuffer; //! Buffer used to directly pass the conte nt without streaming TBuffer *fEntryBuffer; //! Buffer used to directly pass the conte nt without streaming
skipping to change at line 123 skipping to change at line 121
virtual void DropBaskets(Option_t *option = ""); virtual void DropBaskets(Option_t *option = "");
void ExpandBasketArrays(); void ExpandBasketArrays();
virtual Int_t Fill(); virtual Int_t Fill();
virtual void FillLeaves(TBuffer &b); virtual void FillLeaves(TBuffer &b);
virtual TBranch *FindBranch(const char *name); virtual TBranch *FindBranch(const char *name);
virtual TLeaf *FindLeaf(const char *name); virtual TLeaf *FindLeaf(const char *name);
Int_t FlushBaskets(); Int_t FlushBaskets();
Int_t FlushOneBasket(UInt_t which); Int_t FlushOneBasket(UInt_t which);
virtual char *GetAddress() const {return fAddress;} virtual char *GetAddress() const {return fAddress;}
TBasket *GetBasket(Int_t basket);
Int_t *GetBasketBytes() const {return fBasketBytes;}
Long64_t *GetBasketEntry() const {return fBasketEntry;}
virtual Long64_t GetBasketSeek(Int_t basket) const;
virtual Int_t GetBasketSize() const {return fBasketSize;} virtual Int_t GetBasketSize() const {return fBasketSize;}
virtual TList *GetBrowsables();
virtual const char* GetClassName() const { return ""; } virtual const char* GetClassName() const { return ""; }
virtual Int_t GetCompressionLevel() const {return fCompress;} virtual Int_t GetCompressionLevel() const {return fCompress;}
TDirectory *GetDirectory() const {return fDirectory;}
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0); virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesAr ray *list, Int_t n); virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesAr ray *list, Int_t n);
Int_t GetEntryOffsetLen() const { return fEntryOffsetLen; }
Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);} Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);}
Int_t GetEntryOffsetLen() const {return fEntryOffsetLen;}
const char *GetIconName() const; const char *GetIconName() const;
virtual TLeaf *GetLeaf(const char *name) const; virtual TLeaf *GetLeaf(const char *name) const;
TBasket *GetBasket(Int_t basket);
Int_t *GetBasketBytes() const {return fBasketBytes;}
Long64_t *GetBasketEntry() const {return fBasketEntry;}
virtual Long64_t GetBasketSeek(Int_t basket) const;
virtual TList *GetBrowsables();
TDirectory *GetDirectory() const {return fDirectory;}
virtual TFile *GetFile(Int_t mode=0); virtual TFile *GetFile(Int_t mode=0);
const char *GetFileName() const {return fFileName.Data();} const char *GetFileName() const {return fFileName.Data();}
Int_t GetOffset() const {return fOffset;} Int_t GetOffset() const {return fOffset;}
Int_t GetReadBasket() const {return fReadBasket;} Int_t GetReadBasket() const {return fReadBasket;}
Long64_t GetReadEntry() const {return fReadEntry;} Long64_t GetReadEntry() const {return fReadEntry;}
Int_t GetWriteBasket() const {return fWriteBasket;} Int_t GetWriteBasket() const {return fWriteBasket;}
Long64_t GetTotalSize(Option_t *option="") const; Long64_t GetTotalSize(Option_t *option="") const;
Long64_t GetTotBytes(Option_t *option="") const; Long64_t GetTotBytes(Option_t *option="") const;
Long64_t GetZipBytes(Option_t *option="") const; Long64_t GetZipBytes(Option_t *option="") const;
Long64_t GetEntryNumber() const {return fEntryNumber;} Long64_t GetEntryNumber() const {return fEntryNumber;}
skipping to change at line 177 skipping to change at line 175
virtual void Refresh(TBranch *b); virtual void Refresh(TBranch *b);
virtual void Reset(Option_t *option=""); virtual void Reset(Option_t *option="");
virtual void ResetAddress(); virtual void ResetAddress();
virtual void ResetReadEntry() {fReadEntry = -1;} virtual void ResetReadEntry() {fReadEntry = -1;}
virtual void SetAddress(void *add); virtual void SetAddress(void *add);
virtual void SetObject(void *objadd); virtual void SetObject(void *objadd);
virtual void SetAutoDelete(Bool_t autodel=kTRUE); virtual void SetAutoDelete(Bool_t autodel=kTRUE);
virtual void SetBasketSize(Int_t buffsize); virtual void SetBasketSize(Int_t buffsize);
virtual void SetBufferAddress(TBuffer *entryBuffer); virtual void SetBufferAddress(TBuffer *entryBuffer);
virtual void SetCompressionLevel(Int_t level=1); virtual void SetCompressionLevel(Int_t level=1);
virtual void SetEntryOffsetLen(Int_t len) {fEntryOffsetLen = len;}
virtual void SetEntries(Long64_t entries); virtual void SetEntries(Long64_t entries);
virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches = kFALSE);
virtual void SetFirstEntry( Long64_t entry ); virtual void SetFirstEntry( Long64_t entry );
virtual void SetFile(TFile *file=0); virtual void SetFile(TFile *file=0);
virtual void SetFile(const char *filename); virtual void SetFile(const char *filename);
virtual void SetOffset(Int_t offset=0) {fOffset=offset;} virtual void SetOffset(Int_t offset=0) {fOffset=offset;}
virtual void SetTree(TTree *tree) { fTree = tree;} virtual void SetTree(TTree *tree) { fTree = tree;}
virtual void UpdateAddress() {;} virtual void UpdateAddress() {;}
static void ResetCount(); static void ResetCount();
ClassDef(TBranch,11); //Branch descriptor ClassDef(TBranch,12); //Branch descriptor
}; };
#endif #endif
 End of changes. 11 change blocks. 
13 lines changed or deleted 10 lines changed or added


 TBrowser.h   TBrowser.h 
// @(#)root/base:$Id: TBrowser.h 26615 2008-12-03 00:57:41Z pcanal $ // @(#)root/base:$Id: TBrowser.h 29411 2009-07-09 12:11:09Z brun $
// Author: Fons Rademakers 25/10/95 // Author: Fons Rademakers 25/10/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 90 skipping to change at line 90
virtual ~TBrowser(); virtual ~TBrowser();
void Add(TObject *obj, const char *name = 0, Int_t check = -1); void Add(TObject *obj, const char *name = 0, Int_t check = -1);
void Add(void *obj, TClass *cl, const char *name = 0, Int_t check = -1); void Add(void *obj, TClass *cl, const char *name = 0, Int_t check = -1);
void AddCheckBox(TObject *obj, Bool_t check = kFALSE); void AddCheckBox(TObject *obj, Bool_t check = kFALSE);
void CheckObjectItem(TObject *obj, Bool_t check = kFALSE); void CheckObjectItem(TObject *obj, Bool_t check = kFALSE);
void RemoveCheckBox(TObject *obj); void RemoveCheckBox(TObject *obj);
virtual void Create(TObject *obj = 0); // Create this Browser virtual void Create(TObject *obj = 0); // Create this Browser
void BrowseObject(TObject *obj) { fImp->BrowseObj(obj); }
void ExecuteDefaultAction(TObject *obj); void ExecuteDefaultAction(TObject *obj);
TBrowserImp *GetBrowserImp() const { return fImp; } TBrowserImp *GetBrowserImp() const { return fImp; }
void SetBrowserImp(TBrowserImp *i) { fImp = i; } void SetBrowserImp(TBrowserImp *i) { fImp = i; }
TContextMenu *GetContextMenu() const { return fContextMenu; } TContextMenu *GetContextMenu() const { return fContextMenu; }
Bool_t GetRefreshFlag() const { return fNeedRefresh; } Bool_t GetRefreshFlag() const { return fNeedRefresh; }
TObject *GetSelected() const { return fLastSelectedObject ; } TObject *GetSelected() const { return fLastSelectedObject ; }
void SetRefreshFlag(Bool_t flag) { fNeedRefresh = flag; } void SetRefreshFlag(Bool_t flag) { fNeedRefresh = flag; }
void Iconify() { fImp->Iconify(); } void Iconify() { fImp->Iconify(); }
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
void Refresh(); void Refresh();
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TBufferSQL2.h   TBufferSQL2.h 
// @(#)root/sql:$Id: TBufferSQL2.h 29170 2009-06-23 14:09:56Z brun $ // @(#)root/sql:$Id: TBufferSQL2.h 29321 2009-07-03 10:42:10Z brun $
// Author: Sergey Linev 20/11/2005 // Author: Sergey Linev 20/11/2005
#ifndef ROOT_TBufferSQL2 #ifndef ROOT_TBufferSQL2
#define ROOT_TBufferSQL2 #define ROOT_TBufferSQL2
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// // // //
// TBufferSQL2 class used in TSQLFile to convert binary object data // // TBufferSQL2 class used in TSQLFile to convert binary object data //
// to SQL statements, supplied to DB server // // to SQL statements, supplied to DB server //
// // // //
skipping to change at line 123 skipping to change at line 123
void SqlReadBasic(UInt_t& value); void SqlReadBasic(UInt_t& value);
void SqlReadBasic(ULong_t& value); void SqlReadBasic(ULong_t& value);
void SqlReadBasic(ULong64_t& value); void SqlReadBasic(ULong64_t& value);
const char* SqlReadValue(const char* tname); const char* SqlReadValue(const char* tname);
const char* SqlReadCharStarValue(); const char* SqlReadCharStarValue();
Int_t SqlWriteObject(const void* obj, const TClass* objClass, TMemberStreamer *streamer = 0, Int_t streamer_index = 0); Int_t SqlWriteObject(const void* obj, const TClass* objClass, TMemberStreamer *streamer = 0, Int_t streamer_index = 0);
void* SqlReadObject(void* obj, TClass** cl = 0, TMemberStream er *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass=0); void* SqlReadObject(void* obj, TClass** cl = 0, TMemberStream er *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass=0);
void* SqlReadObjectDirect(void* obj, TClass** cl, Long64_t ob jid, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass = 0); void* SqlReadObjectDirect(void* obj, TClass** cl, Long64_t ob jid, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass = 0);
static const char* fgFloatFmt; //! printf argument for floats
and doubles, either "%f" or "%e" or "%10f" and so on
public: public:
TBufferSQL2(TBuffer::EMode mode); TBufferSQL2(TBuffer::EMode mode);
TBufferSQL2(TBuffer::EMode mode, TSQLFile* file); TBufferSQL2(TBuffer::EMode mode, TSQLFile* file);
virtual ~TBufferSQL2(); virtual ~TBufferSQL2();
void SetCompressionLevel(int level) { fCompressLevel = level ; } void SetCompressionLevel(int level) { fCompressLevel = level ; }
TSQLStructure* GetStructure() const { return fStructure; } TSQLStructure* GetStructure() const { return fStructure; }
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added


 TCanvas.h   TCanvas.h 
// @(#)root/gpad:$Id: TCanvas.h 28464 2009-05-06 12:37:21Z brun $ // @(#)root/gpad:$Id: TCanvas.h 29403 2009-07-09 07:17:16Z brun $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 117 skipping to change at line 117
public: public:
// TCanvas status bits // TCanvas status bits
enum { enum {
kShowEventStatus = BIT(15), kShowEventStatus = BIT(15),
kAutoExec = BIT(16), kAutoExec = BIT(16),
kMenuBar = BIT(17), kMenuBar = BIT(17),
kShowToolBar = BIT(18), kShowToolBar = BIT(18),
kShowEditor = BIT(19), kShowEditor = BIT(19),
kMoveOpaque = BIT(20), kMoveOpaque = BIT(20),
kResizeOpaque = BIT(21), kResizeOpaque = BIT(21),
kIsGrayscale = BIT(22) kIsGrayscale = BIT(22),
kShowToolTips = BIT(23)
}; };
TCanvas(Bool_t build=kTRUE); TCanvas(Bool_t build=kTRUE);
TCanvas(const char *name, const char *title="", Int_t form=1); TCanvas(const char *name, const char *title="", Int_t form=1);
TCanvas(const char *name, const char *title, Int_t ww, Int_t wh); TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy, TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
Int_t ww, Int_t wh); Int_t ww, Int_t wh);
TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid); TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
virtual ~TCanvas(); virtual ~TCanvas();
skipping to change at line 171 skipping to change at line 172
TObject *GetSelected() const {return fSelected;} TObject *GetSelected() const {return fSelected;}
TObject *GetClickSelected() const {return fClickSelected;} TObject *GetClickSelected() const {return fClickSelected;}
Int_t GetSelectedX() const {return fSelectedX;} Int_t GetSelectedX() const {return fSelectedX;}
Int_t GetSelectedY() const {return fSelectedY;} Int_t GetSelectedY() const {return fSelectedY;}
Option_t *GetSelectedOpt() const {return fSelectedOpt.Data();} Option_t *GetSelectedOpt() const {return fSelectedOpt.Data();}
TVirtualPad *GetSelectedPad() const { return fSelectedPad; } TVirtualPad *GetSelectedPad() const { return fSelectedPad; }
TVirtualPad *GetClickSelectedPad() const { return fClickSelectedPad ; } TVirtualPad *GetClickSelectedPad() const { return fClickSelectedPad ; }
Bool_t GetShowEventStatus() const { return TestBit(kShowEvent Status); } Bool_t GetShowEventStatus() const { return TestBit(kShowEvent Status); }
Bool_t GetShowToolBar() const { return TestBit(kShowToolBar); } Bool_t GetShowToolBar() const { return TestBit(kShowToolBar); }
Bool_t GetShowEditor() const { return TestBit(kShowEditor); } Bool_t GetShowEditor() const { return TestBit(kShowEditor); }
Bool_t GetShowToolTips() const { return TestBit(kShowToolTips ); }
Bool_t GetAutoExec() const { return TestBit(kAutoExec); } Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
Size_t GetXsizeUser() const {return fXsizeUser;} Size_t GetXsizeUser() const {return fXsizeUser;}
Size_t GetYsizeUser() const {return fYsizeUser;} Size_t GetYsizeUser() const {return fYsizeUser;}
Size_t GetXsizeReal() const {return fXsizeReal;} Size_t GetXsizeReal() const {return fXsizeReal;}
Size_t GetYsizeReal() const {return fYsizeReal;} Size_t GetYsizeReal() const {return fYsizeReal;}
Int_t GetCanvasID() const {return fCanvasID;} Int_t GetCanvasID() const {return fCanvasID;}
TCanvasImp *GetCanvasImp() const {return fCanvasImp;} TCanvasImp *GetCanvasImp() const {return fCanvasImp;}
Int_t GetWindowTopX(); Int_t GetWindowTopX();
Int_t GetWindowTopY(); Int_t GetWindowTopY();
UInt_t GetWindowWidth() const { return fWindowWidth; } UInt_t GetWindowWidth() const { return fWindowWidth; }
skipping to change at line 233 skipping to change at line 235
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0); virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
void SetBatch(Bool_t batch=kTRUE); void SetBatch(Bool_t batch=kTRUE);
static void SetFolder(Bool_t isfolder=kTRUE); static void SetFolder(Bool_t isfolder=kTRUE);
void SetPadSave(TPad *pad) {fPadSave = pad;} void SetPadSave(TPad *pad) {fPadSave = pad;}
void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;} void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;}
void SetTitle(const char *title=""); void SetTitle(const char *title="");
virtual void ToggleEventStatus(); virtual void ToggleEventStatus();
virtual void ToggleAutoExec(); virtual void ToggleAutoExec();
virtual void ToggleToolBar(); virtual void ToggleToolBar();
virtual void ToggleEditor(); virtual void ToggleEditor();
virtual void ToggleToolTips();
virtual void Update(); virtual void Update();
//Still need this. //Still need this.
Bool_t UseGL() const { return fUseGL; } Bool_t UseGL() const { return fUseGL; }
void SetSupportGL(Bool_t support) {fUseGL = support;} void SetSupportGL(Bool_t support) {fUseGL = support;}
//Name is GetPainter, not GetPadPainter //Name is GetPainter, not GetPadPainter
//to avoid name hiding and confusion. //to avoid name hiding and confusion.
//GetPadPainter and GetPainter are non-virtual (no need, in fact). //GetPadPainter and GetPainter are non-virtual (no need, in fact).
TVirtualPadPainter *GetCanvasPainter(); TVirtualPadPainter *GetCanvasPainter();
static TCanvas *MakeDefCanvas(); static TCanvas *MakeDefCanvas();
ClassDef(TCanvas,6) //Graphics canvas ClassDef(TCanvas,7) //Graphics canvas
}; };
#endif #endif
 End of changes. 5 change blocks. 
3 lines changed or deleted 6 lines changed or added


 TCanvasImp.h   TCanvasImp.h 
// @(#)root/base:$Id: TCanvasImp.h 26760 2008-12-09 15:56:43Z brun $ // @(#)root/base:$Id: TCanvasImp.h 29403 2009-07-09 07:17:16Z brun $
// Author: Fons Rademakers 16/11/95 // Author: Fons Rademakers 16/11/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 70 skipping to change at line 70
virtual void SetWindowTitle(const char *newTitle); virtual void SetWindowTitle(const char *newTitle);
virtual void SetCanvasSize(UInt_t w, UInt_t h); virtual void SetCanvasSize(UInt_t w, UInt_t h);
virtual void Show() { } virtual void Show() { }
virtual void ShowMenuBar(Bool_t show = kTRUE); virtual void ShowMenuBar(Bool_t show = kTRUE);
virtual void ShowStatusBar(Bool_t show = kTRUE); virtual void ShowStatusBar(Bool_t show = kTRUE);
virtual void RaiseWindow(); virtual void RaiseWindow();
virtual void ReallyDelete(); virtual void ReallyDelete();
virtual void ShowEditor(Bool_t show = kTRUE); virtual void ShowEditor(Bool_t show = kTRUE);
virtual void ShowToolBar(Bool_t show = kTRUE); virtual void ShowToolBar(Bool_t show = kTRUE);
virtual void ShowToolTips(Bool_t show = kTRUE);
virtual Bool_t HasEditor() const { return kFALSE; } virtual Bool_t HasEditor() const { return kFALSE; }
virtual Bool_t HasMenuBar() const { return kFALSE; } virtual Bool_t HasMenuBar() const { return kFALSE; }
virtual Bool_t HasStatusBar() const { return kFALSE; } virtual Bool_t HasStatusBar() const { return kFALSE; }
virtual Bool_t HasToolBar() const { return kFALSE; } virtual Bool_t HasToolBar() const { return kFALSE; }
virtual Bool_t HasToolTips() const { return kFALSE; }
ClassDef(TCanvasImp,0) //ABC describing main window protocol ClassDef(TCanvasImp,0) //ABC describing main window protocol
}; };
inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, UInt_t, UInt_t) : f Canvas(c) { } inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, UInt_t, UInt_t) : f Canvas(c) { }
inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, Int_t, Int_t, UInt_ t, UInt_t) : fCanvas(c) { } inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, Int_t, Int_t, UInt_ t, UInt_t) : fCanvas(c) { }
inline UInt_t TCanvasImp::GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) inline UInt_t TCanvasImp::GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
{ x = y = 0; w = h = 0; return 0;} { x = y = 0; w = h = 0; return 0;}
inline void TCanvasImp::SetStatusText(const char *, Int_t) { } inline void TCanvasImp::SetStatusText(const char *, Int_t) { }
inline void TCanvasImp::SetWindowPosition(Int_t, Int_t) { } inline void TCanvasImp::SetWindowPosition(Int_t, Int_t) { }
inline void TCanvasImp::SetWindowSize(UInt_t, UInt_t) { } inline void TCanvasImp::SetWindowSize(UInt_t, UInt_t) { }
inline void TCanvasImp::SetWindowTitle(const char *) { } inline void TCanvasImp::SetWindowTitle(const char *) { }
inline void TCanvasImp::SetCanvasSize(UInt_t, UInt_t) { } inline void TCanvasImp::SetCanvasSize(UInt_t, UInt_t) { }
inline void TCanvasImp::ShowMenuBar(Bool_t) { } inline void TCanvasImp::ShowMenuBar(Bool_t) { }
inline void TCanvasImp::ShowStatusBar(Bool_t) { } inline void TCanvasImp::ShowStatusBar(Bool_t) { }
inline void TCanvasImp::RaiseWindow() { } inline void TCanvasImp::RaiseWindow() { }
inline void TCanvasImp::ReallyDelete() { } inline void TCanvasImp::ReallyDelete() { }
inline void TCanvasImp::ShowEditor(Bool_t) { } inline void TCanvasImp::ShowEditor(Bool_t) { }
inline void TCanvasImp::ShowToolBar(Bool_t) { } inline void TCanvasImp::ShowToolBar(Bool_t) { }
inline void TCanvasImp::ShowToolTips(Bool_t) { }
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TChain.h   TChain.h 
// @(#)root/tree:$Id: TChain.h 26399 2008-11-24 01:44:18Z rdm $ // @(#)root/tree:$Id: TChain.h 30121 2009-09-11 16:43:51Z pcanal $
// Author: Rene Brun 03/02/97 // Author: Rene Brun 03/02/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 132 skipping to change at line 132
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
virtual Long64_t Process(const char *filename, Option_t *option="", Lon g64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU* virtual Long64_t Process(const char *filename, Option_t *option="", Lon g64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
#ifndef __CINT__ #ifndef __CINT__
virtual Long64_t Process(TSelector *selector, Option_t *option="", Lon g64_t nentries=kBigNumber, Long64_t firstentry=0); virtual Long64_t Process(TSelector *selector, Option_t *option="", Lon g64_t nentries=kBigNumber, Long64_t firstentry=0);
#endif #endif
virtual void Reset(Option_t *option=""); virtual void Reset(Option_t *option="");
virtual void ResetBranchAddress(TBranch *); virtual void ResetBranchAddress(TBranch *);
virtual void ResetBranchAddresses(); virtual void ResetBranchAddresses();
virtual Long64_t Scan(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU* virtual Long64_t Scan(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
virtual void SetAutoDelete(Bool_t autodel=kTRUE); virtual void SetAutoDelete(Bool_t autodel=kTRUE);
virtual void SetBranchAddress(const char *bname,void *add, TBranch virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr = 0); **ptr = 0);
virtual void SetBranchAddress(const char *bname,void *add, TBranch virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch
**ptr, TClass *realClass, EDataType datatype, Bool_t isptr); **ptr, TClass *realClass, EDataType datatype, Bool_t isptr);
virtual void SetBranchAddress(const char *bname,void *add, TClass * virtual Int_t SetBranchAddress(const char *bname,void *add, TClass *
realClass, EDataType datatype, Bool_t isptr); realClass, EDataType datatype, Bool_t isptr);
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UI nt_t *found=0); virtual void SetBranchStatus(const char *bname, Bool_t status=1, UI nt_t *found=0);
virtual void SetDirectory(TDirectory *dir); virtual void SetDirectory(TDirectory *dir);
virtual void SetEntryList(TEntryList *elist, Option_t *opt=""); virtual void SetEntryList(TEntryList *elist, Option_t *opt="");
virtual void SetEntryListFile(const char *filename="", Option_t *op t=""); virtual void SetEntryListFile(const char *filename="", Option_t *op t="");
virtual void SetEventList(TEventList *evlist); virtual void SetEventList(TEventList *evlist);
virtual void SetMakeClass(Int_t make) { TTree::SetMakeClass(make); if (fTree) fTree->SetMakeClass(make);} virtual void SetMakeClass(Int_t make) { TTree::SetMakeClass(make); if (fTree) fTree->SetMakeClass(make);}
virtual void SetPacketSize(Int_t size = 100); virtual void SetPacketSize(Int_t size = 100);
virtual void SetProof(Bool_t on = kTRUE, Bool_t refresh = kFALSE, B ool_t gettreeheader = kFALSE); virtual void SetProof(Bool_t on = kTRUE, Bool_t refresh = kFALSE, B ool_t gettreeheader = kFALSE);
virtual void SetWeight(Double_t w=1, Option_t *option=""); virtual void SetWeight(Double_t w=1, Option_t *option="");
 End of changes. 2 change blocks. 
7 lines changed or deleted 7 lines changed or added


 TCint.h   TCint.h 
// @(#)root/meta:$Id: TCint.h 27282 2009-01-28 22:36:42Z rdm $ // @(#)root/meta:$Id: TCint.h 30100 2009-09-09 18:30:50Z pcanal $
// Author: Fons Rademakers 01/03/96 // Author: Fons Rademakers 01/03/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 124 skipping to change at line 124
void ResetAll(); void ResetAll();
void ResetGlobals(); void ResetGlobals();
void RewindDictionary(); void RewindDictionary();
Int_t DeleteGlobal(void *obj); Int_t DeleteGlobal(void *obj);
void SaveContext(); void SaveContext();
void SaveGlobalsContext(); void SaveGlobalsContext();
void UpdateListOfGlobals(); void UpdateListOfGlobals();
void UpdateListOfGlobalFunctions(); void UpdateListOfGlobalFunctions();
void UpdateListOfTypes(); void UpdateListOfTypes();
void SetClassInfo(TClass *cl, Bool_t reload = kFALSE); void SetClassInfo(TClass *cl, Bool_t reload = kFALSE);
Bool_t CheckClassInfo(const char *name); Bool_t CheckClassInfo(const char *name, Bool_t autoload = kTRUE);
Long_t Calc(const char *line, EErrorCode *error = 0); Long_t Calc(const char *line, EErrorCode *error = 0);
void CreateListOfBaseClasses(TClass *cl); void CreateListOfBaseClasses(TClass *cl);
void CreateListOfDataMembers(TClass *cl); void CreateListOfDataMembers(TClass *cl);
void CreateListOfMethods(TClass *cl); void CreateListOfMethods(TClass *cl);
void CreateListOfMethodArgs(TFunction *m); void CreateListOfMethodArgs(TFunction *m);
void UpdateListOfMethods(TClass *cl); void UpdateListOfMethods(TClass *cl);
TString GetMangledName(TClass *cl, const char *method, const char *param s); TString GetMangledName(TClass *cl, const char *method, const char *param s);
TString GetMangledNameWithPrototype(TClass *cl, const char *method, cons t char *proto); TString GetMangledNameWithPrototype(TClass *cl, const char *method, cons t char *proto);
void *GetInterfaceMethod(TClass *cl, const char *method, const char *p arams); void *GetInterfaceMethod(TClass *cl, const char *method, const char *p arams);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TClonesArray.h   TClonesArray.h 
// @(#)root/cont:$Id: TClonesArray.h 23348 2008-04-21 09:22:15Z brun $ // @(#)root/cont:$Id: TClonesArray.h 30124 2009-09-13 16:07:19Z brun $
// Author: Rene Brun 11/02/96 // Author: Rene Brun 11/02/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 72 skipping to change at line 72
Int_t AddAtFree(TObject *) { MayNotUse("AddAtFree"); return 0 ; } Int_t AddAtFree(TObject *) { MayNotUse("AddAtFree"); return 0 ; }
void AddAfter(const TObject *, TObject *) { MayNotUse("AddAf ter"); } void AddAfter(const TObject *, TObject *) { MayNotUse("AddAf ter"); }
void AddBefore(const TObject *, TObject *) { MayNotUse("AddB efore"); } void AddBefore(const TObject *, TObject *) { MayNotUse("AddB efore"); }
void BypassStreamer(Bool_t bypass=kTRUE); void BypassStreamer(Bool_t bypass=kTRUE);
Bool_t CanBypassStreamer() const { return TestBit(kBypassStrea mer); } Bool_t CanBypassStreamer() const { return TestBit(kBypassStrea mer); }
void SetClass(const char *classname,Int_t size=1000); void SetClass(const char *classname,Int_t size=1000);
void SetClass(const TClass *cl,Int_t size=1000); void SetClass(const TClass *cl,Int_t size=1000);
virtual TObject *RemoveAt(Int_t idx); virtual TObject *RemoveAt(Int_t idx);
virtual TObject *Remove(TObject *obj); virtual TObject *Remove(TObject *obj);
virtual void RemoveRange(Int_t idx1, Int_t idx2);
virtual void Sort(Int_t upto = kMaxInt); virtual void Sort(Int_t upto = kMaxInt);
TObject *New(Int_t idx); TObject *New(Int_t idx);
TObject *AddrAt(Int_t idx); TObject *AddrAt(Int_t idx);
TObject *&operator[](Int_t idx); TObject *&operator[](Int_t idx);
TObject *operator[](Int_t idx) const; TObject *operator[](Int_t idx) const;
ClassDef(TClonesArray,4) //An array of clone objects ClassDef(TClonesArray,4) //An array of clone objects
}; };
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TColor.h   TColor.h 
// @(#)root/base:$Id: TColor.h 20877 2007-11-19 11:17:07Z rdm $ // @(#)root/base:$Id: TColor.h 30239 2009-09-18 07:37:26Z couet $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 75 skipping to change at line 75
TColor(); TColor();
TColor(Int_t color, Float_t r, Float_t g, Float_t b, const char *name="" , Float_t a = 1); TColor(Int_t color, Float_t r, Float_t g, Float_t b, const char *name="" , Float_t a = 1);
TColor(const TColor &color); TColor(const TColor &color);
virtual ~TColor(); virtual ~TColor();
const char *AsHexString() const; const char *AsHexString() const;
void Copy(TObject &color) const; void Copy(TObject &color) const;
static void CreateColorWheel(); static void CreateColorWheel();
static void CreateColorsGray(); static void CreateColorsGray();
static void CreateColorsCircle(Int_t offset, const char *name, UChar_t *rgb); static void CreateColorsCircle(Int_t offset, const char *name, UChar_t *rgb);
static void CreateColorsRectangle(Int_t offset, const char *name, UCha r_t *rgb); static void CreateColorsRectangle(Int_t offset, const char *name, UCha r_t *rgb);
static Int_t CreateGradientColorTable(UInt_t Number, Double_t* Length, static Int_t CreateGradientColorTable(UInt_t Number, Double_t* Stops,
Double_t* Red, Double_t* Green, Double_t* Blue, UInt_t NColors); Double_t* Red, Double_t* Green, Double_t* Blue, UInt_t NColors);
static Int_t GetColorPalette(Int_t i); static Int_t GetColorPalette(Int_t i);
static Int_t GetNumberOfColors(); static Int_t GetNumberOfColors();
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
{ r=GetRed(); g=GetGreen(); b=GetBlue(); } { r=GetRed(); g=GetGreen(); b=GetBlue(); }
virtual void GetHLS(Float_t &h, Float_t &l, Float_t &s) const virtual void GetHLS(Float_t &h, Float_t &l, Float_t &s) const
{ h=GetHue(); l=GetLight(); s=GetSaturation(); } { h=GetHue(); l=GetLight(); s=GetSaturation(); }
Int_t GetNumber() const { return fNumber; } Int_t GetNumber() const { return fNumber; }
ULong_t GetPixel() const; ULong_t GetPixel() const;
Float_t GetRed() const { return IsGrayscale() ? GetGrayscale() : f Red; } Float_t GetRed() const { return IsGrayscale() ? GetGrayscale() : f Red; }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TContextMenu.h   TContextMenu.h 
// @(#)root/base:$Id: TContextMenu.h 26615 2008-12-03 00:57:41Z pcanal $ // @(#)root/base:$Id: TContextMenu.h 29571 2009-07-24 10:55:28Z rdm $
// Author: Nenad Buncic 08/02/96 // Author: Nenad Buncic 08/02/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 75 skipping to change at line 75
public: public:
TContextMenu(const char *name, const char *title = "Context sensitive po pup menu"); TContextMenu(const char *name, const char *title = "Context sensitive po pup menu");
virtual ~TContextMenu(); virtual ~TContextMenu();
virtual void Action(TObject *object, TMethod *method); virtual void Action(TObject *object, TMethod *method);
virtual void Action(TObject *object, TToggle *toggle); virtual void Action(TObject *object, TToggle *toggle);
virtual void Action(TClassMenuItem *classmenuitem); virtual void Action(TClassMenuItem *classmenuitem);
void Action(TMethod *method) { Action(fSelectedObject, method); } void Action(TMethod *method) { Action(fSelectedObject, method); }
void Action(TToggle *toggle) { Action(fSelectedObject, toggle); } void Action(TToggle *toggle) { Action(fSelectedObject, toggle); }
virtual char *CreateArgumentTitle(TMethodArg *argument); virtual const char *CreateArgumentTitle(TMethodArg *argument);
virtual char *CreateDialogTitle(TObject *object, TFunction *method); virtual const char *CreateDialogTitle(TObject *object, TFunction *method
virtual char *CreatePopupTitle(TObject *object ); );
virtual const char *CreatePopupTitle(TObject *object );
virtual void Execute(const char *method, const char *params, Int_t *err or=0) { TObject::Execute(method, params, error); } virtual void Execute(const char *method, const char *params, Int_t *err or=0) { TObject::Execute(method, params, error); }
virtual void Execute(TMethod *method, TObjArray *params, Int_t *error=0) { TObject::Execute(method, params, error); } virtual void Execute(TMethod *method, TObjArray *params, Int_t *error=0) { TObject::Execute(method, params, error); }
virtual void Execute(TObject *object, TFunction *method, const char *par ams); virtual void Execute(TObject *object, TFunction *method, const char *par ams);
virtual void Execute(TObject *object, TFunction *method, TObjArray *para ms); virtual void Execute(TObject *object, TFunction *method, TObjArray *para ms);
void Execute(const char *params) { Execute(fCalledObject, fSelectedMetho d, params); } void Execute(const char *params) { Execute(fCalledObject, fSelectedMetho d, params); }
void Execute(TObjArray *params) { Execute(fCalledObject, fSelectedMethod , params); } void Execute(TObjArray *params) { Execute(fCalledObject, fSelectedMethod , params); }
virtual TBrowser *GetBrowser() { return fBrowser; } virtual TBrowser *GetBrowser() { return fBrowser; }
virtual TContextMenuImp *GetContextMenuImp() { return fContextMenuImp; } virtual TContextMenuImp *GetContextMenuImp() { return fContextMenuImp; }
virtual TVirtualPad *GetSelectedCanvas() { return fSelectedCanvas; } virtual TVirtualPad *GetSelectedCanvas() { return fSelectedCanvas; }
virtual TFunction *GetSelectedMethod() { return fSelectedMethod; } virtual TFunction *GetSelectedMethod() { return fSelectedMethod; }
 End of changes. 2 change blocks. 
4 lines changed or deleted 5 lines changed or added


 TCutG.h   TCutG.h 
// @(#)root/graf:$Id: TCutG.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/graf:$Id: TCutG.h 29443 2009-07-11 10:49:10Z brun $
// Author: Rene Brun 16/05/97 // Author: Rene Brun 16/05/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 48 skipping to change at line 48
TCutG(); TCutG();
TCutG(const TCutG &cutg); TCutG(const TCutG &cutg);
TCutG(const char *name, Int_t n); TCutG(const char *name, Int_t n);
TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y); TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y); TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
virtual ~TCutG(); virtual ~TCutG();
TObject *GetObjectX() const {return fObjectX;} TObject *GetObjectX() const {return fObjectX;}
TObject *GetObjectY() const {return fObjectY;} TObject *GetObjectY() const {return fObjectY;}
const char *GetVarX() const {return fVarX.Data();} const char *GetVarX() const {return fVarX.Data();}
const char *GetVarY() const {return fVarY.Data();} const char *GetVarY() const {return fVarY.Data();}
Double_t Integral(TH2 *h, Option_t *option="") const; Double_t IntegralHist(TH2 *h, Option_t *option="") const;
virtual Int_t IsInside(Double_t x, Double_t y) const; virtual Int_t IsInside(Double_t x, Double_t y) const;
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetObjectX(TObject *obj) {fObjectX = obj;} virtual void SetObjectX(TObject *obj) {fObjectX = obj;}
virtual void SetObjectY(TObject *obj) {fObjectY = obj;} virtual void SetObjectY(TObject *obj) {fObjectY = obj;}
virtual void SetVarX(const char *varx); // *MENU* virtual void SetVarX(const char *varx); // *MENU*
virtual void SetVarY(const char *vary); // *MENU* virtual void SetVarY(const char *vary); // *MENU*
ClassDef(TCutG,2) // A Graphical cut. ClassDef(TCutG,2) // A Graphical cut.
}; };
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TDataSetManager.h   TDataSetManager.h 
// @(#)root/proof:$Id: TDataSetManager.h 29133 2009-06-22 12:28:50Z brun $ // @(#)root/proof:$Id: TDataSetManager.h 30421 2009-09-24 17:20:09Z ganis $
// Author: Jan Fiete Grosse-Oetringhaus, 08.08.07 // Author: Jan Fiete Grosse-Oetringhaus, 08.08.07
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 89 skipping to change at line 89
Bool_t ReadGroupConfig(const char *cf = 0); Bool_t ReadGroupConfig(const char *cf = 0);
virtual void UpdateUsedSpace(); virtual void UpdateUsedSpace();
static Long64_t ToBytes(const char *size = 0); static Long64_t ToBytes(const char *size = 0);
public: public:
enum EDataSetStatusBits { enum EDataSetStatusBits {
kCheckQuota = BIT(15), // quota checking enabled kCheckQuota = BIT(15), // quota checking enabled
kAllowRegister = BIT(16), // allow registration of a new dataset kAllowRegister = BIT(16), // allow registration of a new dataset
kAllowVerify = BIT(17), // allow verification of a dataset (requi res registration permit) kAllowVerify = BIT(17), // allow verification of a dataset (requi res registration permit)
kAllowStaging = BIT(18), // allow staging of missing files (requir es verification permit) kTrustInfo = BIT(18), // during registration, trust the availab le information provided by the user
kIsSandbox = BIT(19) // dataset dir is in the user sandbox (si mplified naming) kIsSandbox = BIT(19) // dataset dir is in the user sandbox (si mplified naming)
}; };
enum EDataSetWorkOpts { // General (bits 1-8) enum EDataSetWorkOpts { // General (bits 1-8)
kDebug = 1, kShowDefault = 2, kPrint = 4, kExpor t = 8, kDebug = 1, kShowDefault = 2, kPrint = 4, kExpor t = 8,
kQuotaUpdate = 16, kSetDefaultTree = 32, kQuotaUpdate = 16, kSetDefaultTree = 32,
// File-based specific (bits 9-16) // File-based specific (bits 9-16)
kReopen = 256, kTouch = 512, kMaxFiles = 1024, k ReadShort = 2048, kReopen = 256, kTouch = 512, kMaxFiles = 1024, k ReadShort = 2048,
kFileMustExist = 4096}; kFileMustExist = 4096};
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TEnv.h   TEnv.h 
// @(#)root/base:$Id: TEnv.h 24087 2008-06-01 16:15:35Z brun $ // @(#)root/base:$Id: TEnv.h 29398 2009-07-08 12:52:29Z rdm $
// Author: Fons Rademakers 22/09/95 // Author: Fons Rademakers 22/09/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEnv #ifndef ROOT_TEnv
#define ROOT_TEnv #define ROOT_TEnv
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TEnv // // TEnv //
// // // //
// The TEnv class reads a config file, by default .rootrc. Three types // // The TEnv class reads config files, by default named .rootrc. Three //
// of .rootrc files are read: global, user and local files. The global // // types of config files are read: global, user and local files. The //
// file resides in $ROOTSYS/etc, the user file in ~/ and the local file // // global file is $ROOTSYS/etc/system<name> (or ROOTETCDIR/system<name>)//
// in the current working directory. // // the user file is $HOME/<name> and the local file is ./<name>. //
// By setting the shell variable ROOTENV_NO_HOME=1 the reading of //
// the $HOME/<name> resource file will be skipped. This might be useful //
// in case the home directory resides on an automounted remote file //
// system and one wants to avoid this file system from being mounted. //
// //
// The format of the .rootrc file is similar to the .Xdefaults format: // // The format of the .rootrc file is similar to the .Xdefaults format: //
// // // //
// [+]<SystemName>.<RootName|ProgName>.<name>[(type)]: <value> // // [+]<SystemName>.<RootName|ProgName>.<name>[(type)]: <value> //
// // // //
// Where <SystemName> is either Unix, WinNT, MacOS or Vms, // // Where <SystemName> is either Unix, WinNT, MacOS or Vms, //
// <RootName> the name as given in the TApplication ctor (or "RootApp" // // <RootName> the name as given in the TApplication ctor (or "RootApp" //
// in case no explicit TApplication derived object was created), // // in case no explicit TApplication derived object was created), //
// <ProgName> the current program name and <name> the resource name, // // <ProgName> the current program name and <name> the resource name, //
// with optionally a type specification. <value> can be either a // // with optionally a type specification. <value> can be either a //
// string, an integer, a float/double or a boolean with the values // // string, an integer, a float/double or a boolean with the values //
 End of changes. 2 change blocks. 
5 lines changed or deleted 10 lines changed or added


 TEveCalo.h   TEveCalo.h 
// @(#)root/eve:$Id: TEveCalo.h 28197 2009-04-14 13:59:27Z matevz $ // @(#)root/eve:$Id: TEveCalo.h 30384 2009-09-23 17:54:23Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 213 skipping to change at line 213
virtual void ComputeBBox(); virtual void ComputeBBox();
ClassDef(TEveCalo2D, 0); // Class for visualization of projected calorim eter event data. ClassDef(TEveCalo2D, 0); // Class for visualization of projected calorim eter event data.
}; };
/************************************************************************** / /************************************************************************** /
/************************************************************************** / /************************************************************************** /
class TEveCaloLego : public TEveCaloViz class TEveCaloLego : public TEveCaloViz
{ {
friend class TEveCaloLegoGL; friend class TEveCaloLegoGL;
friend class TEveCaloLegoOverlay;
public: public:
enum EProjection_e { kAuto, k3D, k2D }; enum EProjection_e { kAuto, k3D, k2D };
enum E2DMode_e { kValColor, kValSize }; enum E2DMode_e { kValColor, kValSize };
enum EBoxMode_e { kNone, kFrontBack, kBack}; enum EBoxMode_e { kNone, kFrontBack, kBack};
private: private:
TEveCaloLego(const TEveCaloLego&); // Not implemented TEveCaloLego(const TEveCaloLego&); // Not implemented
TEveCaloLego& operator=(const TEveCaloLego&); // Not implemented TEveCaloLego& operator=(const TEveCaloLego&); // Not implemented
protected: protected:
TEveCaloData::vCellId_t fCellList; TEveCaloData::vCellId_t fCellList;
Bool_t fTopViewUseMaxColor;
Color_t fTopViewTowerColor;
Color_t fFontColor; Color_t fFontColor;
Color_t fGridColor; Color_t fGridColor;
Color_t fPlaneColor; Color_t fPlaneColor;
UChar_t fPlaneTransparency; UChar_t fPlaneTransparency;
Int_t fNZSteps; // Z axis label step in GeV Int_t fNZSteps; // Z axis label step in GeV
Float_t fZAxisStep; Float_t fZAxisStep;
Bool_t fAutoRebin; Bool_t fAutoRebin;
Int_t fPixelsPerBin; Int_t fPixelsPerBin;
Bool_t fNormalizeRebin; Bool_t fNormalizeRebin;
EProjection_e fProjection; EProjection_e fProjection;
E2DMode_e f2DMode; E2DMode_e f2DMode;
EBoxMode_e fBoxMode; // additional scale info EBoxMode_e fBoxMode; // additional scale info
Bool_t fDrawHPlane; Bool_t fDrawHPlane;
Float_t fHPlaneVal; Float_t fHPlaneVal;
Int_t fTowerPicked; Int_t fTowerPicked;
Int_t fBinStep;
Int_t fDrawNumberCellPixels;
Int_t fCellPixelFontSize;
virtual void BuildCellIdCache(); virtual void BuildCellIdCache();
public: public:
TEveCaloLego(TEveCaloData* data=0, const char* n="TEveCaloLego", const c har* t=""); TEveCaloLego(TEveCaloData* data=0, const char* n="TEveCaloLego", const c har* t="");
virtual ~TEveCaloLego(){} virtual ~TEveCaloLego(){}
virtual void SetData(TEveCaloData* d); virtual void SetData(TEveCaloData* d);
Bool_t GetTopViewUseMaxColor() const { return fTopViewUseMaxColor; }
void SetTopViewUseMaxColor(Bool_t x) { fTopViewUseMaxColor = x; }
Color_t GetTopViewTowerColor() const { return fTopViewTowerColor; }
void SetTopViewTowerColor(Color_t x) { fTopViewTowerColor = x; }
Color_t GetFontColor() const { return fFontColor; } Color_t GetFontColor() const { return fFontColor; }
void SetFontColor(Color_t ci) { fFontColor=ci; } void SetFontColor(Color_t ci) { fFontColor=ci; }
Color_t GetGridColor() const { return fGridColor; } Color_t GetGridColor() const { return fGridColor; }
void SetGridColor(Color_t ci) { fGridColor=ci; } void SetGridColor(Color_t ci) { fGridColor=ci; }
Color_t GetPlaneColor() const { return fPlaneColor; } Color_t GetPlaneColor() const { return fPlaneColor; }
void SetPlaneColor(Color_t ci) { fPlaneColor=ci; } void SetPlaneColor(Color_t ci) { fPlaneColor=ci; }
UChar_t GetPlaneTransparency() const { return fPlaneTransparency; } UChar_t GetPlaneTransparency() const { return fPlaneTransparency; }
skipping to change at line 294 skipping to change at line 291
Bool_t GetNormalizeRebin() const { return fNormalizeRebin; } Bool_t GetNormalizeRebin() const { return fNormalizeRebin; }
void SetNormalizeRebin(Bool_t s) { fNormalizeRebin = s; fCellIdCache OK=kFALSE;} void SetNormalizeRebin(Bool_t s) { fNormalizeRebin = s; fCellIdCache OK=kFALSE;}
void SetProjection(EProjection_e p) { fProjection = p; } void SetProjection(EProjection_e p) { fProjection = p; }
EProjection_e GetProjection() { return fProjection; } EProjection_e GetProjection() { return fProjection; }
void Set2DMode(E2DMode_e p) { f2DMode = p; } void Set2DMode(E2DMode_e p) { f2DMode = p; }
E2DMode_e Get2DMode() { return f2DMode; } E2DMode_e Get2DMode() { return f2DMode; }
void SetBoxMode(EBoxMode_e p) { fBoxMode = p; } void SetBoxMode(EBoxMode_e p) { fBoxMode = p; }
EBoxMode_e GetBoxMode() { return fBoxMode; } EBoxMode_e GetBoxMode() { return fBoxMode; }
Bool_t GetDrawHPlane() const { return fDrawHPlane; } Bool_t GetDrawHPlane() const { return fDrawHPlane; }
void SetDrawHPlane(Bool_t s) { fDrawHPlane = s;} void SetDrawHPlane(Bool_t s) { fDrawHPlane = s;}
Float_t GetHPlaneVal() const { return fHPlaneVal; } Float_t GetHPlaneVal() const { return fHPlaneVal; }
void SetHPlaneVal(Float_t s) { fHPlaneVal = s;} void SetHPlaneVal(Float_t s) { fHPlaneVal = s;}
Int_t GetTowerPicked() const { return fTowerPicked; } Int_t GetTowerPicked() const { return fTowerPicked; }
void SetTowerPicked(Int_t p) { fTowerPicked = p;} void SetTowerPicked(Int_t p) { fTowerPicked = p;}
Int_t GetDrawNumberCellPixels() { return fDrawNumberCellPixels; }
void SetDrawNumberCellPixels(Int_t x) { fDrawNumberCellPixels = x; }
Int_t GetCellPixelFontSize() { return fCellPixelFontSize; }
void SetCellPixelFontSize(Int_t x) { fCellPixelFontSize = x; }
virtual void ComputeBBox(); virtual void ComputeBBox();
ClassDef(TEveCaloLego, 0); // Class for visualization of calorimeter hi stogram data. ClassDef(TEveCaloLego, 0); // Class for visualization of calorimeter hi stogram data.
}; };
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 12 lines changed or added


 TEveCaloData.h   TEveCaloData.h 
// @(#)root/eve:$Id: TEveCaloData.h 28888 2009-06-10 18:47:24Z matevz $ // @(#)root/eve:$Id: TEveCaloData.h 29302 2009-07-02 08:37:01Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 28 skipping to change at line 28
class TH2F; class TH2F;
class TAxis; class TAxis;
class THStack; class THStack;
class TEveCaloData: public TEveRefBackPtr class TEveCaloData: public TEveRefBackPtr
{ {
public: public:
struct SliceInfo_t struct SliceInfo_t
{ {
TString fName; TString fName; // Name of the slice, eg. ECAL, HCAL.
Float_t fThreshold; Float_t fThreshold; // Only display towers with higher energy.
Int_t fID; Int_t fID; // Unique identification of the slice.
Color_t fColor; Color_t fColor; // Color used to draw this longitudinal slice.
TH2F *fHist; TH2F *fHist;
SliceInfo_t(): fName(""), fThreshold(0), fID(-1), fColor(Color_t(4)), fHist(0){} SliceInfo_t(): fName(""), fThreshold(0), fID(-1), fColor(Color_t(4)), fHist(0){}
SliceInfo_t(TH2F* h): fName(""), fThreshold(0), fID(-1), fColor(Color _t(4)), fHist(h) {} SliceInfo_t(TH2F* h): fName(""), fThreshold(0), fID(-1), fColor(Color _t(4)), fHist(h) {}
virtual ~SliceInfo_t() {} virtual ~SliceInfo_t() {}
void Setup(const char* name, Float_t threshold, Color_t col) void Setup(const char* name, Float_t threshold, Color_t col)
{ {
fName = name; fName = name;
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 TEveCaloLegoEditor.h   TEveCaloLegoEditor.h 
// @(#)root/eve:$Id: TEveCaloLegoEditor.h 25245 2008-08-25 21:44:09Z matevz $ // @(#)root/eve:$Id: TEveCaloLegoEditor.h 30438 2009-09-25 10:15:00Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 36 skipping to change at line 36
class TEveCaloLegoEditor : public TGedFrame class TEveCaloLegoEditor : public TGedFrame
{ {
private: private:
TEveCaloLegoEditor(const TEveCaloLegoEditor&); // Not impleme nted TEveCaloLegoEditor(const TEveCaloLegoEditor&); // Not impleme nted
TEveCaloLegoEditor& operator=(const TEveCaloLegoEditor&); // Not impleme nted TEveCaloLegoEditor& operator=(const TEveCaloLegoEditor&); // Not impleme nted
TGComboBox* MakeLabeledCombo(const char* name, Int_t off); TGComboBox* MakeLabeledCombo(const char* name, Int_t off);
protected: protected:
TEveCaloLego *fM; // Model object. TEveCaloLego *fM; // Model object.
TGCheckButton *fTopViewUseMaxColor;
TGColorSelect *fTopViewTowerColor;
TGColorSelect *fGridColor; TGColorSelect *fGridColor;
TGColorSelect *fFontColor; TGColorSelect *fFontColor;
TGColorSelect *fPlaneColor; TGColorSelect *fPlaneColor;
TGNumberEntry *fTransparency; TGNumberEntry *fTransparency;
TEveGValuator *fNZSteps;
TGComboBox *fProjection; TGComboBox *fProjection;
TGComboBox *f2DMode; TGComboBox *f2DMode;
TGComboBox *fBoxMode; TGComboBox *fBoxMode;
TEveGValuator *fCell2DTextMin;
TGVerticalFrame *fRebinFrame; TGVerticalFrame *fRebinFrame;
TGCheckButton *fAutoRebin; TGCheckButton *fAutoRebin;
TEveGValuator *fPixelsPerBin; TEveGValuator *fPixelsPerBin;
TGCheckButton *fNormalizeRebin; TGCheckButton *fNormalizeRebin;
void MakeRebinFrame(); void MakeRebinFrame();
public: public:
TEveCaloLegoEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30 , TEveCaloLegoEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30 ,
UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground ()); UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground ());
virtual ~TEveCaloLegoEditor() {} virtual ~TEveCaloLegoEditor() {}
virtual void SetModel(TObject* obj); virtual void SetModel(TObject* obj);
// Declare callback/slot methods // Declare callback/slot methods
void DoTopViewUseMaxColor();
void DoTopViewTowerColor(Pixel_t color);
void DoGridColor(Pixel_t color); void DoGridColor(Pixel_t color);
void DoFontColor(Pixel_t color); void DoFontColor(Pixel_t color);
void DoPlaneColor(Pixel_t color); void DoPlaneColor(Pixel_t color);
void DoTransparency(); void DoTransparency();
void DoNZSteps();
void DoProjection(); void DoProjection();
void Do2DMode(); void Do2DMode();
void DoBoxMode(); void DoBoxMode();
void DoCell2DTextMin();
void DoAutoRebin(); void DoAutoRebin();
void DoPixelsPerBin(); void DoPixelsPerBin();
void DoNormalize(); void DoNormalize();
ClassDef(TEveCaloLegoEditor, 0); // GUI editor for TEveCaloLego. ClassDef(TEveCaloLegoEditor, 0); // GUI editor for TEveCaloLego.
}; };
#endif #endif
 End of changes. 7 change blocks. 
9 lines changed or deleted 5 lines changed or added


 TEveCaloLegoGL.h   TEveCaloLegoGL.h 
// @(#)root/eve:$Id: TEveCaloLegoGL.h 28888 2009-06-10 18:47:24Z matevz $ // @(#)root/eve:$Id: TEveCaloLegoGL.h 30384 2009-09-23 17:54:23Z matevz $
// Author: Alja Mrak-Tadel 2007 // Author: Alja Mrak-Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 34 skipping to change at line 34
class TEveCaloLego; class TEveCaloLego;
class TEveCaloLegoGL : public TGLObject class TEveCaloLegoGL : public TGLObject
{ {
private: private:
TEveCaloLegoGL(const TEveCaloLegoGL&); // Not implemented TEveCaloLegoGL(const TEveCaloLegoGL&); // Not implemented
TEveCaloLegoGL& operator=(const TEveCaloLegoGL&); // Not implemented TEveCaloLegoGL& operator=(const TEveCaloLegoGL&); // Not implemented
mutable Float_t fDataMax; // cached mutable Float_t fDataMax; // cached
mutable Color_t fGridColor; // cached
mutable Color_t fFontColor; // cached
// axis // axis
mutable TAxis *fEtaAxis; mutable TAxis *fEtaAxis;
mutable TAxis *fPhiAxis; mutable TAxis *fPhiAxis;
mutable TAxis *fZAxis; mutable TAxis *fZAxis;
mutable TEveVector fXAxisTitlePos; mutable TEveVector fXAxisTitlePos;
mutable TEveVector fYAxisTitlePos; mutable TEveVector fYAxisTitlePos;
mutable TEveVector fZAxisTitlePos; mutable TEveVector fZAxisTitlePos;
mutable TEveVector fBackPlaneXConst[2]; mutable TEveVector fBackPlaneXConst[2];
mutable TEveVector fBackPlaneYConst[2]; mutable TEveVector fBackPlaneYConst[2];
mutable TGLAxisPainter fAxisPainter; mutable TGLAxisPainter fAxisPainter;
mutable Int_t fBinStep;
protected: protected:
Int_t GetGridStep(TGLRnrCtx &rnrCtx) const; Int_t GetGridStep(TGLRnrCtx &rnrCtx) const;
void RebinAxis(TAxis *orig, TAxis *curr) const; void RebinAxis(TAxis *orig, TAxis *curr) const;
void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Flo at_t y0, Float_t y1) const; void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Flo at_t y0, Float_t y1) const;
void DrawAxis3D(TGLRnrCtx &rnrCtx) const; void DrawAxis3D(TGLRnrCtx &rnrCtx) const;
void DrawAxis2D(TGLRnrCtx &rnrCtx) const; void DrawAxis2D(TGLRnrCtx &rnrCtx) const;
void DrawHistBase(TGLRnrCtx &rnrCtx) const; void DrawHistBase(TGLRnrCtx &rnrCtx) const;
void DrawCells2D() const; void DrawCells2D(TGLRnrCtx & rnrCtx) const;
void DrawCells3D(TGLRnrCtx & rnrCtx) const; void DrawCells3D(TGLRnrCtx & rnrCtx) const;
void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw , Float_t zh) const; void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw , Float_t zh) const;
void MakeDisplayList() const; void MakeDisplayList() const;
void WrapTwoPi(Float_t &min, Float_t &max) const; void WrapTwoPi(Float_t &min, Float_t &max) const;
TEveCaloLego *fM; // Model object. TEveCaloLego *fM; // Model object.
mutable Bool_t fDLCacheOK; mutable Bool_t fDLCacheOK;
typedef std::map<Int_t, UInt_t> SliceDLMap_t; typedef std::map<Int_t, UInt_t> SliceDLMap_t;
typedef std::map<Int_t, UInt_t>::iterator SliceDLMap_i; typedef std::map<Int_t, UInt_t>::iterator SliceDLMap_i;
mutable SliceDLMap_t fDLMap; mutable SliceDLMap_t fDLMap;
mutable TEveCaloData::RebinData_t fRebinData; mutable TEveCaloData::RebinData_t fRebinData;
mutable Bool_t fCells3D; mutable Bool_t fCells3D;
public: public:
TEveCaloLegoGL(); TEveCaloLegoGL();
virtual ~TEveCaloLegoGL(); virtual ~TEveCaloLegoGL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt = 0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt = 0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DLCacheDrop(); virtual void DLCacheDrop();
virtual void DLCachePurge(); virtual void DLCachePurge();
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added


 TEveCaloLegoOverlay.h   TEveCaloLegoOverlay.h 
// @(#)root/eve:$Id: TEveCaloLegoOverlay.h 27643 2009-02-27 16:13:24Z matev z $ // @(#)root/eve:$Id: TEveCaloLegoOverlay.h 30384 2009-09-23 17:54:23Z matev z $
// Author: Alja Mrak-Tadel 2007 // Author: Alja Mrak-Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEveCaloLegoOverlay #ifndef ROOT_TEveCaloLegoOverlay
#define ROOT_TEveCaloLegoOverlay #define ROOT_TEveCaloLegoOverlay
#include "TGLCameraOverlay.h" #include "TGLCameraOverlay.h"
#include "TEveElement.h" #include "TEveElement.h"
class TEveCaloLego; class TEveCaloLego;
class TEveCaloLegoOverlay : public TGLCameraOverlay, class TEveCaloLegoOverlay : public TGLCameraOverlay
public TEveElementList
{ {
private: private:
TEveCaloLegoOverlay(const TEveCaloLegoOverlay&); // Not imple mented TEveCaloLegoOverlay(const TEveCaloLegoOverlay&); // Not imple mented
TEveCaloLegoOverlay& operator=(const TEveCaloLegoOverlay&); // Not imple mented TEveCaloLegoOverlay& operator=(const TEveCaloLegoOverlay&); // Not imple mented
void DrawSlider(TGLRnrCtx& rnrCtx);
Bool_t SetSliderVal(Event_t* event,TGLRnrCtx& rnrCtx ); Bool_t SetSliderVal(Event_t* event,TGLRnrCtx& rnrCtx );
TString fHeaderTxt;
Bool_t fHeaderSelected;
protected: protected:
TEveCaloLego* fCalo; void RenderLogaritmicScales(TGLRnrCtx& rnrCtx);
TAxis *fSliderAxis; void RenderPaletteScales(TGLRnrCtx& rnrCtx);
void RenderPlaneInterface(TGLRnrCtx& rnrCtx);
void RenderHeader(TGLRnrCtx& rnrCtx);
TEveCaloLego* fCalo; // model
// 2D scales
Bool_t fShowScales;
Color_t fScaleColor;
UChar_t fScaleTransparency; //transaprency in %
Double_t fScaleCoordX;
Double_t fScaleCoordY;
Double_t fCellX;
Double_t fCellY;
Color_t fFrameColor;
UChar_t fFrameLineTransp;
UChar_t fFrameBgTransp;;
// move of scales
Int_t fMouseX, fMouseY; //! last mouse position
Bool_t fInDrag;
Color_t fMainColor; // text top right corner
TString fHeaderTxt;
Bool_t fHeaderSelected;
Bool_t fShowCamera; // plane ojects
TAxis *fPlaneAxis;
Color_t fAxisPlaneColor;
Bool_t fShowPlane; Bool_t fShowPlane;
// plane state
// plane-value
Float_t fMenuW; Float_t fMenuW;
Float_t fButtonW; Float_t fButtonW;
Bool_t fShowSlider;
Float_t fSliderH; // slider height in % of viewport Float_t fSliderH; // slider height in % of viewport
Float_t fSliderPosY; // y position of slider bottom up Float_t fSliderPosY; // y position of slider bottom up
Bool_t fShowSlider;
Float_t fSliderVal; Float_t fSliderVal;
// plane event-handling
// event handling Int_t fActiveID;
Int_t fActiveID; Color_t fActiveCol;
Color_t fActiveCol;
virtual void RenderPlaneInterface(TGLRnrCtx& rnrCtx);
virtual void RenderHeader(TGLRnrCtx& rnrCtx);
public: public:
TEveCaloLegoOverlay(); TEveCaloLegoOverlay();
virtual ~TEveCaloLegoOverlay(){} virtual ~TEveCaloLegoOverlay(){}
//rendering
virtual void Render(TGLRnrCtx& rnrCtx);
// event handling // event handling
virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec); virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Ev ent_t* event); virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Ev ent_t* event);
virtual void MouseLeave(); virtual void MouseLeave();
//rendering
virtual void Render(TGLRnrCtx& rnrCtx);
TEveCaloLego* GetCaloLego() {return fCalo;} TEveCaloLego* GetCaloLego() {return fCalo;}
void SetCaloLego(TEveCaloLego* c) {fCalo = c;} void SetCaloLego(TEveCaloLego* c) {fCalo = c;}
void SetShowPlane (Bool_t x) { fShowPlane = x; }
Bool_t GetShowPlane() const { return fShowPlane; }
void SetHeaderTxt(const char *txt) {fHeaderTxt = txt; }
const char* GetHeaderTxt() const { return fHeaderTxt; }
void SetShowCamera (Bool_t x) { fShowCamera = x; } void SetShowScales(Bool_t x) { fShowScales = x;}
Bool_t GetShowCamera() const { return fShowCamera; } void SetScaleColorTransparency(Color_t colIdx, UChar_t transp);
void SetShowPlane (Bool_t x) { fShowPlane = x; } void SetScalePosition(Double_t x, Double_t y);
Bool_t GetShowPlane() const { return fShowPlane; }
void SetHeaderTxt(const char *txt) {fHeaderTxt = txt; } void SetFrameAttribs(Color_t frameCol, UChar_t lineTransp, UCha
const char* GetHeaderTxt() const { return fHeaderTxt; } r_t bgTransp);
ClassDef(TEveCaloLegoOverlay, 0); // GL-overaly control GUI for TEveCalo Lego. ClassDef(TEveCaloLegoOverlay, 0); // GL-overaly control GUI for TEveCalo Lego.
}; };
#endif #endif
 End of changes. 16 change blocks. 
32 lines changed or deleted 51 lines changed or added


 TEveElement.h   TEveElement.h 
// @(#)root/eve:$Id: TEveElement.h 27577 2009-02-23 14:34:36Z matevz $ // @(#)root/eve:$Id: TEveElement.h 29499 2009-07-16 16:51:38Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 241 skipping to change at line 241
virtual void DestroyElements(); // *MENU* virtual void DestroyElements(); // *MENU*
virtual Bool_t HandleElementPaste(TEveElement* el); virtual Bool_t HandleElementPaste(TEveElement* el);
virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw= kFALSE); virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw= kFALSE);
virtual Bool_t CanEditElement() const { return kTRUE; } virtual Bool_t CanEditElement() const { return kTRUE; }
virtual Bool_t SingleRnrState() const { return kFALSE; } virtual Bool_t SingleRnrState() const { return kFALSE; }
virtual Bool_t GetRnrSelf() const { return fRnrSelf; } virtual Bool_t GetRnrSelf() const { return fRnrSelf; }
virtual Bool_t GetRnrChildren() const { return fRnrChildren; } virtual Bool_t GetRnrChildren() const { return fRnrChildren; }
virtual Bool_t GetRnrState() const { return fRnrSelf && fRnrChildren; } virtual Bool_t GetRnrState() const { return fRnrSelf && fRnrChildren; }
virtual Bool_t GetRnrAnything() const { return fRnrSelf || (fRnrChildren && HasChildren()); }
virtual Bool_t SetRnrSelf(Bool_t rnr); virtual Bool_t SetRnrSelf(Bool_t rnr);
virtual Bool_t SetRnrChildren(Bool_t rnr); virtual Bool_t SetRnrChildren(Bool_t rnr);
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children); virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children);
virtual Bool_t SetRnrState(Bool_t rnr); virtual Bool_t SetRnrState(Bool_t rnr);
virtual void PropagateRnrStateToProjecteds(); virtual void PropagateRnrStateToProjecteds();
virtual Bool_t CanEditMainColor() const { return kFALSE; } virtual Bool_t CanEditMainColor() const { return kFALSE; }
Color_t* GetMainColorPtr() const { return fMainColorPtr; } Color_t* GetMainColorPtr() const { return fMainColorPtr; }
void SetMainColorPtr(Color_t* color) { fMainColorPtr = color; } void SetMainColorPtr(Color_t* color) { fMainColorPtr = color; }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TEveGeoNode.h   TEveGeoNode.h 
// @(#)root/eve:$Id: TEveGeoNode.h 28354 2009-04-24 17:22:02Z matevz $ // @(#)root/eve:$Id: TEveGeoNode.h 29908 2009-08-25 18:09:53Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 107 skipping to change at line 107
Int_t fVisLevel; Int_t fVisLevel;
Int_t fMaxVisNodes; Int_t fMaxVisNodes;
public: public:
TEveGeoTopNode(TGeoManager* manager, TGeoNode* node, Int_t visopt=1, TEveGeoTopNode(TGeoManager* manager, TGeoNode* node, Int_t visopt=1,
Int_t vislvl=3, Int_t maxvisnds=10000); Int_t vislvl=3, Int_t maxvisnds=10000);
virtual ~TEveGeoTopNode() {} virtual ~TEveGeoTopNode() {}
void UseNodeTrans(); void UseNodeTrans();
TGeoManager* GetGeoManager() const { return fManager; }
Int_t GetVisOption() const { return fVisOption; } Int_t GetVisOption() const { return fVisOption; }
void SetVisOption(Int_t vo) { fVisOption = vo; } void SetVisOption(Int_t vo) { fVisOption = vo; }
Int_t GetVisLevel() const { return fVisLevel; } Int_t GetVisLevel() const { return fVisLevel; }
void SetVisLevel(Int_t vl) { fVisLevel = vl; } void SetVisLevel(Int_t vl) { fVisLevel = vl; }
Int_t GetMaxVisNodes() const { return fMaxVisNodes; } Int_t GetMaxVisNodes() const { return fMaxVisNodes; }
void SetMaxVisNodes(Int_t mvn) { fMaxVisNodes = mvn; } void SetMaxVisNodes(Int_t mvn) { fMaxVisNodes = mvn; }
virtual Bool_t CanEditElement() const { return kTRUE; } virtual Bool_t CanEditElement() const { return kTRUE; }
virtual Bool_t SingleRnrState() const { return kTRUE; } virtual Bool_t SingleRnrState() const { return kTRUE; }
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TEveLegoEventHandler.h   TEveLegoEventHandler.h 
// @(#)root/eve:$Id: TEveLegoEventHandler.h 25245 2008-08-25 21:44:09Z mate vz $ // @(#)root/eve:$Id: TEveLegoEventHandler.h 30425 2009-09-24 19:45:11Z mate vz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 30 skipping to change at line 30
class TEveLegoEventHandler : public TGLEventHandler class TEveLegoEventHandler : public TGLEventHandler
{ {
private: private:
TEveLegoEventHandler(const TEveLegoEventHandler&); // Not imp lemented TEveLegoEventHandler(const TEveLegoEventHandler&); // Not imp lemented
TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not imp lemented TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not imp lemented
protected: protected:
enum EMode_e { kLocked, kFree }; enum EMode_e { kLocked, kFree };
EMode_e fMode; // current rotation mode EMode_e fMode; // current rotation mode
Float_t fTransTheta; // transition theta Float_t fTransTheta; // transition theta in radians
Float_t fTheta; Float_t fTheta;
TEveCaloLego* fLastPickedLego;
virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo d2); virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo d2);
public: public:
TEveLegoEventHandler(const char *name, TGWindow *w, TObject *obj, const TEveCaloLego* fLego;
char *title="");
TEveLegoEventHandler(TGWindow *w, TObject *obj, TEveCaloLego* lego = 0);
virtual ~TEveLegoEventHandler() {} virtual ~TEveLegoEventHandler() {}
virtual Bool_t HandleKey(Event_t *event); virtual Bool_t HandleKey(Event_t *event);
virtual Bool_t HandleDoubleClick(Event_t *event); virtual Bool_t HandleDoubleClick(Event_t *event);
Float_t GetTransTheta() {return fTransTheta;} Float_t GetTransTheta() {return fTransTheta;}
void SetTransTheta(Float_t h) {fTransTheta=h;} void SetTransTheta(Float_t h) {fTransTheta=h;}
TEveCaloLego* GetLego() { return fLego; }
void SetLego( TEveCaloLego* x) { fLego = x; }
ClassDef(TEveLegoEventHandler, 0); // A GL event handler class. Swiches perspective or orthographic camera. ClassDef(TEveLegoEventHandler, 0); // A GL event handler class. Swiches perspective or orthographic camera.
}; };
#endif #endif
 End of changes. 5 change blocks. 
6 lines changed or deleted 8 lines changed or added


 TEveLine.h   TEveLine.h 
// @(#)root/eve:$Id: TEveLine.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveLine.h 29764 2009-08-12 11:27:40Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 58 skipping to change at line 58
Bool_t GetRnrLine() const { return fRnrLine; } Bool_t GetRnrLine() const { return fRnrLine; }
Bool_t GetRnrPoints() const { return fRnrPoints; } Bool_t GetRnrPoints() const { return fRnrPoints; }
Bool_t GetSmooth() const { return fSmooth; } Bool_t GetSmooth() const { return fSmooth; }
void SetRnrLine(Bool_t r); void SetRnrLine(Bool_t r);
void SetRnrPoints(Bool_t r); void SetRnrPoints(Bool_t r);
void SetSmooth(Bool_t r); void SetSmooth(Bool_t r);
void ReduceSegmentLengths(Float_t max); void ReduceSegmentLengths(Float_t max);
TEveVector GetLineStart() const;
TEveVector GetLineEnd() const;
virtual void CopyVizParams(const TEveElement* el); virtual void CopyVizParams(const TEveElement* el);
virtual void WriteVizParams(ostream& out, const TString& var); virtual void WriteVizParams(ostream& out, const TString& var);
virtual TClass* ProjectedClass() const; virtual TClass* ProjectedClass() const;
static Bool_t GetDefaultSmooth() { return fgDefaultSmooth; } static Bool_t GetDefaultSmooth() { return fgDefaultSmooth; }
static void SetDefaultSmooth(Bool_t r) { fgDefaultSmooth = r; } static void SetDefaultSmooth(Bool_t r) { fgDefaultSmooth = r; }
ClassDef(TEveLine, 0); // An arbitrary polyline with fixed line and mark er attributes. ClassDef(TEveLine, 0); // An arbitrary polyline with fixed line and mark er attributes.
}; };
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TEveManager.h   TEveManager.h 
// @(#)root/eve:$Id: TEveManager.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveManager.h 29481 2009-07-16 07:35:38Z brun $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 63 skipping to change at line 63
class TRedrawDisabler class TRedrawDisabler
{ {
private: private:
TRedrawDisabler(const TRedrawDisabler&); // Not implemente d TRedrawDisabler(const TRedrawDisabler&); // Not implemente d
TRedrawDisabler& operator=(const TRedrawDisabler&); // Not implemente d TRedrawDisabler& operator=(const TRedrawDisabler&); // Not implemente d
TEveManager* fMgr; TEveManager* fMgr;
public: public:
TRedrawDisabler(TEveManager* m) : fMgr(m) TRedrawDisabler(TEveManager* m) : fMgr(m)
{ if (fMgr) fMgr->DisableRedraw(); } { if (fMgr) fMgr->DisableRedraw(); }
~TRedrawDisabler() virtual ~TRedrawDisabler()
{ if (fMgr) fMgr->EnableRedraw(); } { if (fMgr) fMgr->EnableRedraw(); }
ClassDef(TRedrawDisabler, 0); // Exception-safe EVE redraw-disabler.
}; };
class TExceptionHandler : public TStdExceptionHandler class TExceptionHandler : public TStdExceptionHandler
{ {
public: public:
TExceptionHandler() : TStdExceptionHandler() { Add(); } TExceptionHandler() : TStdExceptionHandler() { Add(); }
virtual ~TExceptionHandler() { Remove(); } virtual ~TExceptionHandler() { Remove(); }
virtual EStatus Handle(std::exception& exc); virtual EStatus Handle(std::exception& exc);
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 TEvePointSet.h   TEvePointSet.h 
// @(#)root/eve:$Id: TEvePointSet.h 27556 2009-02-20 17:38:28Z matevz $ // @(#)root/eve:$Id: TEvePointSet.h 30254 2009-09-18 17:24:24Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 115 skipping to change at line 115
public TNamed, public TNamed,
public TAttMarker, public TAttMarker,
public TEvePointSelectorConsumer public TEvePointSelectorConsumer
{ {
friend class TEvePointSetArrayEditor; friend class TEvePointSetArrayEditor;
TEvePointSetArray(const TEvePointSetArray&); // Not implement ed TEvePointSetArray(const TEvePointSetArray&); // Not implement ed
TEvePointSetArray& operator=(const TEvePointSetArray&); // Not implement ed TEvePointSetArray& operator=(const TEvePointSetArray&); // Not implement ed
protected: protected:
TEvePointSet** fBins; // Pointers to subjugated TEveP ointSet's. TEvePointSet **fBins; // Pointers to subjugated TEvePoint Set's.
Int_t fDefPointSetCapacity; // Default capacity of subjugated T EvePointSet's. Int_t fDefPointSetCapacity; // Default capacity of subjugated T EvePointSet's.
Int_t fNBins; // Number of subjugated TEvePointSe t's. Int_t fNBins; // Number of subjugated TEvePointSe t's.
Int_t fLastBin; //! Index of the last filled TEvePoi ntSet. Int_t fLastBin; //! Index of the last filled TEvePoi ntSet.
Double_t fMin, fCurMin; // Overall and current minimum valu e of the separating quantity. Double_t fMin, fCurMin; // Overall and current minimum valu e of the separating quantity.
Double_t fMax, fCurMax; // Overall and current maximum valu e of the separating quantity. Double_t fMax, fCurMax; // Overall and current maximum valu e of the separating quantity.
Double_t fBinWidth; // Separating quantity bin-width. Double_t fBinWidth; // Separating quantity bin-width.
TString fQuantName; // Name of the separating quantity. TString fQuantName; // Name of the separating quantity.
public: public:
TEvePointSetArray(const char* name="TEvePointSetArray", const char* titl e=""); TEvePointSetArray(const char* name="TEvePointSetArray", const char* titl e="");
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TEveProjectionAxes.h   TEveProjectionAxes.h 
// @(#)root/eve:$Id: TEveProjectionAxes.h 27341 2009-02-03 19:47:35Z matevz $ // @(#)root/eve:$Id: TEveProjectionAxes.h 30384 2009-09-23 17:54:23Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 43 skipping to change at line 43
enum ELabMode { kPosition, kValue }; enum ELabMode { kPosition, kValue };
enum EAxesMode { kHorizontal, kVertical, kAll}; enum EAxesMode { kHorizontal, kVertical, kAll};
private: private:
TEveProjectionAxes(const TEveProjectionAxes&); // Not impleme nted TEveProjectionAxes(const TEveProjectionAxes&); // Not impleme nted
TEveProjectionAxes& operator=(const TEveProjectionAxes&); // Not impleme nted TEveProjectionAxes& operator=(const TEveProjectionAxes&); // Not impleme nted
protected: protected:
TEveProjectionManager* fManager; // Model object. TEveProjectionManager* fManager; // Model object.
Color_t fColor; // Main eve-element color. Bool_t fUseColorSet;
ELabMode fLabMode; // Division of distorted space. ELabMode fLabMode; // Division of distorted space.
EAxesMode fAxesMode; // Axis vertical/hotrizontal orientat ion. EAxesMode fAxesMode; // Axis vertical/hotrizontal orientat ion.
Bool_t fDrawCenter; // Draw center of distortion. Bool_t fDrawCenter; // Draw center of distortion.
Bool_t fDrawOrigin; // Draw origin. Bool_t fDrawOrigin; // Draw origin.
public: public:
TEveProjectionAxes(TEveProjectionManager* m); TEveProjectionAxes(TEveProjectionManager* m, Bool_t useColorSet = kTRUE) ;
virtual ~TEveProjectionAxes(); virtual ~TEveProjectionAxes();
TEveProjectionManager* GetManager(){ TEveProjectionManager* GetManager(){
return fManager; return fManager;
} }
void SetLabMode(ELabMode x) { fLabMode = x; } void SetLabMode(ELabMode x) { fLabMode = x; }
ELabMode GetLabMode() const { return fLabMode;} ELabMode GetLabMode() const { return fLabMode;}
void SetAxesMode(EAxesMode x) { fAxesMode = x; } void SetAxesMode(EAxesMode x) { fAxesMode = x; }
EAxesMode GetAxesMode() const { return fAxesMode; } EAxesMode GetAxesMode() const { return fAxesMode; }
void SetDrawCenter(Bool_t x) { fDrawCenter = x; } void SetDrawCenter(Bool_t x) { fDrawCenter = x; }
Bool_t GetDrawCenter() const { return fDrawCenter; } Bool_t GetDrawCenter() const { return fDrawCenter; }
void SetDrawOrigin(Bool_t x) { fDrawOrigin = x; } void SetDrawOrigin(Bool_t x) { fDrawOrigin = x; }
Bool_t GetDrawOrigin() const { return fDrawOrigin; } Bool_t GetDrawOrigin() const { return fDrawOrigin; }
virtual Bool_t CanEditMainColor() const { return kTRUE;}
virtual void Paint(Option_t* option=""); virtual void Paint(Option_t* option="");
virtual void ComputeBBox(); virtual void ComputeBBox();
virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE); virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
ClassDef(TEveProjectionAxes, 1); // Class to draw scales in non-linear p rojections. ClassDef(TEveProjectionAxes, 1); // Class to draw scales in non-linear p rojections.
}; };
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 3 lines changed or added


 TEveRGBAPalette.h   TEveRGBAPalette.h 
// @(#)root/eve:$Id: TEveRGBAPalette.h 21215 2007-12-05 17:19:23Z matevz $ // @(#)root/eve:$Id: TEveRGBAPalette.h 29357 2009-07-06 17:53:36Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 36 skipping to change at line 36
private: private:
TEveRGBAPalette(const TEveRGBAPalette&); // Not implemented TEveRGBAPalette(const TEveRGBAPalette&); // Not implemented
TEveRGBAPalette& operator=(const TEveRGBAPalette&); // Not implemented TEveRGBAPalette& operator=(const TEveRGBAPalette&); // Not implemented
protected: protected:
Int_t fLowLimit; // Low limit for Min/Max values (used by editor) Int_t fLowLimit; // Low limit for Min/Max values (used by editor)
Int_t fHighLimit; // High limit for Min/Max values (used by editor) Int_t fHighLimit; // High limit for Min/Max values (used by editor)
Int_t fMinVal; Int_t fMinVal;
Int_t fMaxVal; Int_t fMaxVal;
Int_t fNBins;
Bool_t fInterpolate; Bool_t fInterpolate; // Interpolate colors for signal values.
Bool_t fShowDefValue; Bool_t fShowDefValue; // Flags whether signals with default value s
hould be shown.
Bool_t fFixColorRange; // If true, map palette to low/high limit oth
erwise to min/max value.
Int_t fUnderflowAction; Int_t fUnderflowAction;
Int_t fOverflowAction; Int_t fOverflowAction;
Color_t fDefaultColor; // Color for when value is not specified Color_t fDefaultColor; // Color for when value is not specified
UChar_t fDefaultRGBA[4]; UChar_t fDefaultRGBA[4];
Color_t fUnderColor; // Underflow color Color_t fUnderColor; // Underflow color
UChar_t fUnderRGBA[4]; UChar_t fUnderRGBA[4];
Color_t fOverColor; // Overflow color Color_t fOverColor; // Overflow color
UChar_t fOverRGBA[4]; UChar_t fOverRGBA[4];
mutable Int_t fNBins; // Number of signal-color entries.
mutable Int_t fCAMin; // Minimal signal in color-array.
mutable Int_t fCAMax; // Maximal signal in color-array.
mutable UChar_t* fColorArray; //[4*fNBins] mutable UChar_t* fColorArray; //[4*fNBins]
void SetupColor(Int_t val, UChar_t* pix) const; void SetupColor(Int_t val, UChar_t* pix) const;
static TEveRGBAPalette* fgDefaultPalette; static TEveRGBAPalette* fgDefaultPalette;
public: public:
TEveRGBAPalette(); TEveRGBAPalette();
TEveRGBAPalette(Int_t min, Int_t max, Bool_t interp=kFALSE, Bool_t showd TEveRGBAPalette(Int_t min, Int_t max, Bool_t interp=kTRUE,
ef=kTRUE); Bool_t showdef=kTRUE, Bool_t fixcolrng=kFALSE);
virtual ~TEveRGBAPalette(); virtual ~TEveRGBAPalette();
void SetupColorArray() const; void SetupColorArray() const;
void ClearColorArray(); void ClearColorArray();
Bool_t WithinVisibleRange(Int_t val) const; Bool_t WithinVisibleRange(Int_t val) const;
const UChar_t* ColorFromValue(Int_t val) const; const UChar_t* ColorFromValue(Int_t val) const;
void ColorFromValue(Int_t val, UChar_t* pix, Bool_t alpha=kTRUE) con st; void ColorFromValue(Int_t val, UChar_t* pix, Bool_t alpha=kTRUE) con st;
Bool_t ColorFromValue(Int_t val, Int_t defVal, UChar_t* pix, Bool_t al pha=kTRUE) const; Bool_t ColorFromValue(Int_t val, Int_t defVal, UChar_t* pix, Bool_t al pha=kTRUE) const;
skipping to change at line 89 skipping to change at line 93
Int_t GetHighLimit() const { return fHighLimit; } Int_t GetHighLimit() const { return fHighLimit; }
// ================================================================ // ================================================================
Bool_t GetInterpolate() const { return fInterpolate; } Bool_t GetInterpolate() const { return fInterpolate; }
void SetInterpolate(Bool_t b); void SetInterpolate(Bool_t b);
Bool_t GetShowDefValue() const { return fShowDefValue; } Bool_t GetShowDefValue() const { return fShowDefValue; }
void SetShowDefValue(Bool_t v) { fShowDefValue = v; } void SetShowDefValue(Bool_t v) { fShowDefValue = v; }
Bool_t GetFixColorRange() const { return fFixColorRange; }
void SetFixColorRange(Bool_t v);
Int_t GetUnderflowAction() const { return fUnderflowAction; } Int_t GetUnderflowAction() const { return fUnderflowAction; }
Int_t GetOverflowAction() const { return fOverflowAction; } Int_t GetOverflowAction() const { return fOverflowAction; }
void SetUnderflowAction(Int_t a) { fUnderflowAction = a; } void SetUnderflowAction(Int_t a) { fUnderflowAction = a; }
void SetOverflowAction(Int_t a) { fOverflowAction = a; } void SetOverflowAction(Int_t a) { fOverflowAction = a; }
// ================================================================ // ================================================================
Color_t GetDefaultColor() const { return fDefaultColor; } Color_t GetDefaultColor() const { return fDefaultColor; }
Color_t* PtrDefaultColor() { return &fDefaultColor; } Color_t* PtrDefaultColor() { return &fDefaultColor; }
UChar_t* GetDefaultRGBA() { return fDefaultRGBA; } UChar_t* GetDefaultRGBA() { return fDefaultRGBA; }
const UChar_t* GetDefaultRGBA() const { return fDefaultRGBA; } const UChar_t* GetDefaultRGBA() const { return fDefaultRGBA; }
void SetDefaultColor(Color_t ci); void SetDefaultColor(Color_t ci);
void SetDefaultColor(Pixel_t pix); void SetDefaultColorPixel(Pixel_t pix);
void SetDefaultColor(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255); void SetDefaultColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=25
5);
// ---------------------------------------------------------------- // ----------------------------------------------------------------
Color_t GetUnderColor() const { return fUnderColor; } Color_t GetUnderColor() const { return fUnderColor; }
Color_t* PtrUnderColor() { return &fUnderColor; } Color_t* PtrUnderColor() { return &fUnderColor; }
UChar_t* GetUnderRGBA() { return fUnderRGBA; } UChar_t* GetUnderRGBA() { return fUnderRGBA; }
const UChar_t* GetUnderRGBA() const { return fUnderRGBA; } const UChar_t* GetUnderRGBA() const { return fUnderRGBA; }
void SetUnderColor(Color_t ci); void SetUnderColor(Color_t ci);
void SetUnderColor(Pixel_t pix); void SetUnderColorPixel(Pixel_t pix);
void SetUnderColor(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255); void SetUnderColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
;
// ---------------------------------------------------------------- // ----------------------------------------------------------------
Color_t GetOverColor() const { return fOverColor; } Color_t GetOverColor() const { return fOverColor; }
Color_t* PtrOverColor() { return &fOverColor; } Color_t* PtrOverColor() { return &fOverColor; }
UChar_t* GetOverRGBA() { return fOverRGBA; } UChar_t* GetOverRGBA() { return fOverRGBA; }
const UChar_t* GetOverRGBA() const { return fOverRGBA; } const UChar_t* GetOverRGBA() const { return fOverRGBA; }
void SetOverColor(Color_t ci); void SetOverColor(Color_t ci);
void SetOverColor(Pixel_t pix); void SetOverColorPixel(Pixel_t pix);
void SetOverColor(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255); void SetOverColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
// ================================================================ // ================================================================
// ?? Should we emit some *SIGNALS* ?? // ?? Should we emit some *SIGNALS* ??
// ?? Should we have a RendererTimeStamp ?? // ?? Should we have a RendererTimeStamp ??
ClassDef(TEveRGBAPalette, 1); // A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range truncation mod es. ClassDef(TEveRGBAPalette, 1); // A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range truncation mod es.
}; };
/************************************************************************** ****/ /************************************************************************** ****/
skipping to change at line 156 skipping to change at line 163
return kTRUE; return kTRUE;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline const UChar_t* TEveRGBAPalette::ColorFromValue(Int_t val) const inline const UChar_t* TEveRGBAPalette::ColorFromValue(Int_t val) const
{ {
// Here we expect that kLA_Cut has been checked; we further check // Here we expect that kLA_Cut has been checked; we further check
// for kLA_Wrap and kLA_Clip otherwise we proceed as for kLA_Mark. // for kLA_Wrap and kLA_Clip otherwise we proceed as for kLA_Mark.
if (!fColorArray) SetupColorArray(); if (!fColorArray) SetupColorArray();
if (val < fMinVal) {
if (val < fMinVal)
{
if (fUnderflowAction == kLA_Wrap) if (fUnderflowAction == kLA_Wrap)
val = (val+1-fMinVal)%fNBins + fMaxVal; val = (val+1-fCAMin)%fNBins + fCAMax;
else if (fUnderflowAction == kLA_Clip) else if (fUnderflowAction == kLA_Clip)
val = fMinVal; val = fMinVal;
else else
return fUnderRGBA; return fUnderRGBA;
} }
else if(val > fMaxVal) { else if(val > fMaxVal)
{
if (fOverflowAction == kLA_Wrap) if (fOverflowAction == kLA_Wrap)
val = (val-1-fMaxVal)%fNBins + fMinVal; val = (val-1-fCAMax)%fNBins + fCAMin;
else if (fOverflowAction == kLA_Clip) else if (fOverflowAction == kLA_Clip)
val = fMaxVal; val = fMaxVal;
else else
return fOverRGBA; return fOverRGBA;
} }
return fColorArray + 4 * (val - fMinVal);
return fColorArray + 4 * (val - fCAMin);
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TEveRGBAPalette::ColorFromValue(Int_t val, UChar_t* pix, Bool_t alpha) const inline void TEveRGBAPalette::ColorFromValue(Int_t val, UChar_t* pix, Bool_t alpha) const
{ {
const UChar_t* c = ColorFromValue(val); const UChar_t* c = ColorFromValue(val);
pix[0] = c[0]; pix[1] = c[1]; pix[2] = c[2]; pix[0] = c[0]; pix[1] = c[1]; pix[2] = c[2];
if (alpha) pix[3] = c[3]; if (alpha) pix[3] = c[3];
} }
 End of changes. 14 change blocks. 
17 lines changed or deleted 31 lines changed or added


 TEveRGBAPaletteEditor.h   TEveRGBAPaletteEditor.h 
// @(#)root/eve:$Id: TEveRGBAPaletteEditor.h 21310 2007-12-10 19:05:45Z mat evz $ // @(#)root/eve:$Id: TEveRGBAPaletteEditor.h 29357 2009-07-06 17:53:36Z mat evz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 32 skipping to change at line 32
class TEveGValuator; class TEveGValuator;
class TEveGDoubleValuator; class TEveGDoubleValuator;
class TEveRGBAPaletteSubEditor : public TGVerticalFrame class TEveRGBAPaletteSubEditor : public TGVerticalFrame
{ {
private: private:
TEveRGBAPaletteSubEditor(const TEveRGBAPaletteSubEditor&); // Not implemented TEveRGBAPaletteSubEditor(const TEveRGBAPaletteSubEditor&); // Not implemented
TEveRGBAPaletteSubEditor& operator=(const TEveRGBAPaletteSubEditor&); // Not implemented TEveRGBAPaletteSubEditor& operator=(const TEveRGBAPaletteSubEditor&); // Not implemented
protected: protected:
TEveRGBAPalette* fM; TEveRGBAPalette *fM;
TGComboBox* fUnderflowAction; TGComboBox *fUnderflowAction;
TGColorSelect* fUnderColor; TGColorSelect *fUnderColor;
TGComboBox* fOverflowAction; TGComboBox *fOverflowAction;
TGColorSelect* fOverColor; TGColorSelect *fOverColor;
TEveGDoubleValuator* fMinMax; TEveGDoubleValuator *fMinMax;
TGCheckButton* fInterpolate; TGCheckButton *fInterpolate;
TGCheckButton* fShowDefValue; TGCheckButton *fShowDefValue;
TGColorSelect* fDefaultColor; TGColorSelect *fDefaultColor;
TGCheckButton *fFixColorRange;
public: public:
TEveRGBAPaletteSubEditor(const TGWindow* p); TEveRGBAPaletteSubEditor(const TGWindow* p);
virtual ~TEveRGBAPaletteSubEditor() {} virtual ~TEveRGBAPaletteSubEditor() {}
void SetModel(TEveRGBAPalette* p); void SetModel(TEveRGBAPalette* p);
void Changed(); //*SIGNAL* void Changed(); //*SIGNAL*
void DoMinMax(); void DoMinMax();
void DoInterpolate(); void DoInterpolate();
void DoShowDefValue(); void DoShowDefValue();
void DoDefaultColor(Pixel_t color); void DoDefaultColor(Pixel_t color);
void DoFixColorRange();
void DoUnderColor(Pixel_t color); void DoUnderColor(Pixel_t color);
void DoOverColor(Pixel_t color); void DoOverColor(Pixel_t color);
void DoUnderflowAction(Int_t mode); void DoUnderflowAction(Int_t mode);
void DoOverflowAction(Int_t mode); void DoOverflowAction(Int_t mode);
ClassDef(TEveRGBAPaletteSubEditor, 1); // Sub-editor for TEveRGBAPalette class. ClassDef(TEveRGBAPaletteSubEditor, 1); // Sub-editor for TEveRGBAPalette class.
}; };
/************************************************************************** ****/ /************************************************************************** ****/
/************************************************************************** ****/ /************************************************************************** ****/
class TEveRGBAPaletteEditor : public TGedFrame class TEveRGBAPaletteEditor : public TGedFrame
{ {
private: private:
TEveRGBAPaletteEditor(const TEveRGBAPaletteEditor&); // Not i mplemented TEveRGBAPaletteEditor(const TEveRGBAPaletteEditor&); // Not i mplemented
TEveRGBAPaletteEditor& operator=(const TEveRGBAPaletteEditor&); // Not i mplemented TEveRGBAPaletteEditor& operator=(const TEveRGBAPaletteEditor&); // Not i mplemented
protected: protected:
TEveRGBAPalette* fM; TEveRGBAPalette *fM;
TEveRGBAPaletteSubEditor* fSE; TEveRGBAPaletteSubEditor *fSE;
public: public:
TEveRGBAPaletteEditor(const TGWindow* p=0, Int_t width=170, Int_t height =30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground() ); TEveRGBAPaletteEditor(const TGWindow* p=0, Int_t width=170, Int_t height =30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground() );
virtual ~TEveRGBAPaletteEditor() {} virtual ~TEveRGBAPaletteEditor() {}
virtual void SetModel(TObject* obj); virtual void SetModel(TObject* obj);
ClassDef(TEveRGBAPaletteEditor, 1); // Editor for TEveRGBAPalette class. ClassDef(TEveRGBAPaletteEditor, 1); // Editor for TEveRGBAPalette class.
}; };
 End of changes. 5 change blocks. 
14 lines changed or deleted 16 lines changed or added


 TEveScene.h   TEveScene.h 
// @(#)root/eve:$Id: TEveScene.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveScene.h 29695 2009-08-06 11:10:55Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEveScene #ifndef ROOT_TEveScene
#define ROOT_TEveScene #define ROOT_TEveScene
#include "TEveElement.h" #include "TEveElement.h"
#include "TEvePad.h"
class TEvePad;
class TGLScenePad; class TGLScenePad;
/************************************************************************** ****/ /************************************************************************** ****/
// TEveScene // TEveScene
/************************************************************************** ****/ /************************************************************************** ****/
class TEveScene : public TEveElementList class TEveScene : public TEveElementList
{ {
private: private:
TEveScene(const TEveScene&); // Not implemented TEveScene(const TEveScene&); // Not implemented
TEveScene& operator=(const TEveScene&); // Not implemented TEveScene& operator=(const TEveScene&); // Not implemented
protected: protected:
TEvePad *fPad; TEvePad *fPad;
TGLScenePad *fGLScene; TGLScenePad *fGLScene;
Bool_t fChanged; Bool_t fChanged;
Bool_t fSmartRefresh; Bool_t fSmartRefresh;
Bool_t fHierarchical;
void RetransHierarchicallyRecurse(TEveElement* el, const TEveTrans& tp);
public: public:
TEveScene(const char* n="TEveScene", const char* t=""); TEveScene(const char* n="TEveScene", const char* t="");
virtual ~TEveScene(); virtual ~TEveScene();
virtual void CollectSceneParents(List_t& scenes); virtual void CollectSceneParents(List_t& scenes);
virtual Bool_t SingleRnrState() const { return kTRUE; }
void Changed() { fChanged = kTRUE; } void Changed() { fChanged = kTRUE; }
Bool_t IsChanged() const { return fChanged; } Bool_t IsChanged() const { return fChanged; }
void SetHierarchical(Bool_t h) { fHierarchical = h; }
Bool_t GetHierarchical() const { return fHierarchical; }
void Repaint(Bool_t dropLogicals=kFALSE); void Repaint(Bool_t dropLogicals=kFALSE);
void RetransHierarchically();
TGLScenePad* GetGLScene() const { return fGLScene; } TGLScenePad* GetGLScene() const { return fGLScene; }
void SetGLScene(TGLScenePad* s) { fGLScene = s; } void SetGLScene(TGLScenePad* s) { fGLScene = s; }
virtual void SetName(const char* n); virtual void SetName(const char* n);
virtual void Paint(Option_t* option = ""); virtual void Paint(Option_t* option = "");
void DestroyElementRenderers(TEveElement* element); void DestroyElementRenderers(TEveElement* element);
void DestroyElementRenderers(TObject* rnrObj); void DestroyElementRenderers(TObject* rnrObj);
 End of changes. 7 change blocks. 
2 lines changed or deleted 12 lines changed or added


 TEveStraightLineSetGL.h   TEveStraightLineSetGL.h 
// @(#)root/eve:$Id: TEveStraightLineSetGL.h 28197 2009-04-14 13:59:27Z mat evz $ // @(#)root/eve:$Id: TEveStraightLineSetGL.h 29754 2009-08-11 15:48:54Z mat evz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 40 skipping to change at line 40
public: public:
TEveStraightLineSetGL(); TEveStraightLineSetGL();
virtual ~TEveStraightLineSetGL() {} virtual ~TEveStraightLineSetGL() {}
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void Draw(TGLRnrCtx& rnrCtx) const; virtual void Draw(TGLRnrCtx& rnrCtx) const;
virtual void DirectDraw(TGLRnrCtx& rnrCtx) const; virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
// To support two-level selectionvirtual virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
virtual Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const; virtual Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const;
virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
virtual void ProcessSelection(TGLRnrCtx& rnrCtx, TGLSelectRecord& rec); virtual void ProcessSelection(TGLRnrCtx& rnrCtx, TGLSelectRecord& rec);
ClassDef(TEveStraightLineSetGL, 0); // GL-renderer for TEveStraightLineS et class. ClassDef(TEveStraightLineSetGL, 0); // GL-renderer for TEveStraightLineS et class.
}; };
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added


 TEveTextGL.h   TEveTextGL.h 
// @(#)root/eve:$Id: TEveTextGL.h 22539 2008-03-08 14:36:37Z rdm $ // @(#)root/eve:$Id: TEveTextGL.h 30418 2009-09-24 17:10:11Z matevz $
// Authors: Alja & Matevz Tadel 2008 // Authors: Alja & Matevz Tadel 2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 31 skipping to change at line 31
{ {
private: private:
TEveTextGL(const TEveTextGL&); // Not implemented TEveTextGL(const TEveTextGL&); // Not implemented
TEveTextGL& operator=(const TEveTextGL&); // Not implemented TEveTextGL& operator=(const TEveTextGL&); // Not implemented
protected: protected:
TEveText *fM; // model object. TEveText *fM; // model object.
mutable TGLFont fFont; // FTFont wrapper mutable TGLFont fFont; // FTFont wrapper
mutable Double_t fX[4][3]; // 3D position of font mutable Double_t fX[4][3]; // 3D position of font
void SetFont(TGLRnrCtx & rnrCtx) const;
public: public:
TEveTextGL(); TEveTextGL();
virtual ~TEveTextGL() {} virtual ~TEveTextGL() {}
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
ClassDef(TEveTextGL, 0); // GL renderer class for TEveText. ClassDef(TEveTextGL, 0); // GL renderer class for TEveText.
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 TEveTrack.h   TEveTrack.h 
// @(#)root/eve:$Id: TEveTrack.h 27556 2009-02-20 17:38:28Z matevz $ // @(#)root/eve:$Id: TEveTrack.h 29816 2009-08-18 15:51:02Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 52 skipping to change at line 52
protected: protected:
TEveVector fV; // Starting vertex TEveVector fV; // Starting vertex
TEveVector fP; // Starting momentum TEveVector fP; // Starting momentum
TEveVector fPEnd; // Momentum at the last point of extrapo lation TEveVector fPEnd; // Momentum at the last point of extrapo lation
Double_t fBeta; // Relativistic beta factor Double_t fBeta; // Relativistic beta factor
Int_t fPdg; // PDG code Int_t fPdg; // PDG code
Int_t fCharge; // Charge in units of e0 Int_t fCharge; // Charge in units of e0
Int_t fLabel; // Simulation label Int_t fLabel; // Simulation label
Int_t fIndex; // Reconstruction index Int_t fIndex; // Reconstruction index
Int_t fStatus; // Status-word, user-defined.
Bool_t fLockPoints; // Lock points that are currently in - d o nothing in MakeTrack(). Bool_t fLockPoints; // Lock points that are currently in - d o nothing in MakeTrack().
vPathMark_t fPathMarks; // TEveVector of known points along the track vPathMark_t fPathMarks; // TEveVector of known points along the track
TEveTrackPropagator *fPropagator; // Pointer to shared render-style TEveTrackPropagator *fPropagator; // Pointer to shared render-style
UChar_t fBreakProjectedTracks; // How to handle breaks durin g projection - track specific settings. UChar_t fBreakProjectedTracks; // How to handle breaks durin g projection - track specific settings.
static Bool_t fgDefaultBreakProjectedTracks; // How to handle break s during projection - global setting. static Bool_t fgDefaultBreakProjectedTracks; // How to handle break s during projection - global setting.
public: public:
TEveTrack(); TEveTrack();
TEveTrack(TParticle* t, Int_t label, TEveTrackPropagator* rs); TEveTrack(TParticle* t, Int_t label, TEveTrackPropagator* prop=0);
TEveTrack(TEveMCTrack* t, TEveTrackPropagator* rs); TEveTrack(TEveMCTrack* t, TEveTrackPropagator* prop=0);
TEveTrack(TEveRecTrack* t, TEveTrackPropagator* rs); TEveTrack(TEveRecTrack* t, TEveTrackPropagator* prop=0);
TEveTrack(const TEveTrack& t); TEveTrack(const TEveTrack& t);
virtual ~TEveTrack(); virtual ~TEveTrack();
virtual void SetStdTitle(); virtual void SetStdTitle();
virtual void SetTrackParams(const TEveTrack& t); virtual void SetTrackParams(const TEveTrack& t);
virtual void SetPathMarks (const TEveTrack& t); virtual void SetPathMarks (const TEveTrack& t);
virtual void MakeTrack(Bool_t recurse=kTRUE); virtual void MakeTrack(Bool_t recurse=kTRUE);
TEveTrackPropagator* GetPropagator() const { return fPropagator; } TEveTrackPropagator* GetPropagator() const { return fPropagator; }
void SetPropagator(TEveTrackPropagator* rs); void SetPropagator(TEveTrackPropagator* prop);
void SetAttLineAttMarker(TEveTrackList* tl); void SetAttLineAttMarker(TEveTrackList* tl);
const TEveVector& GetVertex() const { return fV; } const TEveVector& GetVertex() const { return fV; }
const TEveVector& GetMomentum() const { return fP; } const TEveVector& GetMomentum() const { return fP; }
const TEveVector& GetEndMomentum() const { return fPEnd; } const TEveVector& GetEndMomentum() const { return fPEnd; }
Int_t GetPdg() const { return fPdg; } Int_t GetPdg() const { return fPdg; }
void SetPdg(Int_t pdg) { fPdg = pdg; } void SetPdg(Int_t pdg) { fPdg = pdg; }
Int_t GetCharge() const { return fCharge; } Int_t GetCharge() const { return fCharge; }
void SetCharge(Int_t chg) { fCharge = chg; } void SetCharge(Int_t chg) { fCharge = chg; }
Int_t GetLabel() const { return fLabel; } Int_t GetLabel() const { return fLabel; }
void SetLabel(Int_t lbl) { fLabel = lbl; } void SetLabel(Int_t lbl) { fLabel = lbl; }
Int_t GetIndex() const { return fIndex; } Int_t GetIndex() const { return fIndex; }
void SetIndex(Int_t idx) { fIndex = idx; } void SetIndex(Int_t idx) { fIndex = idx; }
Int_t GetStatus() const { return fStatus; }
void SetStatus(Int_t idx) { fStatus = idx; }
void AddPathMark(const TEvePathMark& pm) { fPathMarks.push_back(pm); } void AddPathMark(const TEvePathMark& pm) { fPathMarks.push_back(pm); }
void SortPathMarksByTime(); void SortPathMarksByTime();
vPathMark_t& RefPathMarks() { return fPathMarks; } vPathMark_t& RefPathMarks() { return fPathMarks; }
const vPathMark_t& RefPathMarks() const { return fPathMarks; } const vPathMark_t& RefPathMarks() const { return fPathMarks; }
void PrintPathMarks(); // *MENU* void PrintPathMarks(); // *MENU*
void SetLockPoints(Bool_t l) { fLockPoints = l; } void SetLockPoints(Bool_t l) { fLockPoints = l; }
Bool_t GetLockPoints() const { return fLockPoints; } Bool_t GetLockPoints() const { return fLockPoints; }
skipping to change at line 161 skipping to change at line 164
Float_t fLimPt; // Highest track pT in the container. Float_t fLimPt; // Highest track pT in the container.
Float_t fMinP; // Minimum track p for display selecti on. Float_t fMinP; // Minimum track p for display selecti on.
Float_t fMaxP; // Maximum track p for display selecti on. Float_t fMaxP; // Maximum track p for display selecti on.
Float_t fLimP; // Highest track p in the container. Float_t fLimP; // Highest track p in the container.
void FindMomentumLimits(TEveElement* el, Bool_t recurse=kTRUE); void FindMomentumLimits(TEveElement* el, Bool_t recurse=kTRUE);
Float_t RoundMomentumLimit(Float_t x); Float_t RoundMomentumLimit(Float_t x);
void SanitizeMinMaxCuts(); void SanitizeMinMaxCuts();
public: public:
TEveTrackList(TEveTrackPropagator* rs=0); TEveTrackList(TEveTrackPropagator* prop=0);
TEveTrackList(const char* name, TEveTrackPropagator* rs=0); TEveTrackList(const char* name, TEveTrackPropagator* prop=0);
virtual ~TEveTrackList(); virtual ~TEveTrackList();
void MakeTracks(Bool_t recurse=kTRUE); void MakeTracks(Bool_t recurse=kTRUE);
void FindMomentumLimits(Bool_t recurse=kTRUE); void FindMomentumLimits(Bool_t recurse=kTRUE);
void SetPropagator(TEveTrackPropagator* rs); void SetPropagator(TEveTrackPropagator* prop);
TEveTrackPropagator* GetPropagator() { return fPropagator; } TEveTrackPropagator* GetPropagator() { return fPropagator; }
Bool_t GetRecurse() const { return fRecurse; } Bool_t GetRecurse() const { return fRecurse; }
void SetRecurse(Bool_t x) { fRecurse = x; } void SetRecurse(Bool_t x) { fRecurse = x; }
//-------------------------------- //--------------------------------
virtual void SetMainColor(Color_t c); virtual void SetMainColor(Color_t c);
virtual void SetLineColor(Color_t c) { SetMainColor(c); } virtual void SetLineColor(Color_t c) { SetMainColor(c); }
virtual void SetLineColor(Color_t c, TEveElement* el); virtual void SetLineColor(Color_t c, TEveElement* el);
 End of changes. 7 change blocks. 
8 lines changed or deleted 11 lines changed or added


 TEveTrackPropagator.h   TEveTrackPropagator.h 
// @(#)root/eve:$Id: TEveTrackPropagator.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveTrackPropagator.h 29919 2009-08-26 20:43:36Z matev z $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 130 skipping to change at line 130
// helix parameters // helix parameters
Float_t fLam; // Momentum ratio pT/pZ. Float_t fLam; // Momentum ratio pT/pZ.
Float_t fR; // Helix radius in cm. Float_t fR; // Helix radius in cm.
Float_t fPhiStep; // Caluclated from fMinAng and fDelta. Float_t fPhiStep; // Caluclated from fMinAng and fDelta.
Float_t fSin, fCos; // Current sin/cos(phistep). Float_t fSin, fCos; // Current sin/cos(phistep).
// cached // cached
TEveVector fB; // Current magnetic field, cached. TEveVector fB; // Current magnetic field, cached.
TEveVector fE1, fE2, fE3; // Base vectors: E1 -> B dir, E2->pT dir, E 3 = E1xE2. TEveVector fE1, fE2, fE3; // Base vectors: E1 -> B dir, E2->pT dir, E 3 = E1xE2.
TEveVector fPt, fPl; // Transverse and longitudinal momentum. TEveVector fPt, fPl; // Transverse and longitudinal momentum.
Float_t fPtMag; // Magnitude of pT Float_t fPtMag; // Magnitude of pT.
Float_t fPlDir; // Momentum parallel to mag field. Float_t fPlMag; // Momentum parallel to mag field.
Float_t fLStep; // Transverse step arc-length in cm. Float_t fLStep; // Transverse step arc-length in cm.
// ---------------------------------------------------------------- // ----------------------------------------------------------------
Helix_t(); Helix_t();
void UpdateCommon(const TEveVector & p, const TEveVector& b);
void UpdateHelix(const TEveVector & p, const TEveVector& b, Bool_t fu llUpdate); void UpdateHelix(const TEveVector & p, const TEveVector& b, Bool_t fu llUpdate);
void UpdateRK (const TEveVector & p, const TEveVector& b); void UpdateRK (const TEveVector & p, const TEveVector& b);
void Step (const TEveVector4& v, const TEveVector& p, TEveVector4& v
Out, TEveVector& pOut); void Step(const TEveVector4& v, const TEveVector& p, TEveVector4& vOu
t, TEveVector& pOut);
Float_t GetStep() { return fLStep * TMath::Sqrt(1 + fLam*fLam); } Float_t GetStep() { return fLStep * TMath::Sqrt(1 + fLam*fLam); }
Float_t GetStep2() { return fLStep * fLStep * (1 + fLam*fLam); } Float_t GetStep2() { return fLStep * fLStep * (1 + fLam*fLam); }
}; };
enum EStepper_e { kHelix, kRungeKutta }; enum EStepper_e { kHelix, kRungeKutta };
private: private:
TEveTrackPropagator(const TEveTrackPropagator&); // Not imple mented TEveTrackPropagator(const TEveTrackPropagator&); // Not imple mented
TEveTrackPropagator& operator=(const TEveTrackPropagator&); // Not imple mented TEveTrackPropagator& operator=(const TEveTrackPropagator&); // Not imple mented
skipping to change at line 185 skipping to change at line 187
TMarker fFVAtt; // Marker attributes for fits v ertex. TMarker fFVAtt; // Marker attributes for fits v ertex.
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// Propagation, state of current track // Propagation, state of current track
std::vector<TEveVector4> fPoints; // Calculated point. std::vector<TEveVector4> fPoints; // Calculated point.
TEveVector fV; // Start vertex. TEveVector fV; // Start vertex.
Helix_t fH; // Helix. Helix_t fH; // Helix.
void RebuildTracks(); void RebuildTracks();
void Step(TEveVector4 &v, TEveVector &p, TEveVector4 &vOut, TEveVecto void Update(const TEveVector4& v, const TEveVector& p, Bool_t full_up
r &pOut); date=kFALSE);
void Step(const TEveVector4 &v, const TEveVector &p, TEveVector4 &vOu
t, TEveVector &pOut);
Bool_t LoopToVertex(TEveVector& v, TEveVector& p); Bool_t LoopToVertex(TEveVector& v, TEveVector& p);
void LoopToBounds(TEveVector& p); void LoopToBounds(TEveVector& p);
Bool_t LineToVertex (TEveVector& v); Bool_t LineToVertex (TEveVector& v);
void LineToBounds (TEveVector& p); void LineToBounds (TEveVector& p);
void OneStepRungeKutta(Double_t charge, Double_t step, Double_t* vect , Double_t* vout); void OneStepRungeKutta(Double_t charge, Double_t step, Double_t* vect , Double_t* vout);
Bool_t HelixIntersectPlane(const TEveVector& p, const TEveVector& point , const TEveVector& normal, Bool_t HelixIntersectPlane(const TEveVector& p, const TEveVector& point , const TEveVector& normal,
TEveVector& itsect); TEveVector& itsect);
Bool_t LineIntersectPlane(const TEveVector& p, const TEveVector& point, const TEveVector& normal, Bool_t LineIntersectPlane(const TEveVector& p, const TEveVector& point, const TEveVector& normal,
TEveVector& itsect); TEveVector& itsect);
Bool_t PointOverVertex(const TEveVector4& v0, const TEveVector4& v); Bool_t PointOverVertex(const TEveVector4& v0, const TEveVector4& v, Floa t_t* p=0);
public: public:
TEveTrackPropagator(const char* n="TEveTrackPropagator", const char* t=" ", TEveTrackPropagator(const char* n="TEveTrackPropagator", const char* t=" ",
TEveMagField* field=0); TEveMagField* field=0);
virtual ~TEveTrackPropagator(); virtual ~TEveTrackPropagator();
virtual void OnZeroRefCount(); virtual void OnZeroRefCount();
virtual void CheckReferenceCount(const TEveException& eh="TEveElement::C heckReferenceCount "); virtual void CheckReferenceCount(const TEveException& eh="TEveElement::C heckReferenceCount ");
skipping to change at line 278 skipping to change at line 281
Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; } Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; }
Bool_t GetRnrFV() const { return fRnrFV; } Bool_t GetRnrFV() const { return fRnrFV; }
TMarker& RefPMAtt() { return fPMAtt; } TMarker& RefPMAtt() { return fPMAtt; }
TMarker& RefFVAtt() { return fFVAtt; } TMarker& RefFVAtt() { return fFVAtt; }
static Bool_t IsOutsideBounds(const TEveVector& point, Float_t maxRsqr, Float_t maxZ); static Bool_t IsOutsideBounds(const TEveVector& point, Float_t maxRsqr, Float_t maxZ);
static Float_t fgDefMagField; // Default value for constant solenoid magnetic field. static Float_t fgDefMagField; // Default value for constant solenoid magnetic field.
static const Float_t fgkB2C; // Constant for conversion of momentum to curvature. static const Float_t fgkB2C; // Constant for conversion of momentum to curvature.
static TEveTrackPropagator fgDefStyle; // Default track render-style. static TEveTrackPropagator fgDefault; // Default track propagator.
ClassDef(TEveTrackPropagator, 0); // Calculates path of a particle takin g into account special path-marks and imposed boundaries. ClassDef(TEveTrackPropagator, 0); // Calculates path of a particle takin g into account special path-marks and imposed boundaries.
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Bool_t TEveTrackPropagator::IsOutsideBounds(const TEveVector& point, inline Bool_t TEveTrackPropagator::IsOutsideBounds(const TEveVector& point,
Float_t maxRsq r, Float_t maxRsq r,
Float_t maxZ) Float_t maxZ)
{ {
// Return true if point% is outside of cylindrical bounds detrmined by // Return true if point% is outside of cylindrical bounds detrmined by
// square radius and z. // square radius and z.
return TMath::Abs(point.fZ) > maxZ || return TMath::Abs(point.fZ) > maxZ ||
point.fX*point.fX + point.fY*point.fY > maxRsqr; point.fX*point.fX + point.fY*point.fY > maxRsqr;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Bool_t TEveTrackPropagator::PointOverVertex(const TEveVector4 &v0, inline Bool_t TEveTrackPropagator::PointOverVertex(const TEveVector4 &v0,
const TEveVector4 &v) const TEveVector4 &v,
Float_t *p)
{ {
Float_t dotV = fH.fB.fX*(v0.fX-v.fX) static const Float_t kMinPl = 1e-5;
+ fH.fB.fY*(v0.fY-v.fY)
+ fH.fB.fZ*(v0.fZ-v.fZ); TEveVector dv; dv.Sub(v0, v);
Float_t dotV;
if (TMath::Abs(fH.fPlMag) > kMinPl)
{
// Use longitudinal momentum to determine crossing point.
// Works ok for spiraling helices, also for loopers.
dotV = fH.fE1.Dot(dv);
if (fH.fPlMag < 0)
dotV = -dotV;
}
else
{
// Use full momentum, which is pT, under this conditions.
dotV = fH.fE2.Dot(dv);
}
if (p)
*p = dotV;
return (fH.fPlDir > 0 && dotV < 0) || (fH.fPlDir < 0 && dotV >0); return dotV < 0;
} }
#endif #endif
 End of changes. 10 change blocks. 
14 lines changed or deleted 40 lines changed or added


 TEveTrans.h   TEveTrans.h 
// @(#)root/eve:$Id: TEveTrans.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveTrans.h 29908 2009-08-25 18:09:53Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TEveTrans #ifndef ROOT_TEveTrans
#define ROOT_TEveTrans #define ROOT_TEveTrans
#include "TVector3.h" #include "TVector3.h"
class TEveVector;
class TGeoMatrix; class TGeoMatrix;
class TGeoHMatrix; class TGeoHMatrix;
class TBuffer3D; class TBuffer3D;
/************************************************************************** ****/ /************************************************************************** ****/
// TEveTrans -- 3D transformation in generalised coordinates // TEveTrans -- 3D transformation in generalised coordinates
/************************************************************************** ****/ /************************************************************************** ****/
class TEveTrans : public TObject class TEveTrans : public TObject
{ {
skipping to change at line 57 skipping to change at line 59
public: public:
TEveTrans(); TEveTrans();
TEveTrans(const TEveTrans& t); TEveTrans(const TEveTrans& t);
TEveTrans(const Double_t arr[16]); TEveTrans(const Double_t arr[16]);
TEveTrans(const Float_t arr[16]); TEveTrans(const Float_t arr[16]);
virtual ~TEveTrans() {} virtual ~TEveTrans() {}
// General operations // General operations
void UnitTrans(); void UnitTrans();
void ZeroTrans(Double_t w=1.0);
void UnitRot(); void UnitRot();
void SetTrans(const TEveTrans& t, Bool_t copyAngles=kTRUE); void SetTrans(const TEveTrans& t, Bool_t copyAngles=kTRUE);
void SetFromArray(const Double_t arr[16]); void SetFromArray(const Double_t arr[16]);
void SetFromArray(const Float_t arr[16]); void SetFromArray(const Float_t arr[16]);
TEveTrans& operator=(const TEveTrans& t) { SetTrans(t); return *this; } TEveTrans& operator=(const TEveTrans& t) { SetTrans(t); return *this; }
void SetupRotation(Int_t i, Int_t j, Double_t f); void SetupRotation(Int_t i, Int_t j, Double_t f);
void SetupFromToVec(const TEveVector& from, const TEveVector& to);
void OrtoNorm3(); void OrtoNorm3();
Double_t Invert(); Double_t Invert();
void MultLeft(const TEveTrans& t); void MultLeft(const TEveTrans& t);
void MultRight(const TEveTrans& t); void MultRight(const TEveTrans& t);
void operator*=(const TEveTrans& t) { MultRight(t); } void operator*=(const TEveTrans& t) { MultRight(t); }
void TransposeRotationPart(); void TransposeRotationPart();
skipping to change at line 152 skipping to change at line 156
void SetScaleZ(Double_t sz); void SetScaleZ(Double_t sz);
// Operations on vectors // Operations on vectors
void MultiplyIP(TVector3& v, Double_t w=1) const; void MultiplyIP(TVector3& v, Double_t w=1) const;
void MultiplyIP(Double_t* v, Double_t w=1) const; void MultiplyIP(Double_t* v, Double_t w=1) const;
void MultiplyIP(Float_t* v, Double_t w=1) const; void MultiplyIP(Float_t* v, Double_t w=1) const;
TVector3 Multiply(const TVector3& v, Double_t w=1) const; TVector3 Multiply(const TVector3& v, Double_t w=1) const;
void Multiply(const Double_t *vin, Double_t* vout, Double_t w=1) con st; void Multiply(const Double_t *vin, Double_t* vout, Double_t w=1) con st;
void RotateIP(TVector3& v) const; void RotateIP(TVector3& v) const;
void RotateIP(Double_t* v) const;
void RotateIP(TEveVector& v) const;
TVector3 Rotate(const TVector3& v) const; TVector3 Rotate(const TVector3& v) const;
virtual void Print(Option_t* option = "") const; virtual void Print(Option_t* option = "") const;
// TEveUtil stuff // TEveUtil stuff
void SetFrom(Double_t* carr); void SetFrom(Double_t* carr);
void SetFrom(const TGeoMatrix& mat); void SetFrom(const TGeoMatrix& mat);
void SetGeoHMatrix(TGeoHMatrix& mat); void SetGeoHMatrix(TGeoHMatrix& mat);
void SetBuffer3D(TBuffer3D& buff); void SetBuffer3D(TBuffer3D& buff);
 End of changes. 5 change blocks. 
1 lines changed or deleted 7 lines changed or added


 TEveVSDStructs.h   TEveVSDStructs.h 
// @(#)root/eve:$Id: TEveVSDStructs.h 27485 2009-02-18 12:08:07Z matevz $ // @(#)root/eve:$Id: TEveVSDStructs.h 29908 2009-08-25 18:09:53Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 70 skipping to change at line 70
TEveVector& operator -=(const TEveVector& v) { fX -= v.fX; fY -= v.fY; f Z -= v.fZ; return *this; } TEveVector& operator -=(const TEveVector& v) { fX -= v.fX; fY -= v.fY; f Z -= v.fZ; return *this; }
TEveVector operator + (const TEveVector &) const; TEveVector operator + (const TEveVector &) const;
TEveVector operator - (const TEveVector &) const; TEveVector operator - (const TEveVector &) const;
TEveVector operator * (Float_t a) const; TEveVector operator * (Float_t a) const;
Float_t& operator [] (Int_t indx); Float_t& operator [] (Int_t indx);
Float_t operator [] (Int_t indx) const; Float_t operator [] (Int_t indx) const;
const Float_t* Arr() const { return &fX; } const Float_t* Arr() const { return &fX; }
Float_t* Arr() { return &fX; } Float_t* Arr() { return &fX; }
void Set(const Float_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; } void Set(const Float_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(const Double_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; } void Set(const Double_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(Float_t x, Float_t y, Float_t z) { fX = x; fY = y; fZ = z; } void Set(Float_t x, Float_t y, Float_t z) { fX = x; fY = y; fZ = z; }
void Set(Double_t x, Double_t y, Double_t z) { fX = x; fY = y; fZ = z; } void Set(Double_t x, Double_t y, Double_t z) { fX = x; fY = y; fZ = z; }
void Set(const TVector3& v) { fX = v.x(); fY = v.y(); fZ = v.z(); } void Set(const TVector3& v) { fX = v.x(); fY = v.y(); fZ = v.z(); }
void Set(const TEveVector& v) { fX = v.fX; fY = v.fY; fZ = v.fZ; } void Set(const TEveVector& v) { fX = v.fX; fY = v.fY; fZ = v.fZ; }
void NegateXYZ() { fX = - fX; fY = -fY; fZ = -fZ; } void NegateXYZ() { fX = - fX; fY = -fY; fZ = -fZ; }
void Normalize(Float_t length=1); void Normalize(Float_t length=1);
skipping to change at line 96 skipping to change at line 96
Float_t Mag() const { return TMath::Sqrt(fX*fX + fY*fY + fZ*fZ);} Float_t Mag() const { return TMath::Sqrt(fX*fX + fY*fY + fZ*fZ);}
Float_t Mag2() const { return fX*fX + fY*fY + fZ*fZ;} Float_t Mag2() const { return fX*fX + fY*fY + fZ*fZ;}
Float_t Perp() const { return TMath::Sqrt(fX*fX + fY*fY);} Float_t Perp() const { return TMath::Sqrt(fX*fX + fY*fY);}
Float_t Perp2() const { return fX*fX + fY*fY;} Float_t Perp2() const { return fX*fX + fY*fY;}
Float_t R() const { return Perp(); } Float_t R() const { return Perp(); }
Float_t Distance(const TEveVector& v) const; Float_t Distance(const TEveVector& v) const;
Float_t SquareDistance(const TEveVector& v) const; Float_t SquareDistance(const TEveVector& v) const;
Float_t Dot(const TEveVector&a) const;
TEveVector& Mult(const TEveVector& a, Float_t af) Float_t Dot(const TEveVector& a) const;
{ fX = a.fX*af; fY = a.fY*af; fZ = a.fZ*af; return *this; } TEveVector Cross(const TEveVector& a) const;
TEveVector& Sub(const TEveVector& p, const TEveVector& q);
TEveVector& Mult(const TEveVector& a, Float_t af);
TEveVector Orthogonal() const; TEveVector Orthogonal() const;
void OrthoNormBase(TEveVector& a, TEveVector& b) const; void OrthoNormBase(TEveVector& a, TEveVector& b) const;
ClassDef(TEveVector, 1); // Float three-vector; a minimal Float_t copy o f TVector3 used to represent points and momenta (also used in VSD). ClassDef(TEveVector, 1); // Float three-vector; a minimal Float_t copy o f TVector3 used to represent points and momenta (also used in VSD).
}; };
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Float_t TEveVector::Phi() const inline Float_t TEveVector::Phi() const
{ return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX); } {
return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX);
}
//_________________________________________________________________________ _____
inline Float_t TEveVector::Theta() const inline Float_t TEveVector::Theta() const
{ return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(Perp(), f {
Z); } return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(Perp(),
fZ);
}
//_________________________________________________________________________ _____
inline Float_t TEveVector::CosTheta() const inline Float_t TEveVector::CosTheta() const
{ Float_t ptot = Mag(); return ptot == 0.0 ? 1.0 : fZ/ptot; } {
Float_t ptot = Mag(); return ptot == 0.0 ? 1.0 : fZ/ptot;
}
//_________________________________________________________________________ _____
inline Float_t TEveVector::Distance( const TEveVector& b) const inline Float_t TEveVector::Distance( const TEveVector& b) const
{ {
return TMath::Sqrt((fX - b.fX)*(fX - b.fX) + return TMath::Sqrt((fX - b.fX)*(fX - b.fX) +
(fY - b.fY)*(fY - b.fY) + (fY - b.fY)*(fY - b.fY) +
(fZ - b.fZ)*(fZ - b.fZ)); (fZ - b.fZ)*(fZ - b.fZ));
} }
//_________________________________________________________________________
_____
inline Float_t TEveVector::SquareDistance(const TEveVector& b) const inline Float_t TEveVector::SquareDistance(const TEveVector& b) const
{ {
return ((fX - b.fX) * (fX - b.fX) + return ((fX - b.fX) * (fX - b.fX) +
(fY - b.fY) * (fY - b.fY) + (fY - b.fY) * (fY - b.fY) +
(fZ - b.fZ) * (fZ - b.fZ)); (fZ - b.fZ) * (fZ - b.fZ));
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Float_t TEveVector::Dot(const TEveVector& a) const inline Float_t TEveVector::Dot(const TEveVector& a) const
{ {
return a.fX*fX + a.fY*fY + a.fZ*fZ; return a.fX*fX + a.fY*fY + a.fZ*fZ;
} }
//_________________________________________________________________________
_____
inline TEveVector TEveVector::Cross(const TEveVector& a) const
{
TEveVector r;
r.fX = fY * a.fZ - fZ * a.fY;
r.fY = fZ * a.fX - fX * a.fZ;
r.fZ = fX * a.fY - fY * a.fX;
return r;
}
//_________________________________________________________________________
_____
inline TEveVector& TEveVector::Sub(const TEveVector& p, const TEveVector& q
)
{
fX = p.fX - q.fX;
fY = p.fY - q.fY;
fZ = p.fZ - q.fZ;
return *this;
}
//_________________________________________________________________________
_____
inline TEveVector& TEveVector::Mult(const TEveVector& a, Float_t af)
{
fX = a.fX * af;
fY = a.fY * af;
fZ = a.fZ * af;
return *this;
}
//_________________________________________________________________________
_____
inline Float_t& TEveVector::operator [] (Int_t idx) inline Float_t& TEveVector::operator [] (Int_t idx)
{ return (&fX)[idx]; } {
return (&fX)[idx];
}
//_________________________________________________________________________ _____
inline Float_t TEveVector::operator [] (Int_t idx) const inline Float_t TEveVector::operator [] (Int_t idx) const
{ return (&fX)[idx]; } {
return (&fX)[idx];
}
/************************************************************************** ****/ /************************************************************************** ****/
// TEveVector4 // TEveVector4
/************************************************************************** ****/ /************************************************************************** ****/
class TEveVector4 : public TEveVector class TEveVector4 : public TEveVector
{ {
public: public:
Float_t fT; Float_t fT;
TEveVector4() : TEveVector(), fT(0) {} TEveVector4() : TEveVector(), fT(0) {}
TEveVector4(const TEveVector& v) : TEveVector(v), fT(0) {} TEveVector4(const TEveVector& v) : TEveVector(v), fT(0) {}
TEveVector4(Float_t x, Float_t y, Float_t z, Float_t t=0) : TEveVector4(Float_t x, Float_t y, Float_t z, Float_t t=0) :
TEveVector(x, y, z), fT(t) {} TEveVector(x, y, z), fT(t) {}
virtual ~TEveVector4() {} virtual ~TEveVector4() {}
void Dump() const; void Dump() const;
TEveVector4 operator + (const TEveVector4 & b) TEveVector4 operator + (const TEveVector4 & b) const
{ return TEveVector4(fX + b.fX, fY + b.fY, fZ + b.fZ, fT + b.fT); } { return TEveVector4(fX + b.fX, fY + b.fY, fZ + b.fZ, fT + b.fT); }
TEveVector4 operator - (const TEveVector4 & b) TEveVector4 operator - (const TEveVector4 & b) const
{ return TEveVector4(fX - b.fX, fY - b.fY, fZ - b.fZ, fT - b.fT); } { return TEveVector4(fX - b.fX, fY - b.fY, fZ - b.fZ, fT - b.fT); }
TEveVector4 operator * (Float_t a) TEveVector4 operator * (Float_t a) const
{ return TEveVector4(a*fX, a*fY, a*fZ, a*fT); } { return TEveVector4(a*fX, a*fY, a*fZ, a*fT); }
TEveVector4& operator += (const TEveVector4 & b) TEveVector4& operator += (const TEveVector4 & b)
{ fX += b.fX; fY += b.fY; fZ += b.fZ; fT += b.fT; return *this; } { fX += b.fX; fY += b.fY; fZ += b.fZ; fT += b.fT; return *this; }
ClassDef(TEveVector4, 1); // Float four-vector. ClassDef(TEveVector4, 1); // Float four-vector.
}; };
/************************************************************************** ****/ /************************************************************************** ****/
// TEvePathMark // TEvePathMark
 End of changes. 19 change blocks. 
15 lines changed or deleted 69 lines changed or added


 TEveViewer.h   TEveViewer.h 
// @(#)root/eve:$Id: TEveViewer.h 28863 2009-06-09 19:17:12Z matevz $ // @(#)root/eve:$Id: TEveViewer.h 29323 2009-07-03 10:57:51Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 38 skipping to change at line 38
// TEveViewer // TEveViewer
/************************************************************************** ****/ /************************************************************************** ****/
class TEveViewer : public TEveWindowFrame class TEveViewer : public TEveWindowFrame
{ {
private: private:
TEveViewer(const TEveViewer&); // Not implemented TEveViewer(const TEveViewer&); // Not implemented
TEveViewer& operator=(const TEveViewer&); // Not implemented TEveViewer& operator=(const TEveViewer&); // Not implemented
protected: protected:
TGLViewer *fGLViewer; TGLViewer *fGLViewer;
TGFrame *fGLViewerFrame; TGFrame *fGLViewerFrame;
static Bool_t fgInitInternal;
static Bool_t fgRecreateGlOnDockOps;
static void InitInternal();
public: public:
TEveViewer(const char* n="TEveViewer", const char* t=""); TEveViewer(const char* n="TEveViewer", const char* t="");
virtual ~TEveViewer(); virtual ~TEveViewer();
virtual void PreUndock(); virtual void PreUndock();
virtual void PostDock(); virtual void PostDock();
TGLViewer* GetGLViewer() const { return fGLViewer; } TGLViewer* GetGLViewer() const { return fGLViewer; }
void SetGLViewer(TGLViewer* viewer, TGFrame* frame); void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
skipping to change at line 81 skipping to change at line 85
// TEveViewerList // TEveViewerList
/************************************************************************** ****/ /************************************************************************** ****/
class TEveViewerList : public TEveElementList class TEveViewerList : public TEveElementList
{ {
private: private:
TEveViewerList(const TEveViewerList&); // Not implemented TEveViewerList(const TEveViewerList&); // Not implemented
TEveViewerList& operator=(const TEveViewerList&); // Not implemented TEveViewerList& operator=(const TEveViewerList&); // Not implemented
protected: protected:
Bool_t fShowTooltip; Bool_t fShowTooltip;
Float_t fBrightness; Float_t fBrightness;
Bool_t fUseLightColorSet; Bool_t fUseLightColorSet;
public: public:
TEveViewerList(const char* n="TEveViewerList", const char* t=""); TEveViewerList(const char* n="TEveViewerList", const char* t="");
virtual ~TEveViewerList() {} virtual ~TEveViewerList() {}
virtual void AddElement(TEveElement* el); virtual void AddElement(TEveElement* el);
virtual void RemoveElementLocal(TEveElement* el); virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElementsLocal(); virtual void RemoveElementsLocal();
// -------------------------------- // --------------------------------
skipping to change at line 111 skipping to change at line 115
void SceneDestructing(TEveScene* scene); void SceneDestructing(TEveScene* scene);
// -------------------------------- // --------------------------------
void OnMouseOver(TGLPhysicalShape* shape, UInt_t state); void OnMouseOver(TGLPhysicalShape* shape, UInt_t state);
void OnClicked(TObject *obj, UInt_t button, UInt_t state); void OnClicked(TObject *obj, UInt_t button, UInt_t state);
// -------------------------------- // --------------------------------
Bool_t GetShowTooltip() const { return fShowTooltip; } Bool_t GetShowTooltip() const { return fShowTooltip; }
void SetShowTooltip(Bool_t x) { fShowTooltip = x; } void SetShowTooltip(Bool_t x) { fShowTooltip = x; }
Float_t GetColorBrightness() const { return fBrightness; } Float_t GetColorBrightness() const { return fBrightness; }
void SetColorBrightness(Float_t b); void SetColorBrightness(Float_t b);
Bool_t UseLightColorSet() const { return fUseLightColorSet; } Bool_t UseLightColorSet() const { return fUseLightColorSet; }
void SwitchColorSet(); void SwitchColorSet();
ClassDef(TEveViewerList, 0); // List of Viewers providing common operati ons on TEveViewer collections. ClassDef(TEveViewerList, 0); // List of Viewers providing common operati ons on TEveViewer collections.
}; };
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 14 lines changed or added


 TEveWindowManager.h   TEveWindowManager.h 
// @(#)root/eve:$Id: TEveWindowManager.h 27157 2009-01-15 14:05:12Z brun $ // @(#)root/eve:$Id: TEveWindowManager.h 29324 2009-07-03 11:27:35Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 41 skipping to change at line 41
void DestroyWindowRecursively(TEveWindow* window); void DestroyWindowRecursively(TEveWindow* window);
public: public:
TEveWindowManager(const char* n="TEveWindowManager", const char* t=""); TEveWindowManager(const char* n="TEveWindowManager", const char* t="");
virtual ~TEveWindowManager(); virtual ~TEveWindowManager();
void SelectWindow(TEveWindow* w); void SelectWindow(TEveWindow* w);
void DeleteWindow(TEveWindow* w); void DeleteWindow(TEveWindow* w);
void WindowDocked(TEveWindow* window); // *SIGNAL*
void WindowUndocked (TEveWindow* window); // *SIGNAL*
void WindowSelected(TEveWindow* window); // *SIGNAL* void WindowSelected(TEveWindow* window); // *SIGNAL*
void WindowDeleted (TEveWindow* window); // *SIGNAL* void WindowDeleted (TEveWindow* window); // *SIGNAL*
TEveWindow* GetCurrentWindow() const { return fCurrentWindow; } TEveWindow* GetCurrentWindow() const { return fCurrentWindow; }
Bool_t IsCurrentWindow(const TEveWindow* w) const { return w == fCurrentWindow; } Bool_t IsCurrentWindow(const TEveWindow* w) const { return w == fCurrentWindow; }
TEveWindowSlot* GetCurrentWindowAsSlot() const; TEveWindowSlot* GetCurrentWindowAsSlot() const;
TEveWindow* GetDefaultContainer() const { return fDefaultContainer; } TEveWindow* GetDefaultContainer() const { return fDefaultContainer; }
Bool_t HasDefaultContainer() const { return fDefaultContainer ! = 0; } Bool_t HasDefaultContainer() const { return fDefaultContainer ! = 0; }
void SetDefaultContainer(TEveWindow* w); void SetDefaultContainer(TEveWindow* w);
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TExMap.h   TExMap.h 
// @(#)root/cont:$Id: TExMap.h 25271 2008-08-27 03:29:43Z pcanal $ // @(#)root/cont:$Id: TExMap.h 29598 2009-07-27 15:37:29Z rdm $
// Author: Fons Rademakers 26/05/99 // Author: Fons Rademakers 26/05/99
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TExMap #ifndef ROOT_TExMap
#define ROOT_TExMap #define ROOT_TExMap
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TExMap // // TExMap //
// // // //
// This class stores a (key,value) pair using an external hash. // // This class stores a (key,value) pair using an external hash. //
// The (key,value) are Long_t's and therefore can contain object // // The (key,value) are Long64_t's and therefore can contain object //
// pointers or any longs. The map uses an open addressing hashing // // pointers or any longs. The map uses an open addressing hashing //
// method (linear probing). // // method (linear probing). //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject #ifndef ROOT_TObject
#include "TObject.h" #include "TObject.h"
#endif #endif
class TExMapIter; class TExMapIter;
class TExMap : public TObject { class TExMap : public TObject {
friend class TExMapIter; friend class TExMapIter;
private: private:
struct Assoc_t { struct Assoc_t {
private: private:
ULong_t fHash; ULong64_t fHash;
public: public:
Long_t fKey; Long64_t fKey;
Long_t fValue; Long64_t fValue;
void SetHash(ULong_t h) { fHash = (h | 1); } // bit(0) is "1" whe void SetHash(ULong64_t h) { fHash = (h | 1); } // bit(0) is "1"
n in use when in use
ULong_t GetHash() const { return fHash; } ULong64_t GetHash() const { return fHash; }
Bool_t InUse() const { return fHash & 1; } Bool_t InUse() const { return fHash & 1; }
void Clear() { fHash = 0x0; } void Clear() { fHash = 0x0; }
}; };
Assoc_t *fTable; Assoc_t *fTable;
Int_t fSize; Int_t fSize;
Int_t fTally; Int_t fTally;
Bool_t HighWaterMark() { return (Bool_t) (fTally >= ((3*fSize)/4)); } Bool_t HighWaterMark() { return (Bool_t) (fTally >= ((3*fSize)/4)); }
void Expand(Int_t newsize); void Expand(Int_t newsize);
Int_t FindElement(ULong_t hash, Long_t key); Int_t FindElement(ULong64_t hash, Long64_t key);
void FixCollisions(Int_t index); void FixCollisions(Int_t index);
public: public:
TExMap(Int_t mapSize = 100); TExMap(Int_t mapSize = 100);
TExMap(const TExMap &map); TExMap(const TExMap &map);
TExMap& operator=(const TExMap&); TExMap& operator=(const TExMap&);
~TExMap(); ~TExMap();
void Add(ULong_t hash, Long_t key, Long_t value); void Add(ULong64_t hash, Long64_t key, Long64_t value);
void Add(Long_t key, Long_t value) { Add(key, key, value); } void Add(Long64_t key, Long64_t value) { Add(key, key, value); }
void AddAt(UInt_t slot, ULong_t hash, Long_t key, Long_t value); void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t valu
e);
void Delete(Option_t *opt = ""); void Delete(Option_t *opt = "");
Int_t Capacity() const { return fSize; } Int_t Capacity() const { return fSize; }
Int_t GetSize() const { return fTally; } Int_t GetSize() const { return fTally; }
Long_t GetValue(ULong_t hash, Long_t key); Long64_t GetValue(ULong64_t hash, Long64_t key);
Long_t GetValue(Long_t key) { return GetValue(key, key); } Long64_t GetValue(Long64_t key) { return GetValue(key, key); }
Long_t GetValue(ULong_t hash, Long_t key, UInt_t &slot); Long64_t GetValue(ULong64_t hash, Long64_t key, UInt_t &slot);
void Remove(ULong_t hash, Long_t key); void Remove(ULong64_t hash, Long64_t key);
void Remove(Long_t key) { Remove(key, key); } void Remove(Long64_t key) { Remove(key, key); }
Long_t &operator()(ULong_t hash, Long_t key); Long64_t &operator()(ULong64_t hash, Long64_t key);
Long_t &operator()(Long_t key) { return operator()(key, key); } Long64_t &operator()(Long64_t key) { return operator()(key, key); }
ClassDef(TExMap,2) //Map with external hash ClassDef(TExMap,3) //Map with external hash
}; };
class TExMapIter { class TExMapIter {
private: private:
const TExMap *fMap; const TExMap *fMap;
Int_t fCursor; Int_t fCursor;
public: public:
TExMapIter(const TExMap *map); TExMapIter(const TExMap *map);
TExMapIter(const TExMapIter& tei): TExMapIter(const TExMapIter& tei) : fMap(tei.fMap), fCursor(tei.fCursor)
fMap(tei.fMap), fCursor(tei.fCursor) { } { }
TExMapIter& operator=(const TExMapIter&); TExMapIter& operator=(const TExMapIter&);
virtual ~TExMapIter() { } virtual ~TExMapIter() { }
const TExMap *GetCollection() const { return fMap; } const TExMap *GetCollection() const { return fMap; }
Bool_t Next(ULong_t &hash, Long_t &key, Long_t &value); Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value);
Bool_t Next(Long_t &key, Long_t &value); Bool_t Next(Long64_t &key, Long64_t &value);
void Reset() { fCursor = 0; } void Reset() { fCursor = 0; }
ClassDef(TExMapIter,0) // TExMap iterator ClassDef(TExMapIter,0) // TExMap iterator
}; };
#endif #endif
 End of changes. 11 change blocks. 
26 lines changed or deleted 27 lines changed or added


 TF1.h   TF1.h 
// @(#)root/hist:$Id: TF1.h 26166 2008-11-12 16:25:31Z brun $ // @(#)root/hist:$Id: TF1.h 29895 2009-08-25 09:35:06Z brun $
// Author: Rene Brun 18/08/95 // Author: Rene Brun 18/08/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- F1.h // ---------------------------------- F1.h
skipping to change at line 196 skipping to change at line 196
virtual ~TF1(); virtual ~TF1();
virtual void Browse(TBrowser *b); virtual void Browse(TBrowser *b);
virtual void Copy(TObject &f1) const; virtual void Copy(TObject &f1) const;
virtual Double_t Derivative (Double_t x, Double_t *params=0, Double_t ep silon=0.001) const; virtual Double_t Derivative (Double_t x, Double_t *params=0, Double_t ep silon=0.001) const;
virtual Double_t Derivative2(Double_t x, Double_t *params=0, Double_t ep silon=0.001) const; virtual Double_t Derivative2(Double_t x, Double_t *params=0, Double_t ep silon=0.001) const;
virtual Double_t Derivative3(Double_t x, Double_t *params=0, Double_t ep silon=0.001) const; virtual Double_t Derivative3(Double_t x, Double_t *params=0, Double_t ep silon=0.001) const;
static Double_t DerivativeError(); static Double_t DerivativeError();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option=""); virtual void Draw(Option_t *option="");
virtual TF1 *DrawCopy(Option_t *option="") const; virtual TF1 *DrawCopy(Option_t *option="") const;
virtual void DrawDerivative(Option_t *option="al"); // *MENU* virtual TObject *DrawDerivative(Option_t *option="al"); // *MENU*
virtual void DrawIntegral(Option_t *option="al"); // *MENU* virtual TObject *DrawIntegral(Option_t *option="al"); // *MENU*
virtual void DrawF1(const char *formula, Double_t xmin, Double_t xma x, Option_t *option=""); virtual void DrawF1(const char *formula, Double_t xmin, Double_t xma x, Option_t *option="");
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t =0) const; virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t =0) const;
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0); virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0);
// for using TF1 as a callable object (functor) // for using TF1 as a callable object (functor)
virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Do uble_t t = 0) const; virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Do uble_t t = 0) const;
virtual Double_t operator()(const Double_t *x, const Double_t *params=0) ; virtual Double_t operator()(const Double_t *x, const Double_t *params=0) ;
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void FixParameter(Int_t ipar, Double_t value); virtual void FixParameter(Int_t ipar, Double_t value);
Double_t GetChisquare() const {return fChisquare;} Double_t GetChisquare() const {return fChisquare;}
TH1 *GetHistogram() const; TH1 *GetHistogram() const;
skipping to change at line 244 skipping to change at line 244
TAxis *GetYaxis() const ; TAxis *GetYaxis() const ;
TAxis *GetZaxis() const ; TAxis *GetZaxis() const ;
virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps =0.01); virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps =0.01);
virtual void GradientPar(const Double_t *x, Double_t *grad, Double_t eps=0.01); virtual void GradientPar(const Double_t *x, Double_t *grad, Double_t eps=0.01);
virtual void InitArgs(const Double_t *x, const Double_t *params); virtual void InitArgs(const Double_t *x, const Double_t *params);
static void InitStandardFunctions(); static void InitStandardFunctions();
virtual Double_t Integral(Double_t a, Double_t b, const Double_t *params =0, Double_t epsilon=1e-12); virtual Double_t Integral(Double_t a, Double_t b, const Double_t *params =0, Double_t epsilon=1e-12);
virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_ t by, Double_t epsilon=1e-12); virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_ t by, Double_t epsilon=1e-12);
virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_ t by, Double_t az, Double_t bz, Double_t epsilon=1e-12); virtual Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_ t by, Double_t az, Double_t bz, Double_t epsilon=1e-12);
virtual Double_t IntegralError(Double_t a, Double_t b, Double_t epsilon= 1e-12); virtual Double_t IntegralError(Double_t a, Double_t b, Double_t epsilon= 1e-12);
virtual Double_t IntegralError(Int_t n, const Double_t * a, const Double _t * b, Double_t epsilon=1e-12);
//virtual Double_t IntegralFast(const TGraph *g, Double_t a, Double_t b, Double_t *params=0); //virtual Double_t IntegralFast(const TGraph *g, Double_t a, Double_t b, Double_t *params=0);
virtual Double_t IntegralFast(Int_t num, Double_t *x, Double_t *w, Doubl e_t a, Double_t b, Double_t *params=0, Double_t epsilon=1e-12); virtual Double_t IntegralFast(Int_t num, Double_t *x, Double_t *w, Doubl e_t a, Double_t b, Double_t *params=0, Double_t epsilon=1e-12);
virtual Double_t IntegralMultiple(Int_t n, const Double_t *a, const Doub le_t *b, Int_t minpts, Int_t maxpts, Double_t epsilon, Double_t &relerr,Int _t &nfnevl, Int_t &ifail); virtual Double_t IntegralMultiple(Int_t n, const Double_t *a, const Doub le_t *b, Int_t minpts, Int_t maxpts, Double_t epsilon, Double_t &relerr,Int _t &nfnevl, Int_t &ifail);
virtual Double_t IntegralMultiple(Int_t n, const Double_t *a, const Doub le_t *b, Double_t epsilon, Double_t &relerr); virtual Double_t IntegralMultiple(Int_t n, const Double_t *a, const Doub le_t *b, Double_t epsilon, Double_t &relerr);
virtual Bool_t IsInside(const Double_t *x) const; virtual Bool_t IsInside(const Double_t *x) const;
virtual void Paint(Option_t *option=""); virtual void Paint(Option_t *option="");
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
virtual void ReleaseParameter(Int_t ipar); virtual void ReleaseParameter(Int_t ipar);
virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Doubl e_t ymax, Double_t zmin, Double_t zmax); virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Doubl e_t ymax, Double_t zmin, Double_t zmax);
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added


 TF2.h   TF2.h 
// @(#)root/hist:$Id: TF2.h 28299 2009-04-21 07:35:58Z moneta $ // @(#)root/hist:$Id: TF2.h 29895 2009-08-25 09:35:06Z brun $
// Author: Rene Brun 23/08/95 // Author: Rene Brun 23/08/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- F2.h // ---------------------------------- F2.h
skipping to change at line 83 skipping to change at line 83
TF2(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, const char *className ); TF2(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, const char *className );
TF2(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do uble_t ymin, Double_t ymax, Int_t npar, const char *className, const char * methodName = 0); TF2(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do uble_t ymin, Double_t ymax, Int_t npar, const char *className, const char * methodName = 0);
TF2(const TF2 &f2); TF2(const TF2 &f2);
TF2 &operator=(const TF2& rhs); TF2 &operator=(const TF2& rhs);
virtual ~TF2(); virtual ~TF2();
virtual void Copy(TObject &f2) const; virtual void Copy(TObject &f2) const;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option=""); virtual void Draw(Option_t *option="");
virtual TF1 *DrawCopy(Option_t *option="") const; virtual TF1 *DrawCopy(Option_t *option="") const;
virtual void DrawDerivative(Option_t * ="al") {;} virtual TObject *DrawDerivative(Option_t * ="al") {return 0;}
virtual void DrawIntegral(Option_t * ="al") {;} virtual TObject *DrawIntegral(Option_t * ="al") {return 0;}
virtual void DrawF2(const char *formula, Double_t xmin, Double_t xma x, Double_t ymin, Double_t ymax, Option_t *option=""); virtual void DrawF2(const char *formula, Double_t xmin, Double_t xma x, Double_t ymin, Double_t ymax, Option_t *option="");
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual Int_t GetContour(Double_t *levels=0); virtual Int_t GetContour(Double_t *levels=0);
virtual Double_t GetContourLevel(Int_t level) const; virtual Double_t GetContourLevel(Int_t level) const;
Int_t GetNpy() const {return fNpy;} Int_t GetNpy() const {return fNpy;}
virtual char *GetObjectInfo(Int_t px, Int_t py) const; virtual char *GetObjectInfo(Int_t px, Int_t py) const;
Double_t GetRandom(); Double_t GetRandom();
Double_t GetRandom(Double_t xmin, Double_t xmax); Double_t GetRandom(Double_t xmin, Double_t xmax);
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom); virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom);
virtual void GetRange(Double_t &xmin, Double_t &xmax) const { TF1::G etRange(xmin, xmax); } virtual void GetRange(Double_t &xmin, Double_t &xmax) const { TF1::G etRange(xmin, xmax); }
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 TF2GL.h   TF2GL.h 
// @(#)root/gl:$Id: TF2GL.h 28378 2009-04-28 15:40:53Z matevz $ // @(#)root/gl:$Id: TF2GL.h 29526 2009-07-20 17:41:53Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TF2GL #ifndef ROOT_TF2GL
#define ROOT_TF2GL #define ROOT_TF2GL
#include <TGLObject.h> #include <TGLPlot3D.h>
class TGLRnrCtx; class TGLRnrCtx;
class TF2; class TF2;
class TH2; class TH2;
#include "TGLPlotPainter.h" class TF2GL : public TGLPlot3D
class TF2GL : public TGLObject
{ {
private: private:
TF2GL(const TF2GL&); // Not implemented TF2GL(const TF2GL&); // Not implemented
TF2GL& operator=(const TF2GL&); // Not implemented TF2GL& operator=(const TF2GL&); // Not implemented
protected: protected:
TF2 *fM; // fModel dynamic-casted to TH2 TF2 *fM; // fModel dynamic-casted to TH2
TH2 *fH; // Visualization histogram. TH2 *fH; // Visualization histogram.
TGLPlotPainter *fPlotPainter;
TGLPlotCoordinates fCoord;
public: public:
TF2GL(); TF2GL();
virtual ~TF2GL(); virtual ~TF2GL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
 End of changes. 4 change blocks. 
8 lines changed or deleted 3 lines changed or added


 TF3.h   TF3.h 
// @(#)root/hist:$Id: TF3.h 28481 2009-05-07 13:36:10Z moneta $ // @(#)root/hist:$Id: TF3.h 29895 2009-08-25 09:35:06Z brun $
// Author: Rene Brun 27/10/95 // Author: Rene Brun 27/10/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- F3.h // ---------------------------------- F3.h
skipping to change at line 80 skipping to change at line 80
// constructor used by CINT // constructor used by CINT
TF3(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className ); TF3(const char *name, void *ptr, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className );
TF3(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do uble_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className, const char *methodName = 0); TF3(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Do uble_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, const char *className, const char *methodName = 0);
TF3(const TF3 &f3); TF3(const TF3 &f3);
TF3& operator=(const TF3 &rhs); TF3& operator=(const TF3 &rhs);
virtual ~TF3(); virtual ~TF3();
virtual void Copy(TObject &f3) const; virtual void Copy(TObject &f3) const;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option=""); virtual void Draw(Option_t *option="");
virtual void DrawDerivative(Option_t * ="al") {;} virtual TObject *DrawDerivative(Option_t * ="al") {return 0;}
virtual void DrawIntegral(Option_t * ="al") {;} virtual TObject *DrawIntegral(Option_t * ="al") {return 0;}
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void GetMinimumXYZ(Double_t &x, Double_t &y, Double_t &z); virtual void GetMinimumXYZ(Double_t &x, Double_t &y, Double_t &z);
Int_t GetNpz() const {return fNpz;} Int_t GetNpz() const {return fNpz;}
virtual void GetRandom3(Double_t &xrandom, Double_t &yrandom, Double _t &zrandom); virtual void GetRandom3(Double_t &xrandom, Double_t &yrandom, Double _t &zrandom);
virtual void GetRange(Double_t &xmin, Double_t &xmax) const; virtual void GetRange(Double_t &xmin, Double_t &xmax) const;
virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &xmax , Double_t &ymax) const ; virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &xmax , Double_t &ymax) const ;
virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &zmin , Double_t &xmax, Double_t &ymax, Double_t &zmax) const; virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &zmin , Double_t &xmax, Double_t &ymax, Double_t &zmax) const;
virtual Double_t GetSave(const Double_t *x); virtual Double_t GetSave(const Double_t *x);
virtual Double_t GetZmin() const {return fZmin;} virtual Double_t GetZmin() const {return fZmin;}
virtual Double_t GetZmax() const {return fZmax;} virtual Double_t GetZmax() const {return fZmax;}
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 TFileCacheRead.h   TFileCacheRead.h 
// @(#)root/io:$Id: TFileCacheRead.h 26028 2008-10-30 20:09:44Z brun $ // @(#)root/io:$Id: TFileCacheRead.h 29877 2009-08-24 09:14:46Z brun $
// Author: Rene Brun 19/05/2006 // Author: Rene Brun 19/05/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 36 skipping to change at line 36
class TFile; class TFile;
class TFileCacheRead : public TObject { class TFileCacheRead : public TObject {
protected: protected:
Int_t fBufferSizeMin; //Original size of fBuffer Int_t fBufferSizeMin; //Original size of fBuffer
Int_t fBufferSize; //Allocated size of fBuffer (at a given t ime) Int_t fBufferSize; //Allocated size of fBuffer (at a given t ime)
Int_t fBufferLen; //Current buffer length (<= fBufferSize) Int_t fBufferLen; //Current buffer length (<= fBufferSize)
Int_t fBytesToPrefetch;// Helpers to allow the incremental async
prefetch
Int_t fFirstIndexToPrefetch;
Bool_t fAsyncReading; Bool_t fAsyncReading;
Int_t fNseek; //Number of blocks to be prefetched Int_t fNseek; //Number of blocks to be prefetched
Int_t fNtot; //Total size of prefetched blocks Int_t fNtot; //Total size of prefetched blocks
Int_t fNb; //Number of long buffers Int_t fNb; //Number of long buffers
Int_t fSeekSize; //Allocated size of fSeek Int_t fSeekSize; //Allocated size of fSeek
Long64_t *fSeek; //[fNseek] Position on file of buffers to be prefetched Long64_t *fSeek; //[fNseek] Position on file of buffers to be prefetched
Long64_t *fSeekSort; //[fNseek] Position on file of buffers to be prefetched (sorted) Long64_t *fSeekSort; //[fNseek] Position on file of buffers to be prefetched (sorted)
Int_t *fSeekIndex; //[fNseek] sorted index table of fSeek Int_t *fSeekIndex; //[fNseek] sorted index table of fSeek
Long64_t *fPos; //[fNb] start of long buffers Long64_t *fPos; //[fNb] start of long buffers
skipping to change at line 69 skipping to change at line 67
TFileCacheRead& operator=(const TFileCacheRead &); TFileCacheRead& operator=(const TFileCacheRead &);
public: public:
TFileCacheRead(); TFileCacheRead();
TFileCacheRead(TFile *file, Int_t buffersize); TFileCacheRead(TFile *file, Int_t buffersize);
virtual ~TFileCacheRead(); virtual ~TFileCacheRead();
virtual Int_t GetBufferSize() const { return fBufferSize; }; virtual Int_t GetBufferSize() const { return fBufferSize; };
virtual Bool_t IsAsyncReading() const { return fAsyncReading; }; virtual Bool_t IsAsyncReading() const { return fAsyncReading; };
virtual void Prefetch(Long64_t pos, Int_t len); virtual void Prefetch(Long64_t pos, Int_t len);
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, In t_t &loc);
virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len); virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
virtual void SetFile(TFile *file); virtual void SetFile(TFile *file);
virtual void Sort(); virtual void Sort();
ClassDef(TFileCacheRead,1) //TFile cache when reading ClassDef(TFileCacheRead,1) //TFile cache when reading
}; };
#endif #endif
 End of changes. 3 change blocks. 
4 lines changed or deleted 2 lines changed or added


 TFileMerger.h   TFileMerger.h 
// @(#)root/proofplayer:$Id: TFileMerger.h 28883 2009-06-10 14:32:37Z ganis $ // @(#)root/proofplayer:$Id: TFileMerger.h 30052 2009-09-07 12:39:28Z ganis $
// Author: Andreas Peters + Fons Rademakers 26/5/2005 // Author: Andreas Peters + Fons Rademakers 26/5/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 59 skipping to change at line 59
protected: protected:
TStopwatch fWatch; // stop watch to measure file copy spee d TStopwatch fWatch; // stop watch to measure file copy spee d
TList *fFileList; // a list of files, which shall be merg ed TList *fFileList; // a list of files, which shall be merg ed
TFile *fOutputFile; // the outputfile for merging TFile *fOutputFile; // the outputfile for merging
TString fOutputFilename; // the name of the outputfile for mergi ng TString fOutputFilename; // the name of the outputfile for mergi ng
TString fOutputFilename1; // the name of the temporary outputfile for merging TString fOutputFilename1; // the name of the temporary outputfile for merging
Bool_t fFastMethod; // True if using Fast merging algorithm (default) Bool_t fFastMethod; // True if using Fast merging algorithm (default)
Bool_t fNoTrees; // True if Trees should not be merged ( default is kFALSE) Bool_t fNoTrees; // True if Trees should not be merged ( default is kFALSE)
Bool_t fLocal; // Makes local copies of merging files i f True (default is kFALSE) Bool_t fLocal; // Makes local copies of merging files i f True (default is kFALSE)
Bool_t fHistoOneGo; // Merger histos in one go
TList *fMergeList; // list of the files need to be merged TList *fMergeList; // list of the files need to be merged
public: public:
TFileMerger(Bool_t isLocal = kTRUE); TFileMerger(Bool_t isLocal = kTRUE, Bool_t histoonego = kTRUE);
virtual ~TFileMerger(); virtual ~TFileMerger();
const char *GetOutputFileName() const { return fOutputFilename; } const char *GetOutputFileName() const { return fOutputFilename; }
TList *GetMergeList() const { return fMergeList; } TList *GetMergeList() const { return fMergeList; }
//--- file management interface //--- file management interface
virtual Bool_t SetCWD(const char * /*path*/) { MayNotUse("SetCWD"); retu rn kFALSE; } virtual Bool_t SetCWD(const char * /*path*/) { MayNotUse("SetCWD"); retu rn kFALSE; }
virtual const char *GetCWD() { MayNotUse("GetCWD"); return 0; } virtual const char *GetCWD() { MayNotUse("GetCWD"); return 0; }
//--- file merging interface //--- file merging interface
virtual void Reset(); virtual void Reset();
virtual Bool_t AddFile(const char *url); virtual Bool_t AddFile(const char *url);
virtual Bool_t OutputFile(const char *url); virtual Bool_t OutputFile(const char *url);
virtual void PrintFiles(Option_t *options); virtual void PrintFiles(Option_t *options);
virtual Bool_t Merge(Bool_t = kTRUE); virtual Bool_t Merge(Bool_t = kTRUE);
virtual Bool_t MergeRecursive(TDirectory *target, TList *sourcelist, Int _t isdir); virtual Bool_t MergeRecursive(TDirectory *target, TList *sourcelist);
virtual void SetFastMethod(Bool_t fast=kTRUE) {fFastMethod = fast;} virtual void SetFastMethod(Bool_t fast=kTRUE) {fFastMethod = fast;}
virtual void SetNotrees(Bool_t notrees=kFALSE) {fNoTrees = notrees;} virtual void SetNotrees(Bool_t notrees=kFALSE) {fNoTrees = notrees;}
ClassDef(TFileMerger,1) // File copying and merging services ClassDef(TFileMerger,2) // File copying and merging services
}; };
#endif #endif
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added


 TFitEditor.h   TFitEditor.h 
// @(#)root/fitpanel:$Id: TFitEditor.h 29104 2009-06-19 13:41:05Z moneta $ // @(#)root/fitpanel:$Id: TFitEditor.h 30461 2009-09-25 16:01:13Z moneta $
// Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 10/08/2006 // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 10/08/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 135 skipping to change at line 135
Double_t & operator[](UInt_t i) { return fP[i];} Double_t & operator[](UInt_t i) { return fP[i];}
Double_t fP[3]; Double_t fP[3];
}; };
std::vector<FuncParamData_t> fFuncPars; // function parameters (value + limits) std::vector<FuncParamData_t> fFuncPars; // function parameters (value + limits)
std::vector<TF1*> fPrevFit; // Previous succesful fits. std::vector<TF1*> fPrevFit; // Previous succesful fits.
TGRadioButton *fLibMinuit; // set default minimization libr ary (Minuit) TGRadioButton *fLibMinuit; // set default minimization libr ary (Minuit)
TGRadioButton *fLibMinuit2; // set Minuit2 as minimization l ibrary TGRadioButton *fLibMinuit2; // set Minuit2 as minimization l ibrary
TGRadioButton *fLibFumili; // set Fumili as minimization li brary TGRadioButton *fLibFumili; // set Fumili as minimization li brary
TGRadioButton *fLibGSL; // set Fumili as minimization li TGRadioButton *fLibGSL; // set GSL as minimization libra
brary ry
TGRadioButton *fLibGenetics; // set Genetic/GALib as minimiza
tion library
TGComboBox *fMinMethodList; // set the minimization method TGComboBox *fMinMethodList; // set the minimization method
TGNumberEntryField *fErrorScale; // contains error scale set for minimization TGNumberEntryField *fErrorScale; // contains error scale set for minimization
TGNumberEntryField *fTolerance; // contains tolerance set for mi nimization TGNumberEntryField *fTolerance; // contains tolerance set for mi nimization
TGNumberEntryField *fIterations; // contains maximum number of it erations TGNumberEntryField *fIterations; // contains maximum number of it erations
TGStatusBar *fStatusBar; // statusbar widget TGStatusBar *fStatusBar; // statusbar widget
static TFitEditor *fgFitDialog; // singleton fit panel static TFitEditor *fgFitDialog; // singleton fit panel
TGComboBox* BuildDataSetList(TGFrame *parent, Int_t id); TGComboBox* BuildDataSetList(TGFrame *parent, Int_t id);
 End of changes. 2 change blocks. 
3 lines changed or deleted 5 lines changed or added


 TFormula.h   TFormula.h 
// @(#)root/hist:$Id: TFormula.h 27022 2008-12-19 10:34:54Z pcanal $ // @(#)root/hist:$Id: TFormula.h 30176 2009-09-15 15:42:11Z pcanal $
// Author: Nicolas Brun 19/08/95 // Author: Nicolas Brun 19/08/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- Formula.h // ---------------------------------- Formula.h
skipping to change at line 33 skipping to change at line 33
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TBits #ifndef ROOT_TBits
#include "TBits.h" #include "TBits.h"
#endif #endif
#ifndef ROOT_TObjArray #ifndef ROOT_TObjArray
#include "TObjArray.h" #include "TObjArray.h"
#endif #endif
#include "TFormulaPrimitive.h"
class TFormulaPrimitive;
const Int_t kMAXFOUND = 500; const Int_t kMAXFOUND = 500;
const Int_t kTFOperMask = 0x7fffff; const Int_t kTFOperMask = 0x7fffff;
const UChar_t kTFOperShift = 23; const UChar_t kTFOperShift = 23;
class TOperOffset { class TOperOffset {
friend class TFormula; friend class TFormula;
public: public:
enum { enum {
kVariable = 0, kVariable = 0,
skipping to change at line 65 skipping to change at line 66
Short_t fType3; // type of operand 3 Short_t fType3; // type of operand 3
Short_t fOffset3; // offset of operand 3 Short_t fOffset3; // offset of operand 3
Short_t fToJump; // where to jump in case of optimized boolen Short_t fToJump; // where to jump in case of optimized boolen
Short_t fOldAction; // temporary variable used during optimizatio n Short_t fOldAction; // temporary variable used during optimizatio n
}; };
class TFormula : public TNamed { class TFormula : public TNamed {
protected: protected:
typedef Double_t (TObject::*TFuncG)(const Double_t*,const Double_t*) con
st;
Int_t fNdim; //Dimension of function (1=1-Dim, 2=2-Dim,e tc) Int_t fNdim; //Dimension of function (1=1-Dim, 2=2-Dim,e tc)
Int_t fNpar; //Number of parameters Int_t fNpar; //Number of parameters
Int_t fNoper; //Number of operators Int_t fNoper; //Number of operators
Int_t fNconst; //Number of constants Int_t fNconst; //Number of constants
Int_t fNumber; //formula number identifier Int_t fNumber; //formula number identifier
Int_t fNval; //Number of different variables in expressi on Int_t fNval; //Number of different variables in expressi on
Int_t fNstring; //Number of different constants character s trings Int_t fNstring; //Number of different constants character s trings
TString *fExpr; //[fNoper] List of expressions TString *fExpr; //[fNoper] List of expressions
private: private:
Int_t *fOper; //[fNoper] List of operators. (See document ation for changes made at version 7) Int_t *fOper; //[fNoper] List of operators. (See document ation for changes made at version 7)
skipping to change at line 89 skipping to change at line 92
TObjArray fFunctions; //Array of function calls to make TObjArray fFunctions; //Array of function calls to make
TObjArray fLinearParts; //Linear parts if the formula is linear (co ntains '|' or "++") TObjArray fLinearParts; //Linear parts if the formula is linear (co ntains '|' or "++")
TBits fAlreadyFound; //! cache for information TBits fAlreadyFound; //! cache for information
// Optimized expression // Optimized expression
Int_t fNOperOptimized; //!Number of operators after optim ization Int_t fNOperOptimized; //!Number of operators after optim ization
TString *fExprOptimized; //![fNOperOptimized] List of expre ssions TString *fExprOptimized; //![fNOperOptimized] List of expre ssions
Int_t *fOperOptimized; //![fNOperOptimized] List of opera tors. (See documentation for changes made at version 7) Int_t *fOperOptimized; //![fNOperOptimized] List of opera tors. (See documentation for changes made at version 7)
TOperOffset *fOperOffset; //![fNOperOptimized] Offse ts of operrands TOperOffset *fOperOffset; //![fNOperOptimized] Offse ts of operrands
TFormulaPrimitive **fPredefined; //![fNPar] predefined function TFormulaPrimitive **fPredefined; //![fNPar] predefined function
TFuncG fOptimal; //!pointer to optimal function
Int_t PreCompile(); Int_t PreCompile();
virtual Bool_t CheckOperands(Int_t operation, Int_t &err);
virtual Bool_t CheckOperands(Int_t leftoperand, Int_t rightoperartion
, Int_t &err);
virtual Bool_t StringToNumber(Int_t code);
void MakePrimitive(const char *expr, Int_t pos); void MakePrimitive(const char *expr, Int_t pos);
inline Int_t *GetOper() const { return fOper; } inline Int_t *GetOper() const { return fOper; }
inline Short_t GetAction(Int_t code) const { return fOper[code] >> kT FOperShift; } inline Short_t GetAction(Int_t code) const { return fOper[code] >> kT FOperShift; }
inline Int_t GetActionParam(Int_t code) const { return fOper[code] & kTFOperMask; } inline Int_t GetActionParam(Int_t code) const { return fOper[code] & kTFOperMask; }
inline void SetAction(Int_t code, Int_t value, Int_t param = 0) { inline void SetAction(Int_t code, Int_t value, Int_t param = 0) {
fOper[code] = (value) << kTFOperShift; fOper[code] = (value) << kTFOperShift;
fOper[code] += param; fOper[code] += param;
} }
inline Int_t *GetOperOptimized() const { return fOperOptimized; } inline Int_t *GetOperOptimized() const { return fOperOptimized; }
skipping to change at line 165 skipping to change at line 172
kNot = 68, kNot = 68,
kcosh = 70 , ksinh = 71, ktanh = 72, kcosh = 70 , ksinh = 71, ktanh = 72,
kacosh = 73 , kasinh = 74, katanh = 75, kacosh = 73 , kasinh = 74, katanh = 75,
kStringEqual = 76, kStringNotEqual = 77, kStringEqual = 76, kStringNotEqual = 77,
kBitAnd = 78, kBitOr = 79, kBitAnd = 78, kBitOr = 79,
kLeftShift = 80, kRightShift = 81, kLeftShift = 80, kRightShift = 81,
kJumpIf = 82, kJump = 83,
kexpo = 100 , kxexpo = 100, kyexpo = 101, kzexpo = 102, kxyex po = 105, kexpo = 100 , kxexpo = 100, kyexpo = 101, kzexpo = 102, kxyex po = 105,
kgaus = 110 , kxgaus = 110, kygaus = 111, kzgaus = 112, kxyga us = 115, kgaus = 110 , kxgaus = 110, kygaus = 111, kzgaus = 112, kxyga us = 115,
klandau = 120 , kxlandau = 120, kylandau = 121, kzlandau = 122, kxyla ndau = 125, klandau = 120 , kxlandau = 120, kylandau = 121, kzlandau = 122, kxyla ndau = 125,
kpol = 130 , kxpol = 130, kypol = 131, kzpol = 132, kpol = 130 , kxpol = 130, kypol = 131, kzpol = 132,
kParameter = 140, kParameter = 140,
kConstant = 141, kConstant = 141,
kBoolOptimize = 142, kBoolOptimize = 142,
kStringConst = 143, kStringConst = 143,
kVariable = 144, kVariable = 144,
skipping to change at line 212 skipping to change at line 221
kLinear = BIT(16) //set to true if the function is for line ar fitting kLinear = BIT(16) //set to true if the function is for line ar fitting
}; };
TFormula(); TFormula();
TFormula(const char *name,const char *formula); TFormula(const char *name,const char *formula);
TFormula(const TFormula &formula); TFormula(const TFormula &formula);
TFormula& operator=(const TFormula &rhs); TFormula& operator=(const TFormula &rhs);
virtual ~TFormula(); virtual ~TFormula();
public: public:
TFormulaPrimitive::TFuncG fOptimal; //!pointer to optimal f void Optimize();
unction
void Optimize();
virtual void Analyze(const char *schain, Int_t &err, Int_t offset =0); virtual void Analyze(const char *schain, Int_t &err, Int_t offset =0);
virtual Bool_t AnalyzeFunction(TString &chaine, Int_t &err, Int_t o ffset=0); virtual Bool_t AnalyzeFunction(TString &chaine, Int_t &err, Int_t o ffset=0);
virtual Int_t Compile(const char *expression=""); virtual Int_t Compile(const char *expression="");
virtual void Copy(TObject &formula) const; virtual void Copy(TObject &formula) const;
virtual void Clear(Option_t *option=""); virtual void Clear(Option_t *option="");
virtual char *DefinedString(Int_t code); virtual char *DefinedString(Int_t code);
virtual Double_t DefinedValue(Int_t code); virtual Double_t DefinedValue(Int_t code);
virtual Int_t DefinedVariable(TString &variable,Int_t &action); virtual Int_t DefinedVariable(TString &variable,Int_t &action);
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_ t t=0) const; virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_ t t=0) const;
virtual Double_t EvalParOld(const Double_t *x, const Double_t *params =0); virtual Double_t EvalParOld(const Double_t *x, const Double_t *params =0);
 End of changes. 7 change blocks. 
6 lines changed or deleted 15 lines changed or added


 TFormulaPrimitive.h   TFormulaPrimitive.h 
// @(#)root/hist:$Id: TFormulaPrimitive.h 21295 2007-12-10 15:02:30Z rdm $ // @(#)root/hist:$Id: TFormulaPrimitive.h 29663 2009-07-31 23:17:47Z pcanal $
// Author: Marian Ivanov, 2005 // Author: Marian Ivanov, 2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- TFormulaPrimitive.h // ---------------------------------- TFormulaPrimitive.h
skipping to change at line 84 skipping to change at line 84
TFormulaPrimitive(const char *name,const char *formula, GenFunc110 fpoin ter); TFormulaPrimitive(const char *name,const char *formula, GenFunc110 fpoin ter);
TFormulaPrimitive(const char *name,const char *formula, GenFunc1110 fpoi nter); TFormulaPrimitive(const char *name,const char *formula, GenFunc1110 fpoi nter);
TFormulaPrimitive(const char *name,const char *formula, GenFuncG fpointe r,Int_t npar); TFormulaPrimitive(const char *name,const char *formula, GenFuncG fpointe r,Int_t npar);
TFormulaPrimitive(const char *name,const char *formula, TFunc0 fpointer) ; TFormulaPrimitive(const char *name,const char *formula, TFunc0 fpointer) ;
TFormulaPrimitive(const char *name,const char *formula, TFunc10 fpointer ); TFormulaPrimitive(const char *name,const char *formula, TFunc10 fpointer );
TFormulaPrimitive(const char *name,const char *formula, TFunc110 fpointe r); TFormulaPrimitive(const char *name,const char *formula, TFunc110 fpointe r);
TFormulaPrimitive(const char *name,const char *formula, TFunc1110 fpoint er); TFormulaPrimitive(const char *name,const char *formula, TFunc1110 fpoint er);
TFormulaPrimitive(const char *name,const char *formula, TFuncG fpointer) ; TFormulaPrimitive(const char *name,const char *formula, TFuncG fpointer) ;
static Int_t AddFormula(TFormulaPrimitive * formula); static Int_t AddFormula(TFormulaPrimitive * formula);
static TFormulaPrimitive* FindFormula(const char* name); static TFormulaPrimitive* FindFormula(const char* name);
static TFormulaPrimitive* FindFormula(const char* name, const char *args
);
static TFormulaPrimitive* FindFormula(const char* name, UInt_t nargs);
Double_t Eval(Double_t* x); //eval primitive function Double_t Eval(Double_t* x); //eval primitive function
Double_t Eval(TObject *o, Double_t *x); //eval member function Double_t Eval(TObject *o, Double_t *x); //eval member function
Double_t Eval(Double_t *x, Double_t *param); //eval primitive parametri c function Double_t Eval(Double_t *x, Double_t *param); //eval primitive parametri c function
ClassDef(TFormulaPrimitive,0) //The primitive formula ClassDef(TFormulaPrimitive,0) //The primitive formula
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TGFileBrowser.h   TGFileBrowser.h 
// @(#)root/gui:$Id: TGFileBrowser.h 28853 2009-06-09 08:19:33Z bellenot $ // @(#)root/gui:$Id: TGFileBrowser.h 29885 2009-08-24 14:19:56Z bellenot $
// Author: Bertrand Bellenot 26/09/2007 // Author: Bertrand Bellenot 26/09/2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 60 skipping to change at line 60
const TGPicture *fFileIcon; // System files icon const TGPicture *fFileIcon; // System files icon
const TGPicture *fCachedPic; // Cached picture const TGPicture *fCachedPic; // Cached picture
TString fCachedPicName; // Cached picture name TString fCachedPicName; // Cached picture name
TRegexp *fFilter; // Regular expression used to fil ter files TRegexp *fFilter; // Regular expression used to fil ter files
TSystemDirectory *fDir; // Actual (selected) system direc tory TSystemDirectory *fDir; // Actual (selected) system direc tory
TSystemFile *fFile; // Actual (selected) system file TSystemFile *fFile; // Actual (selected) system file
Int_t fGroupSize; // total number of items when ico n box switched to "global view" mode Int_t fGroupSize; // total number of items when ico n box switched to "global view" mode
Long_t fNKeys, fCnt; // Counters for keys inside a Roo t file Long_t fNKeys, fCnt; // Counters for keys inside a Roo t file
Bool_t fGrouped; // kTRUE if Root file content (ke ys) is grouped Bool_t fGrouped; // kTRUE if Root file content (ke ys) is grouped
Bool_t fShowHidden; // kTRUE to display hidden files Bool_t fShowHidden; // kTRUE to display hidden files
Bool_t fDblClick; // kTRUE if user double-clicked o n a list tree item
void CreateBrowser(); void CreateBrowser();
public: public:
TGFileBrowser(const TGWindow *p, TBrowser* b=0, UInt_t w=200, UInt_t h=4 00); TGFileBrowser(const TGWindow *p, TBrowser* b=0, UInt_t w=200, UInt_t h=4 00);
virtual ~TGFileBrowser(); virtual ~TGFileBrowser();
virtual void Add(TObject *obj, const char *name = 0, Int_t check = -1); virtual void Add(TObject *obj, const char *name = 0, Int_t check = -1);
virtual void BrowseObj(TObject *obj); virtual void BrowseObj(TObject *obj);
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
skipping to change at line 93 skipping to change at line 94
void CheckRemote(TGListTreeItem *item); void CheckRemote(TGListTreeItem *item);
void Clicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y); void Clicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y);
TString DirName(TGListTreeItem* item); TString DirName(TGListTreeItem* item);
TString FullPathName(TGListTreeItem* item); TString FullPathName(TGListTreeItem* item);
void DoubleClicked(TGListTreeItem *item, Int_t btn); void DoubleClicked(TGListTreeItem *item, Int_t btn);
Long_t XXExecuteDefaultAction(TObject *obj); Long_t XXExecuteDefaultAction(TObject *obj);
char *FormatFileInfo(const char *fname, Long64_t size, Long_t modt ime); char *FormatFileInfo(const char *fname, Long64_t size, Long_t modt ime);
void GetFilePictures(const TGPicture **pic, Int_t file_type, Bool _t is_link, const char *name); void GetFilePictures(const TGPicture **pic, Int_t file_type, Bool _t is_link, const char *name);
void GetObjPicture(const TGPicture **pic, TObject *obj); void GetObjPicture(const TGPicture **pic, TObject *obj);
void GotoDir(const char *path); void GotoDir(const char *path);
void PadModified();
void Selected(char *); void Selected(char *);
void Update(); void Update();
ClassDef(TGFileBrowser, 0) // File browser. ClassDef(TGFileBrowser, 0) // File browser.
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TGL5D.h   TGL5D.h 
// @(#)root/gl:$Id: TGL5D.h 28619 2009-05-14 07:10:01Z brun $ // @(#)root/gl:$Id: TGL5D.h 29602 2009-07-28 10:23:20Z brun $
// Author: Timur Pocheptsov 2009 // Author: Timur Pocheptsov 2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGL5D #ifndef ROOT_TGL5D
#define ROOT_TGL5D #define ROOT_TGL5D
#include <utility> #include <memory>
#include <vector> #include <vector>
#include <list>
#ifndef ROOT_TGLPlotPainter
#include "TGLPlotPainter.h"
#endif
#ifndef ROOT_TGLHistPainter #ifndef ROOT_TGLHistPainter
#include "TGLHistPainter.h" #include "TGLHistPainter.h"
#endif #endif
#ifndef ROOT_TGLIsoMesh
#include "TGLIsoMesh.h"
#endif
#ifndef ROOT_TGLUtil #ifndef ROOT_TGLUtil
#include "TGLUtil.h" #include "TGLUtil.h"
#endif #endif
#ifndef ROOT_KDEFGT
#include "TKDEFGT.h"
#endif
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TAxis
#include "TAxis.h"
#endif
class TGLPlotCamera;
class TGL5DPainter; class TGL5DPainter;
class TTree; class TTree;
class TH3F;
//TGL5D is a class to setup TGL5DPainter from TTree. //TGL5D is a class to setup TGL5DPainter from TTree,
//hold data pointers, select required ranges,
//convert them into unit cube.
class TGL5DDataSet : public TNamed { class TGL5DDataSet : public TNamed {
friend class TGL5DPainter; friend class TGL5DPainter;
private: private:
enum { enum Edefaults{
kDefaultNB = 100 kDefaultNB = 50//Default number of bins along X,Y,Z axes.
}; };
public: public:
TGL5DDataSet(TTree *inputData); TGL5DDataSet(TTree *inputData);
~TGL5DDataSet();//
Int_t DistancetoPrimitive(Int_t px, Int_t py);
void ExecuteEvent(Int_t event, Int_t px, Int_t py);
char *GetObjectInfo(Int_t px, Int_t py) const;
void Paint(Option_t *option);
TH3F *GetHist()const {return fHist;} //These are functions for TPad and
TGL5DPainter *GetRealPainter()const; //TPad's standard machinery (picking, painting).
Int_t DistancetoPrimitive(Int_t px, Int_t py);
void ExecuteEvent(Int_t event, Int_t px, Int_t py);
char *GetObjectInfo(Int_t px, Int_t py) const;
void Paint(Option_t *option);
//This is for editor.
TGL5DPainter *GetRealPainter()const;
//Select points for iso-surface.
void SelectPoints(Double_t v4Level, Double_t range);
UInt_t SelectedSize()const;
//Take a point from selected sub-range (V1 == X, V2 == Y, V3 == Z for 3D
).
Double_t V1(UInt_t ind)const;
Double_t V2(UInt_t ind)const;
Double_t V3(UInt_t ind)const;
//Very similar to TH3's axes.
TAxis *GetXAxis()const;
TAxis *GetYAxis()const;
TAxis *GetZAxis()const;
//Data ranges for V1, V2, V3, V4.
const Rgl::Range_t &GetXRange()const;
const Rgl::Range_t &GetYRange()const;
const Rgl::Range_t &GetZRange()const;
const Rgl::Range_t &GetV4Range()const;
private: private:
//These three functions for TKDEFGT,
//which will convert all point coordinates
//into unit cube before density estimation.
Double_t V1ToUnitCube(Double_t v1)const;
Double_t V2ToUnitCube(Double_t v2)const;
Double_t V3ToUnitCube(Double_t v3)const;
Long64_t fNP;//Number of entries. Long64_t fNP;//Number of entries.
const Double_t *fV1;//V1. const Double_t *fV1;//V1.
const Double_t *fV2;//V2. const Double_t *fV2;//V2.
const Double_t *fV3;//V3. const Double_t *fV3;//V3.
const Double_t *fV4;//V4. const Double_t *fV4;//V4.
const Double_t *fV5;//V5. const Double_t *fV5;//V5.
//These are fixed ranges of the data set,
//calculated during construction.
Rgl::Range_t fV1MinMax;//V1 range. Rgl::Range_t fV1MinMax;//V1 range.
Double_t fV1Range;//max - min.
Rgl::Range_t fV2MinMax;//V2 range. Rgl::Range_t fV2MinMax;//V2 range.
Double_t fV2Range;//max - min.
Rgl::Range_t fV3MinMax;//V3 range. Rgl::Range_t fV3MinMax;//V3 range.
Double_t fV3Range;//max - min.
Rgl::Range_t fV4MinMax;//V4 range. Rgl::Range_t fV4MinMax;//V4 range.
Rgl::Range_t fV5MinMax;//V5 range. Rgl::Range_t fV5MinMax;//V5 range.
TH3F *fHist; //This are ranges and bin numbers
//for plot, inside fixed ranges.
mutable TAxis fXAxis;
mutable TAxis fYAxis;
mutable TAxis fZAxis;
//V4 can have a string type.
Bool_t fV4IsString; Bool_t fV4IsString;
//Painter to visualize dataset.
std::auto_ptr<TGLHistPainter> fPainter; std::auto_ptr<TGLHistPainter> fPainter;
//Indices of points, selected for some iso-level.
std::vector<UInt_t> fIndices;
TGL5DDataSet(const TGL5DDataSet &rhs); TGL5DDataSet(const TGL5DDataSet &rhs);
TGL5DDataSet &operator = (const TGL5DDataSet &rhs); TGL5DDataSet &operator = (const TGL5DDataSet &rhs);
ClassDef(TGL5DDataSet, 0)//Class to read data from TTree and create TGL5 DPainter. ClassDef(TGL5DDataSet, 0)//Class to read data from TTree and create TGL5 DPainter.
}; };
//
//This class paints set of iso-surfaces. xyz - range must be specified
//via TH3F, data (5 vectors) must be set via SetDataSources.
//
class TGL5DPainter : public TGLPlotPainter {
public:
enum EDefaults {
kNContours = 4,
kNLowPts = 50
};
typedef Rgl::Mc::TIsoMesh<Float_t> Mesh_t;
//Iso surfaces.
struct Surf_t {
Surf_t() : f4D(0.), fShowCloud(kFALSE), fHide(kFALSE), fColor(0)//, f
KDE(0)
{
}
Mesh_t fMesh; //Mesh.
Double_t f4D; //Iso-level.
Double_t fRange; //Selection critera (f4D +- fRange).
Bool_t fShowCloud;//Show/Hide original cloud.
Bool_t fHide; //Show/Hide surface.
Color_t fColor; //Color.
std::vector<Double_t> fPreds; //Predictions for 5-th variable.
//TKDEFGT *fKDE;
};
typedef std::list<Surf_t> SurfList_t;
typedef SurfList_t::iterator SurfIter_t;
typedef SurfList_t::const_iterator ConstSurfIter_t;
private:
//Density estimator.
TKDEFGT fKDE; //Density estimator.
const Surf_t fDummy; //Empty surface.
Bool_t fInit; //Geometry was set.
SurfList_t fIsos; //List of iso-surfaces.
//Input data.
const TGL5DDataSet *fData;
typedef std::vector<Double_t>::size_type size_type;
//
mutable std::vector<Double_t> fTS; //targets.
mutable std::vector<Double_t> fDens;//densities in target points.
//
std::vector<Double_t> fPtsSorted;//Packed xyz coordinates for cloud.
Rgl::Range_t fV5PredictedRange;
Rgl::Range_t fV5SliderRange;
Bool_t fShowSlider;//For future.
Double_t fAlpha;//
Int_t fNContours;
public:
TGL5DPainter(const TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoo
rdinates *coord);
//~TGL5DPainter();
//Interface to manipulate TGL5DPainter object.
const Rgl::Range_t &GetV1Range()const;
const Rgl::Range_t &GetV2Range()const;
const Rgl::Range_t &GetV3Range()const;
const Rgl::Range_t &GetV4Range()const;
const Rgl::Range_t &GetV5Range()const;
Double_t GetV5PredictedMin()const{return fV5PredictedRange.first;}
Double_t GetV5PredictedMax()const{return fV5PredictedRange.second;}
void SetV5SliderMin(Double_t min);
Double_t GetV5SliderMin() const {return fV5SliderRange.first;}
void SetV5SliderMax(Double_t max);
Double_t GetV5SliderMax() const {return fV5SliderRange.second;}
Bool_t ShowSlider() const {return fShowSlider;}
void ShowSlider(Bool_t show) {fShowSlider = show;}
//Add new iso for selected value of v4. +- range
SurfIter_t AddSurface(Double_t v4, Color_t ci, Double_t isoVal = 1., Dou
ble_t sigma = 1.,
Double_t e = 10., Double_t range = 1e-3, Int_t low
NumOfPoints = kNLowPts);
void SetSurfaceMode(SurfIter_t surf, Bool_t cloudOn);
void SetSurfaceColor(SurfIter_t surf, Color_t colorIndex);
void HideSurface(SurfIter_t surf);
void ShowSurface(SurfIter_t surf);
void RemoveSurface(SurfIter_t surf);
//TGLPlotPainter final-overriders.
char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py);
void AddOption(const TString &option);
void ProcessEvent(Int_t event, Int_t px, Int_t py);
//Methods for ged.
void ShowBoxCut(Bool_t show) {fBoxCut.SetActive(show);}
Bool_t IsBoxCutShown()const{return fBoxCut.IsActive();}
void SetAlpha(Double_t newAlpha);
Double_t GetAlpha()const{return fAlpha;}
void SetNContours(Int_t num);
Int_t GetNContours()const{return fNContours;}
private:
//TGLPlotPainter final-overriders.
void InitGL()const;
void DeInitGL()const;
void DrawPlot()const;
//Empty overriders.
void DrawSectionXOZ()const{}
void DrawSectionYOZ()const{}
void DrawSectionXOY()const{}
//Auxiliary functions.
void SetSurfaceColor(Color_t index)const;
void DrawCloud()const;
void DrawSubCloud(Double_t v4, Double_t range, Color_t ci)const;
void DrawMesh(ConstSurfIter_t surf)const;
TGL5DPainter(const TGL5DPainter &);
TGL5DPainter &operator = (const TGL5DPainter &);
ClassDef(TGL5DPainter, 0)//Class to paint set of iso surfaces.
};
#endif #endif
 End of changes. 22 change blocks. 
165 lines changed or deleted 61 lines changed or added


 TGL5DDataSetEditor.h   TGL5DDataSetEditor.h 
// @(#)root/gl:$Id: TGL5DDataSetEditor.h 28619 2009-05-14 07:10:01Z brun $ // @(#)root/gl:$Id: TGL5DDataSetEditor.h 29602 2009-07-28 10:23:20Z brun $
// Author: Bertrand Bellenot 2009 // Author: Bertrand Bellenot 2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGL5DDataSetEditor #ifndef ROOT_TGL5DDataSetEditor
#define ROOT_TGL5DDataSetEditor #define ROOT_TGL5DDataSetEditor
#ifndef ROOT_TGedFrame #ifndef ROOT_TGedFrame
#include "TGedFrame.h" #include "TGedFrame.h"
#endif #endif
#ifndef ROOT_GuiTypes
#include "GuiTypes.h"
#endif
#ifndef ROOT_TGLUtil #ifndef ROOT_TGLUtil
#include "TGLUtil.h" #include "TGLUtil.h"
#endif #endif
class TGCheckButton; class TGNumberEntryField;
class TGDoubleHSlider;
class TGNumberEntry; class TGNumberEntry;
class TGDoubleSlider; class TGCheckButton;
class TGColorSelect;
class TGTextButton;
class TGL5DPainter; class TGL5DPainter;
class TGL5DDataSet;
class TGListBox;
class TGHSlider;
class TGL5DDataSetEditor : public TGedFrame class TGL5DDataSetEditor : public TGedFrame {
{
private: private:
TGCheckButton *fShowBoxCut; //Widgets for "Grid" tab.
TGNumberEntry *fNumberOfPlanes; TGNumberEntry *fNCellsXEntry; //Number of cells along X.
TGNumberEntry *fAlpha; TGNumberEntry *fNCellsYEntry; //Number of cells along Y.
TGCheckButton *fLogScale; TGNumberEntry *fNCellsZEntry; //Number of cells along Z.
TGDoubleSlider *fSlideRange;
TGDoubleHSlider *fXRangeSlider; //Slider for X range.
TGNumberEntryField *fXRangeSliderMin; //Number entry for slider's min.
TGNumberEntryField *fXRangeSliderMax; //Number entry for slider's max.
TGDoubleHSlider *fYRangeSlider; //Slider for Y range.
TGNumberEntryField *fYRangeSliderMin; //Number entry for slider's min.
TGNumberEntryField *fYRangeSliderMax; //Number entry for slider's max.
TGDoubleHSlider *fZRangeSlider; //Slider for Z range.
TGNumberEntryField *fZRangeSliderMin; //Number entry for slider's min.
TGNumberEntryField *fZRangeSliderMax; //Number entry for slider's max.
TGTextButton *fCancelGridBtn; //"Cancel" button.
TGTextButton *fOkGridBtn; //"Apply" button.
//Widgets for "Surfaces" tab.
TGNumberEntryField *fV4MinEntry; //Read only widget.
TGNumberEntryField *fV4MaxEntry; //Read only widget.
TGCheckButton *fHighlightCheck; //Highlight selected surface.
TGListBox *fIsoList; //List box to select surface.
TGCheckButton *fVisibleCheck; //Show/hide surface.
TGCheckButton *fShowCloud; //Show/hide points for surface.
TGColorSelect *fSurfColorSelect; //Open color dialog.
TGHSlider *fSurfAlphaSlider; //Slider to control transparency.
TGTextButton *fSurfRemoveBtn; //Remove selected surface.
TGNumberEntry *fNewIsoEntry; //Set the iso-level for new surfac
e.
TGTextButton *fAddNewIsoBtn; //Button to add new iso.
//Widgets for "Style" tab.
TGCheckButton *fShowBoxCut;
TGNumberEntry *fNumberOfPlanes;
TGNumberEntry *fAlpha;
TGCheckButton *fLogScale;
TGDoubleHSlider *fSlideRange;
TGTextButton *fApplyAlpha; TGTextButton *fApplyAlpha;
TGTextButton *fApplyPlanes; TGTextButton *fApplyPlanes;
//Model //Model
TGL5DPainter *fPainter; TGL5DDataSet *fDataSet; //Data adapter for TTree.
TGL5DPainter *fPainter; //Painter.
void ConnectSignals2Slots(); void ConnectSignals2Slots();
//Copy ctor and copy-assignment operator. Only
//declarations, no definitions.
TGL5DDataSetEditor(const TGL5DDataSetEditor &); TGL5DDataSetEditor(const TGL5DDataSetEditor &);
TGL5DDataSetEditor &operator = (const TGL5DDataSetEditor &); TGL5DDataSetEditor &operator = (const TGL5DDataSetEditor &);
void CreateStyleTab(); void CreateStyleTab();
void CreateGridTab();
void CreateIsoTab();
void SetStyleTabWidgets();
void SetGridTabWidgets();
void SetIsoTabWidgets();
void EnableGridTabButtons();
void DisableGridTabButtons();
void EnableSurfaceControls();
void DisableSurfaceControls();
//This will hold vector of list iterators
//(list of surfaces). I use this to avoid
//including TGL5DPainter here (SurfIter_t
//is a typedef inside TGL5DPainter).
class TGL5DEditorPrivate;
TGL5DEditorPrivate *fHidden;
Int_t fSelectedSurface;
public: public:
TGL5DDataSetEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30 TGL5DDataSetEditor(const TGWindow *p = 0, Int_t width = 140, Int_t heigh
, t = 30,
UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBack UInt_t options = kChildFrame, Pixel_t back = GetDefau
ground()); ltFrameBackground());
~TGL5DDataSetEditor(); ~TGL5DDataSetEditor();
virtual void SetModel(TObject* obj); virtual void SetModel(TObject* obj);
void DoAlpha(); //Slots for "Grid" tab events.
void DoLogScale(); void GridParametersChanged();
void DoPlanes(); void XSliderChanged();
void DoShowBoxCut(); void YSliderChanged();
void DoSliderRangeMoved(); void ZSliderChanged();
void DoAlphaChanged(); void XSliderSetMin();
void DoNContoursChanged(); void XSliderSetMax();
void YSliderSetMin();
void YSliderSetMax();
void ZSliderSetMin();
void ZSliderSetMax();
void RollbackGridParameters();
void ApplyGridParameters();
//Slots for "Surfaces" tab events.
void HighlightClicked();
void SurfaceSelected(Int_t id);
void VisibleClicked();
void ColorChanged(Pixel_t pixelColor);
void AlphaChanged(Int_t alpha);
void RemoveSurface();
void AddNewSurface();
//Slots for "Style" tab events.
void ApplyAlpha();
void ApplyPlanes();
void BoxCutToggled();
void AlphaChanged();
void NContoursChanged();
ClassDef(TGL5DDataSetEditor, 0); //GUI for editing OpenGL 5D Viewer attr ibutes ClassDef(TGL5DDataSetEditor, 0); //GUI for editing OpenGL 5D Viewer attr ibutes
}; };
#endif #endif
 End of changes. 13 change blocks. 
25 lines changed or deleted 115 lines changed or added


 TGLAxisPainter.h   TGLAxisPainter.h 
// @(#)root/eve:$Id: TGLAxisPainter.h 28378 2009-04-28 15:40:53Z matevz $ // @(#)root/eve:$Id: TGLAxisPainter.h 30425 2009-09-24 19:45:11Z matevz $
// Author: Alja Mrak-Tadel 2009 // Author: Alja Mrak-Tadel 2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 55 skipping to change at line 55
// Font derived from axis attributes. // Font derived from axis attributes.
TGLFont fLabelFont; TGLFont fLabelFont;
TGLFont fTitleFont; TGLFont fTitleFont;
// Print format. // Print format.
void LabelsLimits(const char *label, Int_t &first, Int_t &last) const; void LabelsLimits(const char *label, Int_t &first, Int_t &last) const;
void FormAxisValue(Double_t x, TString &s) const; void FormAxisValue(Double_t x, TString &s) const;
protected: protected:
TAttAxis *fAttAxis; // Model. TAttAxis *fAttAxis; // Model.
Bool_t fUseAxisColors; // Use colors from axes or from GL-rnr- ctx.
TGLFont::EMode fFontMode; // To be put into TAttAxis TGLFont::EMode fFontMode; // To be put into TAttAxis
LabVec_t fLabVec; // List of Labels position-value pairs LabVec_t fLabVec; // List of Labels position-value pairs
TMVec_t fTMVec; // List of tick-mark position-value pairs TMVec_t fTMVec; // List of tick-mark position-value pairs
// //
// Additional axis attributes required for GL rendering: // Additional axis attributes required for GL rendering:
// Orientation // Orientation
TGLVector3 fDir; TGLVector3 fDir;
TGLVector3 fTMOff[3]; TGLVector3 fTMOff[3];
Int_t fTMNDim; Int_t fTMNDim;
// Font. // Font.
Int_t fLabelPixelFontSize; Int_t fLabelPixelFontSize;
Double_t fLabel3DFontSize; Double_t fLabel3DFontSize;
Int_t fTitlePixelFontSize; Int_t fTitlePixelFontSize;
Double_t fTitle3DFontSize; Double_t fTitle3DFontSize;
// Labels options. Allready exist in TAttAxis, but can't be set. // Labels options. Allready exist in TAttAxis, but can't be set.
TGLFont::ETextAlign_e fLabelAlign; TGLFont::ETextAlignH_e fLabelAlignH;
TGLFont::ETextAlignV_e fLabelAlignV;
TGLVector3 fTitlePos; TGLVector3 fTitlePos;
public: public:
TGLAxisPainter(); TGLAxisPainter();
virtual ~TGLAxisPainter(); virtual ~TGLAxisPainter();
// GetSets. // GetSets.
Int_t GetTMNDim() const { return fTMNDim; } Int_t GetTMNDim() const { return fTMNDim; }
void SetTMNDim(Int_t x) { fTMNDim = x; } void SetTMNDim(Int_t x) { fTMNDim = x; }
skipping to change at line 99 skipping to change at line 101
void SetFontMode(TGLFont::EMode m) { fFontMode=m; } void SetFontMode(TGLFont::EMode m) { fFontMode=m; }
// this setter not necessary // this setter not necessary
void SetLabelPixelFontSize(Int_t fs) { fLabelPixelFontSize=fs; } void SetLabelPixelFontSize(Int_t fs) { fLabelPixelFontSize=fs; }
Int_t GetLabelPixelFontSize() const { return fLabelPixelFontSize; } Int_t GetLabelPixelFontSize() const { return fLabelPixelFontSize; }
void SetTitlePixelFontSize(Int_t fs) { fTitlePixelFontSize=fs; } void SetTitlePixelFontSize(Int_t fs) { fTitlePixelFontSize=fs; }
Int_t GetTitlePixelFontSize() const { return fTitlePixelFontSize; } Int_t GetTitlePixelFontSize() const { return fTitlePixelFontSize; }
TGLVector3& RefTitlePos() { return fTitlePos; } TGLVector3& RefTitlePos() { return fTitlePos; }
TGLFont::ETextAlign_e GetLabelAlign() const { return fLabelAlign; } void SetLabelAlign(TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_
void SetLabelAlign(TGLFont::ETextAlign_e x) { fLabelAlign = x; } e);
LabVec_t& RefLabVec() { return fLabVec; } LabVec_t& RefLabVec() { return fLabVec; }
TMVec_t& RefTMVec() { return fTMVec; } TMVec_t& RefTMVec() { return fTMVec; }
void SetAttAxis(TAttAxis* a) { fAttAxis = a; } void SetAttAxis(TAttAxis* a) { fAttAxis = a; }
TAttAxis* GetAttAxis() { return fAttAxis; } TAttAxis* GetAttAxis() { return fAttAxis; }
void SetUseAxisColors(Bool_t x) { fUseAxisColors = x; }
Bool_t GetUseAxisColors() const { return fUseAxisColors; }
// Utility. // Utility.
void SetLabelFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1); void SetLabelFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1);
void SetTitleFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1); void SetTitleFont(TGLRnrCtx &rnrCtx, const char* fontName, Int_t pixelSi ze = 64, Double_t font3DSize = -1);
void SetTextFormat(Double_t min, Double_t max, Double_t binWidth); void SetTextFormat(Double_t min, Double_t max, Double_t binWidth);
// Renderers. // Renderers.
void RnrText (const char* txt, const TGLVector3 &pos, const TGLFont::ETe void RnrText (const TString &txt, const TGLVector3 &pos, TGLFont::ETextA
xtAlign_e align, const TGLFont &font) const; lignH_e aH, TGLFont::ETextAlignV_e aV, const TGLFont &font) const;
void RnrTitle(const char* title, TGLVector3 &pos, TGLFont::ETextAlign_e void RnrTitle(const TString &title, TGLVector3 &pos, TGLFont::ETextAlign
align) const; H_e aH, TGLFont::ETextAlignV_e aV) const;
void RnrLabels() const; void RnrLabels() const;
void RnrLines() const; void RnrLines() const;
void PaintAxis(TGLRnrCtx& ctx, TAxis* ax); void PaintAxis(TGLRnrCtx& ctx, TAxis* ax);
ClassDef(TGLAxisPainter, 0); // GL axis painter. ClassDef(TGLAxisPainter, 0); // GL axis painter.
}; };
//========================================================================= ===== //========================================================================= =====
// TGLAxisPainterBox // TGLAxisPainterBox
 End of changes. 6 change blocks. 
8 lines changed or deleted 13 lines changed or added


 TGLBoundingBox.h   TGLBoundingBox.h 
// @(#)root/gl:$Id: TGLBoundingBox.h 21702 2008-01-14 18:55:14Z matevz $ // @(#)root/gl:$Id: TGLBoundingBox.h 29754 2009-08-11 15:48:54Z matevz $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 89 skipping to change at line 89
TGLBoundingBox & operator =(const TGLBoundingBox & other); TGLBoundingBox & operator =(const TGLBoundingBox & other);
void Set(const TGLVertex3 vertex[8]); void Set(const TGLVertex3 vertex[8]);
void Set(const Double_t vertex[8][3]); void Set(const Double_t vertex[8][3]);
void Set(const TGLBoundingBox & other); void Set(const TGLBoundingBox & other);
void SetEmpty(); void SetEmpty();
// Set axis aligned box // Set axis aligned box
void SetAligned(const TGLVertex3 & lowVertex, const TGLVertex3 & highVer tex); // axis aligned void SetAligned(const TGLVertex3 & lowVertex, const TGLVertex3 & highVer tex); // axis aligned
void SetAligned(UInt_t nbPnts, const Double_t * pnts); // axis aligned void SetAligned(UInt_t nbPnts, const Double_t * pnts); // axis aligned
void MergeAligned(const TGLBoundingBox & other); void MergeAligned(const TGLBoundingBox & other);
void ExpandAligned(const TGLVertex3 & point);
// Manipulation // Manipulation
void Transform(const TGLMatrix & matrix); void Transform(const TGLMatrix & matrix);
void Scale(Double_t factor); void Scale(Double_t factor);
void Scale(Double_t xFactor, Double_t yFactor, Double_t zFactor); void Scale(Double_t xFactor, Double_t yFactor, Double_t zFactor);
void Translate(const TGLVector3 & offset); void Translate(const TGLVector3 & offset);
// Single vertex accessors // Single vertex accessors
const TGLVertex3 & operator [] (UInt_t index) const; const TGLVertex3 & operator [] (UInt_t index) const;
const TGLVertex3 & Vertex(UInt_t index) const; const TGLVertex3 & Vertex(UInt_t index) const;
skipping to change at line 206 skipping to change at line 207
if (normalised) { if (normalised) {
return fAxesNorm[i]; return fAxesNorm[i];
} else { } else {
return fAxes[i]; return fAxes[i];
} }
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline Bool_t TGLBoundingBox::IsEmpty() const inline Bool_t TGLBoundingBox::IsEmpty() const
{ {
// Return kTRUE if box has zero volume - kFALSE otherwise // Return kTRUE if box has zero diagonal - kFALSE otherwise
// TODO: Round errors - should have epsilon test // TODO: Round errors - should have epsilon test
return (Volume() == 0.0); return (Diagonal() == 0.0);
} }
#endif // ROOT_TGLBoundingBox #endif // ROOT_TGLBoundingBox
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 TGLCamera.h   TGLCamera.h 
// @(#)root/gl:$Id: TGLCamera.h 28201 2009-04-14 16:04:20Z matevz $ // @(#)root/gl:$Id: TGLCamera.h 30366 2009-09-23 09:23:32Z matevz $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 102 skipping to change at line 102
mutable UInt_t fTimeStamp; //! timestamp mutable UInt_t fTimeStamp; //! timestamp
mutable TGLMatrix fLastNoPickProjM; //! no-pick projecti on matrix (cached) mutable TGLMatrix fLastNoPickProjM; //! no-pick projecti on matrix (cached)
mutable TGLMatrix fProjM; //! projection matri x (cached) mutable TGLMatrix fProjM; //! projection matri x (cached)
mutable TGLMatrix fModVM; //! modelView matrix (cached) mutable TGLMatrix fModVM; //! modelView matrix (cached)
mutable TGLMatrix fClipM; //! object space cli p matrix (cached) mutable TGLMatrix fClipM; //! object space cli p matrix (cached)
mutable TGLPlane fFrustumPlanes[kPlanesPerFrustum]; //! frustum planes (cached) mutable TGLPlane fFrustumPlanes[kPlanesPerFrustum]; //! frustum planes (cached)
TGLRect fViewport; //! viewport (GL coords - origin bottom left) TGLRect fViewport; //! viewport (GL coords - origin bottom left)
TGLBoundingBox fInterestBox; //! the interest box - created i n UpdateInterest() TGLBoundingBox fInterestBox; //! the interest box - created i n UpdateInterest()
mutable Double_t fLargestSeen; //! largest box volume seen in O mutable Double_t fLargestSeen; //! largest box diagonal seen in
fInterest() - used when OfInterest() - used when
// bootstrapping interest box //! bootstrapping interest box
// Internal cache update - const as the actual camera configuration is u naffected // Internal cache update - const as the actual camera configuration is u naffected
void UpdateCache() const; void UpdateCache() const;
static UInt_t fgDollyDeltaSens; static UInt_t fgDollyDeltaSens;
public: public:
TGLCamera(); TGLCamera();
TGLCamera(const TGLVector3 & hAxis, const TGLVector3 & vAxis); TGLCamera(const TGLVector3 & hAxis, const TGLVector3 & vAxis);
virtual ~TGLCamera(); virtual ~TGLCamera();
skipping to change at line 148 skipping to change at line 148
Bool_t AdjustAndClampVal(Double_t & val, Double_t min, Double_t max, Bool_t AdjustAndClampVal(Double_t & val, Double_t min, Double_t max,
Int_t screenShift, Int_t screenShiftRange, Int_t screenShift, Int_t screenShiftRange,
Bool_t mod1, Bool_t mod2) const; Bool_t mod1, Bool_t mod2) const;
Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor,
Bool_t mod1, Bool_t mod2) const; Bool_t mod1, Bool_t mod2) const;
void SetExternalCenter(Bool_t x); void SetExternalCenter(Bool_t x);
Bool_t GetExternalCenter(){ return fExternalCenter; } Bool_t GetExternalCenter(){ return fExternalCenter; }
void SetCenterVec( Double_t x, Double_t y, Double_t z); void SetCenterVec(Double_t x, Double_t y, Double_t z);
void SetCenterVecWarp(Double_t x, Double_t y, Double_t z);
Double_t* GetCenterVec() { return fCenter->Arr(); } Double_t* GetCenterVec() { return fCenter->Arr(); }
Double_t GetNearClip() const { return fNearClip; } Double_t GetNearClip() const { return fNearClip; }
Double_t GetFarClip() const { return fFarClip; } Double_t GetFarClip() const { return fFarClip; }
const TGLMatrix& GetCamBase() const { return fCamBase; } const TGLMatrix& GetCamBase() const { return fCamBase; }
const TGLMatrix& GetCamTrans() const { return fCamTrans; } const TGLMatrix& GetCamTrans() const { return fCamTrans; }
// If you manipulate camera ... also call IncTimeStamp() before redraw.
TGLMatrix& RefCamBase() { return fCamBase; }
TGLMatrix& RefCamTrans() { return fCamTrans; }
Double_t GetTheta() const; Double_t GetTheta() const;
TGLMatrix& RefLastNoPickProjM() const { return fLastNoPickProjM; } TGLMatrix& RefLastNoPickProjM() const { return fLastNoPickProjM; }
// Current orientation and frustum // Current orientation and frustum
TGLVertex3 EyePoint() const; TGLVertex3 EyePoint() const;
TGLVector3 EyeDirection() const; TGLVector3 EyeDirection() const;
TGLVertex3 FrustumCenter() const; TGLVertex3 FrustumCenter() const;
const TGLPlane & FrustumPlane(EFrustumPlane plane) const; const TGLPlane & FrustumPlane(EFrustumPlane plane) const;
 End of changes. 4 change blocks. 
5 lines changed or deleted 9 lines changed or added


 TGLCameraOverlay.h   TGLCameraOverlay.h 
// @(#)root/eve:$Id: TGLCameraOverlay.h 27643 2009-02-27 16:13:24Z matevz $ // @(#)root/eve:$Id: TGLCameraOverlay.h 29575 2009-07-24 12:52:18Z matevz $
// Author: Alja Mrak-Tadel 2007 // Author: Alja Mrak-Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 28 skipping to change at line 28
class TGLAxisPainter; class TGLAxisPainter;
class TGLFont; class TGLFont;
class TAttAxis; class TAttAxis;
class TAxis; class TAxis;
class TGLCameraOverlay : public TGLOverlayElement class TGLCameraOverlay : public TGLOverlayElement
{ {
public: public:
enum EMode { kPlaneIntersect, kBar, kAxis }; enum EMode { kPlaneIntersect, kBar, kAxis, kGridFront, kGridBack };
private: private:
TGLCameraOverlay(const TGLCameraOverlay&); // Not implemented TGLCameraOverlay(const TGLCameraOverlay&); // Not implemented
TGLCameraOverlay& operator=(const TGLCameraOverlay&); // Not implemented TGLCameraOverlay& operator=(const TGLCameraOverlay&); // Not implemented
Double_t fFrustum[4]; Double_t fFrustum[4];
protected: protected:
Bool_t fShowOrthographic; Bool_t fShowOrthographic;
Bool_t fShowPerspective; Bool_t fShowPerspective;
EMode fOrthographicMode; EMode fOrthographicMode;
EMode fPerspectiveMode; EMode fPerspectiveMode;
TGLAxisPainter *fAxisPainter; TGLAxisPainter *fAxisPainter;
TAxis *fAxis; TAxis *fAxis;
Float_t fAxisExtend; Float_t fAxisExtend;
Bool_t fUseAxisColors;
TGLPlane fExternalRefPlane; TGLPlane fExternalRefPlane;
Bool_t fUseExternalRefPlane; Bool_t fUseExternalRefPlane;
void RenderPlaneIntersect(TGLRnrCtx& rnrCtx); void RenderPlaneIntersect(TGLRnrCtx& rnrCtx);
void RenderAxis(TGLRnrCtx& rnrCtx); void RenderAxis(TGLRnrCtx& rnrCtx, Bool_t drawGrid);
void RenderGrid(TGLRnrCtx& rnrCtx);
void RenderBar(TGLRnrCtx& rnrCtx); void RenderBar(TGLRnrCtx& rnrCtx);
public: public:
TGLCameraOverlay(Bool_t showOrtho=kTRUE, Bool_t showPersp=kFALSE); TGLCameraOverlay(Bool_t showOrtho=kTRUE, Bool_t showPersp=kFALSE);
virtual ~TGLCameraOverlay(); virtual ~TGLCameraOverlay();
virtual void Render(TGLRnrCtx& rnrCtx); virtual void Render(TGLRnrCtx& rnrCtx);
TGLPlane& RefExternalRefPlane() { return fExternalRefPlane; } TGLPlane& RefExternalRefPlane() { return fExternalRefPlane; }
void UseExternalRefPlane(Bool_t x) { fUseExternalRefPlane=x; } void UseExternalRefPlane(Bool_t x) { fUseExternalRefPlane=x; }
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added


 TGLContext.h   TGLContext.h 
// @(#)root/gl:$Id: TGLContext.h 26250 2008-11-17 20:56:44Z matevz $ // @(#)root/gl:$Id: TGLContext.h 29332 2009-07-03 17:02:46Z matevz $
#include <utility> #include <utility>
#include <list> #include <list>
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 46 skipping to change at line 46
private: private:
TGLPaintDevice *fDevice; TGLPaintDevice *fDevice;
TGLContextPrivate *fPimpl; TGLContextPrivate *fPimpl;
Bool_t fFromCtor;//To prohibit user's calls of SetContext. Bool_t fFromCtor;//To prohibit user's calls of SetContext.
Bool_t fValid; Bool_t fValid;
TGLContextIdentity *fIdentity; TGLContextIdentity *fIdentity;
static Bool_t fgGlewInitDone;
void GlewInit();
public: public:
TGLContext(TGLWidget *glWidget, Bool_t shareDefault=kTRUE, const TGLCont ext *shareList=0); TGLContext(TGLWidget *glWidget, Bool_t shareDefault=kTRUE, const TGLCont ext *shareList=0);
// TGLContext(TGLPBuffer *glPbuf, const TGLContext *shareList = 0); // TGLContext(TGLPBuffer *glPbuf, const TGLContext *shareList = 0);
TGLContextIdentity *GetIdentity()const; TGLContextIdentity *GetIdentity()const;
virtual ~TGLContext(); virtual ~TGLContext();
Bool_t MakeCurrent(); Bool_t MakeCurrent();
Bool_t ClearCurrent(); Bool_t ClearCurrent();
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TGLEventHandler.h   TGLEventHandler.h 
// @(#)root/gl:$Id: TGLEventHandler.h 25245 2008-08-25 21:44:09Z matevz $ // @(#)root/gl:$Id: TGLEventHandler.h 30425 2009-09-24 19:45:11Z matevz $
// Author: Bertrand Bellenot 29/01/2008 // Author: Bertrand Bellenot 29/01/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 54 skipping to change at line 54
UInt_t fActiveButtonID; UInt_t fActiveButtonID;
UInt_t fLastEventState; UInt_t fLastEventState;
Bool_t fInPointerGrab; Bool_t fInPointerGrab;
Bool_t fMouseTimerRunning; Bool_t fMouseTimerRunning;
Bool_t fTooltipShown; Bool_t fTooltipShown;
Int_t fTooltipPixelTolerance; Int_t fTooltipPixelTolerance;
virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo d2); virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mo d2);
public: public:
TGLEventHandler(const char *name, TGWindow *w, TObject *obj, const char *title=""); TGLEventHandler(TGWindow *w, TObject *obj);
virtual ~TGLEventHandler(); virtual ~TGLEventHandler();
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual Bool_t HandleEvent(Event_t *event); virtual Bool_t HandleEvent(Event_t *event);
virtual Bool_t HandleExpose(Event_t * event); virtual Bool_t HandleExpose(Event_t * event);
virtual Bool_t HandleFocusChange(Event_t *event); virtual Bool_t HandleFocusChange(Event_t *event);
virtual Bool_t HandleCrossing(Event_t *event); virtual Bool_t HandleCrossing(Event_t *event);
virtual Bool_t HandleButton(Event_t * event); virtual Bool_t HandleButton(Event_t * event);
virtual Bool_t HandleDoubleClick(Event_t *event); virtual Bool_t HandleDoubleClick(Event_t *event);
virtual Bool_t HandleConfigureNotify(Event_t *event); virtual Bool_t HandleConfigureNotify(Event_t *event);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TGLFontManager.h   TGLFontManager.h 
// @(#)root/gl:$Id: TGLFontManager.h 28464 2009-05-06 12:37:21Z brun $ // @(#)root/gl:$Id: TGLFontManager.h 30425 2009-09-24 19:45:11Z matevz $
// Author: Alja Mrak-Tadel 2008 // Author: Alja Mrak-Tadel 2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 33 skipping to change at line 33
class TGLFont class TGLFont
{ {
public: public:
enum EMode enum EMode
{ {
kUndef = -1, kUndef = -1,
kBitmap, kPixmap, kBitmap, kPixmap,
kTexture, kOutline, kPolygon, kExtrude kTexture, kOutline, kPolygon, kExtrude
}; // Font-types of FTGL. }; // Font-types of FTGL.
enum ETextAlign_e { kCenterDown, kCenterUp, kLeft, kRight }; enum ETextAlignH_e { kLeft, kRight, kCenterH };
enum ETextAlignV_e { kBottom, kTop, kCenterV };
private: private:
TGLFont& operator=(const TGLFont& o); // Not implemented. TGLFont& operator=(const TGLFont& o); // Not implemented.
FTFont *fFont; // FTGL font. FTFont *fFont; // FTGL font.
TGLFontManager *fManager; // Font manager. TGLFontManager *fManager; // Font manager.
Float_t fDepth; // depth of extruded fonts, enforced at render time. Float_t fDepth; // depth of extruded fonts, enforced at render time.
protected: protected:
skipping to change at line 84 skipping to change at line 85
Float_t GetAscent() const; Float_t GetAscent() const;
Float_t GetDescent() const; Float_t GetDescent() const;
Float_t GetLineHeight() const; Float_t GetLineHeight() const;
void MeasureBaseLineParams(Float_t& ascent, Float_t& descent, Float_t & line_height, void MeasureBaseLineParams(Float_t& ascent, Float_t& descent, Float_t & line_height,
const char* txt="Xj") const; const char* txt="Xj") const;
void BBox(const char* txt, void BBox(const char* txt,
Float_t& llx, Float_t& lly, Float_t& llz, Float_t& llx, Float_t& lly, Float_t& llz,
Float_t& urx, Float_t& ury, Float_t& urz) const; Float_t& urx, Float_t& ury, Float_t& urz) const;
void Render(const char* txt) const;
void Render(const char* txt, Double_t x, Double_t y, Double_t angle, Do uble_t mgn) const; void Render(const char* txt, Double_t x, Double_t y, Double_t angle, Do uble_t mgn) const;
void RenderBitmap(const char* txt, Float_t x, Float_t y, Float_t zs, ET void Render(const TString &txt) const;
extAlign_e align) const; void Render(const TString &txt, Float_t x, Float_t y, Float_t z, ETextA
lignH_e alignH, ETextAlignV_e alignV) const;
// helper gl draw functions // helper gl draw functions
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) co nst; virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) co nst;
virtual void PostRender() const; virtual void PostRender() const;
Bool_t operator< (const TGLFont& o) const Bool_t operator< (const TGLFont& o) const
{ {
if (fSize == o.fSize) if (fSize == o.fSize)
{ {
if(fFile == o.fFile) if(fFile == o.fFile)
skipping to change at line 147 skipping to change at line 148
TGLFontManager() : fFontMap(), fFontTrash() {} TGLFontManager() : fFontMap(), fFontTrash() {}
virtual ~TGLFontManager(); virtual ~TGLFontManager();
void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont & out); void RegisterFont(Int_t size, Int_t file, TGLFont::EMode mode, TGLFont & out);
void RegisterFont(Int_t size, const char* name, TGLFont::EMode mode, T GLFont& out); void RegisterFont(Int_t size, const char* name, TGLFont::EMode mode, T GLFont& out);
void ReleaseFont(TGLFont& font); void ReleaseFont(TGLFont& font);
static TObjArray* GetFontFileArray(); static TObjArray* GetFontFileArray();
static FontSizeVec_t* GetFontSizeArray(); static FontSizeVec_t* GetFontSizeArray();
static Int_t GetFontSize(Float_t ds); static Int_t GetFontSize(Int_t ds);
static Int_t GetFontSize(Float_t ds, Int_t min, Int_t max); static Int_t GetFontSize(Int_t ds, Int_t min, Int_t max);
static const char* GetFontNameFromId(Int_t); static const char* GetFontNameFromId(Int_t);
void ClearFontTrash(); void ClearFontTrash();
ClassDef(TGLFontManager, 0); // A FreeType GL font manager. ClassDef(TGLFontManager, 0); // A FreeType GL font manager.
}; };
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 8 lines changed or added


 TGLHistPainter.h   TGLHistPainter.h 
skipping to change at line 28 skipping to change at line 28
overrides its virtual functions, but all actual work is done by : overrides its virtual functions, but all actual work is done by :
THistPainter - I name it "default" painter, it's the member of type THistPainter - I name it "default" painter, it's the member of type
TVirtualHistPainter * and loaded via plugin-manager; TVirtualHistPainter * and loaded via plugin-manager;
TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3); TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3);
TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/s urf5); TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/s urf5);
TGLBoxPainter - box option for TH3; TGLBoxPainter - box option for TH3;
TGLTF3Painter - TF3. TGLTF3Painter - TF3.
*/ */
class TGLParametricEquation; class TGLParametricEquation;
class TGLTH3Composition;
class TGL5DDataSet; class TGL5DDataSet;
class TString; class TString;
class TList; class TList;
class TF3; class TF3;
class TH1; class TH1;
class TGLHistPainter : public TVirtualHistPainter { class TGLHistPainter : public TVirtualHistPainter {
private: private:
//Dynamic type is THistPainter, no problems with simultaneous inheritanc e and membership //Dynamic type is THistPainter, no problems with simultaneous inheritanc e and membership
//TGLHistPainter delegates unsupported options/calls to this object //TGLHistPainter delegates unsupported options/calls to this object
skipping to change at line 54 skipping to change at line 55
TF3 *fF3; TF3 *fF3;
TList *fStack; TList *fStack;
EGLPlotType fPlotType; EGLPlotType fPlotType;
TGLPlotCamera fCamera; TGLPlotCamera fCamera;
TGLPlotCoordinates fCoord; TGLPlotCoordinates fCoord;
public: public:
TGLHistPainter(TH1 *hist); TGLHistPainter(TH1 *hist);
TGLHistPainter(TGLParametricEquation *equation); TGLHistPainter(TGLParametricEquation *equation);
TGLHistPainter(TGL5DDataSet *data); TGLHistPainter(TGL5DDataSet *data);
TGLHistPainter(TGLTH3Composition *comp);
//TVirtualHistPainter final overriders //TVirtualHistPainter final overriders
Int_t DistancetoPrimitive(Int_t px, Int_t py); Int_t DistancetoPrimitive(Int_t px, Int_t py);
void DrawPanel(); void DrawPanel();
void ExecuteEvent(Int_t event, Int_t px, Int_t py); void ExecuteEvent(Int_t event, Int_t px, Int_t py);
TList *GetContourList(Double_t contour)const; TList *GetContourList(Double_t contour)const;
char *GetObjectInfo(Int_t px, Int_t py)const; char *GetObjectInfo(Int_t px, Int_t py)const;
TList *GetStack()const; TList *GetStack()const;
Bool_t IsInside(Int_t x, Int_t y); Bool_t IsInside(Int_t x, Int_t y);
Bool_t IsInside(Double_t x, Double_t y); Bool_t IsInside(Double_t x, Double_t y);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 TGLIsoMesh.h   TGLIsoMesh.h 
#ifndef ROOT_TGLIsoMesh #ifndef ROOT_TGLIsoMesh
#define ROOT_TGLIsoMesh #define ROOT_TGLIsoMesh
#include <vector> #include <vector>
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOT_TAxis
#include "TAxis.h"
#endif
class TGLBoxCut;
namespace Rgl { namespace Rgl {
namespace Mc { namespace Mc {
/* /*
TIsoMesh - set of vertices, per-vertex normals, "triangles". TIsoMesh - set of vertices, per-vertex normals, "triangles".
Each "triangle" is a triplet of indices, pointing into vertices Each "triangle" is a triplet of indices, pointing into vertices
and normals arrays. For example, triangle t = {1, 4, 6} and normals arrays. For example, triangle t = {1, 4, 6}
has vertices &fVerts[1 * 3], &fVerts[4 * 3], &fVerts[6 * 3]; has vertices &fVerts[1 * 3], &fVerts[4 * 3], &fVerts[6 * 3];
and normals &fNorms[1 * 3], &fNorms[4 * 3], &fNorms[6 * 3] and normals &fNorms[1 * 3], &fNorms[4 * 3], &fNorms[6 * 3]
skipping to change at line 74 skipping to change at line 79
fVerts.clear(); fVerts.clear();
fNorms.clear(); fNorms.clear();
fTris.clear(); fTris.clear();
} }
std::vector<V> fVerts; std::vector<V> fVerts;
std::vector<V> fNorms; std::vector<V> fNorms;
std::vector<UInt_t> fTris; std::vector<UInt_t> fTris;
}; };
/*
TGridGeometry describes ranges and cell steps (scales are
already in steps and ranges).
*/
template<class V>
class TGridGeometry {
public:
enum EVertexPosition{
kBinCenter,
kBinEdge
};
TGridGeometry() : fMinX(0), fStepX(0),
fMinY(0), fStepY(0),
fMinZ(0), fStepZ(0)
{
//Default constructor.
}
TGridGeometry(const TAxis *x, const TAxis *y, const TAxis *z,
Double_t xs = 1., Double_t ys = 1., Double_t zs = 1.,
EVertexPosition pos = kBinCenter)
: fMinX(0), fStepX(0),
fMinY(0), fStepY(0),
fMinZ(0), fStepZ(0),
fXScaleInverted(1.),
fYScaleInverted(1.),
fZScaleInverted(1.)
{
//Define geometry using TAxis.
if (pos == kBinCenter) {
fMinX = V(x->GetBinCenter(x->GetFirst()));
fStepX = V((x->GetBinCenter(x->GetLast()) - fMinX) / (x->GetNbins(
) - 1));
fMinY = V(y->GetBinCenter(y->GetFirst()));
fStepY = V((y->GetBinCenter(y->GetLast()) - fMinY) / (y->GetNbins(
) - 1));
fMinZ = V(z->GetBinCenter(z->GetFirst()));
fStepZ = V((z->GetBinCenter(z->GetLast()) - fMinZ) / (z->GetNbins(
) - 1));
fMinX *= xs, fStepX *= xs;
fMinY *= ys, fStepY *= ys;
fMinZ *= zs, fStepZ *= zs;
} else if (pos == kBinEdge) {
fMinX = V(x->GetBinLowEdge(x->GetFirst()));
fStepX = V((x->GetBinUpEdge(x->GetLast()) - fMinX) / (x->GetNbins(
)));
fMinY = V(y->GetBinLowEdge(y->GetFirst()));
fStepY = V((y->GetBinUpEdge(y->GetLast()) - fMinY) / (y->GetNbins(
)));
fMinZ = V(z->GetBinLowEdge(z->GetFirst()));
fStepZ = V((z->GetBinUpEdge(z->GetLast()) - fMinZ) / (z->GetNbins(
)));
fMinX *= xs, fStepX *= xs;
fMinY *= ys, fStepY *= ys;
fMinZ *= zs, fStepZ *= zs;
}
fXScaleInverted = 1. / xs;
fYScaleInverted = 1. / ys;
fZScaleInverted = 1. / zs;
}
V fMinX;
V fStepX;
V fMinY;
V fStepY;
V fMinZ;
V fStepZ;
V fXScaleInverted;
V fYScaleInverted;
V fZScaleInverted;
};
}//namespace Mc }//namespace Mc
//Auxilary functions to draw an iso mesh in different modes.
void DrawMesh(const std::vector<Float_t> &vs, const std::vector<Float_t> &n
s,
const std::vector<UInt_t> &ts);
void DrawMesh(const std::vector<Double_t> &vs, const std::vector<Double_t>
&ns,
const std::vector<UInt_t> &ts);
void DrawMesh(const std::vector<Float_t> &vs, const std::vector<UInt_t> &fT
S);
void DrawMesh(const std::vector<Double_t> &vs, const std::vector<UInt_t> &f
TS);
void DrawMesh(const std::vector<Float_t> &vs, const std::vector<Float_t> &n
s,
const std::vector<UInt_t> &ts, const TGLBoxCut &box);
void DrawMesh(const std::vector<Double_t> &vs, const std::vector<Double_t>
&ns,
const std::vector<UInt_t> &ts, const TGLBoxCut &box);
void DrawMesh(const std::vector<Float_t> &vs, const std::vector<UInt_t> &ts
,
const TGLBoxCut &box);
void DrawMesh(const std::vector<Double_t> &vs, const std::vector<UInt_t> &t
s,
const TGLBoxCut &box);
void DrawMesh(const std::vector<Double_t> &vs, const std::vector<UInt_t> &t
s,
const TGLBoxCut &box);
void DrawMesh(const std::vector<Float_t> &vs, const std::vector<UInt_t> &ts
,
const TGLBoxCut &box);
void DrawMapleMesh(const std::vector<Double_t> &vs, const std::vector<Doubl
e_t> &ns,
const std::vector<UInt_t> &ts);
void DrawMapleMesh(const std::vector<Double_t> &vs, const std::vector<Doubl
e_t> &ns,
const std::vector<UInt_t> &ts, const TGLBoxCut & box);
}//namespace Rgl }//namespace Rgl
#endif #endif
 End of changes. 3 change blocks. 
0 lines changed or deleted 126 lines changed or added


 TGLMarchingCubes.h   TGLMarchingCubes.h 
skipping to change at line 13 skipping to change at line 13
#include <vector> #include <vector>
#ifndef ROOT_TH3 #ifndef ROOT_TH3
#include "TH3.h" #include "TH3.h"
#endif #endif
#ifndef ROOT_TGLIsoMesh #ifndef ROOT_TGLIsoMesh
#include "TGLIsoMesh.h" #include "TGLIsoMesh.h"
#endif #endif
#ifndef ROOT_TKDEAdapter
#include "TKDEAdapter.h"
#endif
/* /*
Implementation of "marching cubes" algortihm for GL module. Used by Implementation of "marching cubes" algortihm for GL module. Used by
TGLTF3Painter and TGLIsoPainter. TGLTF3Painter and TGLIsoPainter.
Good and clear algorithm explanation can be found here: Good and clear algorithm explanation can be found here:
http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/ http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/
*/ */
class TF3; class TF3;
class TKDEFGT;
namespace Rgl { namespace Rgl {
namespace Mc { namespace Mc {
/* /*
"T" prefix in class names is only for code-style checker. "T" prefix in class names is only for code-style checker.
*/ */
/* /*
TCell is a cube from marching cubes algorithm. TCell is a cube from marching cubes algorithm.
skipping to change at line 183 skipping to change at line 187
void SetDataSource(const H *hist) void SetDataSource(const H *hist)
{ {
fSrc = hist->GetArray(); fSrc = hist->GetArray();
fW = hist->GetNbinsX() + 2; fW = hist->GetNbinsX() + 2;
fH = hist->GetNbinsY() + 2; fH = hist->GetNbinsY() + 2;
fD = hist->GetNbinsZ() + 2; fD = hist->GetNbinsZ() + 2;
fSliceSize = fW * fH; fSliceSize = fW * fH;
} }
void FetchDensities()const{}//Do nothing.
ElementType_t GetData(UInt_t i, UInt_t j, UInt_t k)const ElementType_t GetData(UInt_t i, UInt_t j, UInt_t k)const
{ {
i += 1; i += 1;
j += 1; j += 1;
k += 1; k += 1;
return fSrc[k * fSliceSize + j * fW + i]; return fSrc[k * fSliceSize + j * fW + i];
} }
const ElementType_t *fSrc; const ElementType_t *fSrc;
UInt_t fW; UInt_t fW;
UInt_t fH; UInt_t fH;
UInt_t fD; UInt_t fD;
UInt_t fSliceSize; UInt_t fSliceSize;
}; };
/* /*
TGridGeometry describes ranges and cell steps (scales are
already in steps and ranges).
*/
template<class V>
class TGridGeometry {
public:
TGridGeometry() : fMinX(0), fStepX(0),
fMinY(0), fStepY(0),
fMinZ(0), fStepZ(0)
{
}
V fMinX;
V fStepX;
V fMinY;
V fStepY;
V fMinZ;
V fStepZ;
};
/*
TF3Adapter. Lets TMeshBuilder to use TF3 as a 3d array. TF3Adapter. Lets TMeshBuilder to use TF3 as a 3d array.
TF3Adapter, TF3EdgeSplitter (see below) and TMeshBuilder<TF3, ValueType> TF3Adapter, TF3EdgeSplitter (see below) and TMeshBuilder<TF3, ValueType>
need TGridGeometry<ValueType>, so TGridGeometry is a virtual base. need TGridGeometry<ValueType>, so TGridGeometry is a virtual base.
*/ */
class TF3Adapter : protected virtual TGridGeometry<Double_t> { class TF3Adapter : protected virtual TGridGeometry<Double_t> {
protected: protected:
typedef Double_t ElementType_t; typedef Double_t ElementType_t;
TF3Adapter() : fTF3(0), fW(0), fH(0), fD(0) TF3Adapter() : fTF3(0), fW(0), fH(0), fD(0)
skipping to change at line 251 skipping to change at line 234
{ {
return fH; return fH;
} }
UInt_t GetD()const UInt_t GetD()const
{ {
return fD; return fD;
} }
void SetDataSource(const TF3 *f); void SetDataSource(const TF3 *f);
void FetchDensities()const{}//Do nothing.
Double_t GetData(UInt_t i, UInt_t j, UInt_t k)const; Double_t GetData(UInt_t i, UInt_t j, UInt_t k)const;
const TF3 *fTF3;//TF3 data source. const TF3 *fTF3;//TF3 data source.
//TF3 grid's dimensions. //TF3 grid's dimensions.
UInt_t fW; UInt_t fW;
UInt_t fH; UInt_t fH;
UInt_t fD; UInt_t fD;
}; };
/* /*
skipping to change at line 302 skipping to change at line 288
public: public:
typedef TH3Adapter<TH3D, Double_t> Type_t; typedef TH3Adapter<TH3D, Double_t> Type_t;
}; };
template<> template<>
class TSourceAdapterSelector<TF3> { class TSourceAdapterSelector<TF3> {
public: public:
typedef TF3Adapter Type_t; typedef TF3Adapter Type_t;
}; };
template<>
class TSourceAdapterSelector<TKDEFGT> {
public:
typedef Fgt::TKDEAdapter Type_t;
};
/* /*
Edge splitter is the second base class for TMeshBuilder. Edge splitter is the second base class for TMeshBuilder.
Its task is to split cell's edge by adding new vertex Its task is to split cell's edge by adding new vertex
into mesh. into mesh.
Default splitter is used by TH3 and KDE.
*/ */
template<class H, class E, class V> template<class H, class E, class V>
class TH3EdgeSplitter : protected TGridGeometry<V> { class TDefaultSplitter : protected virtual TGridGeometry<V> {
protected: protected:
void SetNormalEvaluator(const H * /*hist*/) void SetNormalEvaluator(const H * /*source*/)
{ {
} }
void SplitEdge(TCell<E> & cell, TIsoMesh<V> * mesh, UInt_t i, void SplitEdge(TCell<E> & cell, TIsoMesh<V> * mesh, UInt_t i,
V x, V y, V z, V iso)const; V x, V y, V z, V iso)const;
}; };
/* /*
TF3's edge splitter. Calculates new vertex and surface normal TF3's edge splitter. Calculates new vertex and surface normal
in this vertex using TF3. in this vertex using TF3.
*/ */
skipping to change at line 350 skipping to change at line 343
/* /*
TSplitterSelector is aux. class to select "edge-splitter" base TSplitterSelector is aux. class to select "edge-splitter" base
for TMeshBuilder. for TMeshBuilder.
*/ */
template<class, class> class TSplitterSelector; template<class, class> class TSplitterSelector;
template<class V> template<class V>
class TSplitterSelector<TH3C, V> { class TSplitterSelector<TH3C, V> {
public: public:
typedef TH3EdgeSplitter<TH3C, Char_t, V> Type_t; typedef TDefaultSplitter<TH3C, Char_t, V> Type_t;
}; };
template<class V> template<class V>
class TSplitterSelector<TH3S, V> { class TSplitterSelector<TH3S, V> {
public: public:
typedef TH3EdgeSplitter<TH3S, Short_t, V> Type_t; typedef TDefaultSplitter<TH3S, Short_t, V> Type_t;
}; };
template<class V> template<class V>
class TSplitterSelector<TH3I, V> { class TSplitterSelector<TH3I, V> {
public: public:
typedef TH3EdgeSplitter<TH3I, Int_t, V> Type_t; typedef TDefaultSplitter<TH3I, Int_t, V> Type_t;
}; };
template<class V> template<class V>
class TSplitterSelector<TH3F, V> { class TSplitterSelector<TH3F, V> {
public: public:
typedef TH3EdgeSplitter<TH3F, Float_t, V> Type_t; typedef TDefaultSplitter<TH3F, Float_t, V> Type_t;
}; };
template<class V> template<class V>
class TSplitterSelector<TH3D, V> { class TSplitterSelector<TH3D, V> {
public: public:
typedef TH3EdgeSplitter<TH3D, Double_t, V> Type_t; typedef TDefaultSplitter<TH3D, Double_t, V> Type_t;
};
template<class V>
class TSplitterSelector<TKDEFGT, V> {
public:
typedef TDefaultSplitter<TKDEFGT, Float_t, Float_t> Type_t;
}; };
template<class V> template<class V>
class TSplitterSelector<TF3, V> { class TSplitterSelector<TF3, V> {
public: public:
typedef TF3EdgeSplitter Type_t; typedef TF3EdgeSplitter Type_t;
}; };
/* /*
Mesh builder. Polygonizes scalar field - TH3, TF3 or Mesh builder. Polygonizes scalar field - TH3, TF3 or
 End of changes. 14 change blocks. 
30 lines changed or deleted 29 lines changed or added


 TGLObject.h   TGLObject.h 
// @(#)root/gl:$Id: TGLObject.h 24214 2008-06-11 14:48:35Z matevz $ // @(#)root/gl:$Id: TGLObject.h 29526 2009-07-20 17:41:53Z matevz $
// Author: Matevz Tadel 7/4/2006 // Author: Matevz Tadel 7/4/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLObject #ifndef ROOT_TGLObject
#define ROOT_TGLObject #define ROOT_TGLObject
#include "TGLLogicalShape.h" #include "TGLLogicalShape.h"
#include <TMap.h> #include "TMap.h"
class TClass; class TClass;
class TGLObject : public TGLLogicalShape class TGLObject : public TGLLogicalShape
{ {
private: private:
static TMap fgGLClassMap; static TMap fgGLClassMap;
static TClass* SearchGLRenderer(TClass* cls); static TClass* SearchGLRenderer(TClass* cls);
protected: protected:
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TGLParametricEquationGL.h   TGLParametricEquationGL.h 
// @(#)root/gl:$Id: TGLParametricEquationGL.h 28378 2009-04-28 15:40:53Z ma tevz $ // @(#)root/gl:$Id: TGLParametricEquationGL.h 29526 2009-07-20 17:41:53Z ma tevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLParametricEquationGL #ifndef ROOT_TGLParametricEquationGL
#define ROOT_TGLParametricEquationGL #define ROOT_TGLParametricEquationGL
#ifndef ROOT_TGLObject #include "TGLPlot3D.h"
#include "TGLObject.h"
#endif
#ifndef ROOT_TGLPlotPainter
#include "TGLPlotPainter.h"
#endif
class TGLRnrCtx; class TGLRnrCtx;
class TGLParametricEquation; class TGLParametricEquation;
class TH2; class TH2;
class TGLParametricEquationGL : public TGLObject class TGLParametricEquationGL : public TGLPlot3D
{ {
private: private:
TGLParametricEquationGL(const TGLParametricEquationGL&); // N ot implemented TGLParametricEquationGL(const TGLParametricEquationGL&); // N ot implemented
TGLParametricEquationGL& operator=(const TGLParametricEquationGL&); // N ot implemented TGLParametricEquationGL& operator=(const TGLParametricEquationGL&); // N ot implemented
protected: protected:
TGLParametricEquation *fM; TGLParametricEquation *fM;
TGLPlotPainter *fPlotPainter;
public: public:
TGLParametricEquationGL(); TGLParametricEquationGL();
virtual ~TGLParametricEquationGL(); virtual ~TGLParametricEquationGL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; } virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
 End of changes. 4 change blocks. 
9 lines changed or deleted 3 lines changed or added


 TGLPlotBox.h   TGLPlotBox.h 
skipping to change at line 30 skipping to change at line 30
private: private:
const TColor *fFrameColor; const TColor *fFrameColor;
const Bool_t fXOYSelectable; const Bool_t fXOYSelectable;
const Bool_t fXOZSelectable; const Bool_t fXOZSelectable;
const Bool_t fYOZSelectable; const Bool_t fYOZSelectable;
Bool_t fSelectablePairs[4][2]; Bool_t fSelectablePairs[4][2];
TGLVertex3 f3DBox[8]; TGLVertex3 f3DBox[8];
mutable TGLVertex3 f2DBox[8]; mutable TGLVertex3 f2DBox[8];
mutable TGLVertex3 f2DBoxU[8];
mutable Int_t fFrontPoint; mutable Int_t fFrontPoint;
public: public:
TGLPlotBox(Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelecta ble); TGLPlotBox(Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelecta ble);
//ClassDef macro adds some virtual functions, //ClassDef macro adds some virtual functions,
//so, to supress g++ warnings virtual destructor declared. //so, to supress g++ warnings virtual destructor declared.
virtual ~TGLPlotBox(); virtual ~TGLPlotBox();
void DrawBox(Int_t selectedPart, Bool_t selectionPass, void DrawBox(Int_t selectedPart, Bool_t selectionPass,
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 TGLPlotPainter.h   TGLPlotPainter.h 
// @(#)root/gl:$Id: TGLPlotPainter.h 28601 2009-05-13 13:52:31Z brun $ // @(#)root/gl:$Id: TGLPlotPainter.h 30298 2009-09-19 13:07:06Z matevz $
// Author: Timur Pocheptsov 14/06/2006 // Author: Timur Pocheptsov 14/06/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 35 skipping to change at line 35
#endif #endif
#ifndef ROOT_TGLUtil #ifndef ROOT_TGLUtil
#include "TGLUtil.h" #include "TGLUtil.h"
#endif #endif
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
class TGLPlotCoordinates; class TGLPlotCoordinates;
class TGLPlotCamera; class TGLPlotCamera;
class TGL5DDataSet;
class TString; class TString;
class TColor; class TColor;
class TAxis; class TAxis;
class TH1; class TH1;
class TH3; class TH3;
class TF3; class TF3;
/* /*
Box cut. When attached to a plot, cuts away a part of it. Box cut. When attached to a plot, cuts away a part of it.
Can be moved in a plot's own area in X/Y/Z directions. Can be moved in a plot's own area in X/Y/Z directions.
skipping to change at line 71 skipping to change at line 72
TPoint fMousePos; TPoint fMousePos;
public: public:
TGLBoxCut(const TGLPlotBox *plotBox); TGLBoxCut(const TGLPlotBox *plotBox);
virtual ~TGLBoxCut(); virtual ~TGLBoxCut();
void TurnOnOff(); void TurnOnOff();
Bool_t IsActive()const{return fActive;} Bool_t IsActive()const{return fActive;}
void SetActive(Bool_t a); void SetActive(Bool_t a);
void ResetBoxGeometry();
void SetFactor(Double_t f){fFactor = f;} void SetFactor(Double_t f){fFactor = f;}
void DrawBox(Bool_t selectionPass, Int_t selected)const; void DrawBox(Bool_t selectionPass, Int_t selected)const;
void StartMovement(Int_t px, Int_t py); void StartMovement(Int_t px, Int_t py);
void MoveBox(Int_t px, Int_t py, Int_t axisID); void MoveBox(Int_t px, Int_t py, Int_t axisID);
Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x, Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x,
Double_t zMin, Double_t zMax)const; Double_t zMin, Double_t zMax)const;
skipping to change at line 166 skipping to change at line 169
void DrawSliceTextured(Double_t pos)const; void DrawSliceTextured(Double_t pos)const;
void DrawSliceFrame(Int_t low, Int_t up)const; void DrawSliceFrame(Int_t low, Int_t up)const;
ClassDef(TGLTH3Slice, 0) // TH3 slice ClassDef(TGLTH3Slice, 0) // TH3 slice
}; };
/* /*
TGLPlotPainter class defines interface to different plot painters. TGLPlotPainter class defines interface to different plot painters.
*/ */
class TGLPlotPainter;
/*
Object of this class, created on stack in DrawPlot member-functions,
saves modelview matrix, moves plot to (0; 0; 0), and
restores modelview matrix in dtor.
*/
namespace Rgl {
class PlotTranslation {
public:
PlotTranslation(const TGLPlotPainter *painter);
~PlotTranslation();
private:
const TGLPlotPainter *fPainter;
};
}
class TGLPlotPainter : public TVirtualGLPainter { class TGLPlotPainter : public TVirtualGLPainter {
friend class Rgl::PlotTranslation;
private: private:
//Int_t fGLContext;
//TGLPaintDevice *fGLDevice;
const TColor *fPadColor; const TColor *fPadColor;
protected: protected:
Double_t fPadPhi; Double_t fPadPhi;
Double_t fPadTheta; Double_t fPadTheta;
TH1 *fHist; TH1 *fHist;
TAxis *fXAxis; TAxis *fXAxis;
TAxis *fYAxis; TAxis *fYAxis;
TAxis *fZAxis; TAxis *fZAxis;
skipping to change at line 211 skipping to change at line 234
ESelectionBase fSelectionBase; ESelectionBase fSelectionBase;
mutable Bool_t fDrawPalette; mutable Bool_t fDrawPalette;
public: public:
/* TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *c oord, Int_t context, /* TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *c oord, Int_t context,
Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable); Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable);
TGLPlotPainter(TGLPlotCamera *camera, Int_t context);*/ TGLPlotPainter(TGLPlotCamera *camera, Int_t context);*/
TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd, TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coo rd,
Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable); Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSel ectable);
TGLPlotPainter(TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoordin ates *coord);
TGLPlotPainter(TGLPlotCamera *camera); TGLPlotPainter(TGLPlotCamera *camera);
const TGLPlotBox& RefBackBox() const { return fBackBox; } const TGLPlotBox& RefBackBox() const { return fBackBox; }
virtual void InitGL()const = 0; virtual void InitGL()const = 0;
virtual void DeInitGL()const = 0; virtual void DeInitGL()const = 0;
virtual void DrawPlot()const = 0; virtual void DrawPlot()const = 0;
virtual void Paint(); virtual void Paint();
//Checks, if mouse cursor is above plot. //Checks, if mouse cursor is above plot.
skipping to change at line 272 skipping to change at line 296
//Attention! After one of this methods was called, //Attention! After one of this methods was called,
//the GL_MATRIX_MODE could become different from what //the GL_MATRIX_MODE could become different from what
//you had before the call: for example, SaveModelviewMatrix will //you had before the call: for example, SaveModelviewMatrix will
//change it to GL_MODELVIEW. //change it to GL_MODELVIEW.
void SaveModelviewMatrix()const; void SaveModelviewMatrix()const;
void SaveProjectionMatrix()const; void SaveProjectionMatrix()const;
void RestoreModelviewMatrix()const; void RestoreModelviewMatrix()const;
void RestoreProjectionMatrix()const; void RestoreProjectionMatrix()const;
//
ClassDef(TGLPlotPainter, 0) //Base for gl plots ClassDef(TGLPlotPainter, 0) //Base for gl plots
}; };
/* /*
Auxiliary class, which holds different Auxiliary class, which holds different
information about plot's current coordinate system information about plot's current coordinate system
*/ */
class TGLPlotCoordinates { class TGLPlotCoordinates {
skipping to change at line 329 skipping to change at line 352
void SetYLog(Bool_t yLog); void SetYLog(Bool_t yLog);
Bool_t GetYLog()const; Bool_t GetYLog()const;
void SetZLog(Bool_t zLog); void SetZLog(Bool_t zLog);
Bool_t GetZLog()const; Bool_t GetZLog()const;
void ResetModified(); void ResetModified();
Bool_t Modified()const; Bool_t Modified()const;
Bool_t SetRanges(const TH1 *hist, Bool_t errors = kFALSE, Bool_t zBins = kFALSE); Bool_t SetRanges(const TH1 *hist, Bool_t errors = kFALSE, Bool_t zBins = kFALSE);
//
Bool_t SetRanges(const TAxis *xAxis, const TAxis *yAxis, const TAxis *zA
xis);
Int_t GetNXBins()const; Int_t GetNXBins()const;
Int_t GetNYBins()const; Int_t GetNYBins()const;
Int_t GetNZBins()const; Int_t GetNZBins()const;
const Rgl::BinRange_t &GetXBins()const; const Rgl::BinRange_t &GetXBins()const;
const Rgl::BinRange_t &GetYBins()const; const Rgl::BinRange_t &GetYBins()const;
const Rgl::BinRange_t &GetZBins()const; const Rgl::BinRange_t &GetZBins()const;
const Rgl::Range_t &GetXRange()const; const Rgl::Range_t &GetXRange()const;
skipping to change at line 363 skipping to change at line 388
Int_t GetFirstXBin()const{return fXBins.first;} Int_t GetFirstXBin()const{return fXBins.first;}
Int_t GetLastXBin()const{return fXBins.second;} Int_t GetLastXBin()const{return fXBins.second;}
Int_t GetFirstYBin()const{return fYBins.first;} Int_t GetFirstYBin()const{return fYBins.first;}
Int_t GetLastYBin()const{return fYBins.second;} Int_t GetLastYBin()const{return fYBins.second;}
Int_t GetFirstZBin()const{return fZBins.first;} Int_t GetFirstZBin()const{return fZBins.first;}
Int_t GetLastZBin()const{return fZBins.second;} Int_t GetLastZBin()const{return fZBins.second;}
Double_t GetFactor()const; Double_t GetFactor()const;
private: private:
Bool_t SetRangesCartesian(const TH1 *hist, Bool_t errors, Bool_t zBins);
Bool_t SetRangesPolar(const TH1 *hist); Bool_t SetRangesPolar(const TH1 *hist);
Bool_t SetRangesCylindrical(const TH1 *hist); Bool_t SetRangesCylindrical(const TH1 *hist);
Bool_t SetRangesSpherical(const TH1 *hist); Bool_t SetRangesSpherical(const TH1 *hist);
Bool_t SetRangesCartesian(const TH1 *hist, Bool_t errors = kFALSE, Bool_
t zBins = kFALSE);
TGLPlotCoordinates(const TGLPlotCoordinates &); TGLPlotCoordinates(const TGLPlotCoordinates &);
TGLPlotCoordinates &operator = (const TGLPlotCoordinates &); TGLPlotCoordinates &operator = (const TGLPlotCoordinates &);
ClassDef(TGLPlotCoordinates, 0)//Auxilary class, holds plot dimensions. ClassDef(TGLPlotCoordinates, 0)//Auxilary class, holds plot dimensions.
}; };
class TGLLevelPalette; class TGLLevelPalette;
namespace Rgl { namespace Rgl {
void DrawPalette(const TGLPlotCamera * camera, const TGLLevelPalette & p void DrawPalette(const TGLPlotCamera * camera, const TGLLevelPalette & pale
alette); tte);
void DrawPaletteAxis(const TGLPlotCamera * camera, const Range_t & minMa void DrawPaletteAxis(const TGLPlotCamera * camera, const Range_t & minMax,
x, Bool_t logZ); Bool_t logZ);
} }
#endif #endif
 End of changes. 12 change blocks. 
9 lines changed or deleted 37 lines changed or added


 TGLRnrCtx.h   TGLRnrCtx.h 
// @(#)root/gl:$Id: TGLRnrCtx.h 28378 2009-04-28 15:40:53Z matevz $ // @(#)root/gl:$Id: TGLRnrCtx.h 30425 2009-09-24 19:45:11Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLRnrCtx #ifndef ROOT_TGLRnrCtx
#define ROOT_TGLRnrCtx #define ROOT_TGLRnrCtx
skipping to change at line 101 skipping to change at line 101
TGLSceneInfo *fSceneInfo; TGLSceneInfo *fSceneInfo;
Short_t fViewerLOD; Short_t fViewerLOD;
Short_t fSceneLOD; Short_t fSceneLOD;
Short_t fCombiLOD; // Combined viewer/scene lod Short_t fCombiLOD; // Combined viewer/scene lod
Short_t fShapeLOD; Short_t fShapeLOD;
Short_t fViewerStyle; Short_t fViewerStyle;
Short_t fSceneStyle; Short_t fSceneStyle;
Float_t fViewerWFLineW;
Float_t fSceneWFLineW;
Float_t fViewerOLLineW;
Float_t fSceneOLLineW;
TGLClip *fViewerClip; TGLClip *fViewerClip;
TGLClip *fSceneClip; TGLClip *fSceneClip;
TGLClip *fClip; TGLClip *fClip;
Short_t fDrawPass; Short_t fDrawPass;
TGLStopwatch fStopwatch; TGLStopwatch fStopwatch;
Double_t fRenderTimeOut; Double_t fRenderTimeOut;
Bool_t fIsRunning; Bool_t fIsRunning;
Bool_t fHasTimedOut; Bool_t fHasTimedOut;
skipping to change at line 122 skipping to change at line 127
// Highlight / Selection stuff // Highlight / Selection stuff
Bool_t fHighlight; // True when in highlight. Bool_t fHighlight; // True when in highlight.
Bool_t fHighlightOutline; // True when in highlight-outline. Bool_t fHighlightOutline; // True when in highlight-outline.
Bool_t fSelection; Bool_t fSelection;
Bool_t fSecSelection; Bool_t fSecSelection;
Int_t fPickRadius; Int_t fPickRadius;
TGLRect *fPickRectangle; TGLRect *fPickRectangle;
TGLSelectBuffer*fSelectBuffer; TGLSelectBuffer*fSelectBuffer;
lpTGLColorSet_t*fColorSetStack; lpTGLColorSet_t*fColorSetStack;
Float_t fRenderScale;
UInt_t fEventKeySym; UInt_t fEventKeySym;
// GL state // GL state
Bool_t fDLCaptureOpen; //! DL-capture currently open Bool_t fDLCaptureOpen; //! DL-capture currently open
TGLContextIdentity *fGLCtxIdentity; //! Current GL context identity TGLContextIdentity *fGLCtxIdentity; //! Current GL context identity
GLUquadric *fQuadric; GLUquadric *fQuadric;
// Picture grabbing // Picture grabbing
Bool_t fGrabImage; // Set to true to store the image. Bool_t fGrabImage; // Set to true to store the image.
Int_t fGrabBuffer; // Which buffer to grab after render.
UChar_t *fGrabbedImage; // Buffer where image was stored after r endering. UChar_t *fGrabbedImage; // Buffer where image was stored after r endering.
public: public:
TGLRnrCtx(TGLViewerBase* viewer); TGLRnrCtx(TGLViewerBase* viewer);
virtual ~TGLRnrCtx(); virtual ~TGLRnrCtx();
// Central objects // Central objects
TGLViewerBase * GetViewer() { return fViewer; } TGLViewerBase * GetViewer() { return fViewer; }
TGLViewerBase & RefViewer() { return *fViewer; } TGLViewerBase & RefViewer() { return *fViewer; }
TGLCamera * GetCamera() { return fCamera; } TGLCamera * GetCamera() { return fCamera; }
skipping to change at line 171 skipping to change at line 178
Short_t CombiLOD() const { return fCombiLOD; } Short_t CombiLOD() const { return fCombiLOD; }
void SetCombiLOD(Short_t LOD) { fCombiLOD = LOD; } void SetCombiLOD(Short_t LOD) { fCombiLOD = LOD; }
Short_t ShapeLOD() const { return fShapeLOD; } Short_t ShapeLOD() const { return fShapeLOD; }
void SetShapeLOD(Short_t LOD) { fShapeLOD = LOD; } void SetShapeLOD(Short_t LOD) { fShapeLOD = LOD; }
Short_t ViewerStyle() const { return fViewerStyle; } Short_t ViewerStyle() const { return fViewerStyle; }
void SetViewerStyle(Short_t sty) { fViewerStyle = sty; } void SetViewerStyle(Short_t sty) { fViewerStyle = sty; }
Short_t SceneStyle() const { return fSceneStyle; } Short_t SceneStyle() const { return fSceneStyle; }
void SetSceneStyle(Short_t sty) { fSceneStyle = sty; } void SetSceneStyle(Short_t sty) { fSceneStyle = sty; }
Float_t ViewerWFLineW() const { return fViewerWFLineW; }
void SetViewerWFLineW(Float_t w) { fViewerWFLineW = w; }
Float_t SceneWFLineW() const { return fSceneWFLineW; }
void SetSceneWFLineW(Float_t w) { fSceneWFLineW = w; }
Float_t ViewerOLLineW() const { return fViewerOLLineW; }
void SetViewerOLLineW(Float_t w) { fViewerOLLineW = w; }
Float_t SceneOLLineW() const { return fSceneOLLineW; }
void SetSceneOLLineW(Float_t w) { fSceneOLLineW = w; }
TGLClip* ViewerClip() const { return fViewerClip; } TGLClip* ViewerClip() const { return fViewerClip; }
void SetViewerClip(TGLClip *p) { fViewerClip = p; } void SetViewerClip(TGLClip *p) { fViewerClip = p; }
TGLClip* SceneClip() const { return fSceneClip; } TGLClip* SceneClip() const { return fSceneClip; }
void SetSceneClip(TGLClip *p) { fSceneClip = p; } void SetSceneClip(TGLClip *p) { fSceneClip = p; }
TGLClip* Clip() const { return fClip; } TGLClip* Clip() const { return fClip; }
void SetClip(TGLClip *p) { fClip = p; } void SetClip(TGLClip *p) { fClip = p; }
Bool_t HasClip() const { return fClip != 0; } Bool_t HasClip() const { return fClip != 0; }
Short_t DrawPass() const { return fDrawPass; } Short_t DrawPass() const { return fDrawPass; }
void SetDrawPass(Short_t dpass) { fDrawPass = dpass; } void SetDrawPass(Short_t dpass) { fDrawPass = dpass; }
skipping to change at line 218 skipping to change at line 234
void EndSelection (Int_t glResult); void EndSelection (Int_t glResult);
void PushColorSet(); void PushColorSet();
TGLColorSet& ColorSet(); TGLColorSet& ColorSet();
void PopColorSet(); void PopColorSet();
TGLColorSet* ChangeBaseColorSet(TGLColorSet* set); TGLColorSet* ChangeBaseColorSet(TGLColorSet* set);
TGLColorSet* GetBaseColorSet(); TGLColorSet* GetBaseColorSet();
void ColorOrForeground(Color_t col); void ColorOrForeground(Color_t col);
Float_t GetRenderScale() const { return fRenderScale; }
void SetRenderScale(Float_t s) { fRenderScale = s; }
UInt_t GetEventKeySym() const { return fEventKeySym; } UInt_t GetEventKeySym() const { return fEventKeySym; }
void SetEventKeySym(UInt_t k) { fEventKeySym = k; } void SetEventKeySym(UInt_t k) { fEventKeySym = k; }
Bool_t IsDLCaptureOpen() const { return fDLCaptureOpen; } Bool_t IsDLCaptureOpen() const { return fDLCaptureOpen; }
void OpenDLCapture(); void OpenDLCapture();
void CloseDLCapture(); void CloseDLCapture();
TGLContextIdentity* GetGLCtxIdentity() const { return fGLCtxIdentity; } TGLContextIdentity* GetGLCtxIdentity() const { return fGLCtxIdentity; }
void SetGLCtxIdentity(TGLContextIdentity* cid) { fGLCtxIdentity = cid; } void SetGLCtxIdentity(TGLContextIdentity* cid) { fGLCtxIdentity = cid; }
void RegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont& out); void RegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont& out);
void RegisterFont(Int_t size, const char* name, Int_t mode, TGLFont& ou t); void RegisterFont(Int_t size, const char* name, Int_t mode, TGLFont& ou t);
void RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont& o
ut);
void RegisterFontNoScale(Int_t size, const char* name, Int_t mode, TGLF
ont& out);
void ReleaseFont(TGLFont& font); void ReleaseFont(TGLFont& font);
GLUquadric* GetGluQuadric() { return fQuadric; } GLUquadric* GetGluQuadric() { return fQuadric; }
// Picture grabbing // Picture grabbing
void SetGrabImage(Bool_t gi) { fGrabImage = gi; } void SetGrabImage(Bool_t gi, Int_t buf=-1) { fGrabImage = gi; fGrabB uffer = buf; }
Bool_t GetGrabImage() const { return fGrabImage; } Bool_t GetGrabImage() const { return fGrabImage; }
Int_t GetGrabBuffer() const { return fGrabBuffer; }
UChar_t* GetGrabbedImage() const { return fGrabbedImage; } UChar_t* GetGrabbedImage() const { return fGrabbedImage; }
void SetGrabbedImage(UChar_t* img) { fGrabbedImage = img; } void SetGrabbedImage(UChar_t* img) { fGrabbedImage = img; }
ClassDef(TGLRnrCtx, 0); // Collection of objects and data passes along a ll rendering calls. ClassDef(TGLRnrCtx, 0); // Collection of objects and data passes along a ll rendering calls.
}; };
#endif #endif
 End of changes. 9 change blocks. 
2 lines changed or deleted 26 lines changed or added


 TGLScene.h   TGLScene.h 
// @(#)root/gl:$Id: TGLScene.h 26367 2008-11-21 18:08:30Z matevz $ // @(#)root/gl:$Id: TGLScene.h 29676 2009-08-04 16:18:07Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLScene_H #ifndef ROOT_TGLScene_H
#define ROOT_TGLScene_H #define ROOT_TGLScene_H
skipping to change at line 136 skipping to change at line 136
virtual void DestroyPhysicalInternal(PhysicalShapeMapIt_t pit); virtual void DestroyPhysicalInternal(PhysicalShapeMapIt_t pit);
// GLcontext // GLcontext
TGLContextIdentity * fGLCtxIdentity; TGLContextIdentity * fGLCtxIdentity;
void ReleaseGLCtxIdentity(); void ReleaseGLCtxIdentity();
// Smart Refresh -- will go in this version // Smart Refresh -- will go in this version
Bool_t fInSmartRefresh; //! Bool_t fInSmartRefresh; //!
mutable LogicalShapeMap_t fSmartRefreshCache; //! mutable LogicalShapeMap_t fSmartRefreshCache; //!
// State that requires recreation of display-lists
Float_t fLastPointSizeScale;
Float_t fLastLineWidthScale;
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// ---------------------------------------------------------------- // ----------------------------------------------------------------
public: public:
TGLScene(); TGLScene();
virtual ~TGLScene(); virtual ~TGLScene();
virtual void CalcBoundingBox() const; virtual void CalcBoundingBox() const;
virtual TSceneInfo* CreateSceneInfo(TGLViewerBase* view); virtual TSceneInfo* CreateSceneInfo(TGLViewerBase* view);
skipping to change at line 199 skipping to change at line 203
virtual Bool_t BeginUpdate(); virtual Bool_t BeginUpdate();
virtual void EndUpdate(Bool_t minorChange=kTRUE, Bool_t sceneChanged=k TRUE, Bool_t updateViewers=kTRUE); virtual void EndUpdate(Bool_t minorChange=kTRUE, Bool_t sceneChanged=k TRUE, Bool_t updateViewers=kTRUE);
virtual void UpdateLogical(TObject* logid); virtual void UpdateLogical(TObject* logid);
virtual void UpdatePhysical(UInt_t phid, Double_t* trans, UChar_t* col); virtual void UpdatePhysical(UInt_t phid, Double_t* trans, UChar_t* col);
virtual void UpdatePhysical(UInt_t phid, Double_t* trans, Color_t cidx=- 1, UChar_t transp=0); virtual void UpdatePhysical(UInt_t phid, Double_t* trans, Color_t cidx=- 1, UChar_t transp=0);
virtual void UpdatePhysioLogical(TObject* logid, Double_t* trans, UChar_ t* col); virtual void UpdatePhysioLogical(TObject* logid, Double_t* trans, UChar_ t* col);
virtual void UpdatePhysioLogical(TObject* logid, Double_t* trans, Color_ t cidx=-1, UChar_t transp=0); virtual void UpdatePhysioLogical(TObject* logid, Double_t* trans, Color_ t cidx, UChar_t transp);
// Temporary export for setting selected-state of physical shapes. // Temporary export for setting selected-state of physical shapes.
LogicalShapeMap_t& RefLogicalShapes() { return fLogicalShapes; } LogicalShapeMap_t& RefLogicalShapes() { return fLogicalShapes; }
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// SmartRefresh // SmartRefresh
UInt_t BeginSmartRefresh(); UInt_t BeginSmartRefresh();
void EndSmartRefresh(); void EndSmartRefresh();
TGLLogicalShape* FindLogicalSmartRefresh(TObject* ID) const; TGLLogicalShape* FindLogicalSmartRefresh(TObject* ID) const;
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 TGLSceneBase.h   TGLSceneBase.h 
// @(#)root/gl:$Id: TGLSceneBase.h 25950 2008-10-24 21:34:34Z matevz $ // @(#)root/gl:$Id: TGLSceneBase.h 29676 2009-08-04 16:18:07Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLSceneBase_H #ifndef ROOT_TGLSceneBase_H
#define ROOT_TGLSceneBase_H #define ROOT_TGLSceneBase_H
skipping to change at line 46 skipping to change at line 46
protected: protected:
UInt_t fSceneID; // Unique scene id. UInt_t fSceneID; // Unique scene id.
TString fName; // Object identifier. TString fName; // Object identifier.
TString fTitle; // Object title. TString fTitle; // Object title.
UInt_t fTimeStamp; // Counter increased on every update. UInt_t fTimeStamp; // Counter increased on every update.
UInt_t fMinorStamp; // Counter increased on minimal update. UInt_t fMinorStamp; // Counter increased on minimal update.
Short_t fLOD; // Scene-lod. Short_t fLOD; // Scene-lod.
Short_t fStyle; // Scene-style. Short_t fStyle; // Scene-style.
Float_t fWFLineW; // Scene wire-frame line-width.
Float_t fOLLineW; // Scene outline line-width.
TGLClip * fClip; // Scene clipping-plane. TGLClip * fClip; // Scene clipping-plane.
Bool_t fSelectable; // Objects in the scene are selectable. Bool_t fSelectable; // Objects in the scene are selectable.
// BoundingBox // BoundingBox
mutable TGLBoundingBox fBoundingBox; // bounding box for scene (axi s aligned) - lazy update - use BoundingBox() to access mutable TGLBoundingBox fBoundingBox; // bounding box for scene (axi s aligned) - lazy update - use BoundingBox() to access
mutable Bool_t fBoundingBoxValid; // bounding box valid? mutable Bool_t fBoundingBoxValid; // bounding box valid?
Bool_t fDoFrustumCheck; // Perform global frustum-check in UpdateScene Info() Bool_t fDoFrustumCheck; // Perform global frustum-check in UpdateScene Info()
Bool_t fDoClipCheck; // Perform global clip-plane-check in UpdateSc eneInfo() Bool_t fDoClipCheck; // Perform global clip-plane-check in UpdateSc eneInfo()
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TGLSceneInfo.h   TGLSceneInfo.h 
// @(#)root/gl:$Id: TGLSceneInfo.h 25950 2008-10-24 21:34:34Z matevz $ // @(#)root/gl:$Id: TGLSceneInfo.h 29676 2009-08-04 16:18:07Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLSceneInfo_H #ifndef ROOT_TGLSceneInfo_H
#define ROOT_TGLSceneInfo_H #define ROOT_TGLSceneInfo_H
skipping to change at line 38 skipping to change at line 38
public: public:
enum EClipTest { kClipNone, kClipOutside, kClipInside }; enum EClipTest { kClipNone, kClipOutside, kClipInside };
private: private:
TGLSceneInfo(const TGLSceneInfo&); // Not implemented TGLSceneInfo(const TGLSceneInfo&); // Not implemented
TGLSceneInfo& operator=(const TGLSceneInfo&); // Not implemented TGLSceneInfo& operator=(const TGLSceneInfo&); // Not implemented
protected: protected:
TGLViewerBase * fViewer; TGLViewerBase * fViewer;
TGLSceneBase * fScene; TGLSceneBase * fScene;
Bool_t fActive; // Show fScene in fViewer Bool_t fActive; // Show fScene in fViewer
Short_t fLOD; // Optional override of scene lod Short_t fLOD; // Optional override of scene lod
Short_t fStyle; // Optional override of scene style Short_t fStyle; // Optional override of scene style
TGLClip * fClip; // Optional override of clipping-plane Float_t fWFLineW; // Optional override of scene wire-frame
line-width
Short_t fLastLOD; // Last combined viewer/scene lod (set in Float_t fOLLineW; // Optional override of scene outline lin
scene::lodofy-scene-info). e-width
Short_t fLastStyle; // Last combined viewer/scene style (set in TGLClip * fClip; // Optional override of clipping-plane
scene::pre-render).
TGLClip * fLastClip; // Last combined viewer/scene clip (set in Short_t fLastLOD; // Last combined viewer/scene lod (set
scene::update) in scene::lodify-scene-info).
TGLCamera * fLastCamera;// Last camera used. Short_t fLastStyle; // Last combined viewer/scene style (set
in scene::pre-draw).
Float_t fLastWFLineW; // Last combined viewer/scene wire-frame
line-width (set in scene::pre-draw).
Float_t fLastOLLineW; // Last combined viewer/scene outline lin
e-width (set in scene::pre-draw).
TGLClip * fLastClip; // Last combined viewer/scene clip (set
in scene::update)
TGLCamera * fLastCamera; // Last camera used.
UInt_t fSceneStamp; // Scene's time-stamp on last update. UInt_t fSceneStamp; // Scene's time-stamp on last update.
UInt_t fClipStamp; // Clip's time-stamp on last update. UInt_t fClipStamp; // Clip's time-stamp on last update.
UInt_t fCameraStamp; // Camera's time-stamp on last update. UInt_t fCameraStamp; // Camera's time-stamp on last update.
Bool_t fUpdateTimeouted; // Set if update was interrupted. Bool_t fUpdateTimeouted; // Set if update was interrupted.
// Eventually we will allow additional per-scene transforamtion. // Eventually we will allow additional per-scene transforamtion.
// TGLMatrix fSceneTrans; // TGLMatrix fSceneTrans;
// Also needed: // Also needed:
// *) transformed clipping planes of the camera // *) transformed clipping planes of the camera
skipping to change at line 110 skipping to change at line 114
std::vector<TGLPlane>& FrustumPlanes() { return fFrustumPlanes; } std::vector<TGLPlane>& FrustumPlanes() { return fFrustumPlanes; }
std::vector<TGLPlane>& ClipPlanes() { return fClipPlanes; } std::vector<TGLPlane>& ClipPlanes() { return fClipPlanes; }
Short_t LOD() const { return fLOD; } Short_t LOD() const { return fLOD; }
void SetLOD(Short_t lod) { fLOD = lod; } void SetLOD(Short_t lod) { fLOD = lod; }
Short_t Style() const { return fStyle; } Short_t Style() const { return fStyle; }
void SetStyle(Short_t st) { fStyle = st; } void SetStyle(Short_t st) { fStyle = st; }
Float_t WFLineW() const { return fWFLineW; }
void SetWFLineW(Float_t w) { fWFLineW = w; }
Float_t OLLineW() const { return fOLLineW; }
void SetOLLineW(Float_t w) { fOLLineW = w; }
TGLClip* Clip() const { return fClip; } TGLClip* Clip() const { return fClip; }
void SetClip(TGLClip *p) { fClip = p; } void SetClip(TGLClip *p) { fClip = p; }
Short_t LastLOD() const { return fLastLOD; } Short_t LastLOD() const { return fLastLOD; }
void SetLastLOD(Short_t ld) { fLastLOD = ld; } void SetLastLOD(Short_t ld) { fLastLOD = ld; }
Short_t LastStyle() const { return fLastStyle; } Short_t LastStyle() const { return fLastStyle; }
void SetLastStyle(Short_t st) { fLastStyle = st; } void SetLastStyle(Short_t st) { fLastStyle = st; }
Float_t LastWFLineW() const { return fLastWFLineW; }
void SetLastWFLineW(Float_t w) { fLastWFLineW = w; }
Float_t LastOLLineW() const { return fLastOLLineW; }
void SetLastOLLineW(Float_t w) { fLastOLLineW = w; }
TGLClip* LastClip() const { return fLastClip; } TGLClip* LastClip() const { return fLastClip; }
void SetLastClip(TGLClip *p) { fLastClip = p; } void SetLastClip(TGLClip *p) { fLastClip = p; }
TGLCamera* LastCamera() const { return fLastCamera; } TGLCamera* LastCamera() const { return fLastCamera; }
void SetLastCamera(TGLCamera *p) { fLastCamera = p; } void SetLastCamera(TGLCamera *p) { fLastCamera = p; }
UInt_t SceneStamp() const { return fSceneStamp; } UInt_t SceneStamp() const { return fSceneStamp; }
void SetSceneStamp(UInt_t ts) { fSceneStamp = ts; } void SetSceneStamp(UInt_t ts) { fSceneStamp = ts; }
void ResetSceneStamp() { fSceneStamp = 0; } void ResetSceneStamp() { fSceneStamp = 0; }
 End of changes. 5 change blocks. 
13 lines changed or deleted 31 lines changed or added


 TGLUtil.h   TGLUtil.h 
// @(#)root/gl:$Id: TGLUtil.h 28845 2009-06-08 13:53:44Z rdm $ // @(#)root/gl:$Id: TGLUtil.h 29755 2009-08-11 17:38:16Z matevz $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 77 skipping to change at line 77
enum EGLPlotType { enum EGLPlotType {
kGLLegoPlot, kGLLegoPlot,
kGLSurfacePlot, kGLSurfacePlot,
kGLBoxPlot, kGLBoxPlot,
kGLTF3Plot, kGLTF3Plot,
kGLStackPlot, kGLStackPlot,
kGLParametricPlot, kGLParametricPlot,
kGLIsoPlot, kGLIsoPlot,
kGL5D, kGL5D,
kGLTH3Composition,
kGLDefaultPlot kGLDefaultPlot
}; };
// TODO: Split these into own h/cxx files - too long now! // TODO: Split these into own h/cxx files - too long now!
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLVertex3 // // TGLVertex3 //
// // // //
// 3 component (x/y/z) vertex class // // 3 component (x/y/z) vertex class //
skipping to change at line 121 skipping to change at line 122
Bool_t operator == (const TGLVertex3 & rhs) const; Bool_t operator == (const TGLVertex3 & rhs) const;
TGLVertex3 & operator = (const TGLVertex3 & rhs); TGLVertex3 & operator = (const TGLVertex3 & rhs);
TGLVertex3 & operator *= (Double_t f); TGLVertex3 & operator *= (Double_t f);
TGLVertex3 operator - () const; TGLVertex3 operator - () const;
const TGLVertex3 & operator -= (const TGLVector3 & val); const TGLVertex3 & operator -= (const TGLVector3 & val);
const TGLVertex3 & operator += (const TGLVector3 & val); const TGLVertex3 & operator += (const TGLVector3 & val);
// Manipulators // Manipulators
void Fill(Double_t val); void Fill(Double_t val);
void Set(Double_t x, Double_t y, Double_t z); void Set(Double_t x, Double_t y, Double_t z);
void Set(const Double_t* xyz);
void Set(const TGLVertex3 & other); void Set(const TGLVertex3 & other);
void Shift(TGLVector3 & shift); void Shift(TGLVector3 & shift);
void Shift(Double_t xDelta, Double_t yDelta, Double_t zDelta); void Shift(Double_t xDelta, Double_t yDelta, Double_t zDelta);
void Negate(); void Negate();
void Minimum(const TGLVertex3 & other); void Minimum(const TGLVertex3 & other);
void Maximum(const TGLVertex3 & other); void Maximum(const TGLVertex3 & other);
// Accessors // Accessors
Double_t & operator [] (Int_t index); Double_t & operator [] (Int_t index);
skipping to change at line 231 skipping to change at line 233
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TGLVertex3::Set(Double_t x, Double_t y, Double_t z) inline void TGLVertex3::Set(Double_t x, Double_t y, Double_t z)
{ {
fVals[0]=x; fVals[0]=x;
fVals[1]=y; fVals[1]=y;
fVals[2]=z; fVals[2]=z;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
inline void TGLVertex3::Set(const Double_t* xyz)
{
fVals[0]=xyz[0];
fVals[1]=xyz[1];
fVals[2]=xyz[2];
}
//_________________________________________________________________________
_____
inline void TGLVertex3::Set(const TGLVertex3 & other) inline void TGLVertex3::Set(const TGLVertex3 & other)
{ {
fVals[0]=other.fVals[0]; fVals[0]=other.fVals[0];
fVals[1]=other.fVals[1]; fVals[1]=other.fVals[1];
fVals[2]=other.fVals[2]; fVals[2]=other.fVals[2];
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGLVector3 // // TGLVector3 //
skipping to change at line 953 skipping to change at line 963
ClassDef(TDrawQualityScaler,0); // Multiply/restore draw quality in c onstructor/destructor. ClassDef(TDrawQualityScaler,0); // Multiply/restore draw quality in c onstructor/destructor.
}; };
private: private:
static UInt_t fgDefaultDrawQuality; static UInt_t fgDefaultDrawQuality;
static UInt_t fgDrawQuality; static UInt_t fgDrawQuality;
static UInt_t fgColorLockCount; static UInt_t fgColorLockCount;
static Float_t fgPointSize;
static Float_t fgLineWidth;
static Float_t fgPointSizeScale;
static Float_t fgLineWidthScale;
TGLUtil(const TGLUtil&); // Not implemented. TGLUtil(const TGLUtil&); // Not implemented.
TGLUtil& operator=(const TGLUtil&); // Not implemented. TGLUtil& operator=(const TGLUtil&); // Not implemented.
public: public:
virtual ~TGLUtil() {} virtual ~TGLUtil() {}
// Error checking // Error checking
static void CheckError(const char * loc); static void CheckError(const char * loc);
// Polygon tesselator for direct drawing // Polygon tesselator for direct drawing
skipping to change at line 996 skipping to change at line 1011
static void ColorTransparency(Color_t color_index, Char_t transparency=0 ); static void ColorTransparency(Color_t color_index, Char_t transparency=0 );
static void Color3ub(UChar_t r, UChar_t g, UChar_t b); static void Color3ub(UChar_t r, UChar_t g, UChar_t b);
static void Color4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a); static void Color4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a);
static void Color3ubv(const UChar_t* rgb); static void Color3ubv(const UChar_t* rgb);
static void Color4ubv(const UChar_t* rgba); static void Color4ubv(const UChar_t* rgba);
static void Color3f(Float_t r, Float_t g, Float_t b); static void Color3f(Float_t r, Float_t g, Float_t b);
static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a); static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a);
static void Color3fv(const Float_t* rgb); static void Color3fv(const Float_t* rgb);
static void Color4fv(const Float_t* rgba); static void Color4fv(const Float_t* rgba);
static Float_t GetPointSizeScale();
static void SetPointSizeScale(Float_t scale);
static Float_t GetLineWidthScale();
static void SetLineWidthScale(Float_t scale);
static void PointSize(Float_t point_size);
static void LineWidth(Float_t line_width);
static Float_t PointSize();
static Float_t LineWidth();
static void BeginExtendPickRegion(Float_t scale); static void BeginExtendPickRegion(Float_t scale);
static void EndExtendPickRegion(); static void EndExtendPickRegion();
static void RenderPolyMarkers(const TAttMarker& marker, Float_t* p, Int_ t n, static void RenderPolyMarkers(const TAttMarker& marker, Float_t* p, Int_ t n,
Int_t pick_radius=0, Bool_t selection=kFAL SE, Int_t pick_radius=0, Bool_t selection=kFAL SE,
Bool_t sec_selection=kFALSE); Bool_t sec_selection=kFALSE);
static void RenderPoints(const TAttMarker& marker, Float_t* p, Int_t n, static void RenderPoints(const TAttMarker& marker, Float_t* p, Int_t n,
Int_t pick_radius=0, Bool_t selection=kFALSE, Int_t pick_radius=0, Bool_t selection=kFALSE,
Bool_t sec_selection=kFALSE); Bool_t sec_selection=kFALSE);
static void RenderCrosses(const TAttMarker& marker, Float_t* p, Int_t n, static void RenderCrosses(const TAttMarker& marker, Float_t* p, Int_t n,
Bool_t sec_selection=kFALSE); Bool_t sec_selection=kFALSE);
static void RenderPolyLine(const TAttLine& al, Float_t* p, Int_t n, static void RenderPolyLine(const TAttLine& aline, Float_t* p, Int_t n,
Int_t pick_radius=0, Bool_t selection=kFALSE) ; Int_t pick_radius=0, Bool_t selection=kFALSE) ;
static void BeginAttLine(const TAttLine& aline, Int_t pick_radius=0, Boo
l_t selection=kFALSE);
static void EndAttLine(Int_t pick_radius=0, Bool_t selection=kFALSE);
// TODO: These draw routines should take LOD hints // TODO: These draw routines should take LOD hints
static void SetDrawColors(const Float_t rgba[4]); static void SetDrawColors(const Float_t rgba[4]);
static void DrawSphere(const TGLVertex3 & position, Double_t radius, con st Float_t rgba[4]); static void DrawSphere(const TGLVertex3 & position, Double_t radius, con st Float_t rgba[4]);
static void DrawLine(const TGLLine3 & line, ELineHeadShape head, Double_ t size, const Float_t rgba[4]); static void DrawLine(const TGLLine3 & line, ELineHeadShape head, Double_ t size, const Float_t rgba[4]);
static void DrawLine(const TGLVertex3 & start, const TGLVector3 & vector , ELineHeadShape head, static void DrawLine(const TGLVertex3 & start, const TGLVector3 & vector , ELineHeadShape head,
Double_t size, const Float_t rgba[4]); Double_t size, const Float_t rgba[4]);
static void DrawRing(const TGLVertex3 & center, const TGLVector3 & norma l, static void DrawRing(const TGLVertex3 & center, const TGLVector3 & norma l,
Double_t radius, const Float_t* rgba); Double_t radius, const Float_t* rgba);
static void DrawReferenceMarker(const TGLCamera & camera, static void DrawReferenceMarker(const TGLCamera & camera,
 End of changes. 8 change blocks. 
2 lines changed or deleted 33 lines changed or added


 TGLViewer.h   TGLViewer.h 
// @(#)root/gl:$Id: TGLViewer.h 28607 2009-05-13 15:11:33Z matevz $ // @(#)root/gl:$Id: TGLViewer.h 30384 2009-09-23 17:54:23Z matevz $
// Author: Richard Maunder 25/05/2005 // Author: Richard Maunder 25/05/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 121 skipping to change at line 121
EPushAction fPushAction; EPushAction fPushAction;
EDragAction fDragAction; EDragAction fDragAction;
// Redraw timer // Redraw timer
TGLRedrawTimer *fRedrawTimer; //! timer for triggering redra ws TGLRedrawTimer *fRedrawTimer; //! timer for triggering redra ws
Float_t fMaxSceneDrawTimeHQ; //! max time for scene renderi ng at high LOD (in ms) Float_t fMaxSceneDrawTimeHQ; //! max time for scene renderi ng at high LOD (in ms)
Float_t fMaxSceneDrawTimeLQ; //! max time for scene renderi ng at high LOD (in ms) Float_t fMaxSceneDrawTimeLQ; //! max time for scene renderi ng at high LOD (in ms)
TGLRect fViewport; //! viewport - drawn area TGLRect fViewport; //! viewport - drawn area
TGLColorSet fDarkColorSet; //! color-set with dark background TGLColorSet fDarkColorSet; //! color-set with dark background
TGLColorSet fLightColorSet; //! color-set with dark background TGLColorSet fLightColorSet; //! color-set with light background
Float_t fPointScale; //! size scale for points
Float_t fLineScale; //! width scale for lines
Bool_t fSmoothPoints; //! smooth point edge rendering
Bool_t fSmoothLines; //! smooth line edge rendering
Int_t fAxesType; //! axes type Int_t fAxesType; //! axes type
Bool_t fAxesDepthTest; //! remove guides hidden-lines Bool_t fAxesDepthTest; //! remove guides hidden-lines
Bool_t fReferenceOn; //! reference marker on? Bool_t fReferenceOn; //! reference marker on?
TGLVertex3 fReferencePos; //! reference position TGLVertex3 fReferencePos; //! reference position
Bool_t fDrawCameraCenter; //! reference marker on? Bool_t fDrawCameraCenter; //! reference marker on?
TGLCameraOverlay *fCameraOverlay; //! markup size of viewport in scene units TGLCameraOverlay *fCameraOverlay; //! markup size of viewport in scene units
Bool_t fInitGL; //! has GL been initialised? Bool_t fInitGL; //! has GL been initialised?
Bool_t fSmartRefresh; //! cache logicals during scene rebuilds , use TAtt3D time-stamp to determine if they are still valid Bool_t fSmartRefresh; //! cache logicals during scene rebuilds , use TAtt3D time-stamp to determine if they are still valid
skipping to change at line 154 skipping to change at line 158
// Drawing - can tidy up/remove lots when TGLManager added // Drawing - can tidy up/remove lots when TGLManager added
void InitGL(); void InitGL();
void PreDraw(); void PreDraw();
void PostDraw(); void PostDraw();
void FadeView(Float_t alpha); void FadeView(Float_t alpha);
void MakeCurrent() const; void MakeCurrent() const;
void SwapBuffers() const; void SwapBuffers() const;
// Cameras // Cameras
void SetViewport(Int_t x, Int_t y, Int_t width, Int_t height); void SetViewport(Int_t x, Int_t y, Int_t width, Int_t height);
void SetViewport(const TGLRect& vp);
void SetupCameras(Bool_t reset); void SetupCameras(Bool_t reset);
protected: protected:
TGLWidget *fGLWidget; TGLWidget *fGLWidget;
Int_t fGLDevice; //!for embedded gl viewer Int_t fGLDevice; //!for embedded gl viewer
TGLContextIdentity *fGLCtxId; //!for embedded gl viewer TGLContextIdentity *fGLCtxId; //!for embedded gl viewer
// Updata/camera-reset behaviour // Updata/camera-reset behaviour
Bool_t fIgnoreSizesOnUpdate; // ignore sizes of bounding- boxes on update Bool_t fIgnoreSizesOnUpdate; // ignore sizes of bounding- boxes on update
Bool_t fResetCamerasOnUpdate; // reposition camera on each update Bool_t fResetCamerasOnUpdate; // reposition camera on each update
skipping to change at line 218 skipping to change at line 223
TGLColorSet& RefDarkColorSet() { return fDarkColorSet; } TGLColorSet& RefDarkColorSet() { return fDarkColorSet; }
TGLColorSet& RefLightColorSet() { return fLightColorSet; } TGLColorSet& RefLightColorSet() { return fLightColorSet; }
TGLColorSet& ColorSet() { return * fRnrCtx->GetBaseColorSet(); } TGLColorSet& ColorSet() { return * fRnrCtx->GetBaseColorSet(); }
void UseDarkColorSet(); void UseDarkColorSet();
void UseLightColorSet(); void UseLightColorSet();
void SwitchColorSet(); void SwitchColorSet();
void UseDefaultColorSet(Bool_t x); void UseDefaultColorSet(Bool_t x);
Bool_t IsUsingDefaultColorSet() const; Bool_t IsUsingDefaultColorSet() const;
Bool_t IsColorSetDark() const;
void SetClearColor(Color_t col); void SetClearColor(Color_t col);
static TGLColorSet& GetDefaultColorSet(); static TGLColorSet& GetDefaultColorSet();
static void UseDefaultColorSetForNewViewers(Bool_t x); static void UseDefaultColorSetForNewViewers(Bool_t x);
static Bool_t IsUsingDefaultColorSetForNewViewers(); static Bool_t IsUsingDefaultColorSetForNewViewers();
Float_t GetPointScale() const { return fPointScale; }
Float_t GetLineScale() const { return fLineScale; }
void SetPointScale(Float_t s) { fPointScale = s; }
void SetLineScale (Float_t s) { fLineScale = s; }
Bool_t GetSmoothPoints() const { return fSmoothPoints; }
Bool_t GetSmoothLines() const { return fSmoothLines; }
void SetSmoothPoints(Bool_t s){ fSmoothPoints = s; }
void SetSmoothLines(Bool_t s) { fSmoothLines = s; }
TGLLightSet* GetLightSet() const { return fLightSet; } TGLLightSet* GetLightSet() const { return fLightSet; }
TGLClipSet * GetClipSet() const { return fClipSet; } TGLClipSet * GetClipSet() const { return fClipSet; }
Bool_t GetClipAutoUpdate() const { return fClipAutoUpdate; } Bool_t GetClipAutoUpdate() const { return fClipAutoUpdate; }
void SetClipAutoUpdate(Bool_t x) { fClipAutoUpdate = x; } void SetClipAutoUpdate(Bool_t x) { fClipAutoUpdate = x; }
// External GUI component interface // External GUI component interface
TGLCamera & CurrentCamera() const { return *fCurrentCamera; } TGLCamera & CurrentCamera() const { return *fCurrentCamera; }
TGLCamera & RefCamera(ECameraType camera); TGLCamera & RefCamera(ECameraType camera);
void SetCurrentCamera(ECameraType camera); void SetCurrentCamera(ECameraType camera);
void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly,
skipping to change at line 263 skipping to change at line 278
// Scene rendering timeouts // Scene rendering timeouts
Float_t GetMaxSceneDrawTimeHQ() const { return fMaxSceneDrawTimeHQ; } Float_t GetMaxSceneDrawTimeHQ() const { return fMaxSceneDrawTimeHQ; }
Float_t GetMaxSceneDrawTimeLQ() const { return fMaxSceneDrawTimeLQ; } Float_t GetMaxSceneDrawTimeLQ() const { return fMaxSceneDrawTimeLQ; }
void SetMaxSceneDrawTimeHQ(Float_t t) { fMaxSceneDrawTimeHQ = t; } void SetMaxSceneDrawTimeHQ(Float_t t) { fMaxSceneDrawTimeHQ = t; }
void SetMaxSceneDrawTimeLQ(Float_t t) { fMaxSceneDrawTimeLQ = t; } void SetMaxSceneDrawTimeLQ(Float_t t) { fMaxSceneDrawTimeLQ = t; }
// Request methods post cross thread request via TROOT::ProcessLineFast( ). // Request methods post cross thread request via TROOT::ProcessLineFast( ).
void RequestDraw(Short_t LOD = TGLRnrCtx::kLODMed); // Cross thread draw request void RequestDraw(Short_t LOD = TGLRnrCtx::kLODMed); // Cross thread draw request
virtual void PreRender(); virtual void PreRender();
virtual void PostRender();
void DoDraw(); void DoDraw();
void DrawGuides(); void DrawGuides();
void DrawDebugInfo(); void DrawDebugInfo();
Bool_t RequestSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Cros s thread select request Bool_t RequestSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Cros s thread select request
Bool_t DoSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Wind ow coords origin top left Bool_t DoSelect(Int_t x, Int_t y, Bool_t trySecSel=kFALSE); // Wind ow coords origin top left
void ApplySelection(); void ApplySelection();
Bool_t RequestOverlaySelect(Int_t x, Int_t y); // Cross thread select re quest Bool_t RequestOverlaySelect(Int_t x, Int_t y); // Cross thread select re quest
Bool_t DoOverlaySelect(Int_t x, Int_t y); // Window coords origin t op left Bool_t DoOverlaySelect(Int_t x, Int_t y); // Window coords origin t op left
// Saveing of screen image // Saving of screen image
Bool_t SavePicture(const TString &fileName); Bool_t SavePicture();
Bool_t SavePicture(); Bool_t SavePicture(const TString &fileName);
Bool_t SavePictureUsingBB (const TString &fileName);
Bool_t SavePictureUsingFBO(const TString &fileName, Int_t w, Int_t h, Fl
oat_t pixel_object_scale=0);
Bool_t SavePictureWidth (const TString &fileName, Int_t width, Bool_t pi
xel_object_scale=kTRUE);
Bool_t SavePictureHeight(const TString &fileName, Int_t height, Bool_t p
ixel_object_scale=kTRUE);
Bool_t SavePictureScale (const TString &fileName, Float_t scale, Bool_t
pixel_object_scale=kTRUE);
const char* GetPictureFileName() const { return fPictureFileName.Data() ; } const char* GetPictureFileName() const { return fPictureFileName.Data() ; }
void SetPictureFileName(const TString& f) { fPictureFileName = f ; } void SetPictureFileName(const TString& f) { fPictureFileName = f ; }
Float_t GetFader() const { return fFader; } Float_t GetFader() const { return fFader; }
void SetFader(Float_t x) { fFader = x; } void SetFader(Float_t x) { fFader = x; }
void AutoFade(Float_t fade, Float_t time=1, Int_t steps=10); void AutoFade(Float_t fade, Float_t time=1, Int_t steps=10);
// Update/camera-reset // Update/camera-reset
void UpdateScene(); void UpdateScene();
Bool_t GetIgnoreSizesOnUpdate() const { return fIgnoreSizesOnUpda te; } Bool_t GetIgnoreSizesOnUpdate() const { return fIgnoreSizesOnUpda te; }
void SetIgnoreSizesOnUpdate(Bool_t v) { fIgnoreSizesOnUpdate = v; } void SetIgnoreSizesOnUpdate(Bool_t v) { fIgnoreSizesOnUpdate = v; }
 End of changes. 7 change blocks. 
5 lines changed or deleted 31 lines changed or added


 TGLViewerBase.h   TGLViewerBase.h 
// @(#)root/gl:$Id: TGLViewerBase.h 28885 2009-06-10 15:51:12Z matevz $ // @(#)root/gl:$Id: TGLViewerBase.h 29676 2009-08-04 16:18:07Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TGLViewerBase #ifndef ROOT_TGLViewerBase
#define ROOT_TGLViewerBase #define ROOT_TGLViewerBase
skipping to change at line 63 skipping to change at line 63
void SubRenderScenes(SubRender_foo render_foo); void SubRenderScenes(SubRender_foo render_foo);
// Members // Members
TGLRnrCtx *fRnrCtx; TGLRnrCtx *fRnrCtx;
TGLCamera *fCamera; // Camera for rendering. TGLCamera *fCamera; // Camera for rendering.
TGLClip *fClip; // Viewer clipping-plane. TGLClip *fClip; // Viewer clipping-plane.
Short_t fLOD; // Viewer-lod for rendering. Short_t fLOD; // Viewer-lod for rendering.
Short_t fStyle; // Viewer-style for rendering. Short_t fStyle; // Viewer-style for rendering.
Float_t fWFLineW; // Optional override of scene wire-fram
e line-width
Float_t fOLLineW; // Optional override of scene outline l
ine-width
Bool_t fResetSceneInfosOnRender; // Request rebuild of view- specific scene data. Bool_t fResetSceneInfosOnRender; // Request rebuild of view- specific scene data.
Bool_t fChanged; // Change requiring redraw is pending. Bool_t fChanged; // Change requiring redraw is pending.
SceneInfoList_t fScenes; // Registered scenes. SceneInfoList_t fScenes; // Registered scenes.
SceneInfoVec_t fVisScenes; // Visible scenes. SceneInfoVec_t fVisScenes; // Visible scenes.
TGLBoundingBox fOverallBoundingBox; // Axis-aligned union of sc ene bboxes. TGLBoundingBox fOverallBoundingBox; // Axis-aligned union of sc ene bboxes.
OverlayElmVec_t fOverlay; OverlayElmVec_t fOverlay;
skipping to change at line 104 skipping to change at line 106
TGLClip* Clip() const { return fClip; } TGLClip* Clip() const { return fClip; }
void SetClip(TGLClip *p) { fClip = p; } void SetClip(TGLClip *p) { fClip = p; }
Short_t LOD() const { return fLOD; } Short_t LOD() const { return fLOD; }
void SetLOD(Short_t lod) { fLOD = lod; } void SetLOD(Short_t lod) { fLOD = lod; }
Short_t Style() const { return fStyle; } Short_t Style() const { return fStyle; }
void SetStyle(Short_t st) { fStyle = st; } void SetStyle(Short_t st) { fStyle = st; }
Float_t WFLineW() const { return fWFLineW; }
void SetWFLineW(Float_t w) { fWFLineW = w; }
Float_t OLLineW() const { return fOLLineW; }
void SetOLLineW(Float_t w) { fOLLineW = w; }
// ================================================================ // ================================================================
virtual void ResetSceneInfos(); virtual void ResetSceneInfos();
virtual void Changed() { fChanged = kTRUE; } virtual void Changed() { fChanged = kTRUE; }
virtual Bool_t IsChanged() const { return fChanged; } virtual Bool_t IsChanged() const { return fChanged; }
virtual void MergeSceneBBoxes(TGLBoundingBox& bbox); virtual void MergeSceneBBoxes(TGLBoundingBox& bbox);
// ================================================================ // ================================================================
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 TGLViewerEditor.h   TGLViewerEditor.h 
skipping to change at line 47 skipping to change at line 47
TGColorSelect *fClearColor; TGColorSelect *fClearColor;
TGCheckButton *fIgnoreSizesOnUpdate; TGCheckButton *fIgnoreSizesOnUpdate;
TGCheckButton *fResetCamerasOnUpdate; TGCheckButton *fResetCamerasOnUpdate;
TGCheckButton *fResetCameraOnDoubleClick; TGCheckButton *fResetCameraOnDoubleClick;
TGTextButton *fUpdateScene; TGTextButton *fUpdateScene;
TGTextButton *fCameraHome; TGTextButton *fCameraHome;
TGNumberEntry *fMaxSceneDrawTimeHQ; TGNumberEntry *fMaxSceneDrawTimeHQ;
TGNumberEntry *fMaxSceneDrawTimeLQ; TGNumberEntry *fMaxSceneDrawTimeLQ;
TGNumberEntry *fPointSizeScale;
TGNumberEntry *fLineWidthScale;
TGCheckButton *fPointSmooth;
TGCheckButton *fLineSmooth;
TGNumberEntry *fWFLineWidth;
TGNumberEntry *fOLLineWidth;
//"Guides" tab's controls //"Guides" tab's controls
TGCheckButton *fCameraCenterExt; TGCheckButton *fCameraCenterExt;
TGTextButton *fCaptureCenter; TGTextButton *fCaptureCenter;
TGCheckButton *fDrawCameraCenter; TGCheckButton *fDrawCameraCenter;
TGNumberEntry *fCameraCenterX; TGNumberEntry *fCameraCenterX;
TGNumberEntry *fCameraCenterY; TGNumberEntry *fCameraCenterY;
TGNumberEntry *fCameraCenterZ; TGNumberEntry *fCameraCenterZ;
TGCheckButton* fCaptureAnnotate; TGCheckButton* fCaptureAnnotate;
skipping to change at line 108 skipping to change at line 115
virtual void SetModel(TObject* obj); virtual void SetModel(TObject* obj);
void SetGuides(); void SetGuides();
void DoClearColor(Pixel_t color); void DoClearColor(Pixel_t color);
void DoIgnoreSizesOnUpdate(); void DoIgnoreSizesOnUpdate();
void DoResetCamerasOnUpdate(); void DoResetCamerasOnUpdate();
void DoResetCameraOnDoubleClick(); void DoResetCameraOnDoubleClick();
void DoUpdateScene(); void DoUpdateScene();
void DoCameraHome(); void DoCameraHome();
void UpdateMaxDrawTimes(); void UpdateMaxDrawTimes();
void UpdatePointLineStuff();
void DoCameraCenterExt(); void DoCameraCenterExt();
void DoCaptureCenter(); void DoCaptureCenter();
void DoAnnotation(); void DoAnnotation();
void DoDrawCameraCenter(); void DoDrawCameraCenter();
void UpdateCameraCenter(); void UpdateCameraCenter();
//Axis manipulation //Axis manipulation
void UpdateViewerAxes(Int_t id); void UpdateViewerAxes(Int_t id);
void UpdateViewerReference(); void UpdateViewerReference();
void DoCameraOverlay(); void DoCameraOverlay();
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 TGQt.h   TGQt.h 
// @(#)root/qt:$Id: TGQt.h 28820 2009-06-05 06:16:09Z brun $ // @(#)root/qt:$Id: TGQt.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 52 skipping to change at line 52
#include <QtGui/QFontDatabase> #include <QtGui/QFontDatabase>
#include "TQtClientGuard.h" #include "TQtClientGuard.h"
#else #else
class QObject; class QObject;
class QEvent; class QEvent;
#endif /* CINT */ #endif /* CINT */
class QPen; class QPainter;
class QMarker; class QPen;
class QMarker;
//class QFont; //class QFont;
class QPaintDevice; class QPaintDevice;
class QTextCodec; class QTextCodec;
class QPoint;
class QString;
class QSize;
class QColor;
#include "TVirtualX.h" #include "TVirtualX.h"
#include "TQtEmitter.h" #include "TQtEmitter.h"
class TQtMarker; class TQtMarker;
class TQtPen; class TQtPen;
class TQtSwitch; class TQtSwitch;
class TQtBrush; class TQtBrush;
class TQtCommand; class TQtCommand;
class TFileHandler; class TFileHandler;
class TQtApplication; class TQtApplication;
class TQtClientFilter; class TQtClientFilter;
class TQtEventQueue; class TQtEventQueue;
class TQtPadFont; class TQtPadFont;
class TQtPen; class TQtPen;
class TQtPainter; class TQtPainter;
class TQtFeedBackWidget; class TQtFeedBackWidget;
//#define TRACE_TGQt() fprintf(stdout, "TGQt::%s() %d\n", __FUNCTION__, __L INE__) //#define TRACE_TGQt() fprintf(stdout, "TGQt::%s() %d\n", __FUNCTION__, __L INE__)
class TQtTextProxy {
private:
TQtTextProxy(const TQtTextProxy&);
void operator=(const TQtTextProxy&);
protected:
TQtTextProxy(){;}
public:
virtual ~TQtTextProxy(){;}
virtual void clear() = 0;
bool setContent(const char *text, QString *errorMsg = 0,
int *errorLine = 0, int *errorColumn = 0);
virtual bool setContent(const QString &text, QString *errorMsg = 0,
int *errorLine = 0, int *errorColumn = 0) = 0;
virtual bool setMmlContent(const QString &text, QString *errorMsg = 0
,
int *errorLine = 0, int *errorColumn = 0) = 0;
virtual void paint(QPainter *p,unsigned int x, unsigned int y) const =
0;
virtual unsigned int width() const = 0;
virtual unsigned int height() const = 0;
virtual void setFont(Font_t fontnumber) = 0;
virtual int baseFontPointSize() const = 0;
virtual void setBaseFontPointSize(int size) = 0;
virtual void setForegroundColor(const QColor &) = 0;
virtual bool isMine() const { return false;};
virtual TQtTextProxy *Clone() = 0;
};
inline bool TQtTextProxy::setContent(const char *text, QString *errorMsg,
int *errorLine, int *errorColumn )
{ return setContent(QString(text),errorMsg, errorLine, errorColumn); }
class TGQt : public TVirtualX { class TGQt : public TVirtualX {
#ifndef __CINT__ #ifndef __CINT__
friend class TQtObject; friend class TQtObject;
friend class TQtWindowsObject; friend class TQtWindowsObject;
friend class TQtPixmapObject; friend class TQtPixmapObject;
friend class TPadOpenGLView; friend class TPadOpenGLView;
friend class TQtWidget; friend class TQtWidget;
friend class TQtClientWidget; friend class TQtClientWidget;
friend class TQtImage; friend class TQtImage;
friend class TQtClientGuard; friend class TQtClientGuard;
friend class TQtClientFilter; friend class TQtClientFilter;
friend class TQtSynchPainting; friend class TQtSynchPainting;
friend class TQtToggleFeedBack; friend class TQtToggleFeedBack;
friend class TQtColorSelect; friend class TQtColorSelect;
friend class TQt16ColorSelector; friend class TQt16ColorSelector;
friend class TQtPen; friend class TQtPen;
friend class TQtBrush; friend class TQtBrush;
friend class TQtPainter; friend class TQtPainter;
friend class TQtTextProxy;
protected: protected:
enum DEFWINDOWID { kDefault=1 }; enum DEFWINDOWID { kDefault=1 };
QPaintDevice *fSelectedWindow; // Pointer to the current "paintdevi ce: PixMap, Widget etc" QPaintDevice *fSelectedWindow; // Pointer to the current "paintdevi ce: PixMap, Widget etc"
QPaintDevice *fPrevWindow; // Pointer to the previous "Window" QPaintDevice *fPrevWindow; // Pointer to the previous "Window"
Int_t fDisplayOpened; Int_t fDisplayOpened;
TQtPainter *fQPainter; TQtPainter *fQPainter;
TQtEmitter fEmitter; // object to emit Qt signals on beha lf of TVirtualX TQtEmitter fEmitter; // object to emit Qt signals on beha lf of TVirtualX
static TVirtualX *fgTQt; // The hiden poiner to foolish ROOT TPluginManager static TVirtualX *fgTQt; // The hiden poiner to foolish ROOT TPluginManager
skipping to change at line 150 skipping to change at line 187
TQtClientGuard fQClientGuard; // guard TQtClientWibdget against of dead pointers TQtClientGuard fQClientGuard; // guard TQtClientWibdget against of dead pointers
TQtPixmapGuard fQPixmapGuard; // guard TQtClientWibdget against of dead pointers TQtPixmapGuard fQPixmapGuard; // guard TQtClientWibdget against of dead pointers
typedef std::map<ULong_t, QColor * > COLORMAP; typedef std::map<ULong_t, QColor * > COLORMAP;
COLORMAP fColorMap; // to back the TG widgets COLORMAP fColorMap; // to back the TG widgets
TQtClientWidget *fPointerGrabber; TQtClientWidget *fPointerGrabber;
QTextCodec *fCodec; // The Current text decoder QTextCodec *fCodec; // The Current text decoder
QString fFontTextCode; // The default code text code page (from the Gui.DefaultFont) QString fFontTextCode; // The default code text code page (from the Gui.DefaultFont)
const char *fSymbolFontFamily; // the name of the font to su bstiute the non-standard "Symbol" const char *fSymbolFontFamily; // the name of the font to su bstiute the non-standard "Symbol"
Int_t fQtEventHasBeenProcessed; // Flag whether the eve nts were processed Int_t fQtEventHasBeenProcessed; // Flag whether the eve nts were processed
Bool_t fFeedBackMode; // TCanvas feedback mode Bool_t fFeedBackMode; // TCanvas feedback mode
TQtFeedBackWidget *fFeedBackWidget; // The dedicated widget for T TQtFeedBackWidget *fFeedBackWidget; // The dedicated widget for T
Canvas feebback mode Canvas feedback mode
Bool_t fBlockRGB; // Protect agaist color doube Bool_t fBlockRGB; // Protect against color doub
l setting le setting
Bool_t fUseTTF; // Flag whether ROOT font has
a priority
static TQtTextProxy *fgTextProxy; // proxy for the custom text
rendering engine
// //
// Text management // Text management
// //
//Qt::AlignmentFlags fTextAlign; //Qt::AlignmentFlags fTextAlign;
// void SetTextFont(const char *fontname, Int_t italic, Int_t bold); // void SetTextFont(const char *fontname, Int_t italic, Int_t bold);
Int_t CreatROOTThread(); Int_t CreatROOTThread();
void DeleteSelectedObj(); void DeleteSelectedObj();
// Qt methods // Qt methods
static QRect GetQRect(QPaintDevice &dev); static QRect GetQRect(QPaintDevice &dev);
int UpdateColor(int cindex); int UpdateColor(int cindex);
virtual const QColor& ColorIndex(Color_t indx) const;
QPaintDevice *GetDoubleBuffer(QPaintDevice *dev); QPaintDevice *GetDoubleBuffer(QPaintDevice *dev);
#endif #endif
static Int_t RegisterWid(QPaintDevice *wid); // register QWidget for the embedded TCanvas static Int_t RegisterWid(QPaintDevice *wid); // register QWidget for the embedded TCanvas
static Int_t UnRegisterWid(QPaintDevice *wid); // unregister QWidget o f the TCanvas static Int_t UnRegisterWid(QPaintDevice *wid); // unregister QWidget o f the TCanvas
static Bool_t IsRegistered(QPaintDevice *wid); // Check whether the ob ject has been registered static Bool_t IsRegistered(QPaintDevice *wid); // Check whether the ob ject has been registered
private: private:
TGQt& operator=(const TGQt&); TGQt& operator=(const TGQt&);
public: public:
skipping to change at line 216 skipping to change at line 254
static QPixmap *MakeIcon(Int_t indx); static QPixmap *MakeIcon(Int_t indx);
#endif #endif
static TVirtualX *GetVirtualX(); static TVirtualX *GetVirtualX();
static QWidget *winid(Window_t id); static QWidget *winid(Window_t id);
static QWidget *wid(Window_t id); static QWidget *wid(Window_t id);
static Window_t wid(TQtClientWidget *widget); static Window_t wid(TQtClientWidget *widget);
static Window_t rootwid(QPaintDevice *dev); static Window_t rootwid(QPaintDevice *dev);
static void PrintEvent(Event_t &); static void PrintEvent(Event_t &);
static QString SetFileName(const QString &fileName); static QString SetFileName(const QString &fileName);
static QString GetNewFileName(const QString &fileNamePrototype); static QString GetNewFileName(const QString &fileNamePrototype);
static TQtTextProxy *TextProxy();
static void SetTextProxy(TQtTextProxy *proxy);
void SetQClientFilter(TQtClientFilter *filter) {fQClientFilter = filter; } void SetQClientFilter(TQtClientFilter *filter) {fQClientFilter = filter; }
TQtClientFilter *QClientFilter() const {return fQClientFilter;} TQtClientFilter *QClientFilter() const {return fQClientFilter;}
QColor QtColor(ULong_t pixel); QColor QtColor(ULong_t pixel);
void SendDestroyEvent(TQtClientWidget *) const; void SendDestroyEvent(TQtClientWidget *) const;
TQtEmitter *Emitter(){ return &fEmitter;} TQtEmitter *Emitter(){ return &fEmitter;}
#endif #endif
// Future interface : // Future interface :
virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b, Float_t a); virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b, Float_t a);
virtual void SetAlpha(Int_t cindex, Float_t a); virtual void SetAlpha(Int_t cindex, Float_t a);
virtual void GetRGBA(Int_t cindex, Float_t &r, Float_t &g, Float_t &b, Float_t &a); virtual void GetRGBA(Int_t cindex, Float_t &r, Float_t &g, Float_t &b, Float_t &a);
virtual Float_t GetAlpha(Int_t cindex); virtual Float_t GetAlpha(Int_t cindex);
virtual const QColor& ColorIndex(Color_t indx) const;
virtual Int_t LoadQt(const char *shareLibFileName); virtual Int_t LoadQt(const char *shareLibFileName);
static void PostQtEvent(QObject *receiver, QEvent *event); static void PostQtEvent(QObject *receiver, QEvent *event);
virtual Int_t processQtEvents(Int_t maxtime=300); //milliseconds virtual Int_t processQtEvents(Int_t maxtime=300); //milliseconds
// temporary this should be moved to the QTGL interface // temporary this should be moved to the QTGL interface
private: private:
static int fgCoinFlag; // no coin viewer; static int fgCoinFlag; // no coin viewer;
static int fgCoinLoaded; // no coin viewer; static int fgCoinLoaded; // no coin viewer;
public: public:
static int CoinFlag(); static int CoinFlag();
static void SetCoinFlag(int flag); static void SetCoinFlag(int flag);
 End of changes. 9 change blocks. 
11 lines changed or deleted 57 lines changed or added


 TGraph.h   TGraph.h 
// @(#)root/hist:$Id: TGraph.h 25487 2008-09-22 12:44:13Z moneta $ // @(#)root/hist:$Id: TGraph.h 30458 2009-09-25 15:30:16Z moneta $
// Author: Rene Brun, Olivier Couet 12/12/94 // Author: Rene Brun, Olivier Couet 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 119 skipping to change at line 119
virtual void DrawGraph(Int_t n, const Float_t *x, const Float_t *y, Option_t *option=""); virtual void DrawGraph(Int_t n, const Float_t *x, const Float_t *y, Option_t *option="");
virtual void DrawGraph(Int_t n, const Double_t *x=0, const Doub le_t *y=0, Option_t *option=""); virtual void DrawGraph(Int_t n, const Double_t *x=0, const Doub le_t *y=0, Option_t *option="");
virtual void DrawPanel(); // *MENU* virtual void DrawPanel(); // *MENU*
virtual Double_t Eval(Double_t x, TSpline *spline=0, Option_t *opti on="") const; virtual Double_t Eval(Double_t x, TSpline *spline=0, Option_t *opti on="") const;
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void Expand(Int_t newsize); virtual void Expand(Int_t newsize);
virtual void Expand(Int_t newsize, Int_t step); virtual void Expand(Int_t newsize, Int_t step);
virtual TObject *FindObject(const char *name) const; virtual TObject *FindObject(const char *name) const;
virtual TObject *FindObject(const TObject *obj) const; virtual TObject *FindObject(const TObject *obj) const;
virtual Int_t Fit(const char *formula ,Option_t *option="" ,Opti on_t *goption="", Axis_t xmin=0, Axis_t xmax=0); // *MENU* virtual Int_t Fit(const char *formula ,Option_t *option="" ,Opti on_t *goption="", Axis_t xmin=0, Axis_t xmax=0); // *MENU*
virtual Int_t Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goptio n="", Axis_t xmin=0, Axis_t xmax=0); // *MENU* virtual Int_t Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goptio n="", Axis_t xmin=0, Axis_t xmax=0);
virtual void FitPanel(); // *MENU* virtual void FitPanel(); // *MENU*
Bool_t GetEditable() const; Bool_t GetEditable() const;
TF1 *GetFunction(const char *name) const; TF1 *GetFunction(const char *name) const;
TH1F *GetHistogram() const; TH1F *GetHistogram() const;
TList *GetListOfFunctions() const { return fFunctions; } TList *GetListOfFunctions() const { return fFunctions; }
virtual Double_t GetCorrelationFactor() const; virtual Double_t GetCorrelationFactor() const;
virtual Double_t GetCovariance() const; virtual Double_t GetCovariance() const;
virtual Double_t GetMean(Int_t axis=1) const; virtual Double_t GetMean(Int_t axis=1) const;
virtual Double_t GetRMS(Int_t axis=1) const; virtual Double_t GetRMS(Int_t axis=1) const;
Int_t GetMaxSize() const {return fMaxSize;} Int_t GetMaxSize() const {return fMaxSize;}
skipping to change at line 159 skipping to change at line 159
Double_t GetMaximum() const {return fMaximum;} Double_t GetMaximum() const {return fMaximum;}
Double_t GetMinimum() const {return fMinimum;} Double_t GetMinimum() const {return fMinimum;}
TAxis *GetXaxis() const ; TAxis *GetXaxis() const ;
TAxis *GetYaxis() const ; TAxis *GetYaxis() const ;
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const; virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const;
virtual void InitExpo(Double_t xmin=0, Double_t xmax=0); virtual void InitExpo(Double_t xmin=0, Double_t xmax=0);
virtual void InitGaus(Double_t xmin=0, Double_t xmax=0); virtual void InitGaus(Double_t xmin=0, Double_t xmax=0);
virtual void InitPolynom(Double_t xmin=0, Double_t xmax=0); virtual void InitPolynom(Double_t xmin=0, Double_t xmax=0);
virtual Int_t InsertPoint(); // *MENU* virtual Int_t InsertPoint(); // *MENU*
virtual Double_t Integral(Int_t first=0, Int_t last=-1) const;
virtual Bool_t IsEditable() const {return !TestBit(kNotEditable); } virtual Bool_t IsEditable() const {return !TestBit(kNotEditable); }
virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin =0, Double_t xmax=0); virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin =0, Double_t xmax=0);
virtual void LeastSquareLinearFit(Int_t n, Double_t &a0, Double _t &a1, Int_t &ifail, Double_t xmin=0, Double_t xmax=0); virtual void LeastSquareLinearFit(Int_t n, Double_t &a0, Double _t &a1, Int_t &ifail, Double_t xmin=0, Double_t xmax=0);
virtual Int_t Merge(TCollection* list); virtual Int_t Merge(TCollection* list);
virtual void Paint(Option_t *chopt=""); virtual void Paint(Option_t *chopt="");
void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt); void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt);
void PaintGrapHist(Int_t npoints, const Double_t *x, co nst Double_t *y, Option_t *chopt); void PaintGrapHist(Int_t npoints, const Double_t *x, co nst Double_t *y, Option_t *chopt);
virtual void PaintStats(TF1 *fit); virtual void PaintStats(TF1 *fit);
virtual void Print(Option_t *chopt="") const; virtual void Print(Option_t *chopt="") const;
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 TGuiBldDragManager.h   TGuiBldDragManager.h 
// @(#)root/guibuilder:$Id: TGuiBldDragManager.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/guibuilder:$Id: TGuiBldDragManager.h 30063 2009-09-08 12:15:59Z bellenot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 48 skipping to change at line 48
class TGPictureButton; class TGPictureButton;
class TGCanvas; class TGCanvas;
class TGComboBox; class TGComboBox;
class TGLabel; class TGLabel;
class TGListBox; class TGListBox;
class TGProgressBar; class TGProgressBar;
class TGScrollBar; class TGScrollBar;
class TGTextEntry; class TGTextEntry;
class TGIcon; class TGIcon;
enum EActionType { kNoneAct, kPropertyAct, kEditableAct, kReparentAct, enum EActionType {
kDropAct, kCutAct, kCopyAct, kPasteAct, kCropAct, kNoneAct, kPropertyAct, kEditableAct, kReparentAct,
kCompactAct, kCompactGlobalAct, kLayUpAct, kLayDownAct, kDropAct, kCutAct, kCopyAct, kPasteAct, kCropAct,
kCloneAct, kSaveAct, kSaveFrameAct, kGrabAct, kDeleteAct kCompactAct, kCompactGlobalAct, kLayUpAct, kLayDownAct,
, kCloneAct, kSaveAct, kSaveFrameAct, kGrabAct, kDeleteAct,
kLeftAct, kRightAct, kUpAct, kDownAct, kEndEditAct, kRep kLeftAct, kRightAct, kUpAct, kDownAct, kEndEditAct, kReplaceAct,
laceAct, kGridAct, kBreakLayoutAct, kSwitchLayoutAct, kNewAct,
kGridAct, kBreakLayoutAct, kSwitchLayoutAct, kNewAct, kOpenAct, kLayoutHAct, kLayoutVAct, kUndoAct, kRedoAct,
kOpenAct, kLayoutHAct, kLayoutVAct, kUndoAct, kRedoAct, kSelectAct, kMethodMenuAct, kToggleMenuAct
kSelectAct, kMethodMenuAct, kToggleMenuAct }; };
//////////////////////////////////////////////////////////////////////////
class TGuiBldDragManager : public TVirtualDragManager, public TGFrame { class TGuiBldDragManager : public TVirtualDragManager, public TGFrame {
friend class TGClient; friend class TGClient;
friend class TGFrame; friend class TGFrame;
friend class TGMainFrame; friend class TGMainFrame;
friend class TGGrabRect; friend class TGGrabRect;
friend class TRootGuiBuilder; friend class TRootGuiBuilder;
friend class TGuiBldDragManagerRepeatTimer; friend class TGuiBldDragManagerRepeatTimer;
friend class TGuiBldMenuDialog;
friend class TGuiBldGeometryFrame;
friend class TGuiBldEditor;
private: private:
TGuiBldDragManagerPimpl *fPimpl; // private data TGuiBldDragManagerPimpl *fPimpl; // private data
TRootGuiBuilder *fBuilder; // pointer to gui builder TRootGuiBuilder *fBuilder; // pointer to gui builder
TGuiBldEditor *fEditor; // frame property editor TGuiBldEditor *fEditor; // frame property editor
Bool_t fLassoDrawn; // kTRUE if lasso drawn Bool_t fLassoDrawn; // kTRUE if lasso drawn
TString fPasteFileName; // paste_clippboard file name TString fPasteFileName; // paste_clippboard file name
TString fTmpBuildFile; // temporary file name TString fTmpBuildFile; // temporary file name
Bool_t fSelectionIsOn; // selection with Shift key pressed Bool_t fSelectionIsOn; // selection with Shift key pressed
skipping to change at line 89 skipping to change at line 95
Bool_t fStop; // kTRUE if stopped Bool_t fStop; // kTRUE if stopped
TGFrame *fSelected; // selected frame. In most cases sel ected is TGFrame *fSelected; // selected frame. In most cases sel ected is
// the same frame as grabbed frame. // the same frame as grabbed frame.
TList *fListOfDialogs; // list of dialog methods TList *fListOfDialogs; // list of dialog methods
static TGColorDialog *fgGlobalColorDialog; // color dialog static TGColorDialog *fgGlobalColorDialog; // color dialog
static TGColorDialog *GetGlobalColorDialog(Bool_t create = kTRUE); static TGColorDialog *GetGlobalColorDialog(Bool_t create = kTRUE);
static TGFontDialog *fgGlobalFontDialog; // font dialog static TGFontDialog *fgGlobalFontDialog; // font dialog
static TGFontDialog *GetGlobalFontDialog(); // static TGFontDialog *GetGlobalFontDialog(); //
static void MapGlobalDialog(TGMainFrame *dialog, TGFrame *fr);
void Reset1(); void Reset1();
void DrawGrabRectangles(TGWindow *win = 0); void DrawGrabRectangles(TGWindow *win = 0);
void DrawGrabRect(Int_t i, Int_t x, Int_t y); void DrawGrabRect(Int_t i, Int_t x, Int_t y);
TGCompositeFrame *FindLayoutFrame(TGFrame *f); TGCompositeFrame *FindLayoutFrame(TGFrame *f);
Bool_t IsPointVisible(Int_t x, Int_t y); Bool_t IsPointVisible(Int_t x, Int_t y);
Bool_t IsSelectedVisible(); Bool_t IsSelectedVisible();
void CloseMenus(); void CloseMenus();
Bool_t IsEditDisabled(TGWindow *f) const { return (f && (f->GetE ditDisabled() & kEditDisable)); } Bool_t IsEditDisabled(TGWindow *f) const { return (f && (f->GetE ditDisabled() & kEditDisable)); }
Bool_t IsGrabDisabled(TGWindow *f) const { return (f && (f->GetE ditDisabled() & kEditDisableGrab)); } Bool_t IsGrabDisabled(TGWindow *f) const { return (f && (f->GetE ditDisabled() & kEditDisableGrab)); }
skipping to change at line 124 skipping to change at line 129
TGFrame *FindMdiFrame(TGFrame *in); TGFrame *FindMdiFrame(TGFrame *in);
void RaiseMdiFrame(TGFrame *in); void RaiseMdiFrame(TGFrame *in);
Bool_t CheckTargetAtPoint(Int_t x, Int_t y); Bool_t CheckTargetAtPoint(Int_t x, Int_t y);
void AddClassMenuMethods(TGPopupMenu *menu, TObject *object); void AddClassMenuMethods(TGPopupMenu *menu, TObject *object);
void AddDialogMethods(TGPopupMenu *menu, TObject *object); void AddDialogMethods(TGPopupMenu *menu, TObject *object);
void DeleteMenuDialog(); void DeleteMenuDialog();
void CreateListOfDialogs(); void CreateListOfDialogs();
private: private:
TGFrame *InEditable(Window_t id); TGFrame *InEditable(Window_t id);
void SelectFrame(TGFrame *frame, Bool_t add = kFALSE);
void GrabFrame(TGFrame *frame); void GrabFrame(TGFrame *frame);
void UngrabFrame(); void UngrabFrame();
void SetPropertyEditor(TGuiBldEditor *e); void SetPropertyEditor(TGuiBldEditor *e);
void DeletePropertyEditor(); void DeletePropertyEditor();
TList *GetFramesInside(Int_t x0, Int_t y0, Int_t x, Int_t y); TList *GetFramesInside(Int_t x0, Int_t y0, Int_t x, Int_t y);
void ToGrid(Int_t &x, Int_t &y); void ToGrid(Int_t &x, Int_t &y);
void DoReplace(TGFrame *frame); void DoReplace(TGFrame *frame);
void DeleteFrame(TGFrame *frame); void DeleteFrame(TGFrame *frame);
void HandleDelete(Bool_t crop = kFALSE); void HandleDelete(Bool_t crop = kFALSE);
skipping to change at line 219 skipping to change at line 223
Int_t GetStrartDragX() const; Int_t GetStrartDragX() const;
Int_t GetStrartDragY() const; Int_t GetStrartDragY() const;
Int_t GetEndDragX() const; Int_t GetEndDragX() const;
Int_t GetEndDragY() const; Int_t GetEndDragY() const;
Bool_t GetDropStatus() const { return fDropStatus; } Bool_t GetDropStatus() const { return fDropStatus; }
void SetBuilder(TRootGuiBuilder *b) { fBuilder = b; } void SetBuilder(TRootGuiBuilder *b) { fBuilder = b; }
Bool_t IsStopped() const { return fStop; } Bool_t IsStopped() const { return fStop; }
void SetEditable(Bool_t on = kTRUE); void SetEditable(Bool_t on = kTRUE);
void SelectFrame(TGFrame *frame, Bool_t add = kFALSE);
static void MapGlobalDialog(TGMainFrame *dialog, TGFrame *fr);
Bool_t HandleTimerEvent(Event_t *ev, TTimer *t);
void TimerEvent(Event_t *ev)
{ Emit("TimerEvent(Event_t*)", (Long_t)ev); } // *SIGN
AL*
// hadndling dynamic context menus // hadndling dynamic context menus
void DoClassMenu(Int_t); void DoClassMenu(Int_t);
void DoDialogOK(); void DoDialogOK();
void DoDialogApply(); void DoDialogApply();
void DoDialogCancel(); void DoDialogCancel();
void ChangeProperties(TGLabel *); //*MENU* *DIALOG*icon=bld_font select.png* void ChangeProperties(TGLabel *); //*MENU* *DIALOG*icon=bld_font select.png*
void ChangeProperties(TGTextButton *); //*MENU* *DIALOG*icon=bld_font select.png* void ChangeProperties(TGTextButton *); //*MENU* *DIALOG*icon=bld_font select.png*
 End of changes. 7 change blocks. 
13 lines changed or deleted 23 lines changed or added


 TGuiBldEditor.h   TGuiBldEditor.h 
// @(#)root/guibuilder:$Id: TGuiBldEditor.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/guibuilder:$Id: TGuiBldEditor.h 30063 2009-09-08 12:15:59Z bell enot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 25 skipping to change at line 25
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGuiBldEditor // // TGuiBldEditor //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame #ifndef ROOT_TGFrame
#include "TGFrame.h" #include "TGFrame.h"
#endif #endif
#ifndef ROOT_TGNumberEntry
#include "TGNumberEntry.h"
#endif
class TGuiBldHintsEditor; class TGuiBldHintsEditor;
class TGuiBldNameFrame; class TGuiBldNameFrame;
class TGuiBldBorderFrame; class TGuiBldBorderFrame;
class TGuiBldGeometryFrame;
class TGuiBldDragManager;
class TGTab; class TGTab;
class TGButton;
class TGLabel;
class TGGroupFrame;
class TGCompositeFrame;
class TGuiBldEditor : public TGCompositeFrame { //////////////////////////////////////////////////////////////////////////
class TGuiBldEditor : public TGVerticalFrame {
friend class TGuiBldDragManager;
private: private:
TGFrame *fSelected; // editted frame TGFrame *fSelected; // editted frame
TGuiBldNameFrame *fNameFrame; // frame name TGuiBldNameFrame *fNameFrame; // frame name
TGuiBldHintsEditor *fHintsFrame; // frame hints TGuiBldHintsEditor *fHintsFrame; // frame hints
TGuiBldBorderFrame *fBorderFrame; // frame border TGuiBldBorderFrame *fBorderFrame; // frame border
Bool_t fEmbedded; // kTRUE when it is inside guibuilde TGuiBldGeometryFrame *fGeomFrame; // frame geom
r TGGroupFrame *fPositionFrame; // X,Y coordinates
TGTab *fTab; // tab frame TGuiBldDragManager *fManager; // main manager
Int_t fLayoutId; // the id of layout tab Bool_t fEmbedded; // kTRUE when it is inside guibui
lder
TGTab *fTab; // tab frame
TGCompositeFrame *fTablay; // layout tab frame
Int_t fLayoutId; // the id of layout tab
TGTextButton *fLayoutButton; // button to enable/disable layou
t
TGLabel *fLayoutLabel; // saying if layout is enabled
TGNumberEntry *fXpos; // X position
TGNumberEntry *fYpos; // Y position
public: public:
TGuiBldEditor(const TGWindow *p = 0); TGuiBldEditor(const TGWindow *p = 0);
virtual ~TGuiBldEditor(); virtual ~TGuiBldEditor();
Int_t GetXPos() const { return fXpos->GetIntNumber(); }
Int_t GetYPos() const { return fYpos->GetIntNumber(); }
void SetXPos(Int_t pos) { fXpos->SetIntNumber(pos); }
void SetYPos(Int_t pos) { fYpos->SetIntNumber(pos); }
TGFrame *GetSelected() const { return fSelected; } TGFrame *GetSelected() const { return fSelected; }
Bool_t IsEmbedded() const { return fEmbedded; } Bool_t IsEmbedded() const { return fEmbedded; }
void SetEmbedded(Bool_t e = kTRUE) { fEmbedded = e; } void SetEmbedded(Bool_t e = kTRUE) { fEmbedded = e; }
void Hide(); void Hide();
void UpdateBorder(Int_t); void UpdateBorder(Int_t);
void UpdateBackground(Pixel_t col); void UpdateBackground(Pixel_t col);
void UpdateForeground(Pixel_t col); void UpdateForeground(Pixel_t col);
void Reset(); void Reset();
TGuiBldHintsEditor *GetHintsEditor() const { return fHintsFrame; } TGuiBldHintsEditor *GetHintsEditor() const { return fHintsFrame; }
void RemoveFrame(TGFrame *);
void TabSelected(Int_t id); void TabSelected(Int_t id);
void UpdateSelected(TGFrame* = 0); //*SIGNAL* void UpdateSelected(TGFrame* = 0); //*SIGNAL*
void ChangeSelected(TGFrame*); //*SIGNAL* void ChangeSelected(TGFrame*); //*SIGNAL*
void SwitchLayout();
ClassDef(TGuiBldEditor,0) // frame property editor ClassDef(TGuiBldEditor,0) // frame property editor
}; };
#endif #endif
 End of changes. 9 change blocks. 
10 lines changed or deleted 39 lines changed or added


 TGuiBldHintsButton.h   TGuiBldHintsButton.h 
// @(#)root/guibuilder:$Id: TGuiBldHintsButton.h 21375 2007-12-14 11:12:31Z antcheva $ // @(#)root/guibuilder:$Id: TGuiBldHintsButton.h 30063 2009-09-08 12:15:59Z bellenot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 25 skipping to change at line 25
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TGuiBldHintsButton // // TGuiBldHintsButton //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGButton #ifndef ROOT_TGButton
#include "TGButton.h" #include "TGButton.h"
#endif #endif
//////////////////////////////////////////////////////////////////////////
class TGuiBldHintsButton : public TGButton { class TGuiBldHintsButton : public TGButton {
protected: protected:
virtual void DrawExpandX(); virtual void DrawExpandX();
virtual void DrawExpandY(); virtual void DrawExpandY();
virtual void DrawCenterX(); virtual void DrawCenterX();
virtual void DrawCenterY(); virtual void DrawCenterY();
virtual void DrawTopLeft(); virtual void DrawTopLeft();
virtual void DrawTopRight(); virtual void DrawTopRight();
virtual void DrawBottomLeft(); virtual void DrawBottomLeft();
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TGuiBldHintsEditor.h   TGuiBldHintsEditor.h 
// @(#)root/guibuilder:$Id: TGuiBldHintsEditor.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/guibuilder:$Id: TGuiBldHintsEditor.h 30063 2009-09-08 12:15:59Z bellenot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 30 skipping to change at line 30
#ifndef ROOT_TGButton #ifndef ROOT_TGButton
#include "TGButton.h" #include "TGButton.h"
#endif #endif
class TGuiBldHintsButton; class TGuiBldHintsButton;
class TGNumberEntry; class TGNumberEntry;
class TGuiBldEditor; class TGuiBldEditor;
class TGuiBldNameFrame; class TGuiBldNameFrame;
class TGuiBldHintsManager; class TGuiBldHintsManager;
class TRootGuiBuilder;
//////////////////////////////////////////////////////////////////////////
class TGuiBldHintsEditor : public TGVerticalFrame { class TGuiBldHintsEditor : public TGVerticalFrame {
private: private:
TGuiBldEditor *fEditor; // pointer to main editor TGuiBldEditor *fEditor; // pointer to main editor
TGuiBldNameFrame *fNameFrame; // frame name TGuiBldNameFrame *fNameFrame; // frame name
TGuiBldHintsManager *fHintsManager; // manager of subframes layout TGuiBldHintsManager *fHintsManager; // manager of subframes layout
TGGroupFrame *fHintsFrame; // frame with layout hints
TGGroupFrame *fPaddingFrame; // frame with padding
void SetMatrixSep(); void SetMatrixSep();
public: public:
TGuiBldHintsButton *fExpandX; // expand in x direction button
TGuiBldHintsButton *fExpandY; // expand in y direction button TGCheckButton *fCbLeft; // button activating left hint
TGuiBldHintsButton *fCenterX; // center in x direction button TGCheckButton *fCbRight; // button activating right hint
TGuiBldHintsButton *fCenterY; // center in y direction button TGCheckButton *fCbTop; // button activating top hint
TGCheckButton *fCbBottom; // button activating bottom hint
TGTextButton *fHintsLeft; // button activating left hints TGCheckButton *fCbExpandX; // button activating expand X hint
TGTextButton *fHintsRight; // button activating right hints TGCheckButton *fCbExpandY; // button activating expand Y hint
TGTextButton *fHintsTop; // button activating top hints TGCheckButton *fCbCenterX; // button activating center X hint
TGTextButton *fHintsBottom; // button activating bottom hints TGCheckButton *fCbCenterY; // button activating center Y hint
TGNumberEntry *fPadTop; // top side padding TGNumberEntry *fPadTop; // top side padding
TGNumberEntry *fPadBottom; // bottom side padding TGNumberEntry *fPadBottom; // bottom side padding
TGNumberEntry *fPadLeft; // left side padding TGNumberEntry *fPadLeft; // left side padding
TGNumberEntry *fPadRight; // right side padding TGNumberEntry *fPadRight; // right side padding
TGCheckButton *fLayButton; // enable/disable layout
TRootGuiBuilder *fBuilder;
public: public:
TGuiBldHintsEditor(const TGWindow *p, TGuiBldEditor *e); TGuiBldHintsEditor(const TGWindow *p, TGuiBldEditor *e);
virtual ~TGuiBldHintsEditor() {} virtual ~TGuiBldHintsEditor() {}
void ChangeSelected(TGFrame *); void ChangeSelected(TGFrame *);
void UpdateState(); void LayoutSubframes(Bool_t on = kTRUE);
void LayoutSubframes(Bool_t on);
void MatrixLayout(); void MatrixLayout();
void SetPosition();
void UpdateState();
ClassDef(TGuiBldHintsEditor,0) // layout hints editor ClassDef(TGuiBldHintsEditor,0) // layout hints editor
}; };
#endif #endif
 End of changes. 9 change blocks. 
16 lines changed or deleted 25 lines changed or added


 TGuiBldNameFrame.h   TGuiBldNameFrame.h 
// @(#)root/guibuilder:$Id: TGuiBldNameFrame.h 20882 2007-11-19 11:31:26Z r dm $ // @(#)root/guibuilder:$Id: TGuiBldNameFrame.h 30063 2009-09-08 12:15:59Z b ellenot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 31 skipping to change at line 31
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame #ifndef ROOT_TGFrame
#include "TGFrame.h" #include "TGFrame.h"
#endif #endif
class TGLabel; class TGLabel;
class TGTextEntry; class TGTextEntry;
class TGuiBldEditor; class TGuiBldEditor;
class TGuiBldEditor; class TGuiBldEditor;
class TRootGuiBuilder;
class TGListTree;
class TGFrame;
class TGCanvas;
class TGListTreeItem;
class TGuiBldDragManager;
/////////////////////////////////////////////////////////////////////////// ///// //////////////////////////////////////////////////////////////////////////
class TGuiBldNameFrame : public TGCompositeFrame { class TGuiBldNameFrame : public TGCompositeFrame {
private: private:
TGLabel *fLabel; // label of frame class name TGLabel *fLabel; // label of frame class name
TGTextEntry *fFrameName; // name of the frame TGTextEntry *fFrameName; // name of the frame
TGuiBldEditor *fEditor; // pointer to main editor TGuiBldEditor *fEditor; // pointer to main editor
TGCompositeFrame *fTitleFrame; // frame saying that it's "Name Fram TGCompositeFrame *fTitleFrame; // frame saying that it's "Name Fram
e" e"
TRootGuiBuilder *fBuilder; // pointer to builder
TGuiBldDragManager *fManager; // main manager
TGListTree *fListTree; // list tree containing frames hiera
rchy
TGCanvas *fCanvas;
protected: protected:
void DoRedraw(); void DoRedraw();
public: public:
TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor); TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor);
virtual ~TGuiBldNameFrame() { } virtual ~TGuiBldNameFrame() { }
void ChangeSelected(TGFrame *frame); void ChangeSelected(TGFrame *frame);
void Reset(); Bool_t CheckItems(TGCompositeFrame *main);
TGListTreeItem *FindItemByName(TGListTree *tree, const char* name, TGL
istTreeItem *item = 0);
TGCompositeFrame *GetMdi(TGFrame *frame);
void MapItems(TGCompositeFrame *main);
void RemoveFrame(TGFrame *frame);
void Reset();
void SelectFrameByItem(TGListTreeItem* item, Int_t i = 0);
void UpdateName();
ClassDef(TGuiBldNameFrame, 0) // frame name editor
}; };
#endif #endif
 End of changes. 5 change blocks. 
9 lines changed or deleted 30 lines changed or added


 TH1.h   TH1.h 
// @(#)root/hist:$Id: TH1.h 28964 2009-06-12 16:08:04Z moneta $ // @(#)root/hist:$Id: TH1.h 30001 2009-09-01 13:41:50Z brun $
// Author: Rene Brun 26/12/94 // Author: Rene Brun 26/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 123 skipping to change at line 123
TH1& operator=(const TH1&); // Not implemented TH1& operator=(const TH1&); // Not implemented
protected: protected:
TH1(); TH1();
TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double _t xup); TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double _t xup);
TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins ); TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins );
TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin s); TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin s);
virtual void Copy(TObject &hnew) const; virtual void Copy(TObject &hnew) const;
virtual Int_t BufferFill(Double_t x, Double_t w); virtual Int_t BufferFill(Double_t x, Double_t w);
virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t poi nt, Double_t& newMin, Double_t &newMax); virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t poi nt, Double_t& newMin, Double_t &newMax);
virtual void SavePrimitiveHelp(ostream &out, Option_t *option = ""); virtual void SavePrimitiveHelp(ostream &out, const char *hname, Opti on_t *option = "");
static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxi s); static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxi s);
static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axi s2); static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axi s2);
virtual Int_t DoFit(TF1 *f1,Option_t *option,Option_t *goption, Doubl e_t xmin, Double_t xmax); virtual Int_t DoFit(TF1 *f1,Option_t *option,Option_t *goption, Doubl e_t xmin, Double_t xmax);
virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2,
Int_t iz1, Int_t iz2, Double_t & err,
Option_t * opt, Bool_t doerr = kFALSE) const
;
public: public:
// TH1 status bits // TH1 status bits
enum { enum {
kNoStats = BIT(9), // don't draw stats box kNoStats = BIT(9), // don't draw stats box
kUserContour = BIT(10), // user specified contour levels kUserContour = BIT(10), // user specified contour levels
kCanRebin = BIT(11), // can rebin axis kCanRebin = BIT(11), // can rebin axis
kLogX = BIT(15), // X-axis in log scale kLogX = BIT(15), // X-axis in log scale
kIsZoomed = BIT(16), // bit set when zooming on Y axis kIsZoomed = BIT(16), // bit set when zooming on Y axis
kNoTitle = BIT(17), // don't draw the histogram title kNoTitle = BIT(17), // don't draw the histogram title
kIsAverage = BIT(18) // Bin contents are average (used by Add) kIsAverage = BIT(18) // Bin contents are average (used by Add)
skipping to change at line 274 skipping to change at line 277
virtual const TArrayD *GetSumw2() const {return &fSumw2;} virtual const TArrayD *GetSumw2() const {return &fSumw2;}
virtual Int_t GetSumw2N() const {return fSumw2.fN;} virtual Int_t GetSumw2N() const {return fSumw2.fN;}
virtual Double_t GetRMS(Int_t axis=1) const; virtual Double_t GetRMS(Int_t axis=1) const;
virtual Double_t GetRMSError(Int_t axis=1) const; virtual Double_t GetRMSError(Int_t axis=1) const;
virtual Double_t GetSkewness(Int_t axis=1) const; virtual Double_t GetSkewness(Int_t axis=1) const;
TAxis *GetXaxis() const; TAxis *GetXaxis() const;
TAxis *GetYaxis() const; TAxis *GetYaxis() const;
TAxis *GetZaxis() const; TAxis *GetZaxis() const;
virtual Double_t Integral(Option_t *option="") const; virtual Double_t Integral(Option_t *option="") const;
virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const; virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Option_t * /*optio virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t & e
n*/ ="") const {return 0;} rr, Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Opti
on_t * /*option*/ ="" ) const {return 0;}
virtual Double_t Interpolate(Double_t x); virtual Double_t Interpolate(Double_t x);
virtual Double_t Interpolate(Double_t x, Double_t y); virtual Double_t Interpolate(Double_t x, Double_t y);
virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z);
Bool_t IsBinOverflow(Int_t bin) const; Bool_t IsBinOverflow(Int_t bin) const;
Bool_t IsBinUnderflow(Int_t bin) const; Bool_t IsBinUnderflow(Int_t bin) const;
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t;
virtual void LabelsDeflate(Option_t *axis="X"); virtual void LabelsDeflate(Option_t *axis="X");
virtual void LabelsInflate(Option_t *axis="X"); virtual void LabelsInflate(Option_t *axis="X");
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X"); virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
virtual Long64_t Merge(TCollection *list); virtual Long64_t Merge(TCollection *list);
 End of changes. 4 change blocks. 
6 lines changed or deleted 9 lines changed or added


 TH2.h   TH2.h 
// @(#)root/hist:$Id: TH2.h 28080 2009-04-03 07:30:43Z brun $ // @(#)root/hist:$Id: TH2.h 29775 2009-08-13 15:07:28Z moneta $
// Author: Rene Brun 26/12/94 // Author: Rene Brun 26/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 87 skipping to change at line 87
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c onst; virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c onst;
virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c onst; virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c onst;
virtual void FitSlicesX(TF1 *f1=0,Int_t firstybin=0, Int_t lastybin= -1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* virtual void FitSlicesX(TF1 *f1=0,Int_t firstybin=0, Int_t lastybin= -1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU*
virtual void FitSlicesY(TF1 *f1=0,Int_t firstxbin=0, Int_t lastxbin= -1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU* virtual void FitSlicesY(TF1 *f1=0,Int_t firstxbin=0, Int_t lastxbin= -1, Int_t cut=0, Option_t *option="QNR", TObjArray* arr = 0); // *MENU*
virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny , Int_t firstxbin=1, Int_t lastxbin=-1,Int_t firstybin=1, Int_t lastybin=-1 , Double_t maxdiff=0) const; virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny , Int_t firstxbin=1, Int_t lastxbin=-1,Int_t firstybin=1, Int_t lastybin=-1 , Double_t maxdiff=0) const;
virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const ; virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const ;
virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const;
virtual void GetRandom2(Double_t &x, Double_t &y); virtual void GetRandom2(Double_t &x, Double_t &y);
virtual void GetStats(Double_t *stats) const; virtual void GetStats(Double_t *stats) const;
virtual Double_t Integral(Option_t *option="") const; virtual Double_t Integral(Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return 0; //virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return
} 0;}
virtual Double_t Integral(Int_t firstxbin, Int_t lastxbin, Int_t firstyb using TH1::Integral;
in, Int_t lastybin, Option_t *option="") const; virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b
iny2, Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Opti on_t * ="") const {return 0;} virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Opti on_t * ="") const {return 0;}
using TH1::IntegralAndError;
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1,
Int_t biny2, Double_t & err, Option_t *option="") const;
virtual Double_t Interpolate(Double_t x); virtual Double_t Interpolate(Double_t x);
virtual Double_t Interpolate(Double_t x, Double_t y); virtual Double_t Interpolate(Double_t x, Double_t y);
virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z);
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t;
virtual Long64_t Merge(TCollection *list); virtual Long64_t Merge(TCollection *list);
virtual TH2 *RebinX(Int_t ngroup=2, const char *newname=""); virtual TH2 *RebinX(Int_t ngroup=2, const char *newname="");
virtual TH2 *RebinY(Int_t ngroup=2, const char *newname=""); virtual TH2 *RebinY(Int_t ngroup=2, const char *newname="");
virtual TH2 *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *n ewname=""); virtual TH2 *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *n ewname="");
TProfile *ProfileX(const char *name="_pfx", Int_t firstybin=1, In t_t lastybin=-1, Option_t *option="") const; // *MENU* TProfile *ProfileX(const char *name="_pfx", Int_t firstybin=1, In t_t lastybin=-1, Option_t *option="") const; // *MENU*
TProfile *ProfileY(const char *name="_pfy", Int_t firstxbin=1, In t_t lastxbin=-1, Option_t *option="") const; // *MENU* TProfile *ProfileY(const char *name="_pfy", Int_t firstxbin=1, In t_t lastxbin=-1, Option_t *option="") const; // *MENU*
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added


 TH2GL.h   TH2GL.h 
// @(#)root/gl:$Id: TH2GL.h 28378 2009-04-28 15:40:53Z matevz $ // @(#)root/gl:$Id: TH2GL.h 29526 2009-07-20 17:41:53Z matevz $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TH2GL #ifndef ROOT_TH2GL
#define ROOT_TH2GL #define ROOT_TH2GL
#include <TGLObject.h> #include <TGLPlot3D.h>
#include <TGLUtil.h> #include <TGLUtil.h>
#include <TGLAxisPainter.h> #include <TGLAxisPainter.h>
class TGLRnrCtx; class TGLRnrCtx;
class TH2; class TH2;
class TAxis; class TAxis;
#include "TGLPlotPainter.h" class TH2GL : public TGLPlot3D
class TH2GL : public TGLObject
{ {
private: private:
TH2GL(const TH2GL&); // Not implemented TH2GL(const TH2GL&); // Not implemented
TH2GL& operator=(const TH2GL&); // Not implemented TH2GL& operator=(const TH2GL&); // Not implemented
protected: protected:
TH2 *fM; // Model object dynamic-casted to TH2. TH2 *fM; // Model object dynamic-casted to TH2.
TGLPlotPainter *fPlotPainter;
TGLPlotCoordinates fCoord;
public: public:
TH2GL(); TH2GL();
virtual ~TH2GL(); virtual ~TH2GL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
virtual Bool_t KeepDuringSmartRefresh() const { return kFALSE; }
// To support two-level selection // To support two-level selection
// virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
// virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*); // virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
ClassDef(TH2GL, 0); // GL renderer for TH2 and TH3. ClassDef(TH2GL, 0); // GL renderer for TH2.
}; // endclass TH2GL }; // endclass TH2GL
#endif #endif
 End of changes. 6 change blocks. 
11 lines changed or deleted 4 lines changed or added


 TH3.h   TH3.h 
// @(#)root/hist:$Id: TH3.h 28964 2009-06-12 16:08:04Z moneta $ // @(#)root/hist:$Id: TH3.h 29899 2009-08-25 12:51:00Z moneta $
// Author: Rene Brun 27/10/95 // Author: Rene Brun 27/10/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 31 skipping to change at line 31
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TH1 #ifndef ROOT_TH1
#include "TH1.h" #include "TH1.h"
#endif #endif
#ifndef ROOT_TAtt3D #ifndef ROOT_TAtt3D
#include "TAtt3D.h" #include "TAtt3D.h"
#endif #endif
class TH2; class TH2D;
class TProfile2D; class TProfile2D;
class TH3 : public TH1, public TAtt3D { class TH3 : public TH1, public TAtt3D {
protected: protected:
Double_t fTsumwy; //Total Sum of weight*Y Double_t fTsumwy; //Total Sum of weight*Y
Double_t fTsumwy2; //Total Sum of weight*Y*Y Double_t fTsumwy2; //Total Sum of weight*Y*Y
Double_t fTsumwxy; //Total Sum of weight*X*Y Double_t fTsumwxy; //Total Sum of weight*X*Y
Double_t fTsumwz; //Total Sum of weight*Z Double_t fTsumwz; //Total Sum of weight*Z
Double_t fTsumwz2; //Total Sum of weight*Z*Z Double_t fTsumwz2; //Total Sum of weight*Z*Z
skipping to change at line 94 skipping to change at line 94
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c onst; virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) c onst;
virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c onst; virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) c onst;
virtual void FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t binmaxx=0,I nt_t binminy=1, Int_t binmaxy=0, virtual void FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t binmaxx=0,I nt_t binminy=1, Int_t binmaxy=0,
Int_t cut=0 ,Option_t *option="QNR" ); // *MENU* Int_t cut=0 ,Option_t *option="QNR" ); // *MENU*
virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny , Int_t &binz, Int_t firstx=0, Int_t lastx=0,Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const; virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny , Int_t &binz, Int_t firstx=0, Int_t lastx=0,Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const;
virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const ; virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const ;
virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const; virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const;
virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z); virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z);
virtual void GetStats(Double_t *stats) const; virtual void GetStats(Double_t *stats) const;
virtual Double_t Integral(Option_t *option="") const; virtual Double_t Integral(Option_t *option="") const;
virtual Double_t Integral(Int_t, Int_t, Option_t * ="") const {return 0; using TH1::Integral;
}
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Option_t * ="") co
nst {return 0;}
virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b iny2, Int_t binz1, Int_t binz2, Option_t *option="") const; virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t b iny2, Int_t binz1, Int_t binz2, Option_t *option="") const;
using TH1::IntegralAndError;
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1,
Int_t biny2, Int_t binz1, Int_t binz2, Double_t & err, Option_t *option=""
) const;
virtual Double_t Interpolate(Double_t x); virtual Double_t Interpolate(Double_t x);
virtual Double_t Interpolate(Double_t x, Double_t y); virtual Double_t Interpolate(Double_t x, Double_t y);
virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z);
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t;
virtual Long64_t Merge(TCollection *list); virtual Long64_t Merge(TCollection *list);
TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0, TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0,
Int_t lastybin=0, Int_t firstzbin=0, Int_t lastybin=-1, Int_t firstzbin=0,
Int_t lastzbin=0, Option_t *option="") cons Int_t lastzbin=-1, Option_t *option="") con
t; // *MENU* st; // *MENU*
TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0, TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0,
Int_t lastxbin=0, Int_t firstzbin=0, Int_t lastxbin=-1, Int_t firstzbin=0,
Int_t lastzbin=0, Option_t *option="") cons Int_t lastzbin=-1, Option_t *option="") con
t; // *MENU* st; // *MENU*
TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0, TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0,
Int_t lastxbin=0, Int_t firstybin=0, Int_t lastxbin=-1, Int_t firstybin=0,
Int_t lastybin=0, Option_t *option="") cons Int_t lastybin=-1, Option_t *option="") con
t; // *MENU* st; // *MENU*
TH1 *Project3D(Option_t *option="x") const; // *MENU* TH1 *Project3D(Option_t *option="x") const; // *MENU*
TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU * TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU *
virtual void PutStats(Double_t *stats); virtual void PutStats(Double_t *stats);
virtual void Reset(Option_t *option=""); virtual void Reset(Option_t *option="");
virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU* virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU*
protected: protected:
TH1 *DoProject1D(char* title, char* name, TAxis* projX, TH1D *DoProject1D(const char* name, const char * title, TAxis* pr ojX,
bool computeErrors, bool originalRange, bool computeErrors, bool originalRange,
bool useUF, bool useOF) const; bool useUF, bool useOF) const;
TH2 *DoProject2D(char* title, char* name, TAxis* projX, TAxis* pr ojY, TH2D *DoProject2D(const char* name, const char * title, TAxis* pr ojX, TAxis* projY,
bool computeErrors, bool originalRange, bool computeErrors, bool originalRange,
bool useUF, bool useOF) const; bool useUF, bool useOF) const;
TProfile2D *DoProjectProfile2D(char* title, char* name,TAxis* projX, TAx is* projY, TProfile2D *DoProjectProfile2D(const char* name, const char * title, TAx is* projX, TAxis* projY,
bool originalRange, bool useUF, boo l useOF) const; bool originalRange, bool useUF, boo l useOF) const;
ClassDef(TH3,5) //3-Dim histogram base class ClassDef(TH3,5) //3-Dim histogram base class
}; };
//________________________________________________________________________ //________________________________________________________________________
class TH3C : public TH3, public TArrayC { class TH3C : public TH3, public TArrayC {
public: public:
TH3C(); TH3C();
 End of changes. 8 change blocks. 
21 lines changed or deleted 22 lines changed or added


 TH3GL.h   TH3GL.h 
// @(#)root/eve:$Id: TH3GL.h 28378 2009-04-28 15:40:53Z matevz $ // @(#)root/eve:$Id: TH3GL.h 29526 2009-07-20 17:41:53Z matevz $
// Author: Matevz Tadel 2007 // Author: Matevz Tadel 2007
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TH3GL #ifndef ROOT_TH3GL
#define ROOT_TH3GL #define ROOT_TH3GL
#include "TGLObject.h" #include "TGLPlot3D.h"
#include <TGLUtil.h> #include <TGLUtil.h>
#include <TGLAxisPainter.h> #include <TGLAxisPainter.h>
#include "TGLPlotPainter.h"
class TGLRnrCtx; class TGLRnrCtx;
class TH3; class TH3;
class TAxis; class TAxis;
class TH3; class TH3;
class TH3GL : public TGLObject class TH3GL : public TGLPlot3D
{ {
private: private:
TH3GL(const TH3GL&); // Not implemented TH3GL(const TH3GL&); // Not implemented
TH3GL& operator=(const TH3GL&); // Not implemented TH3GL& operator=(const TH3GL&); // Not implemented
protected: protected:
TH3 *fM; // Model object dynamic-casted to TH2. TH3 *fM; // Model object dynamic-casted to TH2.
TGLPlotPainter *fPlotPainter;
TGLPlotCoordinates fCoord;
public: public:
TH3GL(); TH3GL();
virtual ~TH3GL(); virtual ~TH3GL();
virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
virtual void SetBBox(); virtual void SetBBox();
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
// To support two-level selection // To support two-level selection
 End of changes. 5 change blocks. 
7 lines changed or deleted 3 lines changed or added


 THnSparse.h   THnSparse.h 
// @(#)root/hist:$Id: THnSparse.h 28292 2009-04-20 15:27:12Z moneta $ // @(#)root/hist:$Id: THnSparse.h 30458 2009-09-25 15:30:16Z moneta $
// Author: Axel Naumann (2007-09-11) // Author: Axel Naumann (2007-09-11)
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 58 skipping to change at line 58
#ifndef ROOT_TArrayC #ifndef ROOT_TArrayC
#include "TArrayC.h" #include "TArrayC.h"
#endif #endif
class TAxis; class TAxis;
class TCollection; class TCollection;
class TH1; class TH1;
class TH1D; class TH1D;
class TH2D; class TH2D;
class TH3D; class TH3D;
class TF1;
class THnSparseArrayChunk: public TObject { class THnSparseArrayChunk: public TObject {
private: private:
THnSparseArrayChunk(const THnSparseArrayChunk&); // Not implemented THnSparseArrayChunk(const THnSparseArrayChunk&); // Not implemented
THnSparseArrayChunk& operator=(const THnSparseArrayChunk&); // Not imple mented THnSparseArrayChunk& operator=(const THnSparseArrayChunk&); // Not imple mented
public: public:
THnSparseArrayChunk(): THnSparseArrayChunk():
fCoordinateAllocationSize(-1), fSingleCoordinateSize(0), fCoordinates Size(0), fCoordinates(0), fCoordinateAllocationSize(-1), fSingleCoordinateSize(0), fCoordinates Size(0), fCoordinates(0),
skipping to change at line 166 skipping to change at line 167
Bool_t CheckConsistency(const THnSparse *h, const char *tag) const; Bool_t CheckConsistency(const THnSparse *h, const char *tag) const;
Bool_t IsInRange(Int_t *coord) const; Bool_t IsInRange(Int_t *coord) const;
TH1* CreateHist(const char* name, const char* title, TH1* CreateHist(const char* name, const char* title,
const TObjArray* axes, Bool_t keepTargetAxis) const; const TObjArray* axes, Bool_t keepTargetAxis) const;
TObject* ProjectionAny(Int_t ndim, const Int_t* dim, TObject* ProjectionAny(Int_t ndim, const Int_t* dim,
Bool_t wantSparse, Option_t* option = "") const; Bool_t wantSparse, Option_t* option = "") const;
public: public:
virtual ~THnSparse(); virtual ~THnSparse();
static THnSparse* CreateSparse(const char* name, const char* title,
const TH1* axes, Int_t ChunkSize = 1024 *
16);
Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); } Int_t GetNChunks() const { return fBinContent.GetEntriesFast(); }
TObjArray* GetListOfAxes() { return &fAxes; } TObjArray* GetListOfAxes() { return &fAxes; }
TAxis* GetAxis(Int_t dim) const { return (TAxis*)fAxes[dim]; } TAxis* GetAxis(Int_t dim) const { return (TAxis*)fAxes[dim]; }
Long_t Fill(const Double_t *x, Double_t w = 1.) { Long_t Fill(const Double_t *x, Double_t w = 1.) {
if (GetCalculateErrors()) { if (GetCalculateErrors()) {
for (Int_t d = 0; d < fNdimensions; ++d) { for (Int_t d = 0; d < fNdimensions; ++d) {
const Double_t xd = x[d]; const Double_t xd = x[d];
fTsumwx[d] += w * xd; fTsumwx[d] += w * xd;
fTsumwx2[d] += w * xd * xd; fTsumwx2[d] += w * xd * xd;
skipping to change at line 204 skipping to change at line 208
Long_t GetBin(const Int_t* idx, Bool_t allocate = kTRUE); Long_t GetBin(const Int_t* idx, Bool_t allocate = kTRUE);
Long_t GetBin(const Double_t* x, Bool_t allocate = kTRUE); Long_t GetBin(const Double_t* x, Bool_t allocate = kTRUE);
Long_t GetBin(const char* name[], Bool_t allocate = kTRUE); Long_t GetBin(const char* name[], Bool_t allocate = kTRUE);
void SetBinEdges(Int_t idim, const Double_t* bins); void SetBinEdges(Int_t idim, const Double_t* bins);
void SetBinContent(const Int_t* x, Double_t v); void SetBinContent(const Int_t* x, Double_t v);
void SetBinError(const Int_t* x, Double_t e); void SetBinError(const Int_t* x, Double_t e);
void AddBinContent(const Int_t* x, Double_t v = 1.); void AddBinContent(const Int_t* x, Double_t v = 1.);
void SetEntries(Double_t entries) { fEntries = entries; } void SetEntries(Double_t entries) { fEntries = entries; }
void SetTitle(const char *title);
Double_t GetBinContent(const Int_t *idx) const; Double_t GetBinContent(const Int_t *idx) const;
Double_t GetBinContent(Long64_t bin, Int_t* idx = 0) const; Double_t GetBinContent(Long64_t bin, Int_t* idx = 0) const;
Double_t GetBinError(const Int_t *idx) const; Double_t GetBinError(const Int_t *idx) const;
Double_t GetBinError(Long64_t linidx) const; Double_t GetBinError(Long64_t linidx) const;
Double_t GetSparseFractionBins() const; Double_t GetSparseFractionBins() const;
Double_t GetSparseFractionMem() const; Double_t GetSparseFractionMem() const;
Double_t GetSumw() const { return fTsumw; } Double_t GetSumw() const { return fTsumw; }
skipping to change at line 234 skipping to change at line 239
Option_t* option = "") const; Option_t* option = "") const;
THnSparse* Rebin(Int_t group) const; THnSparse* Rebin(Int_t group) const;
THnSparse* Rebin(const Int_t* group) const; THnSparse* Rebin(const Int_t* group) const;
Long64_t Merge(TCollection* list); Long64_t Merge(TCollection* list);
void Scale(Double_t c); void Scale(Double_t c);
void Add(const THnSparse* h, Double_t c=1.); void Add(const THnSparse* h, Double_t c=1.);
void Multiply(const THnSparse* h); void Multiply(const THnSparse* h);
void Multiply(TF1* f, Double_t c = 1.);
void Divide(const THnSparse* h); void Divide(const THnSparse* h);
void Divide(const THnSparse* h1, const THnSparse* h2, Double_t c1 = 1., Double_t c2 = 1., Option_t* option=""); void Divide(const THnSparse* h1, const THnSparse* h2, Double_t c1 = 1., Double_t c2 = 1., Option_t* option="");
void RebinnedAdd(const THnSparse* h, Double_t c=1.); void RebinnedAdd(const THnSparse* h, Double_t c=1.);
void Reset(Option_t* option = ""); void Reset(Option_t* option = "");
void Sumw2(); void Sumw2();
Double_t ComputeIntegral(); Double_t ComputeIntegral();
void GetRandom(Double_t *rand, Bool_t subBinRandom = kTRUE); void GetRandom(Double_t *rand, Bool_t subBinRandom = kTRUE);
 End of changes. 5 change blocks. 
1 lines changed or deleted 8 lines changed or added


 TInterpreter.h   TInterpreter.h 
// @(#)root/meta:$Id: TInterpreter.h 26888 2008-12-12 21:43:12Z pcanal $ // @(#)root/meta:$Id: TInterpreter.h 30100 2009-09-09 18:30:50Z pcanal $
// Author: Fons Rademakers 01/03/96 // Author: Fons Rademakers 01/03/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 96 skipping to change at line 96
virtual void ResetAll() = 0; virtual void ResetAll() = 0;
virtual void ResetGlobals() = 0; virtual void ResetGlobals() = 0;
virtual void RewindDictionary() = 0; virtual void RewindDictionary() = 0;
virtual Int_t DeleteGlobal(void *obj) = 0; virtual Int_t DeleteGlobal(void *obj) = 0;
virtual void SaveContext() = 0; virtual void SaveContext() = 0;
virtual void SaveGlobalsContext() = 0; virtual void SaveGlobalsContext() = 0;
virtual void UpdateListOfGlobals() = 0; virtual void UpdateListOfGlobals() = 0;
virtual void UpdateListOfGlobalFunctions() = 0; virtual void UpdateListOfGlobalFunctions() = 0;
virtual void UpdateListOfTypes() = 0; virtual void UpdateListOfTypes() = 0;
virtual void SetClassInfo(TClass *cl, Bool_t reload = kFALSE) = 0; virtual void SetClassInfo(TClass *cl, Bool_t reload = kFALSE) = 0;
virtual Bool_t CheckClassInfo(const char *name) = 0; virtual Bool_t CheckClassInfo(const char *name, Bool_t autoload = kTRU E) = 0;
virtual Long_t Calc(const char *line, EErrorCode* error = 0) = 0; virtual Long_t Calc(const char *line, EErrorCode* error = 0) = 0;
virtual void CreateListOfBaseClasses(TClass *cl) = 0; virtual void CreateListOfBaseClasses(TClass *cl) = 0;
virtual void CreateListOfDataMembers(TClass *cl) = 0; virtual void CreateListOfDataMembers(TClass *cl) = 0;
virtual void CreateListOfMethods(TClass *cl) = 0; virtual void CreateListOfMethods(TClass *cl) = 0;
virtual void CreateListOfMethodArgs(TFunction *m) = 0; virtual void CreateListOfMethodArgs(TFunction *m) = 0;
virtual void UpdateListOfMethods(TClass *cl) = 0; virtual void UpdateListOfMethods(TClass *cl) = 0;
virtual TString GetMangledName(TClass *cl, const char *method, const ch ar *params) = 0; virtual TString GetMangledName(TClass *cl, const char *method, const ch ar *params) = 0;
virtual TString GetMangledNameWithPrototype(TClass *cl, const char *met hod, const char *proto) = 0; virtual TString GetMangledNameWithPrototype(TClass *cl, const char *met hod, const char *proto) = 0;
virtual const char *GetInterpreterTypeName(const char *name,Bool_t full = kFALSE) = 0; virtual const char *GetInterpreterTypeName(const char *name,Bool_t full = kFALSE) = 0;
virtual void *GetInterfaceMethod(TClass *cl, const char *method, cons t char *params) = 0; virtual void *GetInterfaceMethod(TClass *cl, const char *method, cons t char *params) = 0;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TKDEFGT.h   TKDEFGT.h 
// @(#)root/gl:$Id: TKDEFGT.h 28589 2009-05-13 06:48:00Z brun $ // @(#)root/gl:$Id: TKDEFGT.h 29602 2009-07-28 10:23:20Z brun $
// Author: Timur Pocheptsov 2009 // Author: Timur Pocheptsov 2009
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TKDEFGT #ifndef ROOT_TKDEFGT
skipping to change at line 23 skipping to change at line 23
#include <vector> #include <vector>
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
//KDE - kenrel density estimator, //KDE - kenrel density estimator,
//based on fast Gauss transform. //based on fast Gauss transform.
class TGL5DDataSet;
class TKDEFGT { class TKDEFGT {
private: private:
//KDE-related stuff. //KDE-related stuff.
std::vector<Double_t> fXC; //Centers. std::vector<Double_t> fXC; //Centers.
std::vector<Double_t> fWeights;//Weights. std::vector<Double_t> fWeights;//Weights.
std::vector<Int_t> fIndxc; //Internal data. std::vector<UInt_t> fIndxc; //Internal data.
std::vector<Double_t> fA_K; //Polynomial coefficient (pd x K) std::vector<Double_t> fA_K; //Polynomial coefficient (pd x K)
std::vector<Int_t> fIndx; //Internal data. std::vector<UInt_t> fIndx; //Internal data.
std::vector<Int_t> fXhead; //Internal data. std::vector<UInt_t> fXhead; //Internal data.
std::vector<Int_t> fXboxsz; //Internal data. std::vector<UInt_t> fXboxsz; //Internal data.
std::vector<Double_t> fDistC; //Internal data. std::vector<Double_t> fDistC; //Internal data.
std::vector<Double_t> fC_K; //Internal data. std::vector<Double_t> fC_K; //Internal data.
std::vector<Int_t> fCinds; //Internal data. std::vector<UInt_t> fCinds; //Internal data.
mutable std::vector<Int_t> fHeads; //Internal data. mutable std::vector<UInt_t> fHeads; //Internal data.
mutable std::vector<Double_t> fDx; //Internal data. mutable std::vector<Double_t> fDx; //Internal data.
mutable std::vector<Double_t> fProds; //Internal data. mutable std::vector<Double_t> fProds; //Internal data.
Int_t fDim; //Number of dimensions. UInt_t fDim; //Number of dimensions.
Int_t fP; //Order of trancation. UInt_t fP; //Order of trancation.
Int_t fK; //Number of centers. UInt_t fK; //Number of centers.
Double_t fSigma; //Noise Standard deviation of the k ernel (default sigma = 1) Double_t fSigma; //Noise Standard deviation of the k ernel (default sigma = 1)
Int_t fPD; //nchoosek(fP + fDim - 1, fDim); UInt_t fPD; //nchoosek(fP + fDim - 1, fDim);
Bool_t fModelValid; //Check, if coefficients are ok. Bool_t fModelValid; //Check, if coefficients are ok.
Bool_t fVerbose;
public: public:
TKDEFGT(); TKDEFGT();
virtual ~TKDEFGT(); virtual ~TKDEFGT();
//Sources and targets must be a vector of packed points, if you have, sa //Generic version.
y, //"sources" must be a vector of packed coordinates, if you have
//Dim == 3, vector will be [xyz|xyz|xyz|xyz|xyz]. //dim == 3, vector will be [xyz|xyz|...].
void BuildModel(const std::vector<Double_t> &sources, Double_t sigma = 1 ., void BuildModel(const std::vector<Double_t> &sources, Double_t sigma = 1 .,
Int_t dim = 3, Int_t p = 8, Int_t k = 0); UInt_t dim = 3, UInt_t p = 8, UInt_t k = 0);
//Special version for data from TTree.
void BuildModel(const TGL5DDataSet *sources, Double_t sigma = 1.,
UInt_t p = 8, UInt_t k = 0);
//"targets" is a vector of packed coordinates, the same as above in Buil
dModel:
//[xyz|xyz|xyz...] for dim == 3.
void Predict(const std::vector<Double_t> &targets, std::vector<Double_t> &densities, void Predict(const std::vector<Double_t> &targets, std::vector<Double_t> &densities,
Double_t e)const; Double_t e)const;
void SetVerbose(Bool_t v) {fVerbose = v;}
private: private:
//Generic version.
void Kcenter(const std::vector<double> &x); void Kcenter(const std::vector<double> &x);
//Special version for data sources from TTree.
void Kcenter(const TGL5DDataSet *sources);
void Compute_C_k(); void Compute_C_k();
//Generic version.
void Compute_A_k(const std::vector<Double_t> &x); void Compute_A_k(const std::vector<Double_t> &x);
//Version for TTree.
void Compute_A_k(const TGL5DDataSet *sources);
TKDEFGT(const TKDEFGT &rhs); TKDEFGT(const TKDEFGT &rhs);
TKDEFGT &operator = (const TKDEFGT &rhs); TKDEFGT &operator = (const TKDEFGT &rhs);
ClassDef(TKDEFGT, 0)//FGT based kernel density estimator.
}; };
#endif #endif
 End of changes. 13 change blocks. 
28 lines changed or deleted 39 lines changed or added


 TMakeProject.h   TMakeProject.h 
// @(#)root/io:$Id: TMakeProject.h 23833 2008-05-13 18:10:39Z pcanal $ // @(#)root/io:$Id: TMakeProject.h 29360 2009-07-06 21:10:23Z pcanal $
// Author: Rene Brun 12/10/2000 // Author: Rene Brun 12/10/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 28 skipping to change at line 28
// // // //
// Helper class implementing the TFile::MakeProject. // // Helper class implementing the TFile::MakeProject. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#include <stdio.h> #include <stdio.h>
#ifndef ROOT_TOBJECT_H #ifndef ROOT_TOBJECT_H
#include "TString.h" #include "TString.h"
#endif #endif
class TList;
class TStreamerElement;
class TMakeProject class TMakeProject
{ {
private:
static void GenerateMissingStreamerInfo(TList *extrainfos, const char *c
lname, Bool_t iscope);
public: public:
static void AddUniqueStatement(FILE *fp, const char *statement, char *in clist); static void AddUniqueStatement(FILE *fp, const char *statement, char *in clist);
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist); static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist);
static void ChopFileName(TString &name, Int_t limit);
static TString GetHeaderName(const char *name, Bool_t includeNested = kF ALSE); static TString GetHeaderName(const char *name, Bool_t includeNested = kF ALSE);
static UInt_t GenerateClassPrefix(FILE *fp, const char *clname, Bool_t t static UInt_t GenerateClassPrefix(FILE *fp, const char *clname, Bool_t t
op, TString &protoname, UInt_t *numberOfClasses, Bool_t implementEmptyClass op, TString &protoname, UInt_t *numberOfClasses, Int_t implementEmptyClass
= kFALSE); = kFALSE, Bool_t needGenericTemplate = kFALSE);
static UInt_t GenerateEmptyNestedClass(FILE *fp, const char *topclass, c static void GenerateMissingStreamerInfos(TList *extrainfos, TStreamerEle
onst char *clname); ment *element);
static UInt_t GenerateForwardDeclaration(FILE *fp, const char *clname, c static void GenerateMissingStreamerInfos(TList *extrainfos, const char *
har *inclist, Bool_t implementEmptyClass = kFALSE); clname);
static UInt_t GenerateForwardDeclaration(FILE *fp, const char *clname, c
har *inclist, Bool_t implementEmptyClass = kFALSE, Bool_t needGenericTempla
te = kFALSE);
static UInt_t GenerateIncludeForTemplate(FILE *fp, const char *clname, c har *inclist, Bool_t forward); static UInt_t GenerateIncludeForTemplate(FILE *fp, const char *clname, c har *inclist, Bool_t forward);
static TString UpdateAssociativeToVector(const char *name);
}; };
#endif // ROOT_TMakeProject #endif // ROOT_TMakeProject
 End of changes. 6 change blocks. 
8 lines changed or deleted 19 lines changed or added


 TMath.h   TMath.h 
// @(#)root/mathcore:$Id: TMath.h 28382 2009-04-29 10:06:36Z moneta $ // @(#)root/mathcore:$Id: TMath.h 29937 2009-08-27 14:15:39Z brun $
// Authors: Rene Brun, Anna Kreshuk, Eddy Offermann, Fons Rademakers 29/0 7/95 // Authors: Rene Brun, Anna Kreshuk, Eddy Offermann, Fons Rademakers 29/0 7/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 170 skipping to change at line 170
Double_t Log2(Double_t x); Double_t Log2(Double_t x);
inline Double_t Log10(Double_t x); inline Double_t Log10(Double_t x);
Int_t Nint(Float_t x); Int_t Nint(Float_t x);
Int_t Nint(Double_t x); Int_t Nint(Double_t x);
inline Int_t Finite(Double_t x); inline Int_t Finite(Double_t x);
inline Int_t IsNaN(Double_t x); inline Int_t IsNaN(Double_t x);
// Some integer math // Some integer math
Long_t Hypot(Long_t x, Long_t y); // sqrt(px*px + py*py) Long_t Hypot(Long_t x, Long_t y); // sqrt(px*px + py*py)
// Comparing floating points
inline Bool_t AreEqualAbs(Double_t af, Double_t bf, Double_t epsilon) {
//return kTRUE if absolute difference between af and bf is less than
epsilon
return TMath::Abs(af-bf) < epsilon;
}
inline Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec) {
//return kTRUE if relative difference between af and bf is less than
relPrec
return TMath::Abs(af-bf) < 0.5*relPrec*(TMath::Abs(af)+TMath::Abs(bf)
);
}
/* ******************** */ /* ******************** */
/* * Array Algorithms * */ /* * Array Algorithms * */
/* ******************** */ /* ******************** */
// Min, Max of an array // Min, Max of an array
template <typename T> T MinElement(Long64_t n, const T *a); template <typename T> T MinElement(Long64_t n, const T *a);
template <typename T> T MaxElement(Long64_t n, const T *a); template <typename T> T MaxElement(Long64_t n, const T *a);
// Locate Min, Max element number in an array // Locate Min, Max element number in an array
template <typename T> Long64_t LocMin(Long64_t n, const T *a); template <typename T> Long64_t LocMin(Long64_t n, const T *a);
 End of changes. 2 change blocks. 
1 lines changed or deleted 14 lines changed or added


 TMatrixTSparse.h   TMatrixTSparse.h 
// @(#)root/matrix:$Id: TMatrixTSparse.h 27658 2009-02-28 05:34:57Z pcanal $ // @(#)root/matrix:$Id: TMatrixTSparse.h 30103 2009-09-11 03:15:27Z brun $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TMatrixTSparse #ifndef ROOT_TMatrixTSparse
#define ROOT_TMatrixTSparse #define ROOT_TMatrixTSparse
skipping to change at line 83 skipping to change at line 83
TMatrixTSparse() { fElements = 0; fRowIndex = 0; fColIndex = 0; } TMatrixTSparse() { fElements = 0; fRowIndex = 0; fColIndex = 0; }
TMatrixTSparse(Int_t nrows,Int_t ncols); TMatrixTSparse(Int_t nrows,Int_t ncols);
TMatrixTSparse(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb); TMatrixTSparse(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb);
TMatrixTSparse(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,I nt_t nr_nonzeros, TMatrixTSparse(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb,I nt_t nr_nonzeros,
Int_t *row, Int_t *col,Element *data); Int_t *row, Int_t *col,Element *data);
TMatrixTSparse(const TMatrixTSparse<Element> &another); TMatrixTSparse(const TMatrixTSparse<Element> &another);
TMatrixTSparse(const TMatrixT<Element> &another); TMatrixTSparse(const TMatrixT<Element> &another);
TMatrixTSparse(EMatrixCreatorsOp1 op,const TMatrixTSparse<Element> &prot otype); TMatrixTSparse(EMatrixCreatorsOp1 op,const TMatrixTSparse<Element> &prot otype);
TMatrixTSparse(const TMatrixTSparse<Element> &a,EMatrixCreatorsOp2 op,co nst TMatrixTSparse<Element> &b); TMatrixTSparse(const TMatrixTSparse<Element> &a,EMatrixCreatorsOp2 op,co nst TMatrixTSparse<Element> &b);
TMatrixTSparse(const TMatrixTSparse<Element> &a,EMatrixCreatorsOp2 op,co
nst TMatrixT <Element> &b);
TMatrixTSparse(const TMatrixT <Element> &a,EMatrixCreatorsOp2 op,co
nst TMatrixTSparse<Element> &b);
virtual ~TMatrixTSparse() { Clear(); } virtual ~TMatrixTSparse() { Clear(); }
virtual const Element *GetMatrixArray () const; virtual const Element *GetMatrixArray () const;
virtual Element *GetMatrixArray (); virtual Element *GetMatrixArray ();
virtual const Int_t *GetRowIndexArray() const; virtual const Int_t *GetRowIndexArray() const;
virtual Int_t *GetRowIndexArray(); virtual Int_t *GetRowIndexArray();
virtual const Int_t *GetColIndexArray() const; virtual const Int_t *GetColIndexArray() const;
virtual Int_t *GetColIndexArray(); virtual Int_t *GetColIndexArray();
virtual TMatrixTBase<Element> &SetRowIndexArray(Int_t *data) { memmove (fRowIndex,data,(this->fNrows+1)*sizeof(Int_t)); return *this; } virtual TMatrixTBase<Element> &SetRowIndexArray(Int_t *data) { memmove (fRowIndex,data,(this->fNrows+1)*sizeof(Int_t)); return *this; }
virtual TMatrixTBase<Element> &SetColIndexArray(Int_t *data) { memmove (fColIndex,data,this->fNelems*sizeof(Int_t)); return *this; } virtual TMatrixTBase<Element> &SetColIndexArray(Int_t *data) { memmove (fColIndex,data,this->fNelems*sizeof(Int_t)); return *this; }
TMatrixTSparse<Element> &SetSparseIndex (Int_t nelem_new);
TMatrixTSparse<Element> &SetSparseIndex (const TMatrixTBase<Ele
ment> &another);
TMatrixTSparse<Element> &SetSparseIndexAB(const TMatrixTSparse<E
lement> &a,const TMatrixTSparse<Element> &b);
TMatrixTSparse<Element> &SetSparseIndexAB(const TMatrixT <E
lement> &a,const TMatrixTSparse<Element> &b);
TMatrixTSparse<Element> &SetSparseIndexAB(const TMatrixTSparse<E
lement> &a,const TMatrixT <Element> &b)
{ return SetSparseIndexAB(b,a
); }
virtual void GetMatrix2Array (Element *data,Option_t *option="") const; virtual void GetMatrix2Array (Element *data,Option_t *option="") const;
virtual TMatrixTBase<Element> &SetMatrixArray (const Element *data,Op tion_t * /*option*/="") virtual TMatrixTBase<Element> &SetMatrixArray (const Element *data,Op tion_t * /*option*/="")
{ memcpy(fElements,data ,this->fNelems*sizeof(Element)); return *this; } { memcpy(fElements,data ,this->fNelems*sizeof(Element)); return *this; }
virtual TMatrixTBase<Element> &SetMatrixArray (Int_t nr_nonzeros,Int_ t *irow,Int_t *icol,Element *data); virtual TMatrixTBase<Element> &SetMatrixArray (Int_t nr_nonzeros,Int_ t *irow,Int_t *icol,Element *data);
TMatrixTSparse<Element> &SetSparseIndex (Int_t nelem_new);
TMatrixTSparse<Element> &SetSparseIndex (const TMatrixTBase<Ele
ment> &another);
TMatrixTSparse<Element> &SetSparseIndexAB(const TMatrixTSparse<E
lement> &a,const TMatrixTSparse<Element> &b);
virtual TMatrixTBase<Element> &InsertRow (Int_t row,Int_t col,co nst Element *v,Int_t n=-1); virtual TMatrixTBase<Element> &InsertRow (Int_t row,Int_t col,co nst Element *v,Int_t n=-1);
virtual void ExtractRow (Int_t row,Int_t col, Element *v,Int_t n=-1) const; virtual void ExtractRow (Int_t row,Int_t col, Element *v,Int_t n=-1) const;
virtual TMatrixTBase<Element> &ResizeTo(Int_t nrows,Int_t ncols,Int_t nr_nonzeros=-1); virtual TMatrixTBase<Element> &ResizeTo(Int_t nrows,Int_t ncols,Int_t nr_nonzeros=-1);
virtual TMatrixTBase<Element> &ResizeTo(Int_t row_lwb,Int_t row_upb,In t_t col_lwb,Int_t col_upb,Int_t nr_nonzeros=-1); virtual TMatrixTBase<Element> &ResizeTo(Int_t row_lwb,Int_t row_upb,In t_t col_lwb,Int_t col_upb,Int_t nr_nonzeros=-1);
inline TMatrixTBase<Element> &ResizeTo(const TMatrixTSparse<Element> &m) {return ResizeTo(m.GetRowLwb(),m.GetRowUpb(),m.GetColLwb(), inline TMatrixTBase<Element> &ResizeTo(const TMatrixTSparse<Element> &m) {return ResizeTo(m.GetRowLwb(),m.GetRowUpb(),m.GetColLwb(),
m.GetColUpb(),m.GetNoElements()); } m.GetColUpb(),m.GetNoElements()); }
virtual void Clear(Option_t * /*option*/ ="") { if (this->fIsOwner) { virtual void Clear(Option_t * /*option*/ ="") { if (this->fIsOwner) {
if (fElements) delete [] fElements; fElements = 0; if (fElements) delete [] fElements; fElements = 0;
 End of changes. 4 change blocks. 
6 lines changed or deleted 17 lines changed or added


 TMemStat.h   TMemStat.h 
// @(#)root/memstat:$Name$:$Id: TMemStat.h 24658 2008-07-04 09:06:58Z anar $ // @(#)root/memstat:$Name$:$Id: TMemStat.h 29410 2009-07-09 12:10:09Z brun $
// Author: D.Bertini and M.Ivanov 18/06/2007 -- Anar Manafov (A.Manafov@g si.de) 28/04/2008 // Author: D.Bertini and M.Ivanov 18/06/2007 -- Anar Manafov (A.Manafov@g si.de) 28/04/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TMEMSTAT #ifndef ROOT_TMEMSTAT
skipping to change at line 49 skipping to change at line 49
typedef std::set<std::string> Selection_t; typedef std::set<std::string> Selection_t;
enum ESelection { kFunction, kLibrary }; enum ESelection { kFunction, kLibrary };
enum StatType { kTotalAllocCount = 0, kAllocCount = 2, kTotalAllocSize = 1, kAllocSize = 3, kUndef = 4}; enum StatType { kTotalAllocCount = 0, kAllocCount = 2, kTotalAllocSize = 1, kAllocSize = 3, kUndef = 4};
enum StampType { kCurrent = 0, kMaxSize = 1, kMaxCount = 2}; enum StampType { kCurrent = 0, kMaxSize = 1, kMaxCount = 2};
enum OperType { kAND = 0, kOR = 1, kNOT = 2}; enum OperType { kAND = 0, kOR = 1, kNOT = 2};
private: private:
StatType fSortStat; // sorting statistic type StatType fSortStat; // sorting statistic type
StampType fSortStamp; // sorting stamp type StampType fSortStamp; // sorting stamp type
Double_t fMaximum; // maximum value of all graph s
UInt_t fSortDeep; // Deepness of the informatio n to be print - draw UInt_t fSortDeep; // Deepness of the informatio n to be print - draw
UInt_t fStackDeep; // Deepness of the stack info rmation UInt_t fStackDeep; // Deepness of the stack info rmation
UInt_t fMaxStringLength; // max length of information string UInt_t fMaxStringLength; // max length of information string
Int_t fSelected; // index of selected object Int_t fSelected; // index of selected object
Bool_t fIsActive; // is object attached to MemS tat Bool_t fIsActive; // is object attached to MemS tat
Bool_t fOrder; // sorting order Bool_t fOrder; // sorting order
UIntVector_t fSelectedCodeIndex; // vector of indexes of selec ted items - code UIntVector_t fSelectedCodeIndex; // vector of indexes of selec ted items - code
UIntVector_t fSelectedStackIndex; // vector of indexes of selec ted items - stack UIntVector_t fSelectedStackIndex; // vector of indexes of selec ted items - stack
IntVector_t fArrayIndexes; // indexes of selected object s IntVector_t fArrayIndexes; // indexes of selected object s
TBits* fSelectedCodeBitmap; // bitmask of selected item s - code TBits* fSelectedCodeBitmap; // bitmask of selected item s - code
skipping to change at line 110 skipping to change at line 111
return fStackDeep; return fStackDeep;
} }
UInt_t GetSortDeep() const UInt_t GetSortDeep() const
{ {
return fSortDeep; return fSortDeep;
} }
UInt_t GetMaxStringLength() const UInt_t GetMaxStringLength() const
{ {
return fMaxStringLength; return fMaxStringLength;
} }
virtual char *GetObjectInfo(Int_t px, Int_t py) const;
void MakeReport(const char * lib = "", const char *fun = "", void MakeReport(const char * lib = "", const char *fun = "",
Option_t* option = NULL, const char *fileNam e = ""); Option_t* option = NULL, const char *fileNam e = "");
void MakeHisMemoryStamp(Int_t topDiff); void MakeHisMemoryStamp(Int_t topDiff);
void MakeHisMemoryTime(); void MakeHisMemoryTime();
void Paint(Option_t *option = ""); void Paint(Option_t *option = "");
void PrintCode(Int_t nentries = 10) const; void PrintCode(Int_t nentries = 10) const;
void PrintCodeWithID(UInt_t index) const; void PrintCodeWithID(UInt_t index) const;
void PrintStack(Int_t nentries = 10, UInt_t deep = 1) const; void PrintStack(Int_t nentries = 10, UInt_t deep = 1) const;
void PrintStackWithID(UInt_t _id, UInt_t _deep = 0) const; void PrintStackWithID(UInt_t _id, UInt_t _deep = 0) const;
void Report(Option_t* option = ""); void Report(Option_t* option = "");
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TMultiLayerPerceptron.h   TMultiLayerPerceptron.h 
// @(#)root/mlp:$Id: TMultiLayerPerceptron.h 22428 2008-03-03 18:17:03Z bru n $ // @(#)root/mlp:$Id: TMultiLayerPerceptron.h 29964 2009-08-28 11:59:08Z mon eta $
// Author: Christophe.Delaere@cern.ch 20/07/03 // Author: Christophe.Delaere@cern.ch 20/07/03
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 147 skipping to change at line 147
Double_t GetCrossEntropyBinary() const; Double_t GetCrossEntropyBinary() const;
Double_t GetCrossEntropy() const; Double_t GetCrossEntropy() const;
Double_t GetSumSquareError() const; Double_t GetSumSquareError() const;
private: private:
TMultiLayerPerceptron(const TMultiLayerPerceptron&); // Not implemented TMultiLayerPerceptron(const TMultiLayerPerceptron&); // Not implemented
TMultiLayerPerceptron& operator=(const TMultiLayerPerceptron&); // Not i mplemented TMultiLayerPerceptron& operator=(const TMultiLayerPerceptron&); // Not i mplemented
void ExpandStructure(); void ExpandStructure();
void BuildFirstLayer(TString&); void BuildFirstLayer(TString&);
void BuildHiddenLayers(TString&); void BuildHiddenLayers(TString&);
void BuildOneHiddenLayer(const TString& sNumNodes, Int_t& layer,
Int_t& prevStart, Int_t& prevStop,
Bool_t lastLayer);
void BuildLastLayer(TString&, Int_t); void BuildLastLayer(TString&, Int_t);
void Shuffle(Int_t*, Int_t) const; void Shuffle(Int_t*, Int_t) const;
void MLP_Line(Double_t*, Double_t*, Double_t); void MLP_Line(Double_t*, Double_t*, Double_t);
TTree* fData; //! pointer to the tree used as datasour ce TTree* fData; //! pointer to the tree used as datasour ce
Int_t fCurrentTree; //! index of the current tree in a chain Int_t fCurrentTree; //! index of the current tree in a chain
Double_t fCurrentTreeWeight; //! weight of the current tree in a chai n Double_t fCurrentTreeWeight; //! weight of the current tree in a chai n
TObjArray fNetwork; // Collection of all the neurons in the network TObjArray fNetwork; // Collection of all the neurons in the network
TObjArray fFirstLayer; // Collection of the input neurons; subs et of fNetwork TObjArray fFirstLayer; // Collection of the input neurons; subs et of fNetwork
TObjArray fLastLayer; // Collection of the output neurons; sub set of fNetwork TObjArray fLastLayer; // Collection of the output neurons; sub set of fNetwork
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 TMutex.h   TMutex.h 
// @(#)root/thread:$Id: TMutex.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/thread:$Id: TMutex.h 29797 2009-08-17 14:35:51Z rdm $
// Author: Fons Rademakers 26/06/97 // Author: Fons Rademakers 26/06/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 42 skipping to change at line 42
#include "TMutexImp.h" #include "TMutexImp.h"
#endif #endif
class TMutex : public TVirtualMutex { class TMutex : public TVirtualMutex {
friend class TCondition; friend class TCondition;
friend class TThread; friend class TThread;
private: private:
TMutexImp *fMutexImp; // pointer to mutex implementation TMutexImp *fMutexImp; // pointer to mutex implementation
Long_t fId; // id of thread which locked mutex
Int_t fRef; // reference count in case of recursive locking
by same thread
TMutex(const TMutex&); // not implemented TMutex(const TMutex&); // not implemented
TMutex& operator=(const TMutex&); // not implemented TMutex& operator=(const TMutex&); // not implemented
public: public:
TMutex(Bool_t recursive = kFALSE); TMutex(Bool_t recursive = kFALSE);
virtual ~TMutex() { delete fMutexImp; } virtual ~TMutex() { delete fMutexImp; }
Int_t Lock(); Int_t Lock();
Int_t TryLock(); Int_t TryLock();
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added


 TMySQLResult.h   TMySQLResult.h 
// @(#)root/mysql:$Id: TMySQLResult.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/mysql:$Id: TMySQLResult.h 29976 2009-08-31 13:34:53Z rdm $
// Author: Fons Rademakers 15/02/2000 // Author: Fons Rademakers 15/02/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TMySQLResult #ifndef ROOT_TMySQLResult
#define ROOT_TMySQLResult #define ROOT_TMySQLResult
#ifndef ROOT_TSQLResult #ifndef ROOT_TSQLResult
#include "TSQLResult.h" #include "TSQLResult.h"
#endif #endif
#if !defined(__CINT__) #if !defined(__CINT__)
#ifdef R__WIN32 #ifdef R__WIN32
#include <winsock.h> #include <winsock2.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <mysql.h> #include <mysql.h>
#else #else
struct MYSQL_RES; struct MYSQL_RES;
struct MYSQL_FIELD; struct MYSQL_FIELD;
#endif #endif
class TMySQLResult : public TSQLResult { class TMySQLResult : public TSQLResult {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TMySQLRow.h   TMySQLRow.h 
// @(#)root/mysql:$Id: TMySQLRow.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/mysql:$Id: TMySQLRow.h 29976 2009-08-31 13:34:53Z rdm $
// Author: Fons Rademakers 15/02/2000 // Author: Fons Rademakers 15/02/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TMySQLRow #ifndef ROOT_TMySQLRow
#define ROOT_TMySQLRow #define ROOT_TMySQLRow
#ifndef ROOT_TSQLRow #ifndef ROOT_TSQLRow
#include "TSQLRow.h" #include "TSQLRow.h"
#endif #endif
#if !defined(__CINT__) #if !defined(__CINT__)
#ifdef R__WIN32 #ifdef R__WIN32
#include <winsock.h> #include <winsock2.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <mysql.h> #include <mysql.h>
#else #else
struct MYSQL_RES; struct MYSQL_RES;
typedef char **MYSQL_ROW; typedef char **MYSQL_ROW;
#endif #endif
class TMySQLRow : public TSQLRow { class TMySQLRow : public TSQLRow {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TMySQLServer.h   TMySQLServer.h 
// @(#)root/mysql:$Id: TMySQLServer.h 26487 2008-11-26 16:52:50Z rdm $ // @(#)root/mysql:$Id: TMySQLServer.h 29976 2009-08-31 13:34:53Z rdm $
// Author: Fons Rademakers 15/02/2000 // Author: Fons Rademakers 15/02/2000
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 53 skipping to change at line 53
// TSQLServer *db = TSQLServer::Connect("mysql://localhost/test", "tuser", "tpass"); // TSQLServer *db = TSQLServer::Connect("mysql://localhost/test", "tuser", "tpass");
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TSQLServer #ifndef ROOT_TSQLServer
#include "TSQLServer.h" #include "TSQLServer.h"
#endif #endif
#if !defined(__CINT__) #if !defined(__CINT__)
#ifdef R__WIN32 #ifdef R__WIN32
#include <winsock.h> #include <winsock2.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <mysql.h> #include <mysql.h>
#else #else
struct MYSQL; struct MYSQL;
#endif #endif
class TMySQLServer : public TSQLServer { class TMySQLServer : public TSQLServer {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TMySQLStatement.h   TMySQLStatement.h 
// @(#)root/mysql:$Id: TMySQLStatement.h 27302 2009-01-30 07:25:32Z brun $ // @(#)root/mysql:$Id: TMySQLStatement.h 29976 2009-08-31 13:34:53Z rdm $
// Author: Sergey Linev 6/02/2006 // Author: Sergey Linev 6/02/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TMySQLStatement #ifndef ROOT_TMySQLStatement
#define ROOT_TMySQLStatement #define ROOT_TMySQLStatement
#ifndef ROOT_TSQLStatement #ifndef ROOT_TSQLStatement
#include "TSQLStatement.h" #include "TSQLStatement.h"
#endif #endif
#if !defined(__CINT__) #if !defined(__CINT__)
#ifdef R__WIN32 #ifdef R__WIN32
#include <winsock.h> #include <winsock2.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <mysql.h> #include <mysql.h>
#if MYSQL_VERSION_ID < 40100 #if MYSQL_VERSION_ID < 40100
typedef struct { int dummy; } MYSQL_STMT; typedef struct { int dummy; } MYSQL_STMT;
typedef struct { int dummy; } MYSQL_BIND; typedef struct { int dummy; } MYSQL_BIND;
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TObjArray.h   TObjArray.h 
// @(#)root/cont:$Id: TObjArray.h 23198 2008-04-14 09:23:08Z rdm $ // @(#)root/cont:$Id: TObjArray.h 30137 2009-09-14 10:12:23Z rdm $
// Author: Fons Rademakers 11/09/95 // Author: Fons Rademakers 11/09/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 79 skipping to change at line 79
virtual void AddLast(TObject *obj); virtual void AddLast(TObject *obj);
virtual void AddAt(TObject *obj, Int_t idx); virtual void AddAt(TObject *obj, Int_t idx);
virtual void AddAtAndExpand(TObject *obj, Int_t idx); virtual void AddAtAndExpand(TObject *obj, Int_t idx);
virtual Int_t AddAtFree(TObject *obj); virtual Int_t AddAtFree(TObject *obj);
virtual void AddAfter(const TObject *after, TObject *obj); virtual void AddAfter(const TObject *after, TObject *obj);
virtual void AddBefore(const TObject *before, TObject *obj); virtual void AddBefore(const TObject *before, TObject *obj);
virtual TObject *FindObject(const char *name) const; virtual TObject *FindObject(const char *name) const;
virtual TObject *FindObject(const TObject *obj) const; virtual TObject *FindObject(const TObject *obj) const;
virtual TObject *RemoveAt(Int_t idx); virtual TObject *RemoveAt(Int_t idx);
virtual TObject *Remove(TObject *obj); virtual TObject *Remove(TObject *obj);
virtual void RemoveRange(Int_t idx1, Int_t idx2);
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
TObject *At(Int_t idx) const; TObject *At(Int_t idx) const;
TObject *UncheckedAt(Int_t i) const { return fCont[i-fLowerBound ]; } TObject *UncheckedAt(Int_t i) const { return fCont[i-fLowerBound ]; }
TObject *Before(const TObject *obj) const; TObject *Before(const TObject *obj) const;
TObject *After(const TObject *obj) const; TObject *After(const TObject *obj) const;
TObject *First() const; TObject *First() const;
TObject *Last() const; TObject *Last() const;
virtual TObject *&operator[](Int_t i); virtual TObject *&operator[](Int_t i);
virtual TObject *operator[](Int_t i) const; virtual TObject *operator[](Int_t i) const;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TOracleServer.h   TOracleServer.h 
// @(#)root/physics:$Id: TOracleServer.h 23102 2008-04-09 22:18:41Z pcanal $ // @(#)root/physics:$Id: TOracleServer.h 29321 2009-07-03 10:42:10Z brun $
// Author: Yan Liu and Shaowen Wang 23/11/04 // Author: Yan Liu and Shaowen Wang 23/11/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 41 skipping to change at line 41
class Connection; class Connection;
#endif #endif
class TOracleServer : public TSQLServer { class TOracleServer : public TSQLServer {
private: private:
Environment *fEnv; // environment of Oracle access Environment *fEnv; // environment of Oracle access
Connection *fConn; // connection to Oracle server Connection *fConn; // connection to Oracle server
TString fInfo; // info string with Oracle version information TString fInfo; // info string with Oracle version information
static const char* fgDatimeFormat; //! format for converting date and ti
me stamps into string
public: public:
TOracleServer(const char *db, const char *uid, const char *pw); TOracleServer(const char *db, const char *uid, const char *pw);
~TOracleServer(); ~TOracleServer();
void Close(Option_t *opt=""); void Close(Option_t *opt="");
TSQLResult *Query(const char *sql); TSQLResult *Query(const char *sql);
Bool_t Exec(const char* sql); Bool_t Exec(const char* sql);
TSQLStatement *Statement(const char *sql, Int_t niter = 100); TSQLStatement *Statement(const char *sql, Int_t niter = 100);
Bool_t IsConnected() const { return (fConn!=0) && (fEnv!=0); } Bool_t IsConnected() const { return (fConn!=0) && (fEnv!=0); }
Bool_t HasStatement() const { return kTRUE; } Bool_t HasStatement() const { return kTRUE; }
skipping to change at line 68 skipping to change at line 70
Int_t CreateDataBase(const char *dbname); Int_t CreateDataBase(const char *dbname);
Int_t DropDataBase(const char *dbname); Int_t DropDataBase(const char *dbname);
Int_t Reload(); Int_t Reload();
Int_t Shutdown(); Int_t Shutdown();
const char *ServerInfo(); const char *ServerInfo();
Bool_t StartTransaction(); Bool_t StartTransaction();
Bool_t Commit(); Bool_t Commit();
Bool_t Rollback(); Bool_t Rollback();
static void SetDatimeFormat(const char* fmt = "MM/DD/YYYY, HH24:M
I:SS");
static const char* GetDatimeFormat();
ClassDef(TOracleServer,0) // Connection to Oracle server ClassDef(TOracleServer,0) // Connection to Oracle server
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 8 lines changed or added


 TPad.h   TPad.h 
// @(#)root/gpad:$Id: TPad.h 28464 2009-05-06 12:37:21Z brun $ // @(#)root/gpad:$Id: TPad.h 29712 2009-08-07 08:00:45Z brun $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 132 skipping to change at line 132
void DestroyExternalViewer3D(); void DestroyExternalViewer3D();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void HideToolTip(Int_t event); virtual void HideToolTip(Int_t event);
void PaintBorder(Color_t color, Bool_t tops); void PaintBorder(Color_t color, Bool_t tops);
virtual void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light); virtual void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light);
void PaintDate(); void PaintDate();
virtual void SavePrimitive(ostream &out, Option_t *option = ""); virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetBatch(Bool_t batch=kTRUE); virtual void SetBatch(Bool_t batch=kTRUE);
TVirtualPadPainter *GetPainter();
private: private:
TPad(const TPad &pad); // cannot copy pads, use TObject::Clone() TPad(const TPad &pad); // cannot copy pads, use TObject::Clone()
TPad &operator=(const TPad &rhs); // idem TPad &operator=(const TPad &rhs); // idem
void CopyBackgroundPixmap(Int_t x, Int_t y); void CopyBackgroundPixmap(Int_t x, Int_t y);
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y); void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y);
public: public:
// TPad status bits // TPad status bits
enum { enum {
skipping to change at line 193 skipping to change at line 192
/// void DrawText(Double_t x, Double_t y, const char *text); /// void DrawText(Double_t x, Double_t y, const char *text);
/// void DrawTextNDC(Double_t u, Double_t v, const char *tex t); /// void DrawTextNDC(Double_t u, Double_t v, const char *tex t);
virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxi s *axis); virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxi s *axis);
virtual TObject *FindObject(const char *name) const; virtual TObject *FindObject(const char *name) const;
virtual TObject *FindObject(const TObject *obj) const; virtual TObject *FindObject(const TObject *obj) const;
virtual void UseCurrentStyle(); // *MENU* virtual void UseCurrentStyle(); // *MENU*
virtual Short_t GetBorderMode() const { return fBorderMode;} virtual Short_t GetBorderMode() const { return fBorderMode;}
virtual Short_t GetBorderSize() const { return fBorderSize;} virtual Short_t GetBorderSize() const { return fBorderSize;}
Int_t GetCrosshair() const; Int_t GetCrosshair() const;
virtual Int_t GetCanvasID() const; virtual Int_t GetCanvasID() const;
virtual TCanvasImp *GetCanvasImp() const;
TFrame *GetFrame(); TFrame *GetFrame();
virtual Int_t GetEvent() const; virtual Int_t GetEvent() const;
virtual Int_t GetEventX() const; virtual Int_t GetEventX() const;
virtual Int_t GetEventY() const; virtual Int_t GetEventY() const;
virtual Color_t GetHighLightColor() const; virtual Color_t GetHighLightColor() const;
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Dou ble_t &y2); virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Dou ble_t &y2);
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax); virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax);
virtual void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xu p, Double_t &yup); virtual void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xu p, Double_t &yup);
Double_t GetXlowNDC() const {return fXlowNDC;} Double_t GetXlowNDC() const {return fXlowNDC;}
Double_t GetYlowNDC() const {return fYlowNDC;} Double_t GetYlowNDC() const {return fYlowNDC;}
skipping to change at line 247 skipping to change at line 247
TView *GetView() const {return fView;} TView *GetView() const {return fView;}
TObject *GetView3D() const {return fPadView3D;}// Return 3D Vie w of this TPad TObject *GetView3D() const {return fPadView3D;}// Return 3D Vie w of this TPad
Int_t GetLogx() const {return fLogx;} Int_t GetLogx() const {return fLogx;}
Int_t GetLogy() const {return fLogy;} Int_t GetLogy() const {return fLogy;}
Int_t GetLogz() const {return fLogz;} Int_t GetLogz() const {return fLogz;}
virtual TVirtualPad *GetMother() const {return fMother;} virtual TVirtualPad *GetMother() const {return fMother;}
const char *GetName() const {return fName.Data();} const char *GetName() const {return fName.Data();}
const char *GetTitle() const {return fTitle.Data();} const char *GetTitle() const {return fTitle.Data();}
virtual TCanvas *GetCanvas() const { return fCanvas; } virtual TCanvas *GetCanvas() const { return fCanvas; }
virtual TVirtualPad *GetVirtCanvas() const ; virtual TVirtualPad *GetVirtCanvas() const ;
virtual TVirtualPadPainter *GetPainter();
Int_t GetPadPaint() const {return fPadPaint;} Int_t GetPadPaint() const {return fPadPaint;}
Int_t GetPixmapID() const {return fPixmapID;} Int_t GetPixmapID() const {return fPixmapID;}
ULong_t Hash() const { return fName.Hash(); } ULong_t Hash() const { return fName.Hash(); }
virtual Bool_t HasCrosshair() const; virtual Bool_t HasCrosshair() const;
void HighLight(Color_t col=kRed, Bool_t set=kTRUE); void HighLight(Color_t col=kRed, Bool_t set=kTRUE);
Bool_t HasFixedAspectRatio() const { return fFixedAspectRatio ; } Bool_t HasFixedAspectRatio() const { return fFixedAspectRatio ; }
virtual Bool_t IsBatch() const; virtual Bool_t IsBatch() const;
virtual Bool_t IsEditable() const {return fEditable;} virtual Bool_t IsEditable() const {return fEditable;}
Bool_t IsFolder() const {return kTRUE;} Bool_t IsFolder() const {return kTRUE;}
Bool_t IsModified() const {return fModified;} Bool_t IsModified() const {return fModified;}
 End of changes. 4 change blocks. 
2 lines changed or deleted 3 lines changed or added


 TPosixMutex.h   TPosixMutex.h 
// @(#)root/thread:$Id: TPosixMutex.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/thread:$Id: TPosixMutex.h 29797 2009-08-17 14:35:51Z rdm $
// Author: Fons Rademakers 25/06/97 // Author: Fons Rademakers 25/06/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 41 skipping to change at line 41
#endif #endif
class TPosixMutex : public TMutexImp { class TPosixMutex : public TMutexImp {
friend class TPosixCondition; friend class TPosixCondition;
private: private:
pthread_mutex_t fMutex; // the pthread mutex pthread_mutex_t fMutex; // the pthread mutex
public: public:
TPosixMutex(); TPosixMutex(Bool_t recursive=kFALSE);
virtual ~TPosixMutex(); virtual ~TPosixMutex();
Int_t Lock(); Int_t Lock();
Int_t UnLock(); Int_t UnLock();
Int_t TryLock(); Int_t TryLock();
ClassDef(TPosixMutex,0) // Posix mutex lock ClassDef(TPosixMutex,0) // Posix mutex lock
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TPosixThreadFactory.h   TPosixThreadFactory.h 
// @(#)root/thread:$Id: TPosixThreadFactory.h 20882 2007-11-19 11:31:26Z rd m $ // @(#)root/thread:$Id: TPosixThreadFactory.h 29797 2009-08-17 14:35:51Z rd m $
// Author: Fons Rademakers 01/07/97 // Author: Fons Rademakers 01/07/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 37 skipping to change at line 37
class TMutexImp; class TMutexImp;
class TConditionImp; class TConditionImp;
class TThreadImp; class TThreadImp;
class TPosixThreadFactory : public TThreadFactory { class TPosixThreadFactory : public TThreadFactory {
public: public:
TPosixThreadFactory(const char *name = "Posix", const char *title = "Pos ix Thread Factory"); TPosixThreadFactory(const char *name = "Posix", const char *title = "Pos ix Thread Factory");
virtual ~TPosixThreadFactory() { } virtual ~TPosixThreadFactory() { }
virtual TMutexImp *CreateMutexImp(); virtual TMutexImp *CreateMutexImp(Bool_t recursive);
virtual TConditionImp *CreateConditionImp(TMutexImp *m); virtual TConditionImp *CreateConditionImp(TMutexImp *m);
virtual TThreadImp *CreateThreadImp(); virtual TThreadImp *CreateThreadImp();
ClassDef(TPosixThreadFactory,0) // Posix thread factory ClassDef(TPosixThreadFactory,0) // Posix thread factory
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TProof.h   TProof.h 
// @(#)root/proof:$Id: TProof.h 29133 2009-06-22 12:28:50Z brun $ // @(#)root/proof:$Id: TProof.h 30174 2009-09-15 14:24:56Z ganis $
// Author: Fons Rademakers 13/02/97 // Author: Fons Rademakers 13/02/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 119 skipping to change at line 119
// 15 -> 16: add support for generic non-data based processing // 15 -> 16: add support for generic non-data based processing
// 16 -> 17: new dataset handling system; support for TFileCollection proce ssing // 16 -> 17: new dataset handling system; support for TFileCollection proce ssing
// 17 -> 18: support for reconnection on daemon restarts // 17 -> 18: support for reconnection on daemon restarts
// 18 -> 19: TProofProgressStatus used in kPROOF_PROGRESS, kPROOF_STOPPROCE SS // 18 -> 19: TProofProgressStatus used in kPROOF_PROGRESS, kPROOF_STOPPROCE SS
// and kPROOF_GETNEXTPACKET messages in Master - worker communica tion // and kPROOF_GETNEXTPACKET messages in Master - worker communica tion
// 19 -> 20: Fix the asynchronous mode (required changes in some messages) // 19 -> 20: Fix the asynchronous mode (required changes in some messages)
// 20 -> 21: Add support for session queuing // 20 -> 21: Add support for session queuing
// 21 -> 22: Add support for switching from sync to async while running ('C trl-Z' functionality) // 21 -> 22: Add support for switching from sync to async while running ('C trl-Z' functionality)
// 22 -> 23: New dataset features (default tree name; classification per fi leserver) // 22 -> 23: New dataset features (default tree name; classification per fi leserver)
// 23 -> 24: Merging optimization // 23 -> 24: Merging optimization
// 24 -> 25: Handling of 'data' dir; group information
// PROOF magic constants // PROOF magic constants
const Int_t kPROOF_Protocol = 24; // protocol versi on number const Int_t kPROOF_Protocol = 25; // protocol versi on number
const Int_t kPROOF_Port = 1093; // IANA registere d PROOF port const Int_t kPROOF_Port = 1093; // IANA registere d PROOF port
const char* const kPROOF_ConfFile = "proof.conf"; // default config file const char* const kPROOF_ConfFile = "proof.conf"; // default config file
const char* const kPROOF_ConfDir = "/usr/local/root"; // default c onfig dir const char* const kPROOF_ConfDir = "/usr/local/root"; // default c onfig dir
const char* const kPROOF_WorkDir = ".proof"; // default workin g directory const char* const kPROOF_WorkDir = ".proof"; // default workin g directory
const char* const kPROOF_CacheDir = "cache"; // file cache dir , under WorkDir const char* const kPROOF_CacheDir = "cache"; // file cache dir , under WorkDir
const char* const kPROOF_PackDir = "packages"; // package dir, u nder WorkDir const char* const kPROOF_PackDir = "packages"; // package dir, u nder WorkDir
const char* const kPROOF_QueryDir = "queries"; // query dir, und er WorkDir const char* const kPROOF_QueryDir = "queries"; // query dir, und er WorkDir
const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u nder WorkDir const char* const kPROOF_DataSetDir = "datasets"; // dataset dir, u nder WorkDir
const char* const kPROOF_DataDir = "data"; // dir for produc ed data, under WorkDir
const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache lock file const char* const kPROOF_CacheLockFile = "proof-cache-lock-"; // cache lock file
const char* const kPROOF_PackageLockFile = "proof-package-lock-"; // packag e lock file const char* const kPROOF_PackageLockFile = "proof-package-lock-"; // packag e lock file
const char* const kPROOF_QueryLockFile = "proof-query-lock-"; // query lock file const char* const kPROOF_QueryLockFile = "proof-query-lock-"; // query lock file
const char* const kPROOF_TerminateWorker = "+++ terminating +++"; // signal worker termination in MarkBad const char* const kPROOF_TerminateWorker = "+++ terminating +++"; // signal worker termination in MarkBad
const char* const kPROOF_InputDataFile = "inputdata.root"; // Defaul t input data file name const char* const kPROOF_InputDataFile = "inputdata.root"; // Defaul t input data file name
#ifndef R__WIN32 #ifndef R__WIN32
const char* const kCP = "/bin/cp -fp"; const char* const kCP = "/bin/cp -fp";
const char* const kRM = "/bin/rm -rf"; const char* const kRM = "/bin/rm -rf";
const char* const kLS = "/bin/ls -l"; const char* const kLS = "/bin/ls -l";
skipping to change at line 361 skipping to change at line 363
enum EBuildPackageOpt { enum EBuildPackageOpt {
kDontBuildOnClient = -2, kDontBuildOnClient = -2,
kBuildOnSlavesNoWait = -1, kBuildOnSlavesNoWait = -1,
kBuildAll = 0, kBuildAll = 0,
kCollectBuildResults = 1 kCollectBuildResults = 1
}; };
enum EProofShowQuotaOpt { enum EProofShowQuotaOpt {
kPerGroup = 0x1, kPerGroup = 0x1,
kPerUser = 0x2 kPerUser = 0x2
}; };
enum EProofClearData {
kPurge = 0x1,
kUnregistered = 0x2,
kDataset = 0x4,
kForceClear = 0x8
};
Bool_t fValid; //is this a valid proof object Bool_t fValid; //is this a valid proof object
TString fMaster; //master server ("" if a master); used in the browser TString fMaster; //master server ("" if a master); used in the browser
TString fWorkDir; //current work directory on remote ser vers TString fWorkDir; //current work directory on remote ser vers
TString fGroup; //PROOF group of this user
Int_t fLogLevel; //server debug logging level Int_t fLogLevel; //server debug logging level
Int_t fStatus; //remote return status (part of kPROOF _LOGDONE) Int_t fStatus; //remote return status (part of kPROOF _LOGDONE)
Int_t fCheckFileStatus; //remote return status after kPROOF_CH ECKFILE Int_t fCheckFileStatus; //remote return status after kPROOF_CH ECKFILE
TList *fRecvMessages; //Messages received during collect not yet processed TList *fRecvMessages; //Messages received during collect not yet processed
TList *fSlaveInfo; //!list returned by kPROOF_GETSLAVEINF O TList *fSlaveInfo; //!list returned by kPROOF_GETSLAVEINF O
Bool_t fSendGroupView; //if true send new group view Bool_t fSendGroupView; //if true send new group view
TList *fActiveSlaves; //list of active slaves (subset of all slaves) TList *fActiveSlaves; //list of active slaves (subset of all slaves)
TList *fInactiveSlaves; //list of inactive slaves (good but no t used for processing) TList *fInactiveSlaves; //list of inactive slaves (good but no t used for processing)
TList *fUniqueSlaves; //list of all active slaves with uniqu e file systems TList *fUniqueSlaves; //list of all active slaves with uniqu e file systems
TList *fAllUniqueSlaves; //list of all active slaves with uniq ue file systems, including all submasters TList *fAllUniqueSlaves; //list of all active slaves with uniq ue file systems, including all submasters
skipping to change at line 562 skipping to change at line 571
void DeActivateAsyncInput(); void DeActivateAsyncInput();
Int_t GetQueryReference(Int_t qry, TString &ref); Int_t GetQueryReference(Int_t qry, TString &ref);
void PrintProgress(Long64_t total, Long64_t processed, Float_t procT ime = -1.); void PrintProgress(Long64_t total, Long64_t processed, Float_t procT ime = -1.);
void ResetMergePrg(); void ResetMergePrg();
void ParseConfigField(const char *config); void ParseConfigField(const char *config);
Bool_t Prompt(const char *p);
void ClearDataProgress(Int_t r, Int_t t);
protected: protected:
TProof(); // For derived classes to use TProof(); // For derived classes to use
Int_t Init(const char *masterurl, const char *conffile, Int_t Init(const char *masterurl, const char *conffile,
const char *confdir, Int_t loglevel, const char *confdir, Int_t loglevel,
const char *alias = 0); const char *alias = 0);
virtual Bool_t StartSlaves(Bool_t attach = kFALSE); virtual Bool_t StartSlaves(Bool_t attach = kFALSE);
Int_t AddWorkers(TList *wrks); Int_t AddWorkers(TList *wrks);
Int_t RemoveWorkers(TList *wrks); Int_t RemoveWorkers(TList *wrks);
void SetPlayer(TVirtualProofPlayer *player); void SetPlayer(TVirtualProofPlayer *player);
skipping to change at line 717 skipping to change at line 729
virtual Bool_t ExistsDataSet(const char *dataset); virtual Bool_t ExistsDataSet(const char *dataset);
void ShowDataSet(const char *dataset = "", const char* opt = "M") ; void ShowDataSet(const char *dataset = "", const char* opt = "M") ;
virtual Int_t RemoveDataSet(const char *dataset, const char* optStr = "" ); virtual Int_t RemoveDataSet(const char *dataset, const char* optStr = "" );
virtual Int_t VerifyDataSet(const char *dataset, const char* optStr = "" ); virtual Int_t VerifyDataSet(const char *dataset, const char* optStr = "" );
virtual TFileCollection *GetDataSet(const char *dataset, const char* opt Str = ""); virtual TFileCollection *GetDataSet(const char *dataset, const char* opt Str = "");
TList *FindDataSets(const char *searchString, const char* optStr = ""); TList *FindDataSets(const char *searchString, const char* optStr = "");
virtual Int_t SetDataSetTreeName( const char *dataset, const char *treen ame); virtual Int_t SetDataSetTreeName( const char *dataset, const char *treen ame);
void ShowData();
void ClearData(UInt_t what = kUnregistered, const char *dsname =
0);
const char *GetMaster() const { return fMaster; } const char *GetMaster() const { return fMaster; }
const char *GetConfDir() const { return fConfDir; } const char *GetConfDir() const { return fConfDir; }
const char *GetConfFile() const { return fConfFile; } const char *GetConfFile() const { return fConfFile; }
const char *GetUser() const { return fUrl.GetUser(); } const char *GetUser() const { return fUrl.GetUser(); }
const char *GetGroup() const { return fGroup; }
const char *GetWorkDir() const { return fWorkDir; } const char *GetWorkDir() const { return fWorkDir; }
const char *GetSessionTag() const { return GetName(); } const char *GetSessionTag() const { return GetName(); }
const char *GetImage() const { return fImage; } const char *GetImage() const { return fImage; }
const char *GetUrl() { return fUrl.GetUrl(); } const char *GetUrl() { return fUrl.GetUrl(); }
Int_t GetPort() const { return fUrl.GetPort(); } Int_t GetPort() const { return fUrl.GetPort(); }
Int_t GetRemoteProtocol() const { return fProtocol; } Int_t GetRemoteProtocol() const { return fProtocol; }
Int_t GetClientProtocol() const { return kPROOF_Protocol; } Int_t GetClientProtocol() const { return kPROOF_Protocol; }
Int_t GetStatus() const { return fStatus; } Int_t GetStatus() const { return fStatus; }
Int_t GetLogLevel() const { return fLogLevel; } Int_t GetLogLevel() const { return fLogLevel; }
Int_t GetParallel() const; Int_t GetParallel() const;
 End of changes. 9 change blocks. 
2 lines changed or deleted 19 lines changed or added


 TProofChain.h   TProofChain.h 
// @(#)root/proof:$Id: TProofChain.h 26399 2008-11-24 01:44:18Z rdm $ // @(#)root/proof:$Id: TProofChain.h 30069 2009-09-08 15:23:21Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TProofChain #ifndef ROOT_TProofChain
#define ROOT_TProofChain #define ROOT_TProofChain
skipping to change at line 29 skipping to change at line 29
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TChain #ifndef ROOT_TChain
#include "TChain.h" #include "TChain.h"
#endif #endif
class TDSet; class TDSet;
class TDrawFeedback; class TDrawFeedback;
class TList; class TList;
class TProof;
class TProofChain : public TChain { class TProofChain : public TChain {
public: public:
// TProofChain constants // TProofChain constants
enum { kOwnsChain = BIT(19) }; enum { kOwnsChain = BIT(19) };
private:
void FillDrawAttributes(TProof *p);
protected: protected:
TChain *fChain; // mother chain: needed for the browsi ng list TChain *fChain; // mother chain: needed for the browsi ng list
TDSet *fSet; // TDSet TDSet *fSet; // TDSet
TDrawFeedback *fDrawFeedback; // feedback handler TDrawFeedback *fDrawFeedback; // feedback handler
public: public:
TProofChain(); TProofChain();
TProofChain(TChain *chain, Bool_t gettreeheader); TProofChain(TChain *chain, Bool_t gettreeheader);
TProofChain(TDSet *dset, Bool_t gettreeheader); TProofChain(TDSet *dset, Bool_t gettreeheader);
virtual ~TProofChain(); virtual ~TProofChain();
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TProofDebug.h   TProofDebug.h 
// @(#)root/proof:$Id: TProofDebug.h 24701 2008-07-08 09:29:33Z ganis $ // @(#)root/proof:$Id: TProofDebug.h 30174 2009-09-15 14:24:56Z ganis $
// Author: Maarten Ballintijn 19/6/2002 // Author: Maarten Ballintijn 19/6/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 43 skipping to change at line 43
kSelector = 4, kSelector = 4,
kOutput = 8, kOutput = 8,
kInput = 16, kInput = 16,
kGlobal = 32, kGlobal = 32,
kPackage = 64, kPackage = 64,
kFeedback = 128, kFeedback = 128,
kCondor = 256, kCondor = 256,
kDraw = 512, kDraw = 512,
kAsyn = 1024, kAsyn = 1024,
kCache = 2048, kCache = 2048,
kCollect = 4096,
kDataset = 8192,
kAll = 0xFFFFFFFF kAll = 0xFFFFFFFF
}; };
}; };
R__EXTERN TProofDebug::EProofDebugMask gProofDebugMask; R__EXTERN TProofDebug::EProofDebugMask gProofDebugMask;
R__EXTERN Int_t gProofDebugLevel; R__EXTERN Int_t gProofDebugLevel;
#define PDB(mask,level) \ #define PDB(mask,level) \
if ((TProofDebug::mask & gProofDebugMask) && gProofDebugLevel >= (level) ) if ((TProofDebug::mask & gProofDebugMask) && gProofDebugLevel >= (level) )
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TProofDraw.h   TProofDraw.h 
// @(#)root/proofplayer:$Id: TProofDraw.h 27345 2009-02-04 10:00:29Z ganis $ // @(#)root/proofplayer:$Id: TProofDraw.h 30068 2009-09-08 15:19:38Z ganis $
// Author: Maarten Ballintijn 24/09/2003 // Author: Maarten Ballintijn 24/09/2003
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 72 skipping to change at line 72
TString fInitialExp; TString fInitialExp;
TTreeFormulaManager *fManager; TTreeFormulaManager *fManager;
TTree *fTree; TTree *fTree;
TTreeFormula *fVar[4]; // Pointer to variable formula TTreeFormula *fVar[4]; // Pointer to variable formula
TTreeFormula *fSelect; // Pointer to selection formula TTreeFormula *fSelect; // Pointer to selection formula
Int_t fMultiplicity; // Indicator of the variability o f the size of entries Int_t fMultiplicity; // Indicator of the variability o f the size of entries
Bool_t fObjEval; // true if fVar1 returns an objec t (or pointer to). Bool_t fObjEval; // true if fVar1 returns an objec t (or pointer to).
Int_t fDimension; // Dimension of the current expre ssion Int_t fDimension; // Dimension of the current expre ssion
void SetCanvas(const char *objname); void SetCanvas(const char *objname);
void SetDrawAtt(TObject *o);
void SetError(const char *sub, const char *mesg); void SetError(const char *sub, const char *mesg);
protected: protected:
enum { kWarn = BIT(12) }; enum { kWarn = BIT(12) };
virtual Bool_t CompileVariables(); virtual Bool_t CompileVariables();
virtual void ClearFormula(); virtual void ClearFormula();
virtual Bool_t ProcessSingle(Long64_t /*entry*/, Int_t /*i*/); virtual Bool_t ProcessSingle(Long64_t /*entry*/, Int_t /*i*/);
virtual void DoFill(Long64_t entry, Double_t w, const Double_t *v ) = 0; virtual void DoFill(Long64_t entry, Double_t w, const Double_t *v ) = 0;
virtual void DefVar() = 0; virtual void DefVar() = 0;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TProofMgr.h   TProofMgr.h 
// @(#)root/proof:$Id: TProofMgr.h 28746 2009-05-28 13:03:29Z ganis $ // @(#)root/proof:$Id: TProofMgr.h 30171 2009-09-15 13:43:12Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TProofMgr #ifndef ROOT_TProofMgr
#define ROOT_TProofMgr #define ROOT_TProofMgr
skipping to change at line 30 skipping to change at line 30
// At most one manager instance per server is allowed. // // At most one manager instance per server is allowed. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
#ifndef ROOT_TUrl #ifndef ROOT_TUrl
#include "TUrl.h" #include "TUrl.h"
#endif #endif
#ifndef ROOT_TSystem
#include "TSystem.h"
#endif
class TList; class TList;
class TObjString; class TObjString;
class TProof; class TProof;
class TProofDesc; class TProofDesc;
class TProofLog; class TProofLog;
class TProofMgr; class TProofMgr;
class TSignalHandler;
typedef TProofMgr *(*TProofMgr_t)(const char *, Int_t, const char *); typedef TProofMgr *(*TProofMgr_t)(const char *, Int_t, const char *);
class TProofMgr : public TNamed { class TProofMgr : public TNamed {
public: public:
enum EServType { kProofd = 0, kXProofd = 1, kProofLite = 2 }; enum EServType { kProofd = 0, kXProofd = 1, kProofLite = 2 };
private: private:
TProofMgr(const TProofMgr&); // Not implemented TProofMgr(const TProofMgr&); // Not implemented
skipping to change at line 58 skipping to change at line 62
static TProofMgr_t fgTXProofMgrHook; // Constructor hooks for TXProofMgr static TProofMgr_t fgTXProofMgrHook; // Constructor hooks for TXProofMgr
static TProofMgr_t GetXProofMgrHook(); static TProofMgr_t GetXProofMgrHook();
protected: protected:
Int_t fRemoteProtocol; // Protocol number run by the daemon ser ver Int_t fRemoteProtocol; // Protocol number run by the daemon ser ver
EServType fServType; // Type of server: old-proofd, XrdProofd EServType fServType; // Type of server: old-proofd, XrdProofd
TList *fSessions; // PROOF session managed by this server TList *fSessions; // PROOF session managed by this server
TUrl fUrl; // Server URL TUrl fUrl; // Server URL
TSignalHandler *fIntHandler; // Interrupt signal handler (ctrl-c)
static TList fgListOfManagers; // Sub-list of TROOT::ListOfProofs for managers static TList fgListOfManagers; // Sub-list of TROOT::ListOfProofs for managers
TProofMgr() : fRemoteProtocol(-1), TProofMgr() : fRemoteProtocol(-1),
fServType(kXProofd), fSessions(0), fUrl() { } fServType(kXProofd), fSessions(0), fUrl() { }
public: public:
TProofMgr(const char *url, Int_t loglevel = -1, const char *alias = ""); TProofMgr(const char *url, Int_t loglevel = -1, const char *alias = "");
virtual ~TProofMgr(); virtual ~TProofMgr();
virtual Bool_t IsLite() const { return (fServType == kProofLite); } virtual Bool_t IsLite() const { return (fServType == kProofLite); }
skipping to change at line 99 skipping to change at line 105
{ return (TObjString *)0; } { return (TObjString *)0; }
virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0);
virtual void ShowWorkers(); virtual void ShowWorkers();
virtual Int_t SendMsgToUsers(const char *, const char * = 0); virtual Int_t SendMsgToUsers(const char *, const char * = 0);
virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); } virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); }
virtual void SetROOTVersion(const char *) { } virtual void SetROOTVersion(const char *) { }
virtual void ShowROOTVersions() { } virtual void ShowROOTVersions() { }
virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); }
virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); } virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); }
// Remote file system actions
virtual Int_t Cp(const char *, const char * = 0, const char * = 0)
{ return -1; }
virtual void Find(const char * = "~/", const char * = 0, const ch
ar * = 0) { }
virtual void Grep(const char *, const char * = 0, const char * =
0) { }
virtual void Ls(const char * = "~/", const char * = 0, const char
* = 0) { }
virtual void More(const char *, const char * = 0, const char * =
0) { }
virtual Int_t Rm(const char *, const char * = 0, const char * = 0)
{ return -1; }
virtual void Tail(const char *, const char * = 0, const char * =
0) { }
virtual Int_t Md5sum(const char *, TString &, const char * = 0) {
return -1; }
virtual Int_t Stat(const char *, FileStat_t &, const char * = 0) {
return -1; }
virtual Int_t GetFile(const char *, const char *, const char * = 0
) { return -1; }
virtual Int_t PutFile(const char *, const char *, const char * = 0
) { return -1; }
static TList *GetListOfManagers(); static TList *GetListOfManagers();
static void SetTXProofMgrHook(TProofMgr_t pmh); static void SetTXProofMgrHook(TProofMgr_t pmh);
static TProofMgr *Create(const char *url, Int_t loglevel = -1, static TProofMgr *Create(const char *url, Int_t loglevel = -1,
const char *alias = 0, Bool_t xpd = kTRU E); const char *alias = 0, Bool_t xpd = kTRU E);
ClassDef(TProofMgr,0) // Abstract PROOF manager interface ClassDef(TProofMgr,0) // Abstract PROOF manager interface
}; };
 End of changes. 5 change blocks. 
1 lines changed or deleted 32 lines changed or added


 TProofOutputFile.h   TProofOutputFile.h 
// @(#)root/proof:$Id: TProofOutputFile.h 25949 2008-10-24 18:03:49Z ganis $ // @(#)root/proof:$Id: TProofOutputFile.h 30174 2009-09-15 14:24:56Z ganis $
// Author: Long Tran-Thanh 14/09/07 // Author: Long Tran-Thanh 14/09/07
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 32 skipping to change at line 32
#ifndef ROOT_TNamed #ifndef ROOT_TNamed
#include "TNamed.h" #include "TNamed.h"
#endif #endif
class TCollection; class TCollection;
class TProofOutputFile; class TProofOutputFile;
class TString; class TString;
class TList; class TList;
class TFile; class TFile;
class TFileCollection;
class TFileMerger; class TFileMerger;
class TProofOutputFile : public TNamed { class TProofOutputFile : public TNamed {
friend class TProof; friend class TProof;
friend class TProofPlayer; friend class TProofPlayer;
public: public:
enum ERunType { kMerge = 1, // Type of run: merge or datase
t creation
kDataset = 2};
enum ETypeOpt { kRemote = 1, // Merge from original copies
kLocal = 2, // Make local copies before mer
ging
kCreate = 4, // Create dataset
kRegister = 8, // Register dataset
kOverwrite = 16, // Force dataset replacement du
ring registration
kVerify = 32}; // Verify the registered datase
t
private: private:
TProofOutputFile(const TProofOutputFile&); // Not implemented TProofOutputFile(const TProofOutputFile&); // Not implemented
TProofOutputFile& operator=(const TProofOutputFile&); // Not implemented TProofOutputFile& operator=(const TProofOutputFile&); // Not implemented
TString fDir; // name of the directory TString fDir; // name of the directory to be exported
TString fRawDir; // name of the local directory where to create
the file
TString fFileName; TString fFileName;
TString fFileName1;
TString fLocation;
TString fMode;
TString fOutputFileName; TString fOutputFileName;
TString fWorkerOrdinal; TString fWorkerOrdinal;
TString fLocalHost; // Host where the file was created
Bool_t fIsLocal; // kTRUE if the file is in the sandbox Bool_t fIsLocal; // kTRUE if the file is in the sandbox
Bool_t fMerged; Bool_t fMerged;
ERunType fRunType; // Type of run (see enum ERunType)
UInt_t fTypeOpt; // Option (see enum ETypeOpt)
TFileMerger *fMerger; // Instance of the file merger for mode "CENTRAL" TFileCollection *fDataSet; // Instance of the file collection in 'datas
et' mode
TFileMerger *fMerger; // Instance of the file merger in 'merge' mode
TString GetTmpName(const char* name); void Init(const char *path, const char *dsname);
void ResolveKeywords(TString &fname);
void SetFileName(const char* name); void SetFileName(const char* name);
void SetDir(const char* dir) { fDir = dir; } void SetDir(const char* dir) { fDir = dir; }
void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; } void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; }
void AddFile(TFileMerger *merger, const char *path); void AddFile(TFileMerger *merger, const char *path);
void NotifyError(const char *errmsg); void NotifyError(const char *errmsg);
void Unlink(const char *path); void Unlink(const char *path);
protected: protected:
public: public:
TProofOutputFile() : fDir(), fFileName(), fFileName1(), fLocation(), TProofOutputFile() : fIsLocal(kFALSE), fMerged(kFALSE), fRunType(kMerge)
fMode(), fOutputFileName(), fWorkerOrdinal(), fIsLocal(kFALSE), fMerge , fTypeOpt(kRemote), fDataSet(0), fMerger(0) { }
d(kFALSE), TProofOutputFile(const char *path, const char *option = "M", const char
fMerger(0) {} *dsname = 0);
TProofOutputFile(const char *path, ERunType type, UInt_t opt = kRemote,
TProofOutputFile(const char* path, const char *dsname = 0);
const char* location = "REMOTE", const char* mode = "CE
NTRAL");
virtual ~TProofOutputFile(); virtual ~TProofOutputFile();
const char* GetDir() const { return fDir; } const char *GetDir(Bool_t raw = kFALSE) const { return (raw) ? fRawDir :
TFileMerger* GetFileMerger(Bool_t local = kFALSE); // Instance of the fi fDir; }
le merger for mode "CENTRAL" TFileCollection *GetFileCollection();
const char* GetFileName(Bool_t tmpName = kTRUE) const { return (tmpName) TFileMerger *GetFileMerger(Bool_t local = kFALSE);
? fFileName1 : fFileName; } const char *GetFileName() const { return fFileName; }
const char* GetLocation() const { return fLocation; } const char *GetLocalHost() const { return fLocalHost; }
const char* GetMode() const { return fMode; } const char *GetOutputFileName() const { return fOutputFileName; }
const char* GetOutputFileName() const { return fOutputFileName; } const char *GetWorkerOrdinal() const { return fWorkerOrdinal; }
const char* GetWorkerOrdinal() const { return fWorkerOrdinal; }
ERunType GetRunType() const { return fRunType; }
UInt_t GetTypeOpt() const { return fTypeOpt; }
Bool_t IsMerge() const { return (fRunType == kMerge) ? kTRUE : kFAL
SE; }
Bool_t IsRegister() const { return ((fTypeOpt & kRegister) || (fTyp
eOpt & kVerify)) ? kTRUE : kFALSE; }
Int_t AdoptFile(TFile *f); // Adopt a TFile already o pen Int_t AdoptFile(TFile *f); // Adopt a TFile already o pen
TFile* OpenFile(const char* opt); // Open a file with the sp TFile* OpenFile(const char *opt); // Open a file with the sp
ecified name in fFileName1 ecified name in fFileName1
Long64_t Merge(TCollection* list); Long64_t Merge(TCollection *list);
void Print(Option_t *option="") const; void Print(Option_t *option = "") const;
void SetOutputFileName(const char *name); void SetOutputFileName(const char *name);
void ResetFileCollection() { fDataSet = 0; }
ClassDef(TProofOutputFile,1) // Wrapper class to steer the merging of fi les produced on workers ClassDef(TProofOutputFile,3) // Wrapper class to steer the merging of fi les produced on workers
}; };
#endif #endif
 End of changes. 14 change blocks. 
31 lines changed or deleted 51 lines changed or added


 TProofPlayer.h   TProofPlayer.h 
// @(#)root/proofplayer:$Id: TProofPlayer.h 27234 2009-01-26 07:57:14Z gani s $ // @(#)root/proofplayer:$Id: TProofPlayer.h 30174 2009-09-15 14:24:56Z gani s $
// Author: Maarten Ballintijn 07/01/02 // Author: Maarten Ballintijn 07/01/02
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 67 skipping to change at line 67
class TSelector; class TSelector;
class TProof; class TProof;
class TSocket; class TSocket;
class TVirtualPacketizer; class TVirtualPacketizer;
class TSlave; class TSlave;
class TEventIter; class TEventIter;
class TProofStats; class TProofStats;
class TMutex; class TMutex;
class TStatus; class TStatus;
class TTimer; class TTimer;
class THashList;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
class TProofPlayer : public TVirtualProofPlayer { class TProofPlayer : public TVirtualProofPlayer {
private: private:
TList *fAutoBins; // Map of min/max values by name for slaves TList *fAutoBins; // Map of min/max values by name for slaves
protected: protected:
TList *fInput; //-> list with input objects TList *fInput; //-> list with input objects
skipping to change at line 99 skipping to change at line 100
TQueryResult *fQuery; //Instance of TQueryResult currently pro cessed TQueryResult *fQuery; //Instance of TQueryResult currently pro cessed
TQueryResult *fPreviousQuery; //Previous instance of TQueryResult proc essed TQueryResult *fPreviousQuery; //Previous instance of TQueryResult proc essed
Int_t fDrawQueries; //Number of Draw queries in the list Int_t fDrawQueries; //Number of Draw queries in the list
Int_t fMaxDrawQueries; //Max number of Draw queries kept Int_t fMaxDrawQueries; //Max number of Draw queries kept
TTimer *fStopTimer; //Timer associated with a stop request TTimer *fStopTimer; //Timer associated with a stop request
TMutex *fStopTimerMtx; //To protect the stop timer TMutex *fStopTimerMtx; //To protect the stop timer
TTimer *fDispatchTimer; //Dispatch pending events while process ing TTimer *fDispatchTimer; //Dispatch pending events while process ing
static THashList *fgDrawInputPars; // List of input parameters to be ke
pt on drawing actions
void *GetSender() { return this; } //used to set gTQSender void *GetSender() { return this; } //used to set gTQSender
virtual Int_t DrawCanvas(TObject *obj); // Canvas drawing via libProofDr aw virtual Int_t DrawCanvas(TObject *obj); // Canvas drawing via libProofDr aw
virtual void SetupFeedback(); // specialized setup virtual void SetupFeedback(); // specialized setup
public: // fix for broken compilers so TCleanup can call StopFeedback() public: // fix for broken compilers so TCleanup can call StopFeedback()
virtual void StopFeedback(); // specialized teardown virtual void StopFeedback(); // specialized teardown
protected: protected:
skipping to change at line 136 skipping to change at line 139
TVirtualPacketizer *GetPacketizer() const { return 0; } TVirtualPacketizer *GetPacketizer() const { return 0; }
Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE); Long64_t Finalize(Bool_t force = kFALSE, Bool_t sync = kFALSE);
Long64_t Finalize(TQueryResult *qr); Long64_t Finalize(TQueryResult *qr);
Long64_t DrawSelect(TDSet *set, const char *varexp, Long64_t DrawSelect(TDSet *set, const char *varexp,
const char *selection, Option_t *option = "", const char *selection, Option_t *option = "",
Long64_t nentries = -1, Long64_t firstentry = 0); Long64_t nentries = -1, Long64_t firstentry = 0);
Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt, Int_t GetDrawArgs(const char *var, const char *sel, Option_t *opt,
TString &selector, TString &objname); TString &selector, TString &objname);
void HandleGetTreeHeader(TMessage *mess); void HandleGetTreeHeader(TMessage *mess);
void HandleRecvHisto(TMessage *mess); void HandleRecvHisto(TMessage *mess);
void FeedBackCanvas(const char *name, Bool_t create);
void StopProcess(Bool_t abort, Int_t timeout = -1); void StopProcess(Bool_t abort, Int_t timeout = -1);
void AddInput(TObject *inp); void AddInput(TObject *inp);
void ClearInput(); void ClearInput();
TObject *GetOutput(const char *name) const; TObject *GetOutput(const char *name) const;
TList *GetOutputList() const; TList *GetOutputList() const;
TList *GetInputList() const { return fInput; } TList *GetInputList() const { return fInput; }
TList *GetListOfResults() const { return fQueryResults; } TList *GetListOfResults() const { return fQueryResults; }
void AddQueryResult(TQueryResult *q); void AddQueryResult(TQueryResult *q);
TQueryResult *GetCurrentQuery() const { return fQuery; } TQueryResult *GetCurrentQuery() const { return fQuery; }
 End of changes. 4 change blocks. 
1 lines changed or deleted 6 lines changed or added


 TProofServ.h   TProofServ.h 
// @(#)root/proof:$Id: TProofServ.h 29133 2009-06-22 12:28:50Z brun $ // @(#)root/proof:$Id: TProofServ.h 30174 2009-09-15 14:24:56Z ganis $
// Author: Fons Rademakers 16/02/97 // Author: Fons Rademakers 16/02/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 92 skipping to change at line 92
TString fWorkDir; //directory containing all proof relate d info TString fWorkDir; //directory containing all proof relate d info
TString fImage; //image name of the session TString fImage; //image name of the session
TString fSessionTag; //tag for the server session TString fSessionTag; //tag for the server session
TString fTopSessionTag; //tag for the global session TString fTopSessionTag; //tag for the global session
TString fSessionDir; //directory containing session dependen t files TString fSessionDir; //directory containing session dependen t files
TString fPackageDir; //directory containing packages and use r libs TString fPackageDir; //directory containing packages and use r libs
THashList *fGlobalPackageDirList; //list of directories containing g lobal packages libs THashList *fGlobalPackageDirList; //list of directories containing g lobal packages libs
TString fCacheDir; //directory containing cache of user fi les TString fCacheDir; //directory containing cache of user fi les
TString fQueryDir; //directory containing query results an d status TString fQueryDir; //directory containing query results an d status
TString fDataSetDir; //directory containing info about known data sets TString fDataSetDir; //directory containing info about known data sets
TString fDataDir; //directory containing data files produ ced during queries
TString fAdminPath; //admin path for this session TString fAdminPath; //admin path for this session
TProofLockPath *fPackageLock; //package dir locker TProofLockPath *fPackageLock; //package dir locker
TProofLockPath *fCacheLock; //cache dir locker TProofLockPath *fCacheLock; //cache dir locker
TProofLockPath *fQueryLock; //query dir locker TProofLockPath *fQueryLock; //query dir locker
TString fArchivePath; //default archive path TString fArchivePath; //default archive path
TSocket *fSocket; //socket connection to client TSocket *fSocket; //socket connection to client
TProof *fProof; //PROOF talking to slave servers TProof *fProof; //PROOF talking to slave servers
TVirtualProofPlayer *fPlayer; //actual player TVirtualProofPlayer *fPlayer; //actual player
FILE *fLogFile; //log file FILE *fLogFile; //log file
Int_t fLogFileDes; //log file descriptor Int_t fLogFileDes; //log file descriptor
skipping to change at line 117 skipping to change at line 118
Int_t fLogLevel; //debug logging level Int_t fLogLevel; //debug logging level
Int_t fNcmd; //command history number Int_t fNcmd; //command history number
Int_t fGroupPriority; //priority of group the user belongs to (0 - 100) Int_t fGroupPriority; //priority of group the user belongs to (0 - 100)
Bool_t fEndMaster; //true for a master in direct contact o nly with workers Bool_t fEndMaster; //true for a master in direct contact o nly with workers
Bool_t fMasterServ; //true if we are a master server Bool_t fMasterServ; //true if we are a master server
Bool_t fInterrupt; //if true macro execution will be stopp ed Bool_t fInterrupt; //if true macro execution will be stopp ed
Float_t fRealTime; //real time spent executing commands Float_t fRealTime; //real time spent executing commands
Float_t fCpuTime; //CPU time spent executing commands Float_t fCpuTime; //CPU time spent executing commands
TStopwatch fLatency; //measures latency of packet requests TStopwatch fLatency; //measures latency of packet requests
TStopwatch fCompute; //measures time spend processing a pack et TStopwatch fCompute; //measures time spend processing a pack et
Int_t fQuerySeqNum; //sequential number of the current or l ast query
TFileHandler *fInputHandler; //Input socket handler TFileHandler *fInputHandler; //Input socket handler
TQueryResultManager *fQMgr; //Query-result manager TQueryResultManager *fQMgr; //Query-result manager
TList *fWaitingQueries; //list of TProofQueryResult waiting to be processed TList *fWaitingQueries; //list of TProofQueryResult waiting to be processed
Bool_t fIdle; //TRUE if idle Bool_t fIdle; //TRUE if idle
TList *fQueuedMsg; //list of messages waiting to be proces sed TList *fQueuedMsg; //list of messages waiting to be proces sed
skipping to change at line 173 skipping to change at line 175
Int_t GetPriority(); Int_t GetPriority();
// Query handlers // Query handlers
TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt, TProofQueryResult *MakeQueryResult(Long64_t nentries, const char *opt,
TList *inl, Long64_t first, TDSet *ds et, TList *inl, Long64_t first, TDSet *ds et,
const char *selec, TObject *elist); const char *selec, TObject *elist);
void SetQueryRunning(TProofQueryResult *pq); void SetQueryRunning(TProofQueryResult *pq);
// Results handling // Results handling
void SendResults(TSocket *sock, TList *outlist = 0, TQueryResul t *pq = 0); void SendResults(TSocket *sock, TList *outlist = 0, TQueryResul t *pq = 0);
Int_t RegisterDataSets(TList *in, TList *out);
protected: protected:
virtual void HandleArchive(TMessage *mess); virtual void HandleArchive(TMessage *mess);
virtual Int_t HandleCache(TMessage *mess); virtual Int_t HandleCache(TMessage *mess);
virtual void HandleCheckFile(TMessage *mess); virtual void HandleCheckFile(TMessage *mess);
virtual Int_t HandleDataSets(TMessage *mess); virtual Int_t HandleDataSets(TMessage *mess);
virtual void HandleFork(TMessage *mess); virtual void HandleFork(TMessage *mess);
virtual void HandleLibIncPath(TMessage *mess); virtual void HandleLibIncPath(TMessage *mess);
virtual void HandleProcess(TMessage *mess); virtual void HandleProcess(TMessage *mess);
virtual void HandleQueryList(TMessage *mess); virtual void HandleQueryList(TMessage *mess);
skipping to change at line 212 skipping to change at line 215
const char *GetService() const { return fService; } const char *GetService() const { return fService; }
const char *GetConfDir() const { return fConfDir; } const char *GetConfDir() const { return fConfDir; }
const char *GetConfFile() const { return fConfFile; } const char *GetConfFile() const { return fConfFile; }
const char *GetUser() const { return fUser; } const char *GetUser() const { return fUser; }
const char *GetGroup() const { return fGroup; } const char *GetGroup() const { return fGroup; }
const char *GetWorkDir() const { return fWorkDir; } const char *GetWorkDir() const { return fWorkDir; }
const char *GetImage() const { return fImage; } const char *GetImage() const { return fImage; }
const char *GetSessionTag() const { return fTopSessionTag; } const char *GetSessionTag() const { return fTopSessionTag; }
const char *GetSessionDir() const { return fSessionDir; } const char *GetSessionDir() const { return fSessionDir; }
const char *GetPackageDir() const { return fPackageDir; } const char *GetPackageDir() const { return fPackageDir; }
const char *GetDataDir() const { return fDataDir; }
Int_t GetProtocol() const { return fProtocol; } Int_t GetProtocol() const { return fProtocol; }
const char *GetOrdinal() const { return fOrdinal; } const char *GetOrdinal() const { return fOrdinal; }
Int_t GetGroupId() const { return fGroupId; } Int_t GetGroupId() const { return fGroupId; }
Int_t GetGroupSize() const { return fGroupSize; } Int_t GetGroupSize() const { return fGroupSize; }
Int_t GetLogLevel() const { return fLogLevel; } Int_t GetLogLevel() const { return fLogLevel; }
TSocket *GetSocket() const { return fSocket; } TSocket *GetSocket() const { return fSocket; }
Float_t GetRealTime() const { return fRealTime; } Float_t GetRealTime() const { return fRealTime; }
Float_t GetCpuTime() const { return fCpuTime; } Float_t GetCpuTime() const { return fCpuTime; }
Int_t GetQuerySeqNum() const { return fQuerySeqNum; }
void GetOptions(Int_t *argc, char **argv); void GetOptions(Int_t *argc, char **argv);
TList *GetEnabledPackages() const { return fEnabledPackages; } TList *GetEnabledPackages() const { return fEnabledPackages; }
Int_t GetInflateFactor() const { return fInflateFactor; } Int_t GetInflateFactor() const { return fInflateFactor; }
Long_t GetVirtMemHWM() const { return fVirtMemHWM; } Long_t GetVirtMemHWM() const { return fVirtMemHWM; }
Long64_t GetMsgSizeHWM() const { return fMsgSizeHWM; } Long64_t GetMsgSizeHWM() const { return fMsgSizeHWM; }
const char *GetPrefix() const { return fPrefix; } const char *GetPrefix() const { return fPrefix; }
skipping to change at line 278 skipping to change at line 284
virtual void Terminate(Int_t status); virtual void Terminate(Int_t status);
// Log control // Log control
Bool_t LogToSysLog() { return fLogToSysLog; } Bool_t LogToSysLog() { return fLogToSysLog; }
void LogToMaster(Bool_t on = kTRUE) { fSendLogToMaster = on; } void LogToMaster(Bool_t on = kTRUE) { fSendLogToMaster = on; }
static FILE *SetErrorHandlerFile(FILE *ferr); static FILE *SetErrorHandlerFile(FILE *ferr);
static void ErrorHandler(Int_t level, Bool_t abort, const char *locat ion, static void ErrorHandler(Int_t level, Bool_t abort, const char *locat ion,
const char *msg); const char *msg);
static void ResolveKeywords(TString &fname, const char *path = 0);
static Bool_t IsActive(); static Bool_t IsActive();
static TProofServ *This(); static TProofServ *This();
ClassDef(TProofServ,0) //PROOF Server Application Interface ClassDef(TProofServ,0) //PROOF Server Application Interface
}; };
R__EXTERN TProofServ *gProofServ; R__EXTERN TProofServ *gProofServ;
class TProofLockPath : public TNamed { class TProofLockPath : public TNamed {
private: private:
 End of changes. 7 change blocks. 
1 lines changed or deleted 9 lines changed or added


 TQtBrush.h   TQtBrush.h 
// @(#)root/qt:$Id: TQtBrush.h 28837 2009-06-05 16:16:58Z brun $ // @(#)root/qt:$Id: TQtBrush.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 27 skipping to change at line 27
# include <qbrush.h> # include <qbrush.h>
# include <qcolor.h> # include <qcolor.h>
# include <qpixmap.h> # include <qpixmap.h>
#else #else
class QColor; class QColor;
class QBrush; class QBrush;
class QPixmap; class QPixmap;
#endif #endif
#include "Rtypes.h" #include "Rtypes.h"
#include "Gtypes.h"
class TAttFill;
class TPoint;
// //
// TQtBrush creates the QBrush Qt object based on the ROOT "fill" attrib utes // TQtBrush creates the QBrush Qt object based on the ROOT "fill" attrib utes
// //
class TQtBrush : public QBrush class TQtBrush : public QBrush
{ {
protected: protected:
QColor fBackground; QColor fBackground;
int fStyle; int fStyle;
int fFasi; int fFasi;
int fAlpha; // transparency int fAlpha; // transparency
void SetColorOwn(); void SetColorOwn();
public: public:
TQtBrush(); TQtBrush();
TQtBrush(const TQtBrush &src):QBrush(src) TQtBrush(const TQtBrush &src):QBrush(src)
{ {
fBackground=src.fBackground; fBackground=src.fBackground;
fStyle=src.fStyle; fStyle=src.fStyle;
fFasi=src.fFasi; fFasi=src.fFasi;
} }
virtual ~TQtBrush(){;} TQtBrush(const TAttFill &rootFillAttributes);
virtual ~TQtBrush();
TQtBrush &operator=(const TAttFill &rootFillAttributes);
void SetFillAttributes(const TAttFill &rootFillAttributes);
Bool_t IsTransparent() const; Bool_t IsTransparent() const;
void SetStyle(int newStyle=1000){ if (newStyle < 0) fStyle = fFasi = -1; void SetStyle(int newStyle=1000){ if (newStyle < 0) fStyle = fFasi = -1;
else SetStyle(newStyle/1000,newStyle% 1000); else SetStyle(newStyle/1000,newStyle% 1000);
}; };
void SetStyle(int style, int fasi); void SetStyle(int style, int fasi);
void SetColor(const QColor &qtcolor); void SetColor(const QColor &qtcolor);
void SetColor(Color_t cindex); void SetColor(Color_t cindex);
const QColor &GetColor() const { return fBackground;} const QColor &GetColor() const { return fBackground;}
int GetStyle() const { return 1000*fStyle + fFasi; } int GetStyle() const { return 1000*fStyle + fFasi; }
ClassDef(TQtBrush,0); // create QBrush object based on the ROOT "fill" a ttributes ClassDef(TQtBrush,0); // create QBrush object based on the ROOT "fill" a ttributes
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added


 TQtMarker.h   TQtMarker.h 
// @(#)root/qt:$Id: TQtMarker.h 28205 2009-04-14 19:38:00Z brun $ // @(#)root/qt:$Id: TQtMarker.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 27 skipping to change at line 27
#include "TPoint.h" #include "TPoint.h"
#endif #endif
#ifndef __CINT__ #ifndef __CINT__
#include <QPolygon> #include <QPolygon>
#else #else
class QPointArray; class QPointArray;
class QPolygon; class QPolygon;
#endif #endif
class TAttMarker;
class QPainter;
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// //
// TQtMarker - class-utility to convert the ROOT TMarker object shape // TQtMarker - class-utility to convert the ROOT TMarker object shape
// in to the Qt QPolygon. // in to the Qt QPolygon.
// //
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
class TQtMarker { class TQtMarker {
private: private:
int fNumNode; // Number of chain in the marker shape int fNumNode; // Number of chain in the marker shape
QPolygon fChain; // array of the n chains to build a shaped marke r QPolygon fChain; // array of the n chains to build a shaped marke r
Color_t fCindex; // Color index of the marker; Color_t fCindex; // Color index of the marker;
int fMarkerType; // Type of the current marker int fMarkerType; // Type of the current marker
public: public:
TQtMarker(int n=0, TPoint *xy=0,int type=0); TQtMarker(int n=0, TPoint *xy=0,int type=0);
void operator=(const TQtMarker&); TQtMarker &operator=(const TQtMarker&);
TQtMarker(const TQtMarker&); TQtMarker(const TQtMarker&);
TQtMarker &operator=(const TAttMarker&);
TQtMarker(const TAttMarker&);
virtual ~TQtMarker(); virtual ~TQtMarker();
void DrawPolyMarker(QPainter &p, int n, TPoint *xy);
void SetMarkerAttributes(const TAttMarker& markerAttributes);
void SetColor(Color_t mcolor);
Color_t GetColor() const;
int GetNumber() const; int GetNumber() const;
const QPolygon &GetNodes() const; const QPolygon &GetNodes() const;
int GetType() const; int GetType() const;
void SetMarker(int n, TPoint *xy, int type); void SetMarker(int n, TPoint *xy, int type);
ClassDef(TQtMarker,0) // Convert ROOT TMarker objects on to QPointArra y ClassDef(TQtMarker,0) // Convert ROOT TMarker objects on to QPointArra y
}; };
//_________________________________________________________ //_________________________________________________________
inline void TQtMarker::operator=(const TQtMarker&m) inline TQtMarker &TQtMarker::operator=(const TQtMarker&m)
{ {
fNumNode = m.fNumNode; fNumNode = m.fNumNode;
fChain = m.fChain; fChain = m.fChain;
fCindex = m.fCindex; fCindex = m.fCindex;
fMarkerType=m.fMarkerType; fMarkerType=m.fMarkerType;
return *this;
} }
//_________________________________________________________ //_________________________________________________________
inline TQtMarker::TQtMarker(const TQtMarker&m) : fNumNode(m.fNumNode), inline TQtMarker::TQtMarker(const TQtMarker&m) : fNumNode(m.fNumNode),
fChain(m.fChain), fCindex(m.fCindex),fMarkerType(m.fMarkerType) {} fChain(m.fChain), fCindex(m.fCindex),fMarkerType(m.fMarkerType) {}
//_________________________________________________________
inline void TQtMarker::SetColor(Color_t mcolor) { fCindex = mcolor; }
//_________________________________________________________
inline Color_t TQtMarker::GetColor() const { return fCindex; }
#endif #endif
 End of changes. 10 change blocks. 
7 lines changed or deleted 23 lines changed or added


 TQtPen.h   TQtPen.h 
// @(#)root/qt:$Name: $:$Id: TQtPen.h 25206 2008-08-22 08:18:13Z brun $ // @(#)root/qt:$Name: $:$Id: TQtPen.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************** ** /************************************************************************** **
** **
** Copyright (C) 2002 by Valeri Fine. All rights reserved. ** Copyright (C) 2002 by Valeri Fine. All rights reserved.
** **
** This file may be distributed under the terms of the Q Public License ** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file ** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file. ** LICENSE.QPL included in the packaging of this file.
*************************************************************************** **/ *************************************************************************** **/
#ifndef ROOT_TQtPen #ifndef ROOT_TQtPen
#define ROOT_TQtPen #define ROOT_TQtPen
#include "Riostream.h" #include "Riostream.h"
#include "TAttLine.h" #include "TAttLine.h"
#ifndef __CINT__ #ifndef __CINT__
# include <QPen> # include <QtGui/QPen>
#else #else
class QPen; class QPen;
#endif #endif
// //
// TQtPen creates the QPen object to map to ROOT TAttLine attributes // TQtPen creates the QPen object to map to ROOT TAttLine attributes
// //
class TQtPen : public QPen, public TAttLine class TQtPen : public QPen, public TAttLine
{ {
public: public:
TQtPen(); TQtPen();
TQtPen(const TQtPen &src):QPen(src),TAttLine(src) {} TQtPen(const TQtPen &src):QPen(src),TAttLine(src) {}
TQtPen(const TAttLine &line);
TQtPen &operator=(const TAttLine &line);
virtual ~TQtPen(){;} virtual ~TQtPen(){;}
void SetLineAttributes() { TAttLine::SetLineAttributes(); }
void SetLineAttributes(const TAttLine &lineAttributes);
void SetLineColor(Color_t cindex); void SetLineColor(Color_t cindex);
void SetLineType(int n, int*dash); void SetLineType(int n, int*dash);
void SetLineStyle(Style_t linestyle); void SetLineStyle(Style_t linestyle);
void SetLineWidth(Width_t width); void SetLineWidth(Width_t width);
}; };
#endif #endif
 End of changes. 5 change blocks. 
3 lines changed or deleted 7 lines changed or added


 TQtSymbolCodec.h   TQtSymbolCodec.h 
skipping to change at line 13 skipping to change at line 13
** **
** Implementation of QTextCodec class ** Implementation of QTextCodec class
** **
** Created : 20050125 ** Created : 20050125
** **
**********************************************************************/ **********************************************************************/
#ifndef ROOT_QSYMBOLCODEC_H #ifndef ROOT_QSYMBOLCODEC_H
#define ROOT_QSYMBOLCODEC_H #define ROOT_QSYMBOLCODEC_H
#include "qglobal.h" #include <QByteArray>
#include <QTextCodec>
#if QT_VERSION < 0x40000 #include <QByteArray>
# ifndef QT_H
# include "qtextcodec.h"
# endif // QT_H
#else
//Added by qt3to4:
# include <QByteArray>
# include <QTextCodec>
# include <QByteArray>
#endif /* QT_VERSION */
#ifndef QT_NO_CODEC_SYMBOL #ifndef QT_NO_CODEC_SYMBOL
class QSymbolCodec : public QTextCodec { class QSymbolCodec : public QTextCodec {
public: public:
virtual int mibEnum() const; virtual int mibEnum() const;
#if QT_VERSION < 0x40000
const char* name() const;
#else
QByteArray name() const; QByteArray name() const;
#endif /* QT_VERSION */
const char* mimeName() const; const char* mimeName() const;
#if !defined(Q_NO_USING_KEYWORD) #if !defined(Q_NO_USING_KEYWORD)
using QTextCodec::fromUnicode; using QTextCodec::fromUnicode;
#endif #endif
#if QT_VERSION < 0x40000
QCString fromUnicode(const QString& uc, int& lenInOut) const;
QCString fromUnicode( const QString & uc ) const { return QTextCodec::f
romUnicode(uc); }
#else
QByteArray fromUnicode(const QString& uc, int& lenInOut) const; QByteArray fromUnicode(const QString& uc, int& lenInOut) const;
virtual QByteArray convertFromUnicode( const QChar * input, int number, ConverterState *state ) const; virtual QByteArray convertFromUnicode( const QChar * input, int number, ConverterState *state ) const;
virtual QString convertToUnicode(const char *chars, int len, Convert erState *state) const; virtual QString convertToUnicode(const char *chars, int len, Convert erState *state) const;
#endif /* QT_VERSION */
QString toUnicode(const char* chars, int len) const; QString toUnicode(const char* chars, int len) const;
int heuristicContentMatch(const char* chars, int len) const; int heuristicContentMatch(const char* chars, int len) const;
}; };
#endif /* QT_NO_CODEC_SYMBOL */ #endif /* QT_NO_CODEC_SYMBOL */
#endif #endif
 End of changes. 6 change blocks. 
24 lines changed or deleted 3 lines changed or added


 TQtUtil.h   TQtUtil.h 
// @(#)root/qt:$Id: TQtUtil.h 27753 2009-03-11 09:41:27Z brun $ // @(#)root/qt:$Id: TQtUtil.h 29951 2009-08-28 04:48:12Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2002 by Valeri Fine. * * Copyright (C) 2002 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TQtUtil #ifndef ROOT_TQtUTIL
#define ROOT_TQtUtil #define ROOT_TQtUTIL
#include "TGQt.h" #include "TGQt.h"
#include "TCanvas.h" #include "TVirtualPad.h"
#include "TCanvasImp.h" #include "TCanvasImp.h"
#include "qpixmap.h" #include <QtGui/QPixmap>
#include "qwidget.h" #include <QtGui/QWidget>
//---------------------------------------- //----------------------------------------
// Q: How to get Qt pointer: // Q: How to get Qt pointer:
//---------------------------------------- //----------------------------------------
namespace TQtUtil {
///
/// Returns QPixmap backend for the given TVirtualPad
///
//_______________________________________ //_______________________________________
inline QPixmap *padPixmap(TPad *pad) inline QPixmap *padPixmap(TVirtualPad *pad)
{ return (QPixmap *)TGQt::iwid(pad->GetPixmapID()); } { return (QPixmap *)TGQt::iwid(pad->GetPixmapID()); }
///
/// Returns QWidget backend for the given TCanvas
/// if "c" is not a TCanvas returns zero
///
//_______________________________________ //_______________________________________
inline QWidget *canvasWidget(TCanvas *c) inline QWidget *canvasWidget(TVirtualPad *c)
{ return (QWidget *)TGQt::iwid(c->GetCanvasID()) ; } { return (QWidget *)TGQt::iwid(c->GetCanvasID()) ; }
//_______________________________________
inline QWidget *canvasWidget(TCanvasImp *c)
{ return (QWidget *) TGQt::iwid(((TQtCanvasImp *)c)->GetCanvasImpID()); }
//_______________________________________
inline QWidget *mainWidget(TCanvas *c)
{ return canvasWidget(c->GetCanvasImp());}
//---------------------------------------- //----------------------------------------
// Q: Get WIN32/X11 handles: // Q: Get WIN32/X11 handles:
// (see function above and Qt manual also) // (see function above and Qt manual also)
//---------------------------------------- //----------------------------------------
///
/// Returns system depended backend handle
/// for the given TVirtualPad
///
//_______________________________________ //_______________________________________
inline HDC wigdetHdc(TPad *pad) inline unsigned long wigdetHdc(TVirtualPad *pad)
{ return padPixmap(pad)->handle(); } { return padPixmap(pad)->handle(); }
//_______________________________________
inline HDC wigdetHdc(TCanvas *c)
{ return canvasWidget(c)->handle(); }
//_______________________________________
inline HDC wigdetHdc(TCanvasImp *c)
{ return canvasWidget(c)->handle(); }
#ifdef WIN32 ///
//_______________________________________ /// Returns system depended backend handle
inline HWND hwndWin32(TCanvas *c) /// for the given TCanvas
{ return canvasWidget(c)->winId(); } /// if "c" is not a TCanvas returns zero
//_______________________________________
inline HWND hwndWin32(TCanvasImp *c)
{ return canvasWidget(c)->winId(); }
#else
//_______________________________________ //_______________________________________
inline Ulong_t hwndWin32(TCanvas *c) inline unsigned long hwndWin32(TVirtualPad *c)
{ return canvasWidget(c)->winId(); } { return canvasWidget(c)->winId(); }
//_______________________________________ };
inline Ulong_t hwndWin32(TCanvasImp *c)
{ return canvasWidget(c)->winId(); }
#endif
#endif #endif
 End of changes. 15 change blocks. 
37 lines changed or deleted 29 lines changed or added


 TQtWidget.h   TQtWidget.h 
// @(#)root/qt:$Id: TQtWidget.h 28862 2009-06-09 18:56:02Z brun $ // @(#)root/qt:$Id: TQtWidget.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 21/01/2002 // Author: Valeri Fine 21/01/2002
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* Copyright (C) 2003 by Valeri Fine. * * Copyright (C) 2003 by Valeri Fine. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 59 skipping to change at line 59
class QPaintDevice; class QPaintDevice;
class QResizeEvent; class QResizeEvent;
class QSize; class QSize;
class QString; class QString;
class QEvent; class QEvent;
class QSizePolicy; class QSizePolicy;
class QContextMenuEvent; class QContextMenuEvent;
class QSize; class QSize;
class QPoint; class QPoint;
#endif #endif
class QTimer;
class TApplication; class TApplication;
// //
// TQtWidget is a custom QWidget to back ROOT TCanvas. // TQtWidget is a custom QWidget to back ROOT TCanvas.
// //
// It can be used within Qt-based program and with Qt Designer as a "regula r" // It can be used within Qt-based program and with Qt Designer as a "regula r"
// Qt QWidget to create the Qt widget wihe builtin TCanvas' // Qt QWidget to create the Qt widget wihe builtin TCanvas'
// //
enum EEventTrackingBits { enum EEventTrackingBits {
kMousePressEvent = BIT(0), // emit signal as soon as TCanvas p rocessed mousePressEvent QMouseEvent kMousePressEvent = BIT(0), // emit signal as soon as TCanvas p rocessed mousePressEvent QMouseEvent
kMouseMoveEvent = BIT(1), // emit signal as soon as TCanvas p rocessed mouseMoveEvent QMouseEvent kMouseMoveEvent = BIT(1), // emit signal as soon as TCanvas p rocessed mouseMoveEvent QMouseEvent
skipping to change at line 157 skipping to change at line 158
bool fPaint; bool fPaint;
bool fSizeChanged; bool fSizeChanged;
bool fDoubleBufferOn; bool fDoubleBufferOn;
bool fEmbedded; bool fEmbedded;
QSize fSizeHint; QSize fSizeHint;
QWidget *fWrapper; QWidget *fWrapper;
QString fSaveFormat; QString fSaveFormat;
bool fInsidePaintEvent; bool fInsidePaintEvent;
QPoint fOldMousePos; QPoint fOldMousePos;
int fIgnoreLeaveEnter; int fIgnoreLeaveEnter;
QTimer *fRefreshTimer;
void SetRootID(QWidget *wrapper); void SetRootID(QWidget *wrapper);
QWidget *GetRootID() const; QWidget *GetRootID() const;
virtual void EmitCanvasPainted() { emit CanvasPainted(); } virtual void EmitCanvasPainted() { emit CanvasPainted(); }
TCanvas *Canvas(); TCanvas *Canvas();
bool paintFlag(bool mode=TRUE); bool paintFlag(bool mode=TRUE);
void AdjustBufferSize(); void AdjustBufferSize();
bool PaintingActive () const; bool PaintingActive () const;
void SetIgnoreLeaveEnter(int ignore=1); void SetIgnoreLeaveEnter(int ignore=1);
skipping to change at line 242 skipping to change at line 244
public slots: public slots:
virtual void cd(); virtual void cd();
virtual void cd(int subpadnumber); virtual void cd(int subpadnumber);
void Disconnect(); void Disconnect();
void Refresh(); void Refresh();
virtual bool Save(const QString &fileName) const; virtual bool Save(const QString &fileName) const;
virtual bool Save(const char *fileName) const; virtual bool Save(const char *fileName) const;
virtual bool Save(const QString &fileName,const char *format,int quality =60) const; virtual bool Save(const QString &fileName,const char *format,int quality =60) const;
virtual bool Save(const char *fileName,const char *format,int quality =60) const; virtual bool Save(const char *fileName,const char *format,int quality =60) const;
protected slots:
void RefreshCB();
#ifndef __CINT__ #ifndef __CINT__
signals: signals:
// emit the Qt signal when the double buffer of the TCamvas has been fil led up // emit the Qt signal when the double buffer of the TCamvas has been fil led up
void CanvasPainted(); // Signal the TCanvas has been painted onto the s creen void CanvasPainted(); // Signal the TCanvas has been painted onto the s creen
void Saved(bool ok); // Signal the TCanvas has been saved into the fil e void Saved(bool ok); // Signal the TCanvas has been saved into the fil e
void RootEventProcessed(TObject *selected, unsigned int event, TCanvas * c); void RootEventProcessed(TObject *selected, unsigned int event, TCanvas * c);
#endif #endif
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
ClassDef(TQtWidget,0) // QWidget to back ROOT TCanvas (Can be used with Qt designer) ClassDef(TQtWidget,0) // QWidget to back ROOT TCanvas (Can be used with Qt designer)
 End of changes. 4 change blocks. 
1 lines changed or deleted 6 lines changed or added


 TRecorder.h   TRecorder.h 
// @(#)root/gui:$Id: TRecorder.h 29094 2009-06-19 10:02:24Z bellenot $ // @(#)root/gui:$Id: TRecorder.h 29956 2009-08-28 07:33:01Z bellenot $
// Author: Katerina Opocenska 11/09/2008 // Author: Katerina Opocenska 11/09/2008
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 448 skipping to change at line 448
protected: protected:
friend class TRecorderState; friend class TRecorderState;
friend class TRecorderInactive; friend class TRecorderInactive;
friend class TRecorderPaused; friend class TRecorderPaused;
friend class TRecorderRecording; friend class TRecorderRecording;
friend class TRecorderReplaying; friend class TRecorderReplaying;
TString fFilename; // Events file name TString fFilename; // Events file name
// Changes state to the new one. // Changes state to the new one.
// See class documentation for information about state changing. // See class documentation for information about state changing.
void ChangeState(TRecorderState* newstate, Bool_t deletePreviousState = kTRUE); void ChangeState(TRecorderState *newstate, Bool_t deletePreviousState = kTRUE);
public: public:
//---- Modes of replaying. Only kRealtime implemented so far //---- Modes of replaying. Only kRealtime implemented so far
enum EReplayModes { enum EReplayModes {
kRealtime kRealtime
}; };
//---- States of recorder. In every moment, recorder is in right //---- States of recorder. In every moment, recorder is in right
// one of these states. // one of these states.
enum ERecorderState { enum ERecorderState {
kInactive, kInactive,
skipping to change at line 663 skipping to change at line 663
virtual ~TRecorderRecording(); virtual ~TRecorderRecording();
Bool_t IsFiltered(Window_t id); Bool_t IsFiltered(Window_t id);
void SetTypeOfConfigureNotify(Event_t *e); void SetTypeOfConfigureNotify(Event_t *e);
void CopyEvent(Event_t *e, Window_t wid); void CopyEvent(Event_t *e, Window_t wid);
TRecorder *fRecorder; // Reference to recorder (owner o f this state) is kept in order to switch TRecorder *fRecorder; // Reference to recorder (owner o f this state) is kept in order to switch
// recorder back to INACTIVE stat e after recording is finished // recorder back to INACTIVE stat e after recording is finished
TFile *fFile; // ROOT file to store recorded ev ents in TFile *fFile; // ROOT file to store recorded ev ents in
TTimer *fTimer; // Timer used for recording TTimer *fTimer; // Timer used for recording
TTimer *fMouseTimer; // Timer used for recording mouse position
ULong_t fBeginPave; // TLatex/TPaveLabel edition star ting time ULong_t fBeginPave; // TLatex/TPaveLabel edition star ting time
TTree *fWinTree; // TTree with registered windows TTree *fWinTree; // TTree with registered windows
TTree *fGuiTree; // TTree with recorded GUI events TTree *fGuiTree; // TTree with recorded GUI events
TTree *fCmdTree; // TTree with recorded commandlin e events TTree *fCmdTree; // TTree with recorded commandlin e events
TTree *fExtraTree; // TTree with recorded extra even ts (PaveLabels and Texts) TTree *fExtraTree; // TTree with recorded extra even ts (PaveLabels and Texts)
ULong64_t fWin; // The newest registered window t o be stored in TTree ULong64_t fWin; // The newest registered window t o be stored in TTree
TRecGuiEvent *fGuiEvent; // The newest GUI event to be sto red in TTree TRecGuiEvent *fGuiEvent; // The newest GUI event to be sto red in TTree
TRecCmdEvent *fCmdEvent; // The newest commandline event t o be stored in TTree TRecCmdEvent *fCmdEvent; // The newest commandline event t o be stored in TTree
skipping to change at line 699 skipping to change at line 700
TRecorderRecording(TRecorder *r, const char *filename, Option_t *option, Window_t *w, Int_t winCount); TRecorderRecording(TRecorder *r, const char *filename, Option_t *option, Window_t *w, Int_t winCount);
Bool_t StartRecording(); Bool_t StartRecording();
public: public:
virtual TRecorder::ERecorderState GetState() const { return TRecorder::k Recording; } virtual TRecorder::ERecorderState GetState() const { return TRecorder::k Recording; }
virtual void Stop(TRecorder *r, Bool_t guiCommand); virtual void Stop(TRecorder *r, Bool_t guiCommand);
void RegisterWindow(Window_t w); //SLOT void RegisterWindow(Window_t w); //SLOT
void RecordCmdEvent(const char* line); //SLOT void RecordCmdEvent(const char *line); //SLOT
void RecordGuiEvent(Event_t* e, Window_t wid); //SLOT void RecordGuiEvent(Event_t *e, Window_t wid); //SLOT
void RecordGuiCNEvent(Event_t* e); //SLOT void RecordGuiBldEvent(Event_t *e); //SLOT
void RecordPave(const TObject* obj); //SLOT void RecordGuiCNEvent(Event_t *e); //SLOT
void RecordText(const TObject* obj); //SLOT void RecordMousePosition();
void RecordPave(const TObject *obj); //SLOT
void RecordText(const TObject *obj); //SLOT
void FilterEventPave(); //SLOT void FilterEventPave(); //SLOT
void StartEditing(); //SLOT void StartEditing(); //SLOT
void RecordExtraEvent(TString line, ULong_t ExtTime); void RecordExtraEvent(TString line, ULong_t ExtTime);
ClassDef(TRecorderRecording, 0) // Represents state of TRecorder when re cording events ClassDef(TRecorderRecording, 0) // Represents state of TRecorder when re cording events
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
 End of changes. 4 change blocks. 
7 lines changed or deleted 10 lines changed or added


 TRootCanvas.h   TRootCanvas.h 
// @(#)root/gui:$Id: TRootCanvas.h 28464 2009-05-06 12:37:21Z brun $ // @(#)root/gui:$Id: TRootCanvas.h 29403 2009-07-09 07:17:16Z brun $
// Author: Fons Rademakers 15/01/98 // Author: Fons Rademakers 15/01/98
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 43 skipping to change at line 43
class TGPopupMenu; class TGPopupMenu;
class TGLayoutHints; class TGLayoutHints;
class TGStatusBar; class TGStatusBar;
class TRootContainer; class TRootContainer;
class TGToolBar; class TGToolBar;
class TGHorizontal3DLine; class TGHorizontal3DLine;
class TGVertical3DLine; class TGVertical3DLine;
class TVirtualPadEditor; class TVirtualPadEditor;
class TGDockableFrame; class TGDockableFrame;
class TGDNDManager; class TGDNDManager;
class TGToolTip;
class TRootCanvas : public TGMainFrame, public TCanvasImp { class TRootCanvas : public TGMainFrame, public TCanvasImp {
friend class TRootContainer; friend class TRootContainer;
private: private:
TGCanvas *fCanvasWindow; // canvas widget TGCanvas *fCanvasWindow; // canvas widget
TRootContainer *fCanvasContainer; // container in canvas widget TRootContainer *fCanvasContainer; // container in canvas widget
TGMenuBar *fMenuBar; // menubar TGMenuBar *fMenuBar; // menubar
TGPopupMenu *fFileMenu; // file menu TGPopupMenu *fFileMenu; // file menu
skipping to change at line 84 skipping to change at line 85
TGLayoutHints *fMainFrameLayout; // layout for main frame TGLayoutHints *fMainFrameLayout; // layout for main frame
TGVertical3DLine *fVertical1; // toolbar vertical separator TGVertical3DLine *fVertical1; // toolbar vertical separator
TGVertical3DLine *fVertical2; // toolbar vertical separator TGVertical3DLine *fVertical2; // toolbar vertical separator
TGHorizontal3DLine *fHorizontal1; // toolbar sepatator TGHorizontal3DLine *fHorizontal1; // toolbar sepatator
TGLayoutHints *fVertical1Layout; // layout hints for separator TGLayoutHints *fVertical1Layout; // layout hints for separator
TGLayoutHints *fVertical2Layout; // layout hints for separator TGLayoutHints *fVertical2Layout; // layout hints for separator
TGLayoutHints *fHorizontal1Layout; // layout hints for separator TGLayoutHints *fHorizontal1Layout; // layout hints for separator
TGDockableFrame *fToolDock; // dockable frame holding the toolbar TGDockableFrame *fToolDock; // dockable frame holding the toolbar
TGLayoutHints *fDockLayout; // layout hints for dockable f rame widget TGLayoutHints *fDockLayout; // layout hints for dockable f rame widget
const TGPicture *fIconPic; // icon picture const TGPicture *fIconPic; // icon picture
TGToolTip *fToolTip; // tooltip for object info
TVirtualPadEditor *fEditor; // pointer to currently loaded pad edi tor TVirtualPadEditor *fEditor; // pointer to currently loaded pad edi tor
Int_t fCanvasID; // index in fWindows array of TGX11 Int_t fCanvasID; // index in fWindows array of TGX11
Bool_t fAutoFit; // when true canvas container keeps sa me size as canvas Bool_t fAutoFit; // when true canvas container keeps sa me size as canvas
Int_t fButton; // currently pressed button Int_t fButton; // currently pressed button
TRootCanvas(const TRootCanvas&); // Not implemented TRootCanvas(const TRootCanvas&); // Not implemented
TRootCanvas& operator=(const TRootCanvas&); // Not implemented TRootCanvas& operator=(const TRootCanvas&); // Not implemented
void CreateCanvas(const char *name); void CreateCanvas(const char *name);
void CreateEditor(); void CreateEditor();
skipping to change at line 118 skipping to change at line 120
public: public:
TRootCanvas(TCanvas *c = 0, const char *name = "ROOT Canvas", UInt_t wid th = 500, UInt_t height = 300); TRootCanvas(TCanvas *c = 0, const char *name = "ROOT Canvas", UInt_t wid th = 500, UInt_t height = 300);
TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width , UInt_t height); TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width , UInt_t height);
virtual ~TRootCanvas(); virtual ~TRootCanvas();
void AdjustSize(); void AdjustSize();
void Close(); void Close();
void ForceUpdate() { Layout(); } void ForceUpdate() { Layout(); }
void FitCanvas(); void FitCanvas();
void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected);
UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h); UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
UInt_t GetCwidth() const; UInt_t GetCwidth() const;
UInt_t GetCheight() const; UInt_t GetCheight() const;
void Iconify() { IconifyWindow(); } void Iconify() { IconifyWindow(); }
Int_t InitWindow(); Int_t InitWindow();
void PrintCanvas(); void PrintCanvas();
void RaiseWindow(); void RaiseWindow();
void SetWindowPosition(Int_t x, Int_t y); void SetWindowPosition(Int_t x, Int_t y);
void SetWindowSize(UInt_t w, UInt_t h); void SetWindowSize(UInt_t w, UInt_t h);
void SetWindowTitle(const char *newTitle); void SetWindowTitle(const char *newTitle);
void SetCanvasSize(UInt_t w, UInt_t h); void SetCanvasSize(UInt_t w, UInt_t h);
void SetStatusText(const char *txt = 0, Int_t partidx = 0); void SetStatusText(const char *txt = 0, Int_t partidx = 0);
void Show() { MapRaised(); } void Show() { MapRaised(); }
void ShowMenuBar(Bool_t show = kTRUE); void ShowMenuBar(Bool_t show = kTRUE);
void ShowStatusBar(Bool_t show = kTRUE); void ShowStatusBar(Bool_t show = kTRUE);
void ShowEditor(Bool_t show = kTRUE); void ShowEditor(Bool_t show = kTRUE);
void ShowToolBar(Bool_t show = kTRUE); void ShowToolBar(Bool_t show = kTRUE);
void ShowToolTips(Bool_t show = kTRUE);
Bool_t HasEditor() const; Bool_t HasEditor() const;
Bool_t HasMenuBar() const; Bool_t HasMenuBar() const;
Bool_t HasStatusBar() const; Bool_t HasStatusBar() const;
Bool_t HasToolBar() const; Bool_t HasToolBar() const;
Bool_t HasToolTips() const;
TGMenuBar *GetMenuBar() const { return fMenuBar; } TGMenuBar *GetMenuBar() const { return fMenuBar; }
TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; } TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; }
TGStatusBar *GetStatusBar() const { return fStatusBar; } TGStatusBar *GetStatusBar() const { return fStatusBar; }
TGDockableFrame *GetToolDock() const { return fToolDock; } TGDockableFrame *GetToolDock() const { return fToolDock; }
// overridden from TGMainFrame // overridden from TGMainFrame
void CloseWindow(); void CloseWindow();
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
void ReallyDelete(); void ReallyDelete();
 End of changes. 6 change blocks. 
1 lines changed or deleted 6 lines changed or added


 TRootGuiBuilder.h   TRootGuiBuilder.h 
// @(#)root/guibuilder:$Id: TRootGuiBuilder.h 20882 2007-11-19 11:31:26Z rd m $ // @(#)root/guibuilder:$Id: TRootGuiBuilder.h 30063 2009-09-08 12:15:59Z be llenot $
// Author: Valeriy Onuchin 12/09/04 // Author: Valeriy Onuchin 12/09/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 46 skipping to change at line 46
kGUIBLD_EDIT_PREF, kGUIBLD_EDIT_PREF,
kGUIBLD_WINDOW_HOR, kGUIBLD_WINDOW_HOR,
kGUIBLD_WINDOW_VERT, kGUIBLD_WINDOW_VERT,
kGUIBLD_WINDOW_CASCADE, kGUIBLD_WINDOW_CASCADE,
kGUIBLD_WINDOW_OPAQUE, kGUIBLD_WINDOW_OPAQUE,
kGUIBLD_WINDOW_ARRANGE, kGUIBLD_WINDOW_ARRANGE,
kGUIBLD_HELP_CONTENTS, kGUIBLD_HELP_CONTENTS,
kGUIBLD_HELP_ABOUT, kGUIBLD_HELP_ABOUT,
kGUIBLD_HELP_BUG kGUIBLD_HELP_BUG,
kGUIBLD_FILE_OPEN
}; };
class TGShutter; class TGShutter;
class TGMdiMainFrame; class TGMdiMainFrame;
class TGDockableFrame; class TGDockableFrame;
class TGMdiMenuBar; class TGMdiMenuBar;
class TGPopupMenu; class TGPopupMenu;
class TGStatusBar; class TGStatusBar;
class TGuiBldDragManager; class TGuiBldDragManager;
class TGToolBar; class TGToolBar;
class TGMdiFrame; class TGMdiFrame;
class TGuiBldEditor; class TGuiBldEditor;
class TGButton; class TGButton;
class TGPictureButton; class TGPictureButton;
class TImage; class TImage;
class TTimer; class TTimer;
//////////////////////////////////////////////////////////////////////////
class TRootGuiBuilder : public TGuiBuilder, public TGMainFrame { class TRootGuiBuilder : public TGuiBuilder, public TGMainFrame {
friend class TGuiBldDragManager; friend class TGuiBldDragManager;
private: private:
TGuiBldDragManager *fManager; // drag and drop manager TGuiBldDragManager *fManager; // drag and drop manager
TGButton *fActionButton;// action button TGButton *fActionButton;// action button
TGToolBar *fToolBar; // guibuider toolbar TGToolBar *fToolBar; // guibuider toolbar
TGShutter *fShutter; // widget palette TGShutter *fShutter; // widget palette
TGMdiMainFrame *fMain; // main mdi frame TGMdiMainFrame *fMain; // main mdi frame
TGDockableFrame *fToolDock; // dockable frame where toolbar is loca ted TGDockableFrame *fToolDock; // dockable frame where toolbar is loca ted
TGDockableFrame *fShutterDock; // dockable frame where widget palette is located TGDockableFrame *fShutterDock; // dockable frame where widget palette is located
TGMdiMenuBar *fMenuBar; // guibuilder menu bar TGMdiMenuBar *fMenuBar; // guibuilder menu bar
TGPopupMenu *fMenuFile; // "File" popup menu TGPopupMenu *fMenuFile; // "File" popup menu
TGPopupMenu *fMenuWindow; // "Window" popup menu TGPopupMenu *fMenuWindow; // "Window" popup menu
TGPopupMenu *fMenuEdit; // "Edit" popup menu TGPopupMenu *fMenuEdit; // "Edit" popup menu
TGPopupMenu *fMenuHelp; // "Help" popup menu TGPopupMenu *fMenuHelp; // "Help" popup menu
TGStatusBar *fStatusBar; // guibuilder status bar TGStatusBar *fStatusBar; // guibuilder status bar
TGFrame *fSelected; // selected frame TGFrame *fSelected; // selected frame
TGMdiFrame *fEditable; // mdi frame where editted frame is l TGMdiFrame *fEditable; // mdi frame where editted frame is lo
ocated cated
TGuiBldEditor *fEditor; // frame property editor TGuiBldEditor *fEditor; // frame property editor
const TGPicture *fIconPic; // icon picture const TGPicture *fIconPic; // icon picture
TGPictureButton *fStartButton; // start button TGPictureButton *fStartButton; // start button
Int_t fClosing;
static TGGC *fgBgnd; static TGGC *fgBgnd;
static TGGC *fgBgndPopup; static TGGC *fgBgndPopup;
static TGGC *fgBgndPopupHlght; static TGGC *fgBgndPopupHlght;
void InitMenu(); void InitMenu();
void EnableLassoButtons(Bool_t on = kTRUE); void EnableLassoButtons(Bool_t on = kTRUE);
void EnableSelectedButtons(Bool_t on = kTRUE); void EnableSelectedButtons(Bool_t on = kTRUE);
void EnableEditButtons(Bool_t on = kTRUE); void EnableEditButtons(Bool_t on = kTRUE);
void BindKeys(); void BindKeys();
skipping to change at line 115 skipping to change at line 120
virtual TGFrame *ExecuteAction(); virtual TGFrame *ExecuteAction();
virtual void HandleButtons(); virtual void HandleButtons();
virtual void Show() { MapRaised(); } virtual void Show() { MapRaised(); }
virtual void Hide(); virtual void Hide();
virtual void ChangeSelected(TGFrame *f); virtual void ChangeSelected(TGFrame *f);
virtual void Update(); virtual void Update();
virtual Bool_t IsSelectMode() const; virtual Bool_t IsSelectMode() const;
virtual Bool_t IsGrabButtonDown() const; virtual Bool_t IsGrabButtonDown() const;
virtual Bool_t OpenProject(Event_t *event = 0); virtual Bool_t OpenProject(Event_t *event = 0);
virtual Bool_t SaveProject(Event_t *event = 0); virtual Bool_t SaveProject(Event_t *event = 0);
virtual Bool_t NewProject(Event_t *event = 0); virtual Bool_t NewProject(TString type = "");
virtual Bool_t HandleKey(Event_t *event); virtual Bool_t HandleKey(Event_t *event);
virtual void HandleMenu(Int_t id); virtual void HandleMenu(Int_t id);
virtual void CloseWindow(); virtual void CloseWindow();
virtual void MaybeCloseWindow();
virtual void HandleWindowClosed(Int_t id); virtual void HandleWindowClosed(Int_t id);
virtual void UpdateStatusBar(const char *text = 0); virtual void UpdateStatusBar(const char *text = 0);
virtual void EraseStatusBar(); virtual void EraseStatusBar();
virtual void SwitchToolbarButton(); virtual void SwitchToolbarButton();
TGMdiFrame *FindEditableMdiFrame(const TGWindow *win); TGMdiFrame *FindEditableMdiFrame(const TGWindow *win);
TGuiBldEditor *GetEditor() const { return fEditor; } TGuiBldEditor *GetEditor() const { return fEditor; }
TGDockableFrame *GetToolDock() const { return fToolDock; } TGDockableFrame *GetToolDock() const { return fToolDock; }
TGMdiMainFrame *GetMdiMain() const { return fMain; } TGMdiMainFrame *GetMdiMain() const { return fMain; }
TGMdiFrame *GetEditable() const { return fEditable; } TGMdiFrame *GetEditable() const { return fEditable; }
TGuiBldDragManager *GetManager() const { return fManager; }
static ULong_t GetBgnd(); static ULong_t GetBgnd();
static TGGC *GetBgndGC(); static TGGC *GetBgndGC();
static ULong_t GetPopupBgnd(); static ULong_t GetPopupBgnd();
static TGGC *GetPopupBgndGC(); static TGGC *GetPopupBgndGC();
static ULong_t GetPopupHlght(); static ULong_t GetPopupHlght();
static TGGC *GetPopupHlghtGC(); static TGGC *GetPopupHlghtGC();
 End of changes. 9 change blocks. 
7 lines changed or deleted 14 lines changed or added


 TSAXParser.h   TSAXParser.h 
// @(#)root/xmlparser:$Id: TSAXParser.h 25878 2008-10-18 19:12:08Z rdm $ // @(#)root/xmlparser:$Id: TSAXParser.h 29654 2009-07-31 14:34:14Z rdm $
// Author: Jose Lo 12/1/2005 // Author: Jose Lo 12/1/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 46 skipping to change at line 46
class TList; class TList;
class TSAXParserCallback; class TSAXParserCallback;
struct _xmlSAXHandler; struct _xmlSAXHandler;
class TSAXParser : public TXMLParser { class TSAXParser : public TXMLParser {
friend class TSAXParserCallback; friend class TSAXParserCallback;
private: private:
TSAXParser(const TSAXParser&); // Not implemented
TSAXParser& operator=(const TSAXParser&); // Not implemented
_xmlSAXHandler *fSAXHandler; // libxml2 SAX handler _xmlSAXHandler *fSAXHandler; // libxml2 SAX handler
virtual Int_t Parse(); virtual Int_t Parse();
TSAXParser(const TSAXParser&); // Not implemented
TSAXParser& operator=(const TSAXParser&); // Not implemented
public: public:
TSAXParser(); TSAXParser();
virtual ~TSAXParser(); virtual ~TSAXParser();
virtual Int_t ParseFile(const char *filename); virtual Int_t ParseFile(const char *filename);
virtual Int_t ParseBuffer(const char *contents, Int_t len); virtual Int_t ParseBuffer(const char *contents, Int_t len);
virtual void OnStartDocument(); //*SIGNAL* virtual void OnStartDocument(); //*SIGNAL*
virtual void OnEndDocument(); //*SIGNAL* virtual void OnEndDocument(); //*SIGNAL*
virtual void OnStartElement(const char *name, const TList *at tr); //*SIGNAL* virtual void OnStartElement(const char *name, const TList *at tr); //*SIGNAL*
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 TSQLServer.h   TSQLServer.h 
// @(#)root/net:$Id: TSQLServer.h 26487 2008-11-26 16:52:50Z rdm $ // @(#)root/net:$Id: TSQLServer.h 29321 2009-07-03 10:42:10Z brun $
// Author: Fons Rademakers 25/11/99 // Author: Fons Rademakers 25/11/99
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 62 skipping to change at line 62
TString fErrorMsg; // error message of last operation TString fErrorMsg; // error message of last operation
Bool_t fErrorOut; // enable error output Bool_t fErrorOut; // enable error output
TSQLServer() TSQLServer()
: fType(), fHost(), fDB(), fPort(-1), fErrorCode(0), : fType(), fHost(), fDB(), fPort(-1), fErrorCode(0),
fErrorMsg(), fErrorOut(kTRUE) { ClearError(); } fErrorMsg(), fErrorOut(kTRUE) { ClearError(); }
void ClearError(); void ClearError();
void SetError(Int_t code, const char* msg, const char* me thod = 0); void SetError(Int_t code, const char* msg, const char* me thod = 0);
static const char* fgFloatFmt; //! printf argument for floats
and doubles, either "%f" or "%e" or "%10f" and so on
public: public:
enum ESQLDataTypes { // data types, recognised by TSQLServer and other classes, extrction from ODBC enum ESQLDataTypes { // data types, recognised by TSQLServer and other classes, extrction from ODBC
kSQL_NONE = -1, // data type unknown kSQL_NONE = -1, // data type unknown
kSQL_CHAR = 1, // CHAR(n) - string with fixed length n kSQL_CHAR = 1, // CHAR(n) - string with fixed length n
kSQL_VARCHAR = 2, // VARCHAR(n) - string with variable length upto n kSQL_VARCHAR = 2, // VARCHAR(n) - string with variable length upto n
kSQL_INTEGER = 3, // INTEGER, INT - integer value kSQL_INTEGER = 3, // INTEGER, INT - integer value
kSQL_FLOAT = 4, // FLOAT - float value kSQL_FLOAT = 4, // FLOAT - float value
kSQL_DOUBLE = 5, // DOUBLE - double value kSQL_DOUBLE = 5, // DOUBLE - double value
kSQL_NUMERIC = 6, // NUMERIC - numeric values with length and prec ion kSQL_NUMERIC = 6, // NUMERIC - numeric values with length and prec ion
kSQL_BINARY = 7, // BLOB - binary data kSQL_BINARY = 7, // BLOB - binary data
skipping to change at line 116 skipping to change at line 118
virtual Bool_t StartTransaction(); virtual Bool_t StartTransaction();
virtual Bool_t Commit(); virtual Bool_t Commit();
virtual Bool_t Rollback(); virtual Bool_t Rollback();
virtual Bool_t PingVerify() { return kFALSE; } virtual Bool_t PingVerify() { return kFALSE; }
virtual Int_t Ping() { return -9999; } virtual Int_t Ping() { return -9999; }
static TSQLServer *Connect(const char *db, const char *uid, const char * pw); static TSQLServer *Connect(const char *db, const char *uid, const char * pw);
static void SetFloatFormat(const char* fmt = "%e");
static const char* GetFloatFormat();
ClassDef(TSQLServer,0) // Connection to SQL server ClassDef(TSQLServer,0) // Connection to SQL server
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 TSchemaRuleSet.h   TSchemaRuleSet.h 
// @(#)root/core:$Id: TSchemaRuleSet.h 27944 2009-03-26 14:33:51Z pcanal $ // @(#)root/core:$Id: TSchemaRuleSet.h 29272 2009-06-30 19:24:06Z pcanal $
// author: Lukasz Janyst <ljanyst@cern.ch> // author: Lukasz Janyst <ljanyst@cern.ch>
#ifndef ROOT_TSchemaRuleSet #ifndef ROOT_TSchemaRuleSet
#define ROOT_TSchemaRuleSet #define ROOT_TSchemaRuleSet
class TClass; class TClass;
#include "TObject.h" #include "TObject.h"
#include "TObjArray.h" #include "TObjArray.h"
#include "Rtypes.h" #include "Rtypes.h"
skipping to change at line 43 skipping to change at line 43
TSchemaRuleSet(); TSchemaRuleSet();
virtual ~TSchemaRuleSet(); virtual ~TSchemaRuleSet();
Bool_t AddRule( TSchemaRule* rule, Bool_t checkConsis tency = kTRUE ); Bool_t AddRule( TSchemaRule* rule, Bool_t checkConsis tency = kTRUE );
Bool_t AddRules( TSchemaRuleSet* rules, Bool_t checkC onsistency = kTRUE ); Bool_t AddRules( TSchemaRuleSet* rules, Bool_t checkC onsistency = kTRUE );
Bool_t HasRuleWithSourceClass( const TString &source) const; Bool_t HasRuleWithSourceClass( const TString &source) const;
const TObjArray* FindRules( const TString &source ) const; const TObjArray* FindRules( const TString &source ) const;
const TSchemaMatch* FindRules( const TString &source, Int_t versio n ) const; const TSchemaMatch* FindRules( const TString &source, Int_t versio n ) const;
const TSchemaMatch* FindRules( const TString &source, UInt_t check sum ) const; const TSchemaMatch* FindRules( const TString &source, UInt_t check sum ) const;
const TSchemaMatch* FindRules( const TString &source, Int_t versio n, UInt_t checksum ) const;
TClass* GetClass(); TClass* GetClass();
UInt_t GetClassCheckSum() const; UInt_t GetClassCheckSum() const;
TString GetClassName() const; TString GetClassName() const;
Int_t GetClassVersion() const; Int_t GetClassVersion() const;
const TObjArray* GetRules() const; const TObjArray* GetRules() const;
const TObjArray* GetPersistentRules() const; const TObjArray* GetPersistentRules() const;
void RemoveRule( TSchemaRule* rule ); void RemoveRule( TSchemaRule* rule );
void RemoveRules( TObjArray* rules ); void RemoveRules( TObjArray* rules );
void SetClass( TClass* cls ); void SetClass( TClass* cls );
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TSelectorDraw.h   TSelectorDraw.h 
// @(#)root/treeplayer:$Id: TSelectorDraw.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/treeplayer:$Id: TSelectorDraw.h 30157 2009-09-14 20:12:53Z pcan al $
// Author: Rene Brun 08/01/2003 // Author: Rene Brun 08/01/2003
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 82 skipping to change at line 82
TSelectorDraw(); TSelectorDraw();
virtual ~TSelectorDraw(); virtual ~TSelectorDraw();
virtual void Begin(TTree *tree); virtual void Begin(TTree *tree);
virtual Int_t GetAction() const {return fAction;} virtual Int_t GetAction() const {return fAction;}
virtual Bool_t GetCleanElist() const {return fCleanElist;} virtual Bool_t GetCleanElist() const {return fCleanElist;}
virtual Int_t GetDimension() const {return fDimension;} virtual Int_t GetDimension() const {return fDimension;}
virtual Long64_t GetDrawFlag() const {return fDraw;} virtual Long64_t GetDrawFlag() const {return fDraw;}
TObject *GetObject() const {return fObject;} TObject *GetObject() const {return fObject;}
Int_t GetMultiplicity() const {return fMultiplicity;} Int_t GetMultiplicity() const {return fMultiplicity;}
const char *GetNameByIndex(TString &varexp, Int_t *index,Int_t col index);
virtual Int_t GetNfill() const {return fNfill;} virtual Int_t GetNfill() const {return fNfill;}
TH1 *GetOldHistogram() const {return fOldHistogram;} TH1 *GetOldHistogram() const {return fOldHistogram;}
TTreeFormula *GetSelect() const {return fSelect;} TTreeFormula *GetSelect() const {return fSelect;}
virtual Long64_t GetSelectedRows() const {return fSelectedRows;} virtual Long64_t GetSelectedRows() const {return fSelectedRows;}
TTree *GetTree() const {return fTree;} TTree *GetTree() const {return fTree;}
TTreeFormula *GetVar(Int_t i) const; TTreeFormula *GetVar(Int_t i) const;
TTreeFormula *GetVar1() const {return GetVar(0);} TTreeFormula *GetVar1() const {return GetVar(0);}
TTreeFormula *GetVar2() const {return GetVar(1);} TTreeFormula *GetVar2() const {return GetVar(1);}
TTreeFormula *GetVar3() const {return GetVar(2);} TTreeFormula *GetVar3() const {return GetVar(2);}
TTreeFormula *GetVar4() const {return GetVar(3);} TTreeFormula *GetVar4() const {return GetVar(3);}
virtual Double_t *GetVal(Int_t i) const; virtual Double_t *GetVal(Int_t i) const;
virtual Double_t *GetV1() const {return GetVal(0);} virtual Double_t *GetV1() const {return GetVal(0);}
virtual Double_t *GetV2() const {return GetVal(1);} virtual Double_t *GetV2() const {return GetVal(1);}
virtual Double_t *GetV3() const {return GetVal(2);} virtual Double_t *GetV3() const {return GetVal(2);}
virtual Double_t *GetV4() const {return GetVal(3);} virtual Double_t *GetV4() const {return GetVal(3);}
virtual Double_t *GetW() const {return fW;} virtual Double_t *GetW() const {return fW;}
virtual void MakeIndex(TString &varexp, Int_t *index);
virtual Bool_t Notify(); virtual Bool_t Notify();
virtual Bool_t Process(Long64_t /*entry*/) { return kFALSE; } virtual Bool_t Process(Long64_t /*entry*/) { return kFALSE; }
virtual void ProcessFill(Long64_t entry); virtual void ProcessFill(Long64_t entry);
virtual void ProcessFillMultiple(Long64_t entry); virtual void ProcessFillMultiple(Long64_t entry);
virtual void ProcessFillObject(Long64_t entry); virtual void ProcessFillObject(Long64_t entry);
virtual void SetEstimate(Long64_t n); virtual void SetEstimate(Long64_t n);
virtual UInt_t SplitNames(const TString &varexp, std::vector<TString> &names);
virtual void TakeAction(); virtual void TakeAction();
virtual void TakeEstimate(); virtual void TakeEstimate();
virtual void Terminate(); virtual void Terminate();
ClassDef(TSelectorDraw,1); //A specialized TSelector for TTree::Draw ClassDef(TSelectorDraw,1); //A specialized TSelector for TTree::Draw
}; };
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 2 lines changed or added


 TStyle.h   TStyle.h 
// @(#)root/base:$Id: TStyle.h 20877 2007-11-19 11:17:07Z rdm $ // @(#)root/base:$Id: TStyle.h 30345 2009-09-22 07:17:46Z brun $
// Author: Rene Brun 12/12/94 // Author: Rene Brun 12/12/94
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 243 skipping to change at line 243
Int_t GetNumberContours() const {return fNumberContours;} Int_t GetNumberContours() const {return fNumberContours;}
Int_t GetOptDate() const {return fOptDate;} Int_t GetOptDate() const {return fOptDate;}
Int_t GetOptFile() const {return fOptFile;} Int_t GetOptFile() const {return fOptFile;}
Int_t GetOptFit() const {return fOptFit;} Int_t GetOptFit() const {return fOptFit;}
Int_t GetOptStat() const {return fOptStat;} Int_t GetOptStat() const {return fOptStat;}
Int_t GetOptTitle() const {return fOptTitle;} Int_t GetOptTitle() const {return fOptTitle;}
Int_t GetOptLogx() const {return fOptLogx;} Int_t GetOptLogx() const {return fOptLogx;}
Int_t GetOptLogy() const {return fOptLogy;} Int_t GetOptLogy() const {return fOptLogy;}
Int_t GetOptLogz() const {return fOptLogz;} Int_t GetOptLogz() const {return fOptLogz;}
const char *GetPaintTextFormat() const {return fPaintTextFormat.Dat a();} const char *GetPaintTextFormat() const {return fPaintTextFormat.Dat a();}
void GetPaperSize(Float_t &xsize, Float_t &ysize); void GetPaperSize(Float_t &xsize, Float_t &ysize) const;
Int_t GetShowEventStatus() const {return fShowEventStatus;} Int_t GetShowEventStatus() const {return fShowEventStatus;}
Int_t GetShowEditor() const {return fShowEditor;} Int_t GetShowEditor() const {return fShowEditor;}
Int_t GetShowToolBar() const {return fShowToolBar;} Int_t GetShowToolBar() const {return fShowToolBar;}
Float_t GetScreenFactor() const {return fScreenFactor;} Float_t GetScreenFactor() const {return fScreenFactor;}
Color_t GetStatColor() const {return fStatColor;} Color_t GetStatColor() const {return fStatColor;}
Color_t GetStatTextColor() const {return fStatTextColor;} Color_t GetStatTextColor() const {return fStatTextColor;}
Width_t GetStatBorderSize() const {return fStatBorderSize;} Width_t GetStatBorderSize() const {return fStatBorderSize;}
Style_t GetStatFont() const {return fStatFont;} Style_t GetStatFont() const {return fStatFont;}
Float_t GetStatFontSize() const {return fStatFontSize;} Float_t GetStatFontSize() const {return fStatFontSize;}
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TTabCom.h   TTabCom.h 
// @(#)root/rint:$Id: TTabCom.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/rint:$Id: TTabCom.h 30215 2009-09-17 10:25:41Z rdm $
// Author: Christian Lacunza <lacunza@cdfsg6.lbl.gov> 27/04/99 // Author: Christian Lacunza <lacunza@cdfsg6.lbl.gov> 27/04/99
// Modified by Artur Szostak <artur@alice.phy.uct.ac.za> : 1 June 2003 // Modified by Artur Szostak <artur@alice.phy.uct.ac.za> : 1 June 2003
// Added support for namespaces. // Added support for namespaces.
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
skipping to change at line 194 skipping to change at line 194
kCXX_GlobalProto, kCXX_GlobalProto,
// ------- make additions above this line --------- // ------- make additions above this line ---------
kNUM_PAT // kNUM_PAT must be last. (to fix array size) kNUM_PAT // kNUM_PAT must be last. (to fix array size)
}; };
private: // member functions private: // member functions
TTabCom(const TTabCom &); //private and not implemented TTabCom(const TTabCom &); //private and not implemented
TTabCom& operator=(const TTabCom&); //private and not implemented TTabCom& operator=(const TTabCom&); //private and not implemented
Int_t Complete( const TRegexp& re, const TSeqCollection* pListOfCan didates, const char appendage[] ); Int_t Complete( const TRegexp& re, const TSeqCollection* pListOfCan didates, const char appendage[], TString::ECaseCompare cmp = TString::kExac t);
void CopyMatch( char dest[], const char localName[], const char ap pendage[]=0, const char fullName[]=0 ) const; void CopyMatch( char dest[], const char localName[], const char ap pendage[]=0, const char fullName[]=0 ) const;
EContext_t DetermineContext() const; EContext_t DetermineContext() const;
TString DeterminePath( const TString& fileName, const char defaultPat h[] ) const; TString DeterminePath( const TString& fileName, const char defaultPat h[] ) const;
TString ExtendPath( const char originalPath[], TString newBase ) cons t; TString ExtendPath( const char originalPath[], TString newBase ) cons t;
void InitPatterns(); void InitPatterns();
TClass* MakeClassFromClassName( const char className[] ) const; TClass* MakeClassFromClassName( const char className[] ) const;
TClass* TryMakeClassFromClassName( const char className[] ) const; TClass* TryMakeClassFromClassName( const char className[] ) const;
TClass* MakeClassFromVarName( const char varName[], EContext_t& conte xt, TClass* MakeClassFromVarName( const char varName[], EContext_t& conte xt,
int iter=0); int iter=0);
void SetPattern( EContext_t handle, const char regexp[] ); void SetPattern( EContext_t handle, const char regexp[] );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TThreadFactory.h   TThreadFactory.h 
// @(#)root/thread:$Id: TThreadFactory.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/thread:$Id: TThreadFactory.h 29797 2009-08-17 14:35:51Z rdm $
// Author: Fons Rademakers 01/07/97 // Author: Fons Rademakers 01/07/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 39 skipping to change at line 39
class TConditionImp; class TConditionImp;
class TThreadImp; class TThreadImp;
class TThread; class TThread;
class TThreadFactory : public TNamed { class TThreadFactory : public TNamed {
public: public:
TThreadFactory(const char *name = "Unknown", const char *title = "Unknow n Thread Factory"); TThreadFactory(const char *name = "Unknown", const char *title = "Unknow n Thread Factory");
virtual ~TThreadFactory() { } virtual ~TThreadFactory() { }
virtual TMutexImp *CreateMutexImp() = 0; virtual TMutexImp *CreateMutexImp(Bool_t recursive) = 0;
virtual TConditionImp *CreateConditionImp(TMutexImp *m) = 0; virtual TConditionImp *CreateConditionImp(TMutexImp *m) = 0;
virtual TThreadImp *CreateThreadImp() = 0; virtual TThreadImp *CreateThreadImp() = 0;
ClassDef(TThreadFactory,0) // Thread factory ABC ClassDef(TThreadFactory,0) // Thread factory ABC
}; };
R__EXTERN TThreadFactory *gThreadFactory; R__EXTERN TThreadFactory *gThreadFactory;
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TTimeStamp.h   TTimeStamp.h 
// @(#)root/base:$Id: TTimeStamp.h 24597 2008-06-28 13:43:06Z rdm $ // @(#)root/base:$Id: TTimeStamp.h 29770 2009-08-12 16:40:27Z rdm $
// Author: R. Hatcher 30/9/2001 // Author: R. Hatcher 30/9/2001
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 53 skipping to change at line 53
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef ROOT_Riosfwd #ifndef ROOT_Riosfwd
#include "Riosfwd.h" #include "Riosfwd.h"
#endif #endif
#include <time.h> #include <time.h>
#if !defined(__CINT__) && (defined(R__MACOSX) || defined(R__OBSD)) #if !defined(__CINT__) && (defined(R__MACOSX) || defined(R__OBSD))
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#if defined(__CINT__) || defined(R__WIN32) || \ #if defined(__CINT__) || defined(R__WIN32)
(defined(R__LINUX) && defined(R__KCC) && !defined(__timespec_defined))
// Explicit definition of timespec 'cause "rootcint" won't look in // Explicit definition of timespec 'cause "rootcint" won't look in
// appropriate <time.h>. time_t appears to be defined as "typedef long time _t;" // appropriate <time.h>. time_t appears to be defined as "typedef long time _t;"
// in CINT version of <time.h>. This isn't required by the standard: // in CINT version of <time.h>. This isn't required by the standard:
// to be compatible w/ std functions it must be at least 32-bits long, // to be compatible w/ std functions it must be at least 32-bits long,
// but it might be longer to avoid the year-2037 cutoff. // but it might be longer to avoid the year-2037 cutoff.
struct timespec struct timespec
{ {
time_t tv_sec; // seconds time_t tv_sec; // seconds
long tv_nsec; // nanoseconds long tv_nsec; // nanoseconds
}; };
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added


 TTree.h   TTree.h 
// @(#)root/tree:$Id: TTree.h 28831 2009-06-05 11:45:41Z pcanal $ // @(#)root/tree:$Id: TTree.h 30219 2009-09-17 12:29:31Z brun $
// Author: Rene Brun 12/01/96 // Author: Rene Brun 12/01/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 101 skipping to change at line 101
protected: protected:
Long64_t fEntries; // Number of entries Long64_t fEntries; // Number of entries
Long64_t fTotBytes; // Total number of bytes in all bran ches before compression Long64_t fTotBytes; // Total number of bytes in all bran ches before compression
Long64_t fZipBytes; // Total number of bytes in all bran ches after compression Long64_t fZipBytes; // Total number of bytes in all bran ches after compression
Long64_t fSavedBytes; // Number of autosaved bytes Long64_t fSavedBytes; // Number of autosaved bytes
Double_t fWeight; // Tree weight (see TTree::SetWeight ) Double_t fWeight; // Tree weight (see TTree::SetWeight )
Int_t fTimerInterval; // Timer interval in milliseconds Int_t fTimerInterval; // Timer interval in milliseconds
Int_t fScanField; // Number of runs before prompting i n Scan Int_t fScanField; // Number of runs before prompting i n Scan
Int_t fUpdate; // Update frequency for EntryLoop Int_t fUpdate; // Update frequency for EntryLoop
Int_t fDefaultEntryOffsetLen; // Initial Length of fEntryOffs et table in the basket buffers
Long64_t fMaxEntries; // Maximum number of entries in case of circular buffers Long64_t fMaxEntries; // Maximum number of entries in case of circular buffers
Long64_t fMaxEntryLoop; // Maximum number of entries to proc ess Long64_t fMaxEntryLoop; // Maximum number of entries to proc ess
Long64_t fMaxVirtualSize; // Maximum total size of buffers kep t in memory Long64_t fMaxVirtualSize; // Maximum total size of buffers kep t in memory
Long64_t fAutoSave; // Autosave tree when fAutoSave byte s produced Long64_t fAutoSave; // Autosave tree when fAutoSave byte s produced
Long64_t fEstimate; // Number of entries to estimate his togram limits Long64_t fEstimate; // Number of entries to estimate his togram limits
Long64_t fCacheSize; //! Maximum size of file buffers Long64_t fCacheSize; //! Maximum size of file buffers
Long64_t fChainOffset; //! Offset of 1st entry of this Tree in a TChain Long64_t fChainOffset; //! Offset of 1st entry of this Tree in a TChain
Long64_t fReadEntry; //! Number of the entry being process ed Long64_t fReadEntry; //! Number of the entry being process ed
Long64_t fTotalBuffers; //! Total number of bytes in branch b uffers Long64_t fTotalBuffers; //! Total number of bytes in branch b uffers
Int_t fPacketSize; //! Number of entries in one packet f or parallel root Int_t fPacketSize; //! Number of entries in one packet f or parallel root
skipping to change at line 143 skipping to change at line 144
static Int_t fgBranchStyle; // Old/New branch style static Int_t fgBranchStyle; // Old/New branch style
static Long64_t fgMaxTreeSize; // Maximum size of a file containg a Tree static Long64_t fgMaxTreeSize; // Maximum size of a file containg a Tree
private: private:
TTree(const TTree& tt); // not implemented TTree(const TTree& tt); // not implemented
TTree& operator=(const TTree& tt); // not implemented TTree& operator=(const TTree& tt); // not implemented
protected: protected:
void AddClone(TTree*); void AddClone(TTree*);
const char *GetNameByIndex(TString& varexp, Int_t* index, Int_t col index) const;
virtual void KeepCircular(); virtual void KeepCircular();
virtual void MakeIndex(TString& varexp, Int_t* index);
virtual TBranch *BranchImp(const char* branchname, const char* classname , TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel); virtual TBranch *BranchImp(const char* branchname, const char* classname , TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
virtual TBranch *BranchImp(const char* branchname, TClass* ptrClass, voi d* addobj, Int_t bufsize, Int_t splitlevel); virtual TBranch *BranchImp(const char* branchname, TClass* ptrClass, voi d* addobj, Int_t bufsize, Int_t splitlevel);
virtual TBranch *BranchImpRef(const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel); virtual TBranch *BranchImpRef(const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel);
virtual Bool_t CheckBranchAddressType(TBranch* branch, TClass* ptrClas s, EDataType datatype, Bool_t ptr); virtual Int_t CheckBranchAddressType(TBranch* branch, TClass* ptrClas s, EDataType datatype, Bool_t ptr);
virtual TBranch *BronchExec(const char* name, const char* classname, voi d* addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel); virtual TBranch *BronchExec(const char* name, const char* classname, voi d* addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel);
friend TBranch *TTreeBranchImpRef(TTree *tree, const char* branchname, T Class* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t spl itlevel); friend TBranch *TTreeBranchImpRef(TTree *tree, const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t sp litlevel);
class TFriendLock { class TFriendLock {
// Helper class to prevent infinite recursion in the // Helper class to prevent infinite recursion in the
// usage of TTree Friends. Implemented in TTree.cxx. // usage of TTree Friends. Implemented in TTree.cxx.
TTree *fTree; // Pointer to the locked tree TTree *fTree; // Pointer to the locked tree
UInt_t fMethodBit; // BIT for the locked method UInt_t fMethodBit; // BIT for the locked method
Bool_t fPrevious; // Previous value of the BIT. Bool_t fPrevious; // Previous value of the BIT.
protected: protected:
TFriendLock(const TFriendLock&); TFriendLock(const TFriendLock&);
skipping to change at line 187 skipping to change at line 186
kGetEntryWithIndex = BIT(5), kGetEntryWithIndex = BIT(5),
kGetFriend = BIT(6), kGetFriend = BIT(6),
kGetFriendAlias = BIT(7), kGetFriendAlias = BIT(7),
kGetLeaf = BIT(8), kGetLeaf = BIT(8),
kLoadTree = BIT(9), kLoadTree = BIT(9),
kPrint = BIT(10), kPrint = BIT(10),
kRemoveFriend = BIT(12), kRemoveFriend = BIT(12),
kSetBranchStatus = BIT(12) kSetBranchStatus = BIT(12)
}; };
enum SetBranchAddressStatus {
kMissingBranch = -5,
kInternalError = -4,
kMissingCompiledCollectionProxy = -3,
kMismatch = -2,
kClassMismatch = -1,
kMatch = 0,
kMatchConversion = 1,
kMatchConversionCollection = 2,
kMakeClass = 3,
kVoidPtr = 4,
kNoCheck = 5
};
public: public:
// TTree status bits // TTree status bits
enum { enum {
kForceRead = BIT(11), kForceRead = BIT(11),
kCircular = BIT(12) kCircular = BIT(12)
}; };
TTree(); TTree();
TTree(const char* name, const char* title, Int_t splitlevel = 99); TTree(const char* name, const char* title, Int_t splitlevel = 99);
virtual ~TTree(); virtual ~TTree();
virtual void AddBranchToCache(const char *bname, Bool_t subbr
anches = kFALSE);
virtual void AddBranchToCache(TBranch *branch, Bool_t subbr
anches = kFALSE);
virtual TFriendElement *AddFriend(const char* treename, const char* file name = ""); virtual TFriendElement *AddFriend(const char* treename, const char* file name = "");
virtual TFriendElement *AddFriend(const char* treename, TFile* file); virtual TFriendElement *AddFriend(const char* treename, TFile* file);
virtual TFriendElement *AddFriend(TTree* tree, const char* alias = "", B ool_t warn = kFALSE); virtual TFriendElement *AddFriend(TTree* tree, const char* alias = "", B ool_t warn = kFALSE);
virtual void AddTotBytes(Int_t tot) { fTotBytes += tot; } virtual void AddTotBytes(Int_t tot) { fTotBytes += tot; }
virtual void AddZipBytes(Int_t zip) { fZipBytes += zip; } virtual void AddZipBytes(Int_t zip) { fZipBytes += zip; }
virtual Long64_t AutoSave(Option_t* option = ""); virtual Long64_t AutoSave(Option_t* option = "");
virtual Int_t Branch(TCollection* list, Int_t bufsize = 32000, Int_t splitlevel = 99, const char* name = ""); virtual Int_t Branch(TCollection* list, Int_t bufsize = 32000, Int_t splitlevel = 99, const char* name = "");
virtual Int_t Branch(TList* list, Int_t bufsize = 32000, Int_t splitlevel = 99); virtual Int_t Branch(TList* list, Int_t bufsize = 32000, Int_t splitlevel = 99);
virtual Int_t Branch(const char* folder, Int_t bufsize = 32000 , Int_t splitlevel = 99); virtual Int_t Branch(const char* folder, Int_t bufsize = 32000 , Int_t splitlevel = 99);
virtual TBranch *Branch(const char* name, void* address, const ch ar* leaflist, Int_t bufsize = 32000); virtual TBranch *Branch(const char* name, void* address, const ch ar* leaflist, Int_t bufsize = 32000);
skipping to change at line 260 skipping to change at line 275
virtual Int_t FlushBaskets() const; virtual Int_t FlushBaskets() const;
virtual const char *GetAlias(const char* aliasName) const; virtual const char *GetAlias(const char* aliasName) const;
virtual TBranch *GetBranch(const char* name); virtual TBranch *GetBranch(const char* name);
virtual TBranchRef *GetBranchRef() const { return fBranchRef; }; virtual TBranchRef *GetBranchRef() const { return fBranchRef; };
virtual Bool_t GetBranchStatus(const char* branchname) const; virtual Bool_t GetBranchStatus(const char* branchname) const;
static Int_t GetBranchStyle(); static Int_t GetBranchStyle();
virtual Long64_t GetCacheSize() const { return fCacheSize; } virtual Long64_t GetCacheSize() const { return fCacheSize; }
virtual Long64_t GetChainEntryNumber(Long64_t entry) const { retu rn entry; } virtual Long64_t GetChainEntryNumber(Long64_t entry) const { retu rn entry; }
virtual Long64_t GetChainOffset() const { return fChainOffset; } virtual Long64_t GetChainOffset() const { return fChainOffset; }
TFile *GetCurrentFile() const; TFile *GetCurrentFile() const;
Int_t GetDefaultEntryOffsetLen() const {return fDefaul tEntryOffsetLen;}
Long64_t GetDebugMax() const { return fDebugMax; } Long64_t GetDebugMax() const { return fDebugMax; }
Long64_t GetDebugMin() const { return fDebugMin; } Long64_t GetDebugMin() const { return fDebugMin; }
TDirectory *GetDirectory() const { return fDirectory; } TDirectory *GetDirectory() const { return fDirectory; }
virtual Long64_t GetEntries() const { return fEntries; } virtual Long64_t GetEntries() const { return fEntries; }
virtual Long64_t GetEntries(const char *selection); virtual Long64_t GetEntries(const char *selection);
virtual Long64_t GetEntriesFast() const { return fEntries; } virtual Long64_t GetEntriesFast() const { return fEntries; }
virtual Long64_t GetEntriesFriend() const; virtual Long64_t GetEntriesFriend() const;
virtual Long64_t GetEstimate() const { return fEstimate; } virtual Long64_t GetEstimate() const { return fEstimate; }
virtual Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0); virtual Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0);
Int_t GetEvent(Long64_t entry = 0, Int_t getall = 0) { return GetEntry(entry, getall); } Int_t GetEvent(Long64_t entry = 0, Int_t getall = 0) { return GetEntry(entry, getall); }
skipping to change at line 341 skipping to change at line 357
virtual Long64_t LoadTree(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry);
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree* T); virtual Long64_t LoadTreeFriend(Long64_t entry, TTree* T);
virtual Int_t MakeClass(const char* classname = 0, Option_t* o ption = ""); virtual Int_t MakeClass(const char* classname = 0, Option_t* o ption = "");
virtual Int_t MakeCode(const char* filename = 0); virtual Int_t MakeCode(const char* filename = 0);
virtual Int_t MakeProxy(const char* classname, const char* mac rofilename = 0, const char* cutfilename = 0, const char* option = 0, Int_t maxUnrolling = 3); virtual Int_t MakeProxy(const char* classname, const char* mac rofilename = 0, const char* cutfilename = 0, const char* option = 0, Int_t maxUnrolling = 3);
virtual Int_t MakeSelector(const char* selector = 0); virtual Int_t MakeSelector(const char* selector = 0);
Bool_t MemoryFull(Int_t nbytes); Bool_t MemoryFull(Int_t nbytes);
virtual Long64_t Merge(TCollection* list, Option_t* option = ""); virtual Long64_t Merge(TCollection* list, Option_t* option = "");
static TTree *MergeTrees(TList* list, Option_t* option = ""); static TTree *MergeTrees(TList* list, Option_t* option = "");
virtual Bool_t Notify(); virtual Bool_t Notify();
virtual void OptimizeBaskets(Int_t maxMemory=10000000, Float_ t minComp=1.1, Option_t *option="");
TPrincipal *Principal(const char* varexp = "", const char* s election = "", Option_t* option = "np", Long64_t nentries = 1000000000, Lon g64_t firstentry = 0); TPrincipal *Principal(const char* varexp = "", const char* s election = "", Option_t* option = "np", Long64_t nentries = 1000000000, Lon g64_t firstentry = 0);
virtual void Print(Option_t* option = "") const; // *MENU* virtual void Print(Option_t* option = "") const; // *MENU*
virtual void PrintCacheStats(Option_t* option = "") const;
virtual Long64_t Process(const char* filename, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); // *MENU* virtual Long64_t Process(const char* filename, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); // *MENU*
#if defined(__CINT__) #if defined(__CINT__)
#if defined(R__MANUAL_DICT) #if defined(R__MANUAL_DICT)
virtual Long64_t Process(void* selector, Option_t* option = "", L ong64_t nentries = 1000000000, Long64_t firstentry = 0); virtual Long64_t Process(void* selector, Option_t* option = "", L ong64_t nentries = 1000000000, Long64_t firstentry = 0);
#endif #endif
#else #else
virtual Long64_t Process(TSelector* selector, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); virtual Long64_t Process(TSelector* selector, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0);
#endif #endif
virtual Long64_t Project(const char* hname, const char* varexp, c onst char* selection = "", Option_t* option = "", Long64_t nentries = 10000 00000, Long64_t firstentry = 0); virtual Long64_t Project(const char* hname, const char* varexp, c onst char* selection = "", Option_t* option = "", Long64_t nentries = 10000 00000, Long64_t firstentry = 0);
virtual TSQLResult *Query(const char* varexp = "", const char* selec tion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); virtual TSQLResult *Query(const char* varexp = "", const char* selec tion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0);
skipping to change at line 365 skipping to change at line 383
virtual void RecursiveRemove(TObject *obj); virtual void RecursiveRemove(TObject *obj);
virtual void RemoveFriend(TTree*); virtual void RemoveFriend(TTree*);
virtual void Reset(Option_t* option = ""); virtual void Reset(Option_t* option = "");
virtual void ResetBranchAddress(TBranch *); virtual void ResetBranchAddress(TBranch *);
virtual void ResetBranchAddresses(); virtual void ResetBranchAddresses();
virtual Long64_t Scan(const char* varexp = "", const char* select ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f irstentry = 0); // *MENU* virtual Long64_t Scan(const char* varexp = "", const char* select ion = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t f irstentry = 0); // *MENU*
virtual Bool_t SetAlias(const char* aliasName, const char* alia sFormula); virtual Bool_t SetAlias(const char* aliasName, const char* alia sFormula);
virtual void SetAutoSave(Long64_t autos = 10000000) { fAutoSa ve=autos; } virtual void SetAutoSave(Long64_t autos = 10000000) { fAutoSa ve=autos; }
virtual void SetBasketSize(const char* bname, Int_t buffsize = 16000); virtual void SetBasketSize(const char* bname, Int_t buffsize = 16000);
#if !defined(__CINT__) #if !defined(__CINT__)
virtual void SetBranchAddress(const char *bname,void *add, TBran ch **ptr = 0); virtual Int_t SetBranchAddress(const char *bname,void *add, TB ranch **ptr = 0);
#endif #endif
virtual void SetBranchAddress(const char *bname,void *add, TClas virtual Int_t SetBranchAddress(const char *bname,void *add, TC
s *realClass, EDataType datatype, Bool_t isptr); lass *realClass, EDataType datatype, Bool_t isptr);
virtual void SetBranchAddress(const char *bname,void *add, TBran virtual Int_t SetBranchAddress(const char *bname,void *add, TB
ch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr); ranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr);
template <class T> void SetBranchAddress(const char *bname, T **add, TBr template <class T> Int_t SetBranchAddress(const char *bname, T **add, TB
anch **ptr = 0) { ranch **ptr = 0) {
SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDataType: return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
:GetType(typeid(T)),true); taType::GetType(typeid(T)),true);
} }
#ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION
// This can only be used when the template overload resolution can distr inguish between // This can only be used when the template overload resolution can distr inguish between
// T* and T** // T* and T**
template <class T> void SetBranchAddress(const char *bname, T *add, TBra template <class T> Int_t SetBranchAddress(const char *bname, T *add, TBr
nch **ptr = 0) { anch **ptr = 0) {
SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDataType: return SetBranchAddress(bname,add,ptr,TClass::GetClass(typeid(T)),TDa
:GetType(typeid(T)),false); taType::GetType(typeid(T)),false);
} }
#endif #endif
virtual void SetBranchStatus(const char* bname, Bool_t status = 1, UInt_t* found = 0); virtual void SetBranchStatus(const char* bname, Bool_t status = 1, UInt_t* found = 0);
static void SetBranchStyle(Int_t style = 1); //style=0 for old branch, =1 for new branch style static void SetBranchStyle(Int_t style = 1); //style=0 for old branch, =1 for new branch style
virtual void SetCacheSize(Long64_t cachesize = 10000000); virtual void SetCacheSize(Long64_t cachesize = 10000000);
virtual void SetCacheEntryRange(Long64_t first, Long64_t last
);
virtual void SetCacheLearnEntries(Int_t n=10);
virtual void SetChainOffset(Long64_t offset = 0) { fChainOffs et=offset; } virtual void SetChainOffset(Long64_t offset = 0) { fChainOffs et=offset; }
virtual void SetCircular(Long64_t maxEntries); virtual void SetCircular(Long64_t maxEntries);
virtual void SetDebug(Int_t level = 1, Long64_t min = 0, Long 64_t max = 9999999); // *MENU* virtual void SetDebug(Int_t level = 1, Long64_t min = 0, Long 64_t max = 9999999); // *MENU*
virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_ t updateExisting = kFALSE);
virtual void SetDirectory(TDirectory* dir); virtual void SetDirectory(TDirectory* dir);
virtual Long64_t SetEntries(Long64_t n = -1); virtual Long64_t SetEntries(Long64_t n = -1);
virtual void SetEstimate(Long64_t nentries = 10000); virtual void SetEstimate(Long64_t nentries = 10000);
virtual void SetFileNumber(Int_t number = 0); virtual void SetFileNumber(Int_t number = 0);
virtual void SetEventList(TEventList* list); virtual void SetEventList(TEventList* list);
virtual void SetEntryList(TEntryList* list, Option_t *opt="") ; virtual void SetEntryList(TEntryList* list, Option_t *opt="") ;
virtual void SetMakeClass(Int_t make) { fMakeClass = make; } virtual void SetMakeClass(Int_t make) { fMakeClass = make; }
virtual void SetMaxEntryLoop(Long64_t maxev = 1000000000) { f MaxEntryLoop = maxev; } // *MENU* virtual void SetMaxEntryLoop(Long64_t maxev = 1000000000) { f MaxEntryLoop = maxev; } // *MENU*
static void SetMaxTreeSize(Long64_t maxsize = 1900000000); static void SetMaxTreeSize(Long64_t maxsize = 1900000000);
virtual void SetMaxVirtualSize(Long64_t size = 0) { fMaxVirtu alSize = size; } // *MENU* virtual void SetMaxVirtualSize(Long64_t size = 0) { fMaxVirtu alSize = size; } // *MENU*
virtual void SetName(const char* name); // *MENU* virtual void SetName(const char* name); // *MENU*
virtual void SetNotify(TObject* obj) { fNotify = obj; } virtual void SetNotify(TObject* obj) { fNotify = obj; }
virtual void SetObject(const char* name, const char* title); virtual void SetObject(const char* name, const char* title);
virtual void SetParallelUnzip(Bool_t opt=kTRUE);
virtual void SetScanField(Int_t n = 50) { fScanField = n; } / / *MENU* virtual void SetScanField(Int_t n = 50) { fScanField = n; } / / *MENU*
virtual void SetTimerInterval(Int_t msec = 333) { fTimerInter val=msec; } virtual void SetTimerInterval(Int_t msec = 333) { fTimerInter val=msec; }
virtual void SetTreeIndex(TVirtualIndex*index); virtual void SetTreeIndex(TVirtualIndex*index);
virtual void SetWeight(Double_t w = 1, Option_t* option = "") ; virtual void SetWeight(Double_t w = 1, Option_t* option = "") ;
virtual void SetUpdate(Int_t freq = 0) { fUpdate = freq; } virtual void SetUpdate(Int_t freq = 0) { fUpdate = freq; }
virtual void Show(Long64_t entry = -1, Int_t lenmax = 20); virtual void Show(Long64_t entry = -1, Int_t lenmax = 20);
virtual void StartViewer(); // *MENU* virtual void StartViewer(); // *MENU*
virtual void StopCacheLearningPhase();
virtual Int_t UnbinnedFit(const char* funcname, const char* va rexp, const char* selection = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0); virtual Int_t UnbinnedFit(const char* funcname, const char* va rexp, const char* selection = "", Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0);
void UseCurrentStyle(); void UseCurrentStyle();
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0); virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0);
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const; virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const;
ClassDef(TTree,16) //Tree descriptor (the main ROOT I/O class) ClassDef(TTree,17) //Tree descriptor (the main ROOT I/O class)
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TTreeFriendLeafIter // // TTreeFriendLeafIter //
// // // //
// Iterator on all the leaves in a TTree and its friend // // Iterator on all the leaves in a TTree and its friend //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 End of changes. 19 change blocks. 
19 lines changed or deleted 45 lines changed or added


 TTreeCache.h   TTreeCache.h 
// @(#)root/tree:$Id: TTreeCache.h 23685 2008-05-07 15:18:39Z brun $ // @(#)root/tree:$Id: TTreeCache.h 30208 2009-09-16 17:30:17Z brun $
// Author: Rene Brun 04/06/2006 // Author: Rene Brun 04/06/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 73 skipping to change at line 73
Double_t GetEfficiencyRel(); Double_t GetEfficiencyRel();
static Int_t GetLearnEntries(); static Int_t GetLearnEntries();
virtual Bool_t GetSkipZip() { return kFALSE; } // This function is only used by TTreeCacheUnzip (ignore it) virtual Bool_t GetSkipZip() { return kFALSE; } // This function is only used by TTreeCacheUnzip (ignore it)
virtual Bool_t FillBuffer(); virtual Bool_t FillBuffer();
TTree *GetOwner() const; TTree *GetOwner() const;
TTree *GetTree() const; TTree *GetTree() const;
Bool_t IsLearning() const {return fIsLearning;} Bool_t IsLearning() const {return fIsLearning;}
virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len); virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
virtual void ResetCache(); virtual void ResetCache();
virtual void SetEntryRange(Long64_t emin, Long64_t emax); virtual void SetEntryRange(Long64_t emin, Long64_t emax);
static void SetLearnEntries(Int_t n = 100); static void SetLearnEntries(Int_t n = 10);
virtual void SetSkipZip(Bool_t skip = kTRUE) { (void)skip; return ; } // This function is only used by TTreeCacheUnzip (ignore it) virtual void SetSkipZip(Bool_t skip = kTRUE) { (void)skip; return ; } // This function is only used by TTreeCacheUnzip (ignore it)
void StartLearningPhase(); void StartLearningPhase();
virtual void StopLearningPhase(); virtual void StopLearningPhase();
virtual void UpdateBranches(TTree *tree, Bool_t owner = kFALSE); virtual void UpdateBranches(TTree *tree, Bool_t owner = kFALSE);
ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree ClassDef(TTreeCache,2) //Specialization of TFileCacheRead for a TTree
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TTreeCacheUnzip.h   TTreeCacheUnzip.h 
// @(#)root/tree:$Id: TTreeCacheUnzip.h 23685 2008-05-07 15:18:39Z brun $ // @(#)root/tree:$Id: TTreeCacheUnzip.h 29886 2009-08-24 14:58:18Z brun $
// Author: Rene Brun 04/06/2006 // Author: Rene Brun 04/06/2006
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TTreeCacheUnzip #ifndef ROOT_TTreeCacheUnzip
#define ROOT_TTreeCacheUnzip #define ROOT_TTreeCacheUnzip
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// // // //
// TTreeCacheUnzip // // TTreeCacheUnzip //
// // // //
// Specialization of TTreeCache for parallel Unzipping // // Specialization of TTreeCache for parallel Unzipping //
// // // //
// Fabrizio Furano (CERN) Aug 2009 //
// Core TTree-related code borrowed from the previous version //
// by Leandro Franco and Rene Brun //
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TTreeCache #ifndef ROOT_TTreeCache
#include "TTreeCache.h" #include "TTreeCache.h"
#endif #endif
#include <queue>
class TTree; class TTree;
class TBranch; class TBranch;
class TThread; class TThread;
class TCondition; class TCondition;
class TBasket; class TBasket;
class TMutex; class TMutex;
class TTreeCacheUnzip : public TTreeCache { class TTreeCacheUnzip : public TTreeCache {
public: public:
// We have three possibilities for the unzipping mode: // We have three possibilities for the unzipping mode:
// enable, disable and force // enable, disable and force
enum EParUnzipMode { kEnable, kDisable, kForce }; enum EParUnzipMode { kEnable, kDisable, kForce };
protected: protected:
TMutex *fMutexCache;
// Members for paral. managing // Members for paral. managing
TThread *fUnzipThread; TThread *fUnzipThread[10];
Bool_t fActiveThread; Bool_t fActiveThread; // Used to terminate gracefully the
TCondition *fUnzipCondition; unzippers
Bool_t fNewTransfer; // Used to indicate the second thread tah TCondition *fUnzipStartCondition; // Used to signal the threads to sta
t a new transfer is in progress rt.
Bool_t fParallel; // Indicate if we want to activate the pa TCondition *fUnzipDoneCondition; // Used to wait for an unzip tour to
rallelism (for this instance) finish. Gives the Async feel.
Bool_t fParallel; // Indicate if we want to activate t
TMutex *fMutexBuffer; // Mutex to protect the unzipping buffer he parallelism (for this instance)
'fUnzipBuffer' Bool_t fAsyncReading;
TMutex *fMutexList; // Mutex to protect the list of inflated TMutex *fMutexList; // Mutex to protect the various list
buffer s. Used by the condvars.
Int_t fTmpBufferSz; //! Size for the fTmpBuffer (default is
10KB... used to unzip a buffer)
char *fTmpBuffer; //! [fTmpBufferSz] buffer of contiguous u
nzipped blocks
Int_t fCycle;
static TTreeCacheUnzip::EParUnzipMode fgParallel; // Indicate if we wan t to activate the parallelism static TTreeCacheUnzip::EParUnzipMode fgParallel; // Indicate if we wan t to activate the parallelism
Int_t fLastReadPos;
// Members to keep track of the unzipping buffer // Members to keep track of the unzipping buffer
Long64_t fPosWrite; Long64_t fPosWrite;
// Unzipping related member // Unzipping related members
Int_t *fUnzipLen; //! [fNseek] Length of buffers to be unzi Int_t *fUnzipLen; //! [fNseek] Length of the unzipped buffe
pped rs
Int_t *fUnzipPos; //! [fNseek] Position of sorted blocks in char **fUnzipChunks; //! [fNseek] Individual unzipped chunks.
fUnzipBuffer Their summed size is kept under control.
Byte_t *fUnzipStatus; //! [fNSeek] For each blk, tells us if it
's unzipped or pending
Long64_t fTotalUnzipBytes; //! The total sum of the currently unzipp
ed blks
Int_t fNseekMax; //! fNseek can change so we need to know its max size Int_t fNseekMax; //! fNseek can change so we need to know its max size
Long64_t fUnzipBufferSize; //! Size for the fUnzipBuffer (default i Long64_t fUnzipBufferSize; //! Max Size for the ready unzipped bloc
s 2*fBufferSize) ks (default is 2*fBufferSize)
char *fUnzipBuffer; //! [fTotBytes] buffer of contiguous unzi
pped blocks
Bool_t fSkipZip; // say if we should skip the uncompressi on of all buffers Bool_t fSkipZip; // say if we should skip the uncompressi on of all buffers
static Double_t fgRelBuffSize; // This is the percentage of the TTreeCac heUnzip that will be used static Double_t fgRelBuffSize; // This is the percentage of the TTreeCac heUnzip that will be used
//! keep track of the buffer we are currently unzipping //! keep track of the buffer set we are currently unzipping
Int_t fUnzipStart; //! This will give uf the start index (fS eekSort) Int_t fUnzipStart; //! This will give uf the start index (fS eekSort)
Int_t fUnzipEnd; //! Unzipped buffers go from fUnzipStart to fUnzipEnd Int_t fUnzipEnd; //! Unzipped buffers go from fUnzipStart to fUnzipEnd
Int_t fUnzipNext; //! From fUnzipEnd to fUnzipNext we have to buffer that will be unzipped soon
// Members use to keep statistics // Members use to keep statistics
Int_t fNUnzip; //! number of blocks that were unzipped Int_t fNUnzip; //! number of blocks that were unzipped
Int_t fNFound; //! number of blocks that were found in t he cache Int_t fNFound; //! number of blocks that were found in t he cache
Int_t fNMissed; //! number of blocks that were not found in the cache and were unzipped Int_t fNMissed; //! number of blocks that were not found in the cache and were unzipped
std::queue<Int_t> fActiveBlks; // The blocks which are active now
private: private:
TTreeCacheUnzip(const TTreeCacheUnzip &); //this class cannot be copied TTreeCacheUnzip(const TTreeCacheUnzip &); //this class cannot be copied
TTreeCacheUnzip& operator=(const TTreeCacheUnzip &); TTreeCacheUnzip& operator=(const TTreeCacheUnzip &);
// Private methods // Private methods
void Init(); void Init();
Int_t StartThreadUnzip(); Int_t StartThreadUnzip(Int_t nthreads);
Int_t StopThreadUnzip(); Int_t StopThreadUnzip();
public: public:
TTreeCacheUnzip(); TTreeCacheUnzip();
TTreeCacheUnzip(TTree *tree, Int_t buffersize=0); TTreeCacheUnzip(TTree *tree, Int_t buffersize=0);
virtual ~TTreeCacheUnzip(); virtual ~TTreeCacheUnzip();
virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE); virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE);
virtual void AddBranch(const char *branch, Bool_t subbranches = k FALSE); virtual void AddBranch(const char *branch, Bool_t subbranches = k FALSE);
Bool_t FillBuffer(); Bool_t FillBuffer();
void SetEntryRange(Long64_t emin, Long64_t emax); void SetEntryRange(Long64_t emin, Long64_t emax);
virtual void StopLearningPhase(); virtual void StopLearningPhase();
void UpdateBranches(TTree *tree, Bool_t owner = kFALSE); void UpdateBranches(TTree *tree, Bool_t owner = kFALSE);
// Methods related to the thread // Methods related to the thread
static EParUnzipMode GetParallelUnzip(); static EParUnzipMode GetParallelUnzip();
static Bool_t IsParallelUnzip(); static Bool_t IsParallelUnzip();
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode opt
ion = TTreeCacheUnzip::kEnable);
Bool_t IsActiveThread(); Bool_t IsActiveThread();
Bool_t IsQueueEmpty(); Bool_t IsQueueEmpty();
Int_t ProcessQueue();
void SendSignal(); void WaitUnzipStartSignal();
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode opt void SendUnzipStartSignal(Bool_t broadcast);
ion = TTreeCacheUnzip::kEnable);
void WaitForSignal();
// Unzipping related methods // Unzipping related methods
Int_t GetRecordHeader(char *buf, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen); Int_t GetRecordHeader(char *buf, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen);
virtual Bool_t GetSkipZip() { return fSkipZip; } virtual Bool_t GetSkipZip() { return fSkipZip; }
virtual void ResetCache(); virtual void ResetCache();
Int_t GetUnzipBuffer(char **buf, Long64_t pos, Int_t len, Bool_ t *free); Int_t GetUnzipBuffer(char **buf, Long64_t pos, Int_t len, Bool_ t *free);
void SetUnzipBufferSize(Long64_t bufferSize); void SetUnzipBufferSize(Long64_t bufferSize);
virtual void SetSkipZip(Bool_t skip = kTRUE) { fSkipZip = skip; } virtual void SetSkipZip(Bool_t skip = kTRUE) { fSkipZip = skip; }
Int_t UnzipBuffer(char **dest, char *src); Int_t UnzipBuffer(char **dest, char *src);
Int_t UnzipCache(); Int_t UnzipCache(Int_t &startindex, Int_t &locbuffsz, char *&lo cbuff);
// Methods to get stats // Methods to get stats
Int_t GetNUnzip() { return fNUnzip; } Int_t GetNUnzip() { return fNUnzip; }
Int_t GetNFound() { return fNFound; } Int_t GetNFound() { return fNFound; }
Int_t GetNMissed(){ return fNMissed; } Int_t GetNMissed(){ return fNMissed; }
// static members // static members
static void* UnzipLoop(void *arg); static void* UnzipLoop(void *arg);
ClassDef(TTreeCacheUnzip,0) //Specialization of TTreeCache for parallel unzipping ClassDef(TTreeCacheUnzip,0) //Specialization of TTreeCache for parallel unzipping
}; };
 End of changes. 16 change blocks. 
37 lines changed or deleted 46 lines changed or added


 TTreeCloner.h   TTreeCloner.h 
// @(#)root/tree:$Id: TTreeCloner.h 28615 2009-05-13 18:50:17Z pcanal $ // @(#)root/tree:$Id: TTreeCloner.h 29413 2009-07-09 14:10:29Z pcanal $
// Author: Philippe Canal 07/11/2005 // Author: Philippe Canal 07/11/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 71 skipping to change at line 71
UInt_t fCloneMethod; //Indicates which cloning method was selec ted. UInt_t fCloneMethod; //Indicates which cloning method was selec ted.
Long64_t fToStartEntries; //Number of entries in the target tree bef ore any addition. Long64_t fToStartEntries; //Number of entries in the target tree bef ore any addition.
enum ECloneMethod { enum ECloneMethod {
kDefault = 0, kDefault = 0,
kSortBasketsByBranch = 1, kSortBasketsByBranch = 1,
kSortBasketsByOffset = 2, kSortBasketsByOffset = 2,
kSortBasketsByEntry = 3 kSortBasketsByEntry = 3
}; };
class CompareSeek {
TTreeCloner *fObject;
public:
CompareSeek(TTreeCloner *obj) : fObject(obj) {}
bool operator()(UInt_t i1, UInt_t i2);
};
class CompareEntry {
TTreeCloner *fObject;
public:
CompareEntry(TTreeCloner *obj) : fObject(obj) {}
bool operator()(UInt_t i1, UInt_t i2);
};
friend class CompareSeek;
friend class CompareEntry;
public: public:
enum EClonerOptions { enum EClonerOptions {
kNone = 0, kNone = 0,
kNoWarnings = BIT(1) kNoWarnings = BIT(1)
}; };
TTreeCloner(TTree *from, TTree *to, Option_t *method, UInt_t options = k None); TTreeCloner(TTree *from, TTree *to, Option_t *method, UInt_t options = k None);
virtual ~TTreeCloner(); virtual ~TTreeCloner();
void CloseOutWriteBaskets(); void CloseOutWriteBaskets();
 End of changes. 2 change blocks. 
1 lines changed or deleted 18 lines changed or added


 TTreeFormula.h   TTreeFormula.h 
// @(#)root/treeplayer:$Id: TTreeFormula.h 27765 2009-03-12 19:02:43Z pcana l $ // @(#)root/treeplayer:$Id: TTreeFormula.h 30176 2009-09-15 15:42:11Z pcana l $
// Author: Rene Brun 19/01/96 // Author: Rene Brun 19/01/96
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
// ---------------------------------- TreeFormula.h // ---------------------------------- TreeFormula.h
skipping to change at line 76 skipping to change at line 76
enum { enum {
kIsCharacter = BIT(12), kIsCharacter = BIT(12),
kMissingLeaf = BIT(15), // true if some of the needed leaves are miss ing in the current TTree kMissingLeaf = BIT(15), // true if some of the needed leaves are miss ing in the current TTree
kIsInteger = BIT(17), // true if the branch contains an integer var iable kIsInteger = BIT(17), // true if the branch contains an integer var iable
kNeedEntries = BIT(18) // true if the formula uses Entries$ kNeedEntries = BIT(18) // true if the formula uses Entries$
}; };
enum { enum {
kDirect, kDataMember, kMethod, kDirect, kDataMember, kMethod,
kIndexOfEntry, kEntries, kLength, kIteration, kLengthFunc, kSum, kEnt ryList, kIndexOfEntry, kEntries, kLength, kIteration, kLengthFunc, kSum, kEnt ryList,
kTreeMember, kTreeMember,
kIndexOfLocalEntry kIndexOfLocalEntry,
kMin, kMax
}; };
enum { enum {
kAlias = 200, kAlias = 200,
kAliasString = 201, kAliasString = 201,
kAlternate = 202, kAlternate = 202,
kAlternateString = 203 kAlternateString = 203,
kMinIf = 204,
kMaxIf = 205
}; };
TTree *fTree; //! pointer to Tree TTree *fTree; //! pointer to Tree
Short_t fCodes[kMAXCODES]; // List of leaf numbers referenced in fo rmula Short_t fCodes[kMAXCODES]; // List of leaf numbers referenced in fo rmula
Int_t fNdata[kMAXCODES]; //! This caches the physical number of el ement in the leaf or datamember. Int_t fNdata[kMAXCODES]; //! This caches the physical number of el ement in the leaf or datamember.
Int_t fNcodes; // Number of leaves referenced in formul a Int_t fNcodes; // Number of leaves referenced in formul a
Bool_t fHasCast; // Record whether the formula contain a cast operation or not Bool_t fHasCast; // Record whether the formula contain a cast operation or not
Int_t fMultiplicity; // Indicator of the variability of the f ormula Int_t fMultiplicity; // Indicator of the variability of the f ormula
Int_t fNindex; // Size of fIndex Int_t fNindex; // Size of fIndex
Int_t *fLookupType; //[fNindex] array indicating how each lea f should be looked-up Int_t *fLookupType; //[fNindex] array indicating how each lea f should be looked-up
skipping to change at line 147 skipping to change at line 151
void LoadBranches(); void LoadBranches();
Bool_t LoadCurrentDim(); Bool_t LoadCurrentDim();
void ResetDimensions(); void ResetDimensions();
virtual TClass* EvalClass(Int_t oper) const; virtual TClass* EvalClass(Int_t oper) const;
virtual Bool_t IsLeafInteger(Int_t code) const; virtual Bool_t IsLeafInteger(Int_t code) const;
virtual Bool_t IsString(Int_t oper) const; virtual Bool_t IsString(Int_t oper) const;
virtual Bool_t IsLeafString(Int_t code) const; virtual Bool_t IsLeafString(Int_t code) const;
virtual Bool_t SwitchToFormLeafInfo(Int_t code); virtual Bool_t SwitchToFormLeafInfo(Int_t code);
virtual Bool_t StringToNumber(Int_t code);
void Convert(UInt_t fromVersion); void Convert(UInt_t fromVersion);
private: private:
// Not implemented yet // Not implemented yet
TTreeFormula(const TTreeFormula&); TTreeFormula(const TTreeFormula&);
TTreeFormula& operator=(const TTreeFormula&); TTreeFormula& operator=(const TTreeFormula&);
public: public:
TTreeFormula(); TTreeFormula();
 End of changes. 4 change blocks. 
3 lines changed or deleted 8 lines changed or added


 TUnfold.h   TUnfold.h 
skipping to change at line 118 skipping to change at line 118
public: public:
enum EHistMap { // mapping between unfolding matrix and TH2 axes enum EHistMap { // mapping between unfolding matrix and TH2 axes
kHistMapOutputHoriz = 0, // map unfolding output to x-axis of TH2 ma trix kHistMapOutputHoriz = 0, // map unfolding output to x-axis of TH2 ma trix
kHistMapOutputVert = 1 // map unfolding output to y-axis of TH2 ma trix kHistMapOutputVert = 1 // map unfolding output to y-axis of TH2 ma trix
}; };
enum ERegMode { // regularisation scheme enum ERegMode { // regularisation scheme
kRegModeNone = 0, // no regularisation kRegModeNone = 0, // no regularisation
kRegModeSize = 1, // regularise the size of the output kRegModeSize = 1, // regularise the size of the output
kRegModeDerivative = 2, // regularize the 1st derivative of the out put kRegModeDerivative = 2, // regularize the 1st derivative of the out put
kRegModeCurvature = 3, // regularize the 2nd derivative of the out put kRegModeCurvature = 3 // regularize the 2nd derivative of the out put
}; };
TUnfold(TH2 const *hist_A, EHistMap histmap, ERegMode regmode = kRegMode Size); // constructor TUnfold(TH2 const *hist_A, EHistMap histmap, ERegMode regmode = kRegMode Size); // constructor
virtual ~ TUnfold(void); // delete data members virtual ~ TUnfold(void); // delete data members
static void DeleteMatrix(TMatrixD **m); // delete and invalidate pointer static void DeleteMatrix(TMatrixD **m); // delete and invalidate pointer
static void DeleteMatrix(TMatrixDSparse **m); // delete and invalidate p ointer static void DeleteMatrix(TMatrixDSparse **m); // delete and invalidate p ointer
void SetBias(TH1 const *bias); // set alternative bias void SetBias(TH1 const *bias); // set alternative bias
Int_t RegularizeSize(int bin, Double_t const &scale = 1.0); // regular ise the size of one output bin Int_t RegularizeSize(int bin, Double_t const &scale = 1.0); // regular ise the size of one output bin
Int_t RegularizeDerivative(int left_bin, int right_bin, Double_t const & scale = 1.0); // regularize difference of two output bins (1st derivative) Int_t RegularizeDerivative(int left_bin, int right_bin, Double_t const & scale = 1.0); // regularize difference of two output bins (1st derivative)
Int_t RegularizeCurvature(int left_bin, int center_bin, int right_bin, D ouble_t const &scale_left = 1.0, Double_t const &scale_right = 1.0); // re gularize curvature of three output bins (2nd derivative) Int_t RegularizeCurvature(int left_bin, int center_bin, int right_bin, D ouble_t const &scale_left = 1.0, Double_t const &scale_right = 1.0); // re gularize curvature of three output bins (2nd derivative)
Int_t RegularizeBins(int start, int step, int nbin, ERegMode regmode); // regularize a 1-dimensional curve Int_t RegularizeBins(int start, int step, int nbin, ERegMode regmode); // regularize a 1-dimensional curve
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 TUnixSystem.h   TUnixSystem.h 
// @(#)root/unix:$Id: TUnixSystem.h 25715 2008-10-07 09:10:25Z rdm $ // @(#)root/unix:$Id: TUnixSystem.h 30170 2009-09-15 13:35:35Z rdm $
// Author: Fons Rademakers 15/09/95 // Author: Fons Rademakers 15/09/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 146 skipping to change at line 146
const char *WorkingDirectory(); const char *WorkingDirectory();
const char *HomeDirectory(const char *userName = 0); const char *HomeDirectory(const char *userName = 0);
const char *TempDirectory() const; const char *TempDirectory() const;
FILE *TempFileName(TString &base, const char *dir = 0); FILE *TempFileName(TString &base, const char *dir = 0);
//---- Paths & Files ---------------------------------------- //---- Paths & Files ----------------------------------------
const char *PrependPathName(const char *dir, TString& name); const char *PrependPathName(const char *dir, TString& name);
Bool_t ExpandPathName(TString &patbuf); Bool_t ExpandPathName(TString &patbuf);
char *ExpandPathName(const char *path); char *ExpandPathName(const char *path);
Bool_t AccessPathName(const char *path, EAccessMode mode = kF ileExists); Bool_t AccessPathName(const char *path, EAccessMode mode = kF ileExists);
Bool_t IsPathLocal(const char *path);
int CopyFile(const char *from, const char *to, Bool_t over write = kFALSE); int CopyFile(const char *from, const char *to, Bool_t over write = kFALSE);
int Rename(const char *from, const char *to); int Rename(const char *from, const char *to);
int Link(const char *from, const char *to); int Link(const char *from, const char *to);
int Symlink(const char *from, const char *to); int Symlink(const char *from, const char *to);
int Unlink(const char *name); int Unlink(const char *name);
int GetPathInfo(const char *path, FileStat_t &buf); int GetPathInfo(const char *path, FileStat_t &buf);
int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, int GetFsInfo(const char *path, Long_t *id, Long_t *bsize,
Long_t *blocks, Long_t *bfree); Long_t *blocks, Long_t *bfree);
int Chmod(const char *file, UInt_t mode); int Chmod(const char *file, UInt_t mode);
int Umask(Int_t mask); int Umask(Int_t mask);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TVectorT.h   TVectorT.h 
// @(#)root/matrix:$Id: TVectorT.h 27658 2009-02-28 05:34:57Z pcanal $ // @(#)root/matrix:$Id: TVectorT.h 30125 2009-09-14 05:03:58Z brun $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TVectorT #ifndef ROOT_TVectorT
#define ROOT_TVectorT #define ROOT_TVectorT
skipping to change at line 205 skipping to change at line 205
R__ASSERT(v.IsValid()); R__ASSERT(v.IsValid());
return Use(v.GetLwb(),v.GetUpb(),v.GetMatrixArray()); return Use(v.GetLwb(),v.GetUpb(),v.GetMatrixArray());
} }
template<class Element> inline TVectorT<Element> TVectorT<Element>:: GetSub (Int_t row_lwb,Int_t row_upb,Option_t *option) const template<class Element> inline TVectorT<Element> TVectorT<Element>:: GetSub (Int_t row_lwb,Int_t row_upb,Option_t *option) const
{ {
TVectorT tmp; TVectorT tmp;
this->GetSub(row_lwb,row_upb,tmp,option); this->GetSub(row_lwb,row_upb,tmp,option);
return tmp; return tmp;
} }
template<class Element> inline const Element &TVectorT<Element>:: operator()(Int_t ind) const template<class Element> inline const Element &TVectorT<Element>::operator() (Int_t ind) const
{ {
// Access a vector element. // Access a vector element.
R__ASSERT(IsValid()); R__ASSERT(IsValid());
const Int_t aind = ind-fRowLwb; const Int_t aind = ind-fRowLwb;
if (aind >= fNrows || aind < 0) { if (aind >= fNrows || aind < 0) {
Error("operator()","Request index(%d) outside vector range of %d - %d ",ind,fRowLwb,fRowLwb+fNrows); Error("operator()","Request index(%d) outside vector range of %d - %d ",ind,fRowLwb,fRowLwb+fNrows);
return fElements[0]; return fElements[0];
} }
return fElements[aind]; return fElements[aind];
} }
template<class Element> inline Element &TVectorT<Element>::operat or()(Int_t ind) template<class Element> inline Element &TVectorT<Element>::operator()(Int_t ind)
{ {
// Access a vector element. // Access a vector element.
R__ASSERT(IsValid()); R__ASSERT(IsValid());
const Int_t aind = ind-fRowLwb; const Int_t aind = ind-fRowLwb;
if (aind >= fNrows || aind < 0) { if (aind >= fNrows || aind < 0) {
Error("operator()","Request index(%d) outside vector range of %d - %d ",ind,fRowLwb,fRowLwb+fNrows); Error("operator()","Request index(%d) outside vector range of %d - %d ",ind,fRowLwb,fRowLwb+fNrows);
return fElements[0]; return fElements[0];
} }
return fElements[aind]; return fElements[aind];
} }
template<class Element1,class Element2>
Bool_t AreCompatible(const TVectorT template<class Element> Bool_t operator== (const TVectorT
<Element1> &source1,const TVectorT <Element2> &source2, Int_t <Element> &source1,const TVectorT <Element> &source2);
verbose=0); template<class Element> TVectorT<Element> operator+ (const TVectorT
template<class Element> Bool_t operator== (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
<Element> &source1,const TVectorT <Element> &source2); template<class Element> TVectorT<Element> operator- (const TVectorT
template<class Element> TVectorT<Element> operator+ (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
<Element> &source1,const TVectorT <Element> &source2); template<class Element> Element operator* (const TVectorT
template<class Element> TVectorT<Element> operator- (const TVectorT <Element> &source1,const TVectorT <Element> &source2);
<Element> &source1,const TVectorT <Element> &source2); template<class Element> TVectorT<Element> operator* (const TMatrixT
template<class Element> Element operator* (const TVectorT <Element> &a, const TVectorT <Element> &source);
<Element> &source1,const TVectorT <Element> &source2); template<class Element> TVectorT<Element> operator* (const TMatrixTSym
template<class Element> TVectorT<Element> operator* (const TMatrixT <Element> &a, const TVectorT <Element> &source);
<Element> &a, const TVectorT <Element> &source); template<class Element> TVectorT<Element> operator* (const TMatrixTSpar
template<class Element> TVectorT<Element> operator* (const TMatrixTSym se<Element> &a, const TVectorT <Element> &source);
<Element> &a, const TVectorT <Element> &source); template<class Element> TVectorT<Element> operator* ( Element
template<class Element> TVectorT<Element> operator* (const TMatrixTSpar val, const TVectorT <Element> &source);
se<Element> &a, const TVectorT <Element> &source);
template<class Element> TVectorT<Element> operator* ( Element template<class Element> Element Dot (const TVectorT
val, const TVectorT <Element> &source); <Element> &source1,const TVectorT <Element> &source2);
template<class Element> Element Dot (const TVectorT template <class Element1,class Element2>
<Element> &source1,const TVectorT <Element> &source2); TMatrixT<Element1> OuterProduct(const TVectorT
template<class Element> TVectorT<Element> &Add ( TVectorT <Element1> &v1, const TVectorT <Element2> &v2);
<Element> &target, Element scalar, const TVector template <class Element1,class Element2,class Element3>
T<Element> &source); TMatrixT<Element1> &OuterProduct( TMatrixT
template<class Element> TVectorT<Element> &Add ( TVectorT <Element1> &target, const TVectorT <Element2> &v1, const TVectorT
<Element> &target, Element , const TMatrix <Element3> &v2);
T <Element> &a, template <class Element1,class Element2,class Element3>
Element1 Mult (const TVectorT
<Element1> &v1, const TMatrixT <Element2> &m, const TVectorT
<Element3> &v2);
template<class Element> TVectorT<Element> &Add ( TVectorT
<Element> &target, Element scalar, const TVectorT
<Element> &source);
template<class Element> TVectorT<Element> &Add ( TVectorT
<Element> &target, Element scalar, const TMatrixT
<Element> &a,
const TVectorT<Ele ment> &source); const TVectorT<Ele ment> &source);
template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element , const TMatrix TSym <Element> &a, template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TMatrixTSym <Element> &a,
const TVectorT<Ele ment> &source); const TVectorT<Ele ment> &source);
template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element , const TMatrix TSparse<Element> &a, template<class Element> TVectorT<Element> &Add ( TVectorT <Element> &target, Element scalar, const TMatrixTSpar se<Element> &a,
const TVectorT<Ele ment> &source); const TVectorT<Ele ment> &source);
template<class Element> TVectorT<Element> &AddElemMult ( TVectorT <Element> &target, Element scalar, const TVector T<Element> &source1, template<class Element> TVectorT<Element> &AddElemMult ( TVectorT <Element> &target, Element scalar, const TVectorT <Element> &source1,
const TVectorT <Element> &source2); const TVectorT <Element> &source2);
template<class Element> TVectorT<Element> &AddElemMult ( TVectorT template<class Element> TVectorT<Element> &AddElemMult ( TVectorT
<Element> &target, Element scalar, const TVector <Element> &target, Element scalar, const TVectorT
T<Element> &source1, <Element> &source1,
const TVectorT const TVectorT
<Element> &source2,const TVectorT <Element> &select); <Element> &source2,const TVectorT <Element> &select);
template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT
<Element> &target, Element scalar, const TVector <Element> &target, Element scalar, const TVectorT
T<Element> &source1, <Element> &source1,
const TVectorT <Element> &source2); const TVectorT <Element> &source2);
template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT template<class Element> TVectorT<Element> &AddElemDiv ( TVectorT
<Element> &target, Element scalar, const TVector <Element> &target, Element scalar, const TVectorT
T<Element> &source1, <Element> &source1,
const TVectorT const TVectorT
<Element> &source2,const TVectorT <Element> &select); <Element> &source2,const TVectorT <Element> &select);
template<class Element> TVectorT<Element> &ElementMult ( TVectorT template<class Element> TVectorT<Element> &ElementMult ( TVectorT
<Element> &target, const TVectorT <Element> &source); <Element> &target, const TVectorT <Element> &source);
template<class Element> TVectorT<Element> &ElementMult ( TVectorT template<class Element> TVectorT<Element> &ElementMult ( TVectorT
<Element> &target, const TVectorT <Element> &source, const TVector <Element> &target, const TVectorT <Element> &source, const TVectorT
T<Element> &select); <Element> &select);
template<class Element> TVectorT<Element> &ElementDiv ( TVectorT template<class Element> TVectorT<Element> &ElementDiv ( TVectorT
<Element> &target, const TVectorT <Element> &source); <Element> &target, const TVectorT <Element> &source);
template<class Element> TVectorT<Element> &ElementDiv ( TVectorT template<class Element> TVectorT<Element> &ElementDiv ( TVectorT
<Element> &target, const TVectorT <Element> &source, const TVector <Element> &target, const TVectorT <Element> &source, const TVectorT
T<Element> &select); <Element> &select);
template<class Element> void Compare (const TVectorT
<Element> &source1,const TVectorT <Element> &source2); template<class Element1,class Element2> Bool_t AreCompatible(const TVectorT
template<class Element> Bool_t VerifyVectorValue <Element1> &v1,const TVectorT<Element2> &v2,Int_t verbose=0);
(const TVectorT // Check matrix and vector for compatibility in multiply: M * v and v * M
<Element> &m, Element val, Int_t template<class Element1,class Element2> Bool_t AreCompatible(const TMatrixT
verbose, <Element1> &m, const TVectorT<Element2> &v, Int_t verbose=0);
Element maxDevAllo template<class Element1,class Element2> Bool_t AreCompatible(const TVectorT
w); <Element1> &v, const TMatrixT<Element2> &m, Int_t verbose=0);
template<class Element> Bool_t VerifyVectorValue
(const TVectorT template<class Element> void Compare (const TVectorT <Elemen
<Element> &m, Element val, Int_t t> &source1,const TVectorT <Element> &source2);
verbose) template<class Element> Bool_t VerifyVectorValue (const TVectorT <Elemen
{ return VerifyVect t> &m, Element val,Int_t verbose, Element maxDevAllow);
orValue(m,val,verbose,Element(0.0)); } template<class Element> Bool_t VerifyVectorValue (const TVectorT <Elemen
template<class Element> Bool_t VerifyVectorValue t> &m, Element val,Int_t verbose)
(const TVectorT { return VerifyVectorV
<Element> &m, Element val) alue(m,val,verbose,Element(0.0)); }
{ return VerifyVect template<class Element> Bool_t VerifyVectorValue (const TVectorT <Elemen
orValue(m,val,1,Element(0.0)); } t> &m, Element val)
template<class Element> Bool_t VerifyVectorIdentity { return VerifyVectorV
(const TVectorT alue(m,val,1,Element(0.0)); }
<Element> &m1, const TVectorT <Element> &m2, Int_t template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Elemen
verbose, t> &m1,const TVectorT <Element> &m2, Int_t verbose, Element maxDevAllow);
Element maxDevAllo template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Elemen
w); t> &m1,const TVectorT <Element> &m2, Int_t verbose)
template<class Element> Bool_t VerifyVectorIdentity { return VerifyVectorI
(const TVectorT dentity(m1,m2,verbose,Element(0.0)); }
<Element> &m1, const TVectorT <Element> &m2, Int_t template<class Element> Bool_t VerifyVectorIdentity (const TVectorT <Elemen
verbose) t> &m1,const TVectorT <Element> &m2)
{ return VerifyVect { return VerifyVectorI
orIdentity(m1,m2,verbose,Element(0.0)); } dentity(m1,m2,1,Element(0.0)); }
template<class Element> Bool_t VerifyVectorIdentity
(const TVectorT
<Element> &m1, const TVectorT <Element> &m2)
{ return VerifyVect
orIdentity(m1,m2,1,Element(0.0)); }
#endif #endif
 End of changes. 9 change blocks. 
93 lines changed or deleted 99 lines changed or added


 TVirtualDragManager.h   TVirtualDragManager.h 
skipping to change at line 68 skipping to change at line 68
virtual void SetTarget(TGFrame *f) { fTarget = f; } virtual void SetTarget(TGFrame *f) { fTarget = f; }
virtual void SetSource(TGFrame *f) { fSource = f; } virtual void SetSource(TGFrame *f) { fSource = f; }
virtual void SetPasteFrame(TGFrame *f) { fPasteFrame = f; } virtual void SetPasteFrame(TGFrame *f) { fPasteFrame = f; }
virtual Bool_t StartDrag(TGFrame * = 0, Int_t = 0, Int_t = 0) { retur n kFALSE; } virtual Bool_t StartDrag(TGFrame * = 0, Int_t = 0, Int_t = 0) { retur n kFALSE; }
virtual Bool_t EndDrag() { return kFALSE; } virtual Bool_t EndDrag() { return kFALSE; }
virtual Bool_t Drop() { return kFALSE; } virtual Bool_t Drop() { return kFALSE; }
virtual Bool_t Cancel(Bool_t = kTRUE) { return kFALSE; } virtual Bool_t Cancel(Bool_t = kTRUE) { return kFALSE; }
virtual Bool_t HandleEvent(Event_t *) { return kFALSE; } virtual Bool_t HandleEvent(Event_t *) { return kFALSE; }
virtual Bool_t HandleTimerEvent(Event_t *, TTimer *) { return kFALSE; }
virtual Bool_t IgnoreEvent(Event_t *) { return kTRUE; } virtual Bool_t IgnoreEvent(Event_t *) { return kTRUE; }
virtual void SetEditable(Bool_t) {} virtual void SetEditable(Bool_t) {}
virtual Int_t GetStrartDragX() const { return 0; } virtual Int_t GetStrartDragX() const { return 0; }
virtual Int_t GetStrartDragY() const { return 0; } virtual Int_t GetStrartDragY() const { return 0; }
virtual Int_t GetEndDragX() const { return 0; } virtual Int_t GetEndDragX() const { return 0; }
virtual Int_t GetEndDragY() const { return 0; } virtual Int_t GetEndDragY() const { return 0; }
static TVirtualDragManager *Instance(); static TVirtualDragManager *Instance();
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 TVirtualPad.h   TVirtualPad.h 
// @(#)root/base:$Id: TVirtualPad.h 26760 2008-12-09 15:56:43Z brun $ // @(#)root/base:$Id: TVirtualPad.h 29712 2009-08-07 08:00:45Z brun $
// Author: Rene Brun 05/12/95 // Author: Rene Brun 05/12/95
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 50 skipping to change at line 50
#ifndef ROOT_TQObject #ifndef ROOT_TQObject
#include "TQObject.h" #include "TQObject.h"
#endif #endif
// forward declarations // forward declarations
class TAxis; class TAxis;
class TObject; class TObject;
class TObjLink; class TObjLink;
class TView; class TView;
class TCanvas; class TCanvas;
class TCanvasImp;
class TH1F; class TH1F;
class TFrame; class TFrame;
class TBox; class TBox;
class TVirtualViewer3D; class TVirtualViewer3D;
class TVirtualPad : public TObject, public TAttLine, public TAttFill, class TVirtualPad : public TObject, public TAttLine, public TAttFill,
public TAttPad, public TQObject { public TAttPad, public TQObject {
protected: protected:
Bool_t fResizing; //!true when resizing the pad Bool_t fResizing; //!true when resizing the pad
skipping to change at line 87 skipping to change at line 88
virtual void CopyPixmaps() = 0; virtual void CopyPixmaps() = 0;
virtual void DeleteExec(const char *name) = 0; virtual void DeleteExec(const char *name) = 0;
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Fl oat_t ymargin=0.01, Int_t color=0) = 0; virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Fl oat_t ymargin=0.01, Int_t color=0) = 0;
virtual void Draw(Option_t *option="") = 0; virtual void Draw(Option_t *option="") = 0;
virtual void DrawClassObject(const TObject *obj, Option_t *option="" ) = 0; virtual void DrawClassObject(const TObject *obj, Option_t *option="" ) = 0;
virtual TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") = 0; virtual TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") = 0;
virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) = 0; virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) = 0;
virtual Short_t GetBorderMode() const = 0; virtual Short_t GetBorderMode() const = 0;
virtual Short_t GetBorderSize() const = 0; virtual Short_t GetBorderSize() const = 0;
virtual Int_t GetCanvasID() const = 0; virtual Int_t GetCanvasID() const = 0;
virtual TCanvasImp *GetCanvasImp() const = 0;
virtual TCanvas *GetCanvas() const = 0; virtual TCanvas *GetCanvas() const = 0;
virtual TVirtualPad *GetVirtCanvas() const = 0; virtual TVirtualPad *GetVirtCanvas() const = 0;
virtual Int_t GetEvent() const = 0; virtual Int_t GetEvent() const = 0;
virtual Int_t GetEventX() const = 0; virtual Int_t GetEventX() const = 0;
virtual Int_t GetEventY() const = 0; virtual Int_t GetEventY() const = 0;
virtual TFrame *GetFrame() = 0; virtual TFrame *GetFrame() = 0;
virtual Color_t GetHighLightColor() const = 0; virtual Color_t GetHighLightColor() const = 0;
virtual Int_t GetNumber() const = 0; virtual Int_t GetNumber() const = 0;
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Doub le_t &y2) = 0; virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Doub le_t &y2) = 0;
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t & xmax, Double_t &ymax) = 0; virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t & xmax, Double_t &ymax) = 0;
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TVirtualX.interface.h   TVirtualX.interface.h 
// @(#)root/base:$Id: TVirtualX.interface.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/base:$Id: TVirtualX.interface.h 30386 2009-09-23 19:06:28Z brun $
// Author: Valeri Fine 28/07/2004 // Author: Valeri Fine 28/07/2004
// //
// This is a copy of the all "abstract" TVirtualX methods to make sure // This is a copy of the all "abstract" TVirtualX methods to make sure
// we don't miss it with the implementation // we don't miss it with the implementation
// //
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
skipping to change at line 44 skipping to change at line 44
virtual UInt_t ExecCommand(TGWin32Command *code); virtual UInt_t ExecCommand(TGWin32Command *code);
virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy); virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy);
virtual Int_t GetDoubleBuffer(Int_t wid); virtual Int_t GetDoubleBuffer(Int_t wid);
virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h); virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
virtual const char *DisplayName(const char * = 0); virtual const char *DisplayName(const char * = 0);
virtual Handle_t GetNativeEvent() const; virtual Handle_t GetNativeEvent() const;
virtual ULong_t GetPixel(Color_t cindex); virtual ULong_t GetPixel(Color_t cindex);
virtual void GetPlanes(Int_t &nplanes); virtual void GetPlanes(Int_t &nplanes);
virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b ); virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b );
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess); virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess);
virtual Int_t GetFontAscent() const;
virtual Int_t GetFontDescent() const;
virtual Float_t GetTextMagnitude(); virtual Float_t GetTextMagnitude();
virtual Window_t GetWindowID(Int_t wid); virtual Window_t GetWindowID(Int_t wid);
virtual Bool_t HasTTFonts() const; virtual Bool_t HasTTFonts() const;
virtual Int_t InitWindow(ULong_t window); virtual Int_t InitWindow(ULong_t window);
virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h); virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h);
virtual void RemoveWindow(ULong_t qwid); virtual void RemoveWindow(ULong_t qwid);
virtual void MoveWindow(Int_t wid, Int_t x, Int_t y); virtual void MoveWindow(Int_t wid, Int_t x, Int_t y);
virtual Int_t OpenPixmap(UInt_t w, UInt_t h); virtual Int_t OpenPixmap(UInt_t w, UInt_t h);
virtual void QueryPointer(Int_t &ix, Int_t &iy); virtual void QueryPointer(Int_t &ix, Int_t &iy);
virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0); virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0);
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TWebFile.h   TWebFile.h 
// @(#)root/net:$Id: TWebFile.h 28645 2009-05-15 17:51:47Z rdm $ // @(#)root/net:$Id: TWebFile.h 30365 2009-09-23 09:02:58Z rdm $
// Author: Fons Rademakers 17/01/97 // Author: Fons Rademakers 17/01/97
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 30 skipping to change at line 30
// via a standard apache web server. A TWebFile is a read-only file. // // via a standard apache web server. A TWebFile is a read-only file. //
// // // //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TFile #ifndef ROOT_TFile
#include "TFile.h" #include "TFile.h"
#endif #endif
#ifndef ROOT_TUrl #ifndef ROOT_TUrl
#include "TUrl.h" #include "TUrl.h"
#endif #endif
#ifndef ROOT_TSystem
#include "TSystem.h"
#endif
class TSocket; class TSocket;
class TWebSocket; class TWebSocket;
class TWebFile : public TFile { class TWebFile : public TFile {
friend class TWebSocket; friend class TWebSocket;
friend class TWebSystem;
private: private:
mutable Long64_t fSize; // file size mutable Long64_t fSize; // file size
TSocket *fSocket; // socket for HTTP/1.1 (stays alive bet TSocket *fSocket; // socket for HTTP/1.1 (stays alive
ween calls) between calls)
TUrl fProxy; // proxy URL TUrl fProxy; // proxy URL
Bool_t fHasModRoot; // true if server has mod_root installe Bool_t fHasModRoot; // true if server has mod_root inst
d alled
Bool_t fHTTP11; // true if server support HTTP/1.1 Bool_t fHTTP11; // true if server support HTTP/1.1
Bool_t fNoProxy; // don't use proxy Bool_t fNoProxy; // don't use proxy
TString fMsgReadBuffer; // cache ReadBuffer() msg
TString fMsgReadBuffer10; // cache ReadBuffer10() msg
TString fMsgReadBuffers; // cache ReadBuffers() msg
TString fMsgReadBuffers10; // cache ReadBuffers10() msg
TString fMsgGetHead; // cache GetHead() msg
static TUrl fgProxy; // globally set proxy URL static TUrl fgProxy; // globally set proxy URL
TWebFile() : fSocket(0) { } TWebFile() : fSocket(0) { }
void Init(Bool_t); void Init(Bool_t readHeadOnly);
void CheckProxy(); void CheckProxy();
TString BasicAuthentication(); TString BasicAuthentication();
Int_t GetHead(); Int_t GetHead();
Int_t GetLine(TSocket *s, char *line, Int_t size); Int_t GetLine(TSocket *s, char *line, Int_t maxsize);
Int_t GetFromWeb(char *buf, Int_t len, const TString &msg); Int_t GetHunk(TSocket *s, char *hunk, Int_t maxsize);
Int_t GetFromWeb10(char *buf, Int_t len, const TString &msg); const char *HttpTerminator(const char *start, const char *peeked, Int_t
Bool_t ReadBuffer10(char *buf, Int_t len); peeklen);
Bool_t ReadBuffers10(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf); Int_t GetFromWeb(char *buf, Int_t len, const TString &msg);
Int_t GetFromWeb10(char *buf, Int_t len, const TString &msg);
Bool_t ReadBuffer10(char *buf, Int_t len);
Bool_t ReadBuffers10(char *buf, Long64_t *pos, Int_t *len, Int_t nb
uf);
public: public:
TWebFile(const char *url, Option_t *opt=""); TWebFile(const char *url, Option_t *opt="");
TWebFile(TUrl url, Option_t *opt=""); TWebFile(TUrl url, Option_t *opt="");
virtual ~TWebFile(); virtual ~TWebFile();
Long64_t GetSize() const; Long64_t GetSize() const;
Bool_t IsOpen() const; Bool_t IsOpen() const;
Int_t ReOpen(Option_t *mode); Int_t ReOpen(Option_t *mode);
Bool_t ReadBuffer(char *buf, Int_t len); Bool_t ReadBuffer(char *buf, Int_t len);
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf); Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf
void Seek(Long64_t offset, ERelativeTo pos = kBeg); );
void Seek(Long64_t offset, ERelativeTo pos = kBeg);
static void SetProxy(const char *url); static void SetProxy(const char *url);
static const char *GetProxy(); static const char *GetProxy();
ClassDef(TWebFile,1) //A ROOT file that reads via a http server ClassDef(TWebFile,1) //A ROOT file that reads via a http server
}; };
class TWebSystem : public TSystem {
private:
void *fDirp; // directory handler
void *GetDirPtr() const { return fDirp; }
public:
TWebSystem();
virtual ~TWebSystem() { }
Int_t MakeDirectory(const char *name);
void *OpenDirectory(const char *name);
void FreeDirectory(void *dirp);
const char *GetDirEntry(void *dirp);
Int_t GetPathInfo(const char *path, FileStat_t &buf);
Bool_t AccessPathName(const char *path, EAccessMode mode);
Int_t Unlink(const char *path);
ClassDef(TWebSystem,0) // Directory handler for HTTP (TWebFiles)
};
#endif #endif
 End of changes. 8 change blocks. 
25 lines changed or deleted 61 lines changed or added


 TXMLParser.h   TXMLParser.h 
// @(#)root/xmlparser:$Id: TXMLParser.h 28833 2009-06-05 14:08:12Z rdm $ // @(#)root/xmlparser:$Id: TXMLParser.h 29654 2009-07-31 14:34:14Z rdm $
// Author: Jose Lo 12/4/2005 // Author: Jose Lo 12/4/2005
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 64 skipping to change at line 64
Bool_t fReplaceEntities; // replace entities Bool_t fReplaceEntities; // replace entities
Bool_t fStopError; // stop when parse error occurs Bool_t fStopError; // stop when parse error occurs
TString fValidateError; // parse error TString fValidateError; // parse error
TString fValidateWarning; // parse warning TString fValidateWarning; // parse warning
Int_t fParseCode; // to keep track of the errorcode s Int_t fParseCode; // to keep track of the errorcode s
virtual void InitializeContext(); virtual void InitializeContext();
virtual void ReleaseUnderlying(); virtual void ReleaseUnderlying();
virtual void OnValidateError(const TString& message); virtual void OnValidateError(const TString& message);
virtual void OnValidateWarning(const TString& message); virtual void OnValidateWarning(const TString& message);
virtual void StopParser();
virtual void SetParseCode(Int_t code); virtual void SetParseCode(Int_t code);
public: public:
TXMLParser(); TXMLParser();
virtual ~TXMLParser(); virtual ~TXMLParser();
void SetValidate(Bool_t val = kTRUE); void SetValidate(Bool_t val = kTRUE);
Bool_t GetValidate() const { return fValidate; } Bool_t GetValidate() const { return fValidate; }
void SetReplaceEntities(Bool_t val = kTRUE); void SetReplaceEntities(Bool_t val = kTRUE);
Bool_t GetReplaceEntities() const { return fReplaceEntities ; } Bool_t GetReplaceEntities() const { return fReplaceEntities ; }
virtual Int_t ParseFile(const char *filename) = 0; virtual Int_t ParseFile(const char *filename) = 0;
virtual Int_t ParseBuffer(const char *contents, Int_t len) = 0; virtual Int_t ParseBuffer(const char *contents, Int_t len) = 0;
virtual void StopParser();
Int_t GetParseCode() const { return fParseCode; } Int_t GetParseCode() const { return fParseCode; }
const char *GetParseCodeMessage(Int_t parseCode) const; const char *GetParseCodeMessage(Int_t parseCode) const;
void SetStopOnError(Bool_t stop = kTRUE); void SetStopOnError(Bool_t stop = kTRUE);
Bool_t GetStopOnError() const { return fStopError; } Bool_t GetStopOnError() const { return fStopError; }
const char *GetValidateError() const { return fValidateError; } const char *GetValidateError() const { return fValidateError; }
const char *GetValidateWarning() const { return fValidateWarning ; } const char *GetValidateWarning() const { return fValidateWarning ; }
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TXNetSystem.h   TXNetSystem.h 
// @(#)root/netx:$Id: TXNetSystem.h 21913 2008-01-29 22:39:32Z ganis $ // @(#)root/netx:$Id: TXNetSystem.h 30170 2009-09-15 13:35:35Z rdm $
// Author: Frank Winklmeier, Fabrizio Furano // Author: Frank Winklmeier, Fabrizio Furano
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 103 skipping to change at line 103
public: public:
TXNetSystem(Bool_t owner = kTRUE); TXNetSystem(Bool_t owner = kTRUE);
TXNetSystem(const char *url, Bool_t owner = kTRUE); TXNetSystem(const char *url, Bool_t owner = kTRUE);
virtual ~TXNetSystem() { } virtual ~TXNetSystem() { }
Bool_t AccessPathName(const char *path, EAccessMode mode); Bool_t AccessPathName(const char *path, EAccessMode mode);
virtual Bool_t ConsistentWith(const char *path, void *dirptr); virtual Bool_t ConsistentWith(const char *path, void *dirptr);
virtual void FreeDirectory(void *dirp); virtual void FreeDirectory(void *dirp);
virtual const char *GetDirEntry(void *dirp); virtual const char *GetDirEntry(void *dirp);
virtual Int_t GetPathInfo(const char* path, FileStat_t &buf); virtual Int_t GetPathInfo(const char* path, FileStat_t &buf);
virtual Bool_t IsPathLocal(const char *path);
virtual Int_t Locate(const char* path, TString &endurl); virtual Int_t Locate(const char* path, TString &endurl);
virtual Int_t MakeDirectory(const char* dir); virtual Int_t MakeDirectory(const char* dir);
virtual void *OpenDirectory(const char* dir); virtual void *OpenDirectory(const char* dir);
virtual int Unlink(const char *path); virtual int Unlink(const char *path);
// TXNetSystem specific // TXNetSystem specific
Bool_t GetPathsInfo(const char *paths, UChar_t *info); Bool_t GetPathsInfo(const char *paths, UChar_t *info);
Bool_t IsOnline(const char *path); Bool_t IsOnline(const char *path);
Bool_t Prepare(const char *path, UChar_t opt = 8, UChar_t p rio = 0); Bool_t Prepare(const char *path, UChar_t opt = 8, UChar_t p rio = 0);
Int_t Prepare(TCollection *paths, Int_t Prepare(TCollection *paths,
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TXProofMgr.h   TXProofMgr.h 
// @(#)root/proofx:$Id: TXProofMgr.h 28746 2009-05-28 13:03:29Z ganis $ // @(#)root/proofx:$Id: TXProofMgr.h 30171 2009-09-15 13:43:12Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TXProofMgr #ifndef ROOT_TXProofMgr
#define ROOT_TXProofMgr #define ROOT_TXProofMgr
skipping to change at line 40 skipping to change at line 40
#ifndef ROOT_TXHandler #ifndef ROOT_TXHandler
#include "TXHandler.h" #include "TXHandler.h"
#endif #endif
// //
// XPROOF client version: increase whenever a non backward compatible // XPROOF client version: increase whenever a non backward compatible
// change occur // change occur
// ->1 first version being tested by ALICE // ->1 first version being tested by ALICE
const Int_t kXPROOF_Protocol = 1; const Int_t kXPROOF_Protocol = 1;
class TStopwatch;
class TXSocket; class TXSocket;
class TXProofMgr : public TProofMgr, public TXHandler { class TXProofMgr : public TProofMgr, public TXHandler {
private: private:
TXSocket *fSocket; // Connection to XRD TXSocket *fSocket; // Connection to XRD
Int_t Init(Int_t loglevel = -1); Int_t Init(Int_t loglevel = -1);
void CpProgress(const char *pfx, Long64_t bytes,
Long64_t size, TStopwatch *watch, Bool_t cr = kFALSE);
TObjString *Exec(Int_t action,
const char *what, const char *how, const char *where);
public: public:
TXProofMgr(const char *url, Int_t loglevel = -1, const char *alias = "") ; TXProofMgr(const char *url, Int_t loglevel = -1, const char *alias = "") ;
virtual ~TXProofMgr(); virtual ~TXProofMgr();
Bool_t HandleInput(const void *); Bool_t HandleInput(const void *);
Bool_t HandleError(const void *in = 0); Bool_t HandleError(const void *in = 0);
Bool_t IsValid() const { return fSocket; } Bool_t IsValid() const { return fSocket; }
void SetInvalid(); void SetInvalid();
skipping to change at line 77 skipping to change at line 83
Bool_t MatchUrl(const char *url); Bool_t MatchUrl(const char *url);
void ShowROOTVersions(); void ShowROOTVersions();
TList *QuerySessions(Option_t *opt = "S"); TList *QuerySessions(Option_t *opt = "S");
TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len); TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len);
TObjString *ReadBuffer(const char *file, const char *pattern); TObjString *ReadBuffer(const char *file, const char *pattern);
Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0);
Int_t SendMsgToUsers(const char *msg, const char *usr = 0); Int_t SendMsgToUsers(const char *msg, const char *usr = 0);
void SetROOTVersion(const char *tag); void SetROOTVersion(const char *tag);
void ShowWorkers(); void ShowWorkers();
// Remote file system actions
Int_t Cp(const char *src, const char *dst = 0, const char *opts =
0);
void Find(const char *what = "~/", const char *how = "-type f", c
onst char *where = 0);
void Grep(const char *what, const char *how = 0, const char *wher
e = 0);
void Ls(const char *what = "~/", const char *how = 0, const char
*where = 0);
void More(const char *what, const char *how = 0, const char *wher
e = 0);
Int_t Rm(const char *what, const char *how = 0, const char *where
= 0);
void Tail(const char *what, const char *how = 0, const char *wher
e = 0);
Int_t Md5sum(const char *what, TString &sum, const char *where = 0
);
Int_t Stat(const char *what, FileStat_t &st, const char *where = 0
);
Int_t GetFile(const char *remote, const char *local, const char *o
pt = 0);
Int_t PutFile(const char *local, const char *remote, const char *o
pt = 0);
ClassDef(TXProofMgr,0) // XrdProofd PROOF manager interface ClassDef(TXProofMgr,0) // XrdProofd PROOF manager interface
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 32 lines changed or added


 TXSocket.h   TXSocket.h 
// @(#)root/proofx:$Id: TXSocket.h 27035 2008-12-19 15:36:44Z ganis $ // @(#)root/proofx:$Id: TXSocket.h 29579 2009-07-25 12:19:25Z ganis $
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOT_TXSocket #ifndef ROOT_TXSocket
#define ROOT_TXSocket #define ROOT_TXSocket
skipping to change at line 222 skipping to change at line 222
if (fConn) fConn->SetInterrupt(); } if (fConn) fConn->SetInterrupt(); }
// Flush the asynchronous queue // Flush the asynchronous queue
Int_t Flush(); Int_t Flush();
// Ping the counterpart // Ping the counterpart
Bool_t Ping(const char *ord = 0); Bool_t Ping(const char *ord = 0);
// Request remote touch of the admin file associated with this connectio n // Request remote touch of the admin file associated with this connectio n
void RemoteTouch(); void RemoteTouch();
// Propagate a Ctrl-C
void CtrlC();
// Standard options cannot be set // Standard options cannot be set
Int_t SetOption(ESockOptions, Int_t) { return 0; } Int_t SetOption(ESockOptions, Int_t) { return 0; }
// Disable / Enable read timeout // Disable / Enable read timeout
void DisableTimeout() { fDontTimeout = kTRUE; } void DisableTimeout() { fDontTimeout = kTRUE; }
void EnableTimeout() { fDontTimeout = kFALSE; } void EnableTimeout() { fDontTimeout = kFALSE; }
// Try reconnection after error // Try reconnection after error
virtual Int_t Reconnect(); virtual Int_t Reconnect();
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 TestStatSampler.h   TestStatSampler.h 
skipping to change at line 30 skipping to change at line 30
</p> </p>
END_HTML END_HTML
*/ */
// //
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
class RooAbsArg; class RooAbsArg;
class RooAbsData;
class RooArgSet;
class RooAbsPdf;
namespace RooStats { namespace RooStats {
class SamplingDistribution; class SamplingDistribution;
class TestStatSampler { class TestStatSampler {
public: public:
// TestStatSampler(); // TestStatSampler();
virtual ~TestStatSampler() {} virtual ~TestStatSampler() {}
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 ToyMCSampler.h   ToyMCSampler.h 
skipping to change at line 49 skipping to change at line 49
#endif #endif
#include <vector> #include <vector>
#include <sstream> #include <sstream>
#include "RooStats/TestStatSampler.h" #include "RooStats/TestStatSampler.h"
#include "RooStats/SamplingDistribution.h" #include "RooStats/SamplingDistribution.h"
#include "RooStats/TestStatistic.h" #include "RooStats/TestStatistic.h"
#include "RooStats/RooStatsUtils.h" #include "RooStats/RooStatsUtils.h"
#ifndef __CINT__
#include "RooGlobalFunc.h"
#endif
#include "RooWorkspace.h" #include "RooWorkspace.h"
#include "RooMsgService.h" #include "RooMsgService.h"
#include "RooAbsPdf.h" #include "RooAbsPdf.h"
#include "TRandom.h" #include "TRandom.h"
#include "RooDataSet.h" #include "RooDataSet.h"
namespace RooStats { namespace RooStats {
class ToyMCSampler : public TestStatSampler { class ToyMCSampler : public TestStatSampler {
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added


 TypeBase.h   TypeBase.h 
// @(#)root/reflex:$Id: TypeBase.h 28733 2009-05-28 04:34:44Z pcanal $ // @(#)root/reflex:$Id: TypeBase.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
skipping to change at line 23 skipping to change at line 23
#define Reflex_TypeBase #define Reflex_TypeBase
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
#include "Reflex/internal/OwnedPropertyList.h" #include "Reflex/internal/OwnedPropertyList.h"
#include <vector> #include <vector>
#include <typeinfo> #include <typeinfo>
namespace Reflex { namespace Reflex {
// forward declarations
class Type;
class Object;
class TypeTemplate;
class TypeName;
class DictionaryGenerator;
/**
* @class TypeBase TypeBase.h Reflex/TypeBase.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API TypeBase {
public:
/** default constructor */
TypeBase(const char* nam,
size_t size,
TYPE typeTyp,
const std::type_info & ti,
const Type& finalType = Dummy::Type(),
REPRESTYPE represType = REPRES_NOTYPE);
// forward declarations /** destructor */
class Type; virtual ~TypeBase();
class Object;
class TypeTemplate; /**
class TypeName; * operator Scope will return the corresponding scope of this type if
class DictionaryGenerator; * applicable (i.e. if the Type is also a Scope e.g. Class, Union, Enum)
*/
/** operator Scope() const;
* @class TypeBase TypeBase.h Reflex/TypeBase.h
* @author Stefan Roiser /**
* @date 24/11/2003 * operator Type will return the corresponding Type object
* @ingroup Ref * @return Type corresponding to this TypeBase
*/ */
class RFLX_API TypeBase { operator Type() const;
public: /**
* Allocate will reserve memory for the size of the object
/** default constructor */ * @return pointer to allocated memory
TypeBase( const char * nam, */
size_t size, void* Allocate() const;
TYPE typeTyp,
const std::type_info & ti, /**
const Type & finalType = Dummy::Type(), * CastObject an object from this class At to another one
REPRESTYPE represType = REPRES_NOTYPE); * @param to is the class At to cast into
* @param obj the memory AddressGet of the object to be casted
/** destructor */ */
virtual ~TypeBase(); virtual Object CastObject(const Type& to,
const Object& obj) const;
/**
* operator Scope will return the corresponding scope of this type if /**
* applicable (i.e. if the Type is also a Scope e.g. Class, Union, Enu * Construct will call the constructor of a given At and Allocate the
m) * memory for it
*/ * @param signature of the constructor
operator Scope () const; * @param values for parameters of the constructor
* @param mem place in memory for implicit construction
/** * @return pointer to new instance
* operator Type will return the corresponding Type object */
* @return Type corresponding to this TypeBase
*/ /*
operator Type () const;
/**
* Allocate will reserve memory for the size of the object
* @return pointer to allocated memory
*/
void * Allocate() const;
/**
* CastObject an object from this class At to another one
* @param to is the class At to cast into
* @param obj the memory AddressGet of the object to be casted
*/
virtual Object CastObject( const Type & to,
const Object & obj ) const;
/**
* Construct will call the constructor of a given At and Allocate the
* memory for it
* @param signature of the constructor
* @param values for parameters of the constructor
* @param mem place in memory for implicit construction
* @return pointer to new instance
*/
/*
virtual Object Construct( const Type & signature, virtual Object Construct( const Type & signature,
const std::vector < Object > & values, const std::vector < Object > & values,
void * mem ) const;*/ void * mem ) const;*/
virtual Object Construct( const Type & signature, virtual Object Construct(const Type& signature,
const std::vector < void * > & values, const std::vector<void*>& values,
void * mem) const; void* mem) const;
/**
* Deallocate will Deallocate the memory for a given object
* @param instance of the At in memory
*/
void Deallocate(void* instance) const;
/**
* Destruct will call the destructor of a At and remove its memory
* allocation if desired
* @param instance of the At in memory
* @param dealloc for also deallacoting the memory
*/
virtual void Destruct(void* instance,
bool dealloc = true) const;
/** /**
* Deallocate will Deallocate the memory for a given object * DeclaringScope will return a pointer to the At of this one
* @param instance of the At in memory * @return pointer to declaring At
*/ */
void Deallocate( void * instance ) const; Scope DeclaringScope() const;
/** /**
* Destruct will call the destructor of a At and remove its memory * DynamicType is used to discover whether an object represents the
* allocation if desired * current class At or not
* @param instance of the At in memory * @param mem is the memory AddressGet of the object to checked
* @param dealloc for also deallacoting the memory * @return the actual class of the object
*/ */
virtual void Destruct( void * instance, virtual Type DynamicType(const Object& obj) const;
bool dealloc = true ) const;
/**
/** * FinalType will return the type without typedefs
* DeclaringScope will return a pointer to the At of this one * @return type with all typedef info removed
* @return pointer to declaring At */
*/ Type FinalType() const;
Scope DeclaringScope() const;
/**
/** * GenerateDict will produce the dictionary information of this type
* DynamicType is used to discover whether an object represents the * @param generator a reference to the dictionary generator instance
* current class At or not */
* @param mem is the memory AddressGet of the object to checked virtual void GenerateDict(DictionaryGenerator& generator) const;
* @return the actual class of the object
*/ /**
virtual Type DynamicType( const Object & obj ) const; * GetBasePosition will return fBasePosition
* @return The position where the unscoped Name starts in the typename
/** */
* FinalType will return the type without typedefs size_t GetBasePosition() const;
* @return type with all typedef info removed
*/ /**
Type FinalType() const; * IsAbstract will return true if the the class is abstract
* @return true if the class is abstract
/** */
* GenerateDict will produce the dictionary information of this type virtual bool IsAbstract() const;
* @param generator a reference to the dictionary generator instance
*/ /**
virtual void GenerateDict(DictionaryGenerator &generator) const; * IsArray returns true if the At represents a Array
* @return true if At represents a Array
/** */
* GetBasePosition will return fBasePosition bool IsArray() const;
* @return The position where the unscoped Name starts in the typenam
e /**
*/ * IsClass returns true if the At represents a Class
size_t GetBasePosition() const; * @return true if At represents a Class
*/
/** bool IsClass() const;
* IsAbstract will return true if the the class is abstract
* @return true if the class is abstract /**
*/ * IsComplete will return true if all classes and BaseAt classes of this
virtual bool IsAbstract() const; * class are resolved and fully known in the system
*/
/** virtual bool IsComplete() const;
* IsArray returns true if the At represents a Array
* @return true if At represents a Array /**
*/ * IsEnum returns true if the At represents a Enum
bool IsArray() const; * @return true if At represents a Enum
*/
/** bool IsEnum() const;
* IsClass returns true if the At represents a Class
* @return true if At represents a Class /**
*/ * IsFunction returns true if the At represents a Function
bool IsClass() const; * @return true if At represents a Function
*/
/** bool IsFunction() const;
* IsComplete will return true if all classes and BaseAt classes of th
is /**
* class are resolved and fully known in the system * IsFundamental returns true if the At represents a Fundamental
*/ * @return true if At represents a Fundamental
virtual bool IsComplete() const; */
bool IsFundamental() const;
/**
* IsEnum returns true if the At represents a Enum /**
* @return true if At represents a Enum * IsPointer returns true if the At represents a Pointer
*/ * @return true if At represents a Pointer
bool IsEnum() const; */
bool IsPointer() const;
/**
* IsFunction returns true if the At represents a Function /**
* @return true if At represents a Function * IsPointerToMember returns true if the At represents a PointerToMember
*/ * @return true if At represents a PointerToMember
bool IsFunction() const; */
bool IsPointerToMember() const;
/**
* IsFundamental returns true if the At represents a Fundamental /**
* @return true if At represents a Fundamental * IsPrivate will check if the scope access is private
*/ * @return true if scope access is private
bool IsFundamental() const; */
virtual bool IsPrivate() const;
/**
* IsPointer returns true if the At represents a Pointer /**
* @return true if At represents a Pointer * IsProtected will check if the scope access is protected
*/ * @return true if scope access is protected
bool IsPointer() const; */
virtual bool IsProtected() const;
/**
* IsPointerToMember returns true if the At represents a PointerToMemb /**
er * IsPublic will check if the scope access is public
* @return true if At represents a PointerToMember * @return true if scope access is public
*/ */
bool IsPointerToMember() const; virtual bool IsPublic() const;
/** /**
* IsPrivate will check if the scope access is private * IsStruct will return true if the At represents a struct (not a class)
* @return true if scope access is private * @return true if At represents a struct
*/ */
virtual bool IsPrivate() const; bool IsStruct() const;
/** /**
* IsProtected will check if the scope access is protected * IsTemplateInstance will return true if the the class is templated
* @return true if scope access is protected * @return true if the class is templated
*/ */
virtual bool IsProtected() const; bool IsTemplateInstance() const;
/** /**
* IsPublic will check if the scope access is public * IsTypedef returns true if the At represents a Typedef
* @return true if scope access is public * @return true if At represents a Typedef
*/ */
virtual bool IsPublic() const; bool IsTypedef() const;
/** /**
* IsStruct will return true if the At represents a struct (not a clas * IsUnion returns true if the At represents a Union
s) * @return true if At represents a
* @return true if At represents a struct */
*/ bool IsUnion() const;
bool IsStruct() const;
/**
/** * IsVirtual will return true if the class contains a virtual table
* IsTemplateInstance will return true if the the class is templated * @return true if the class contains a virtual table
* @return true if the class is templated */
*/ virtual bool IsVirtual() const;
bool IsTemplateInstance() const;
/** Array
/** * size returns the size of the array
* IsTypedef returns true if the At represents a Typedef * @return size of array
* @return true if At represents a Typedef */
*/ virtual size_t ArrayLength() const;
bool IsTypedef() const;
/**
/** * Name returns the name of the type
* IsUnion returns true if the At represents a Union * @return name of type
* @return true if At represents a */
*/ virtual std::string Name(unsigned int mod = 0) const;
bool IsUnion() const;
/**
/** * SimpleName returns the name of the type as a reference. It provides a
* IsVirtual will return true if the class contains a virtual table * simplified but faster generation of a type name. Attention currently
* @return true if the class contains a virtual table it
*/ * is not guaranteed that Name() and SimpleName() return the same charac
virtual bool IsVirtual() const; ter
* layout of a name (ie. spacing, commas, etc. )
/** Array * @param pos will indicate where in the returned reference the requeste
* size returns the size of the array d name starts
* @return size of array * @param mod The only 'mod' support is SCOPED
*/ * @return name of type
virtual size_t ArrayLength() const; */
virtual const std::string& SimpleName(size_t& pos,
/** unsigned int mod = 0) const;
* Name returns the name of the type
* @return name of type /**
*/ * FunctionParameterAt returns the nth FunctionParameterAt
virtual std::string Name( unsigned int mod = 0 ) const; * @param nth nth FunctionParameterAt
* @return pointer to nth FunctionParameterAt At
/** */
* SimpleName returns the name of the type as a reference. It provides virtual Type FunctionParameterAt(size_t nth) const;
a
* simplified but faster generation of a type name. Attention currentl /**
y it * FunctionParameterSize will return the number of parameters of this fu
* is not guaranteed that Name() and SimpleName() return the same char nction
acter * @return number of parameters
* layout of a name (ie. spacing, commas, etc. ) */
* @param pos will indicate where in the returned reference the reques virtual size_t FunctionParameterSize() const;
ted name starts
* @param mod The only 'mod' support is SCOPED virtual Type_Iterator FunctionParameter_Begin() const;
* @return name of type virtual Type_Iterator FunctionParameter_End() const;
*/ virtual Reverse_Type_Iterator FunctionParameter_RBegin() const;
virtual const std::string & SimpleName( size_t & pos, virtual Reverse_Type_Iterator FunctionParameter_REnd() const;
unsigned int mod = 0 ) const;
/**
/** * PointerToMemberScope will return the scope of the pointer to member t
* FunctionParameterAt returns the nth FunctionParameterAt ype
* @param nth nth FunctionParameterAt * @return scope of the pointer to member type
* @return pointer to nth FunctionParameterAt At */
*/ virtual Scope PointerToMemberScope() const;
virtual Type FunctionParameterAt( size_t nth ) const;
/**
/** * Properties will return a pointer to the PropertyNth list attached
* FunctionParameterSize will return the number of parameters of this * to this item
function * @return pointer to PropertyNth list
* @return number of parameters */
*/ virtual PropertyList Properties() const;
virtual size_t FunctionParameterSize() const;
/**
virtual Type_Iterator FunctionParameter_Begin() const; * RawType will return the underlying type of a type removing all inform
virtual Type_Iterator FunctionParameter_End() const; ation
virtual Reverse_Type_Iterator FunctionParameter_RBegin() const; * of pointers, arrays, typedefs
virtual Reverse_Type_Iterator FunctionParameter_REnd() const; * @return the raw type representation
*/
/** Type RawType() const;
* PointerToMemberScope will return the scope of the pointer to member
type /**
* @return scope of the pointer to member type * ReturnType will return a pointer to the At of the return At.
*/ * @return pointer to Type of return At
virtual Scope PointerToMemberScope() const; */
virtual Type ReturnType() const;
/**
* Properties will return a pointer to the PropertyNth list attached /**
* to this item * sizeof will return the size of the At
* @return pointer to PropertyNth list * @return size of the At as int
*/ */
virtual PropertyList Properties() const; size_t SizeOf() const;
/** /**
* RawType will return the underlying type of a type removing all info * TemplateArgumentAt will return a pointer to the nth template argument
rmation * @param nth nth template argument
* of pointers, arrays, typedefs * @return pointer to nth template argument
* @return the raw type representation */
*/ virtual Type TemplateArgumentAt(size_t nth) const;
Type RawType() const;
/**
/** * templateArgSize will return the number of template arguments
* ReturnType will return a pointer to the At of the return At. * @return number of template arguments
* @return pointer to Type of return At */
*/ virtual size_t TemplateArgumentSize() const;
virtual Type ReturnType() const;
virtual Type_Iterator TemplateArgument_Begin() const;
/** virtual Type_Iterator TemplateArgument_End() const;
* sizeof will return the size of the At virtual Reverse_Type_Iterator TemplateArgument_RBegin() const;
* @return size of the At as int virtual Reverse_Type_Iterator TemplateArgument_REnd() const;
*/
size_t SizeOf() const; /**
* TemplateFamily returns the corresponding TypeTemplate if any
/** * @return corresponding TypeTemplate
* TemplateArgumentAt will return a pointer to the nth template argume */
nt virtual TypeTemplate TemplateFamily() const;
* @param nth nth template argument
* @return pointer to nth template argument /**
*/ * arrayType will return a pointer to the At of the array.
virtual Type TemplateArgumentAt( size_t nth ) const; * @return pointer to Type of MemberAt et. al.
*/
/** virtual Type ToType() const;
* templateArgSize will return the number of template arguments
* @return number of template arguments /**
*/ * At returns the corresponding unqualified Type object
virtual size_t TemplateArgumentSize() const; * @return corresponding At object
*/
virtual Type_Iterator TemplateArgument_Begin() const; Type ThisType() const;
virtual Type_Iterator TemplateArgument_End() const;
virtual Reverse_Type_Iterator TemplateArgument_RBegin() const; /**
virtual Reverse_Type_Iterator TemplateArgument_REnd() const; * TypeInfo will return the c++ type_info object of the At
* @return type_info object of At
/** */
* TemplateFamily returns the corresponding TypeTemplate if any virtual const std::type_info& TypeInfo() const;
* @return corresponding TypeTemplate
*/ /**
virtual TypeTemplate TemplateFamily() const; * TypeType will return the real At
* @return real At
/** */
* arrayType will return a pointer to the At of the array. TYPE TypeType() const;
* @return pointer to Type of MemberAt et. al.
*/ /**
virtual Type ToType() const; * TypeTypeAsString will return the string representation of the TYPE At
* @return string representation of TYPE At
/** */
* At returns the corresponding unqualified Type object std::string TypeTypeAsString() const;
* @return corresponding At object
*/ public:
Type ThisType() const; /**
* SetSize will set the size of the type. This function shall
/** * be used with care. It will change the reflection information
* TypeInfo will return the c++ type_info object of the At * of this type.
* @return type_info object of At */
*/ void SetSize(size_t s) const;
virtual const std::type_info & TypeInfo() const;
/**
/** * SetTypeInfo will set the type_info object of this type.
* TypeType will return the real At * Attention: This will change the reflection information
* @return real At * of this type.
*/ */
TYPE TypeType() const; void SetTypeInfo(const std::type_info& ti) const;
/** /**
* TypeTypeAsString will return the string representation of the TYPE * Hide this type from any lookup by appending the string " @HIDDEN@" to
At its name.
* @return string representation of TYPE At */
*/ virtual void HideName() const;
std::string TypeTypeAsString() const;
/**
public: * Un-Hide this type from any lookup by removing the string " @HIDDEN@"
to its name.
/** */
* SetSize will set the size of the type. This function shall virtual void UnhideName() const;
* be used with care. It will change the reflection information
* of this type. REPRESTYPE
*/ RepresType() const { return fRepresType; }
void SetSize( size_t s ) const;
protected:
/** /**
* SetTypeInfo will set the type_info object of this type. * DetermineFinalType will return the t without typedefs
* Attention: This will change the reflection information * @return type with all typedef info removed
* of this type. */
*/ Type DetermineFinalType(const Type& t) const;
void SetTypeInfo( const std::type_info & ti ) const;
/**
/** * Calculate the size for types based on other types,
* Hide this type from any lookup by appending the string " @HIDDEN@" * if the other type was not yet available to calculate the
to its name. * size at construction time.
*/ * @return The calculated size, 0 if the underlying size is unknown.
virtual void HideName() const; */
virtual size_t CalculateSize() const;
/**
* Un-Hide this type from any lookup by removing the string " @HIDDEN /**
@" to its name. * Pointer to the TypeName
*/ * @label At Name
virtual void UnhideName() const; * @ling aggregation
* @link aggregation
REPRESTYPE RepresType() const { return fRepresType; } * @supplierCardinality 1
* @clientCardinality 1
protected: */
TypeName* fTypeName;
/**
* DetermineFinalType will return the t without typedefs /** C++ type_info object */
* @return type with all typedef info removed mutable
*/ const std::type_info * fTypeInfo;
Type DetermineFinalType(const Type& t) const;
private:
/** REPRESTYPE fRepresType;
* Calculate the size for types based on other types,
* if the other type was not yet available to calculate the /**
* size at construction time. * The Scope of the Type
* @return The calculated size, 0 if the underlying size is unknown. * @label type scope
*/ * @link aggregation
virtual size_t CalculateSize() const; * @clientCardinality 1
* @supplierCardinality 1
/** */
* Pointer to the TypeName Scope fScope;
* @label At Name
* @ling aggregation /** size of the type in int */
* @link aggregation mutable
* @supplierCardinality 1 size_t fSize;
* @clientCardinality 1
*/ /**
TypeName * fTypeName; * TYPE (kind) of the Type
* @link aggregation
/** C++ type_info object */ * @label type type
mutable * @clientCardinality 1
const std::type_info * fTypeInfo; * @supplierCardinality 1
*/
private: TYPE fTypeType;
REPRESTYPE fRepresType; /**
* Property list attached to this type
/** * @label propertylist
* The Scope of the Type * @link aggregationByValue
* @label type scope * @clientCardinality 1
* @link aggregation * @supplierCardinality 1
* @clientCardinality 1 */
* @supplierCardinality 1 OwnedPropertyList fPropertyList;
*/
Scope fScope; /**
* The position where the unscoped Name starts in the typename
/** size of the type in int */ */
mutable size_t fBasePosition;
size_t fSize;
/**
/** * the final type excluding typedefs
* TYPE (kind) of the Type * @label final typedef type
* @link aggregation * @link aggregation
* @label type type * @supplierCardinality 0..1
* @clientCardinality 1 * @clientCardinality 1
* @supplierCardinality 1 */
*/ mutable
TYPE fTypeType; Type * fFinalType;
/** /**
* Property list attached to this type * the raw type excluding pointers, typedefs and arrays
* @label propertylist * @label raw type
* @link aggregationByValue * @link aggregation
* @clientCardinality 1 * @supplierCardinality 0..1
* @supplierCardinality 1 * @clientCardinality 1
*/ */
OwnedPropertyList fPropertyList; mutable
Type * fRawType;
/**
* The position where the unscoped Name starts in the typename
*/
size_t fBasePosition;
/**
* the final type excluding typedefs
* @label final typedef type
* @link aggregation
* @supplierCardinality 0..1
* @clientCardinality 1
*/
mutable
Type * fFinalType;
/**
* the raw type excluding pointers, typedefs and arrays
* @label raw type
* @link aggregation
* @supplierCardinality 0..1
* @clientCardinality 1
*/
mutable
Type * fRawType;
}; // class TypeBase }; // class TypeBase
} //namespace Reflex } //namespace Reflex
#include "Reflex/TypeTemplate.h" #include "Reflex/TypeTemplate.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::CalculateSize() const { inline size_t
Reflex::TypeBase::CalculateSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fSize; return fSize;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::GetBasePosition() const { inline size_t
Reflex::TypeBase::GetBasePosition() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fBasePosition; return fBasePosition;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsAbstract() const { inline bool
Reflex::TypeBase::IsAbstract() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsArray() const { inline bool
Reflex::TypeBase::IsArray() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == ARRAY ); return fTypeType == ARRAY;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsClass() const { inline bool
Reflex::TypeBase::IsClass() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == CLASS || return fTypeType == CLASS ||
fTypeType == TYPETEMPLATEINSTANCE || fTypeType == TYPETEMPLATEINSTANCE ||
fTypeType == STRUCT ); fTypeType == STRUCT;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsComplete() const { inline bool
Reflex::TypeBase::IsComplete() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return true; return true;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsEnum() const { inline bool
Reflex::TypeBase::IsEnum() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == ENUM ); return fTypeType == ENUM;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsFunction() const { inline bool
Reflex::TypeBase::IsFunction() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == FUNCTION ); return fTypeType == FUNCTION;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsFundamental() const { inline bool
Reflex::TypeBase::IsFundamental() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == FUNDAMENTAL ); return fTypeType == FUNDAMENTAL;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsPointer() const { inline bool
Reflex::TypeBase::IsPointer() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == POINTER ); return fTypeType == POINTER;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsStruct() const { inline bool
Reflex::TypeBase::IsStruct() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == STRUCT ); return fTypeType == STRUCT;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsPointerToMember() const { inline bool
Reflex::TypeBase::IsPointerToMember() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == POINTERTOMEMBER ); return fTypeType == POINTERTOMEMBER;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsTemplateInstance() const { inline bool
Reflex::TypeBase::IsTemplateInstance() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == TYPETEMPLATEINSTANCE || return fTypeType == TYPETEMPLATEINSTANCE ||
fTypeType == MEMBERTEMPLATEINSTANCE ); fTypeType == MEMBERTEMPLATEINSTANCE;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsTypedef() const { inline bool
Reflex::TypeBase::IsTypedef() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == TYPEDEF ); return fTypeType == TYPEDEF;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsUnion() const { inline bool
Reflex::TypeBase::IsUnion() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeType == UNION ); return fTypeType == UNION;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsPrivate() const { inline bool
Reflex::TypeBase::IsPrivate() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsProtected() const { inline bool
Reflex::TypeBase::IsProtected() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsPublic() const { inline bool
Reflex::TypeBase::IsPublic() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeBase::IsVirtual() const { inline bool
Reflex::TypeBase::IsVirtual() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::TypeBase::FunctionParameter_Begin() co inline Reflex::Type_Iterator
nst { Reflex::TypeBase::FunctionParameter_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().begin(); return Dummy::TypeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::TypeBase::FunctionParameter_End() cons inline Reflex::Type_Iterator
t { Reflex::TypeBase::FunctionParameter_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().end(); return Dummy::TypeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::FunctionParameter_RB inline Reflex::Reverse_Type_Iterator
egin() const { Reflex::TypeBase::FunctionParameter_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rbegin(); return Dummy::TypeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::FunctionParameter_RE inline Reflex::Reverse_Type_Iterator
nd() const { Reflex::TypeBase::FunctionParameter_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rend(); return Dummy::TypeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::SizeOf() const { inline size_t
Reflex::TypeBase::SizeOf() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if (!fSize) fSize = CalculateSize(); if (!fSize) {
fSize = CalculateSize();
}
return fSize; return fSize;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeBase::TemplateArgumentSize() const { inline size_t
Reflex::TypeBase::TemplateArgumentSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::TypeBase::TemplateArgument_Begin() con inline Reflex::Type_Iterator
st { Reflex::TypeBase::TemplateArgument_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().begin(); return Dummy::TypeCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Type_Iterator Reflex::TypeBase::TemplateArgument_End() const inline Reflex::Type_Iterator
{ Reflex::TypeBase::TemplateArgument_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().end(); return Dummy::TypeCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::TemplateArgument_RBe inline Reflex::Reverse_Type_Iterator
gin() const { Reflex::TypeBase::TemplateArgument_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rbegin(); return Dummy::TypeCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::TemplateArgument_REn inline Reflex::Reverse_Type_Iterator
d() const { Reflex::TypeBase::TemplateArgument_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeCont().rend(); return Dummy::TypeCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate Reflex::TypeBase::TemplateFamily() const { inline Reflex::TypeTemplate
Reflex::TypeBase::TemplateFamily() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return Dummy::TypeTemplate(); return Dummy::TypeTemplate();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const std::type_info & Reflex::TypeBase::TypeInfo() const { inline const std::type_info&
Reflex::TypeBase::TypeInfo() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return *fTypeInfo; return *fTypeInfo;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::TypeBase::SetSize( size_t s ) const { inline void
Reflex::TypeBase::SetSize(size_t s) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fSize = s; fSize = s;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void Reflex::TypeBase::SetTypeInfo( const std::type_info & ti ) cons inline void
t { Reflex::TypeBase::SetTypeInfo(const std::type_info& ti) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fTypeInfo = &ti; fTypeInfo = &ti;
} }
#endif // Reflex_TypeBase #endif // Reflex_TypeBase
 End of changes. 51 change blocks. 
535 lines changed or deleted 549 lines changed or added


 TypeBuilder.h   TypeBuilder.h 
// @(#)root/reflex:$Id: TypeBuilder.h 27579 2009-02-23 15:15:06Z pcanal $ // @(#)root/reflex:$Id: TypeBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypeBuilder #ifndef Reflex_TypeBuilder
#define Reflex_TypeBuilder #define Reflex_TypeBuilder
// Include files // Include files
#include "Reflex/Type.h" #include "Reflex/Type.h"
#include "Reflex/Tools.h" #include "Reflex/Tools.h"
#include <vector> #include <vector>
#if defined(__ICC) #if defined(__ICC)
#define OffsetOf(c1,mem) (long(&((volatile const char&)((c1*)0)->mem))) # define OffsetOf(c1, mem) (long (&((volatile const char &)((c1*) 0)->mem)) )
#else #else
#define OffsetOf(c1,mem) ((size_t)(&reinterpret_cast<const volatile char&>( ((c1*)64)->mem))-64) # define OffsetOf(c1, mem) ((size_t) (&reinterpret_cast<const volatile char &>(((c1*) 64)->mem)) - 64)
#endif #endif
namespace Reflex { namespace Reflex {
RFLX_API Type TypeBuilder(const char* n,
unsigned int modifiers = 0);
RFLX_API Type TypeBuilder( const char * n, RFLX_API Type ConstBuilder(const Type& t);
unsigned int modifiers = 0 );
RFLX_API Type ConstBuilder( const Type & t ); RFLX_API Type VolatileBuilder(const Type& t);
RFLX_API Type VolatileBuilder( const Type & t ); RFLX_API Type PointerBuilder(const Type& t,
const std::type_info& ti = typeid(UnknownType)
);
RFLX_API Type PointerToMemberBuilder(const Type& t,
const Scope& s,
const std::type_info& ti = typeid(Unkn
ownType));
RFLX_API Type ReferenceBuilder(const Type& t);
RFLX_API Type ArrayBuilder(const Type& t,
size_t n,
const std::type_info& ti = typeid(UnknownType));
RFLX_API Type EnumTypeBuilder(const char*,
const char* items = "",
const std::type_info& ti = typeid(UnknownType
),
unsigned int modifiers = 0);
RFLX_API Type TypedefTypeBuilder(const char* Name,
const Type& t,
REPRESTYPE represType = REPRES_NOTYPE);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const std::vector<Reflex::Type>& p,
const std::type_info& ti = typeid(Unknown
Type));
RFLX_API Type FunctionTypeBuilder(const Type& r);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26,
const Type& t27);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26,
const Type& t27,
const Type& t28);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26,
const Type& t27,
const Type& t28,
const Type& t29);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26,
const Type& t27,
const Type& t28,
const Type& t29,
const Type& t30);
RFLX_API Type FunctionTypeBuilder(const Type& r,
const Type& t0,
const Type& t1,
const Type& t2,
const Type& t3,
const Type& t4,
const Type& t5,
const Type& t6,
const Type& t7,
const Type& t8,
const Type& t9,
const Type& t10,
const Type& t11,
const Type& t12,
const Type& t13,
const Type& t14,
const Type& t15,
const Type& t16,
const Type& t17,
const Type& t18,
const Type& t19,
const Type& t20,
const Type& t21,
const Type& t22,
const Type& t23,
const Type& t24,
const Type& t25,
const Type& t26,
const Type& t27,
const Type& t28,
const Type& t29,
const Type& t30,
const Type& t31);
/**
* offsetOf will calculate the Offset of a data MemberAt relative
* to the start of the class
* @param MemberAt the pointer to the data MemberAt
* @return the Offset of the data MemberAt
*/
template <typename C, typename M>
size_t
offsetOf(M C::* member) {
return (size_t) &((((C*) 0)->*member));
}
/**
* @struct BaseOffset TypeBuilder.h Reflex/Builder/TypeBuilder.h
* provide the static function that calculates the Offset between BaseAt c
lasses
*/
template <typename C, typename B>
class BaseOffset {
public:
static size_t
Offset(void* o) { return (size_t) (B*) (C*) o - (size_t) (C*) o; }
static OffsetFunction
Get() { return &BaseOffset::Offset; }
};
/**
* @struct TypeDistiller TypeBuilder.h Reflex/Builder/TypeBuilder.h
* @author Pere Mato
* @date 29/07/2004
* @ingroup RefBld
*/
template <typename T> class TypeDistiller {
public:
static Type
Get() {
Type t = Type::ByTypeInfo(typeid(T));
RFLX_API Type PointerBuilder( const Type & t, if (!t.Id()) { t = Type::ByName(Tools::Demangle(typeid(T))); }
const std::type_info & ti = typeid(UnknownType));
if (t.Id()) { return t; } else { return TypeBuilder(Tools::Demangle(t
RFLX_API Type PointerToMemberBuilder( const Type & t, ypeid(T)).c_str()); }
const Scope & s, }
const std::type_info & ti = typeid(UnknownType));
};
RFLX_API Type ReferenceBuilder( const Type & t );
/** */
RFLX_API Type ArrayBuilder( const Type & t, template <typename T> class TypeDistiller<T*> {
size_t n, public:
const std::type_info & ti = typeid(UnknownType)); static Type
Get() {
RFLX_API Type EnumTypeBuilder( const char *, Type t = Type::ByTypeInfo(typeid(T*));
const char * items = "",
const std::type_info & ti = typeid(UnknownType), if (t) { return t; } else { return PointerBuilder(TypeDistiller<T>::G
unsigned int modifiers = 0 ); et(), typeid(T*)); }
}
RFLX_API Type TypedefTypeBuilder( const char * Name,
const Type & t, };
REPRESTYPE represType = REPRES_NOTYPE );
/** */
RFLX_API Type FunctionTypeBuilder( const Type & r, template <typename T, size_t N> class TypeDistiller<T[N]> {
const std::vector<Reflex::Type> & p, public:
const std::type_info & ti = typeid(UnknownType)); static Type
Get() {
RFLX_API Type FunctionTypeBuilder(const Type & r); Type t = Type::ByTypeInfo(typeid(T*));
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0); if (t) { return t; } else { return ArrayBuilder(TypeDistiller<T>::Get
(), N, typeid(NullType)); }
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co }
nst Type & t1);
};
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1, /** */
const Type & t2); template <typename T> class TypeDistiller<const T> {
public:
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co static Type
nst Type & t1, Get() {
const Type & t2, const Type & t3); Type t = Type::ByTypeInfo(typeid(T));
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co if (t) { return Type(t, CONST); } else { return Type(TypeDistiller<T>
nst Type & t1, ::Get(), CONST); }
const Type & t2, const Type & t3, const Type & t4); }
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co };
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4, /** */
const Type & t5); template <typename T> class TypeDistiller<volatile T> {
public:
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co static Type
nst Type & t1, Get() {
const Type & t2, const Type & t3, const Type & t4, Type t = Type::ByTypeInfo(typeid(T));
const Type & t5, const Type & t6);
if (t) { return Type(t, VOLATILE); } else { return Type(TypeDistiller
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co <T>::Get(), VOLATILE); }
nst Type & t1, }
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7); };
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co /** */
nst Type & t1, template <typename T> class TypeDistiller<const volatile T> {
const Type & t2, const Type & t3, const Type & t4, public:
const Type & t5, const Type & t6, const Type & t7, static Type
const Type & t8); Get() {
Type t = Type::ByTypeInfo(typeid(T));
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1, if (t) { return Type(t, CONST | VOLATILE); } else { return Type(TypeD
const Type & t2, const Type & t3, const Type & t4, istiller<T>::Get(), CONST | VOLATILE); }
const Type & t5, const Type & t6, const Type & t7, }
const Type & t8, const Type & t9);
};
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1, /** */
const Type & t2, const Type & t3, const Type & t4, template <typename T> class TypeDistiller<T&> {
const Type & t5, const Type & t6, const Type & t7, public:
const Type & t8, const Type & t9, const Type & t10); static Type
Get() {
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co Type t = Type::ByTypeInfo(typeid(T));
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4, if (t) { return Type(t, REFERENCE); } else { return Type(TypeDistille
const Type & t5, const Type & t6, const Type & t7, r<T>::Get(), REFERENCE); }
const Type & t8, const Type & t9, const Type & t10, }
const Type & t11);
};
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1, /** */
const Type & t2, const Type & t3, const Type & t4, template <typename T> class TypeDistiller<const T&> {
const Type & t5, const Type & t6, const Type & t7, public:
const Type & t8, const Type & t9, const Type & t10, static Type
const Type & t11, const Type & t12); Get() {
Type t = Type::ByTypeInfo(typeid(T));
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1, if (t) { return Type(t, CONST | REFERENCE); } else { return Type(Type
const Type & t2, const Type & t3, const Type & t4, Distiller<T>::Get(), CONST | REFERENCE); }
const Type & t5, const Type & t6, const Type & t7, }
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13); };
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co /** */
nst Type & t1, template <typename T> class TypeDistiller<volatile T&> {
const Type & t2, const Type & t3, const Type & t4, public:
const Type & t5, const Type & t6, const Type & t7, static Type
const Type & t8, const Type & t9, const Type & t10, Get() {
const Type & t11, const Type & t12, const Type & t13, Type t = Type::ByTypeInfo(typeid(T));
const Type & t14);
if (t) { return Type(t, VOLATILE | REFERENCE); } else { return Type(T
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co ypeDistiller<T>::Get(), VOLATILE | REFERENCE); }
nst Type & t1, }
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7, };
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13, /** */
const Type & t14, const Type & t15); template <typename T> class TypeDistiller<const volatile T&> {
public:
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co static Type
nst Type & t1, Get() {
const Type & t2, const Type & t3, const Type & t4, Type t = Type::ByTypeInfo(typeid(T));
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10, if (t) { return Type(t, CONST | VOLATILE | REFERENCE); } else { retur
const Type & t11, const Type & t12, const Type & t13, n Type(TypeDistiller<T>::Get(), CONST | VOLATILE | REFERENCE); }
const Type & t14, const Type & t15, const Type & t16); }
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co };
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26, const Type & t27);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26, const Type & t27, const Type & t28);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26, const Type & t27, const Type & t28,
const Type & t29);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26, const Type & t27, const Type & t28,
const Type & t29, const Type & t30);
RFLX_API Type FunctionTypeBuilder(const Type & r, const Type & t0, co
nst Type & t1,
const Type & t2, const Type & t3, const Type & t4,
const Type & t5, const Type & t6, const Type & t7,
const Type & t8, const Type & t9, const Type & t10,
const Type & t11, const Type & t12, const Type & t13,
const Type & t14, const Type & t15, const Type & t16,
const Type & t17, const Type & t18, const Type & t19,
const Type & t20, const Type & t21, const Type & t22,
const Type & t23, const Type & t24, const Type & t25,
const Type & t26, const Type & t27, const Type & t28,
const Type & t29, const Type & t30, const Type & t31);
/**
* offsetOf will calculate the Offset of a data MemberAt relative
* to the start of the class
* @param MemberAt the pointer to the data MemberAt
* @return the Offset of the data MemberAt
*/
template < typename C, typename M >
size_t offsetOf( M C::* member ) {
return (size_t) &((((C*)0)->*member));
}
/**
* @struct BaseOffset TypeBuilder.h Reflex/Builder/TypeBuilder.h
* provide the static function that calculates the Offset between BaseAt
classes
*/
template < typename C, typename B >
class BaseOffset {
public:
static size_t Offset (void * o ) { return (size_t)(B*)(C*)o - (size_t
)(C*)o; }
static OffsetFunction Get() { return & BaseOffset::Offset; }
};
/**
* @struct TypeDistiller TypeBuilder.h Reflex/Builder/TypeBuilder.h
* @author Pere Mato
* @date 29/07/2004
* @ingroup RefBld
*/
template<typename T> class TypeDistiller {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( ! t.Id() ) t = Type::ByName(Tools::Demangle(typeid(T)));
if ( t.Id() ) return t;
else return TypeBuilder(Tools::Demangle(typeid(T)).c_str());
}
};
/** */
template<typename T> class TypeDistiller<T *> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T*));
if ( t ) return t;
else return PointerBuilder(TypeDistiller<T>::Get(),typeid(T *));
}
};
/** */
template<typename T, size_t N > class TypeDistiller<T[N]> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T*));
if ( t ) return t;
else return ArrayBuilder(TypeDistiller<T>::Get(),N,typeid(NullType
));
}
};
/** */
template<typename T> class TypeDistiller<const T> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, CONST );
else return Type(TypeDistiller<T>::Get(),CONST);
}
};
/** */
template<typename T> class TypeDistiller<volatile T> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, VOLATILE );
else return Type(TypeDistiller<T>::Get(),VOLATILE);
}
};
/** */
template<typename T> class TypeDistiller<const volatile T> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, CONST | VOLATILE );
else return Type(TypeDistiller<T>::Get(),CONST|VOLATILE);
}
};
/** */
template<typename T> class TypeDistiller<T &> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, REFERENCE );
else return Type(TypeDistiller<T>::Get(),REFERENCE);
}
};
/** */
template<typename T> class TypeDistiller<const T &> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, CONST | REFERENCE );
else return Type(TypeDistiller<T>::Get(),CONST|REFERENCE);
}
};
/** */
template<typename T> class TypeDistiller<volatile T &> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, VOLATILE | REFERENCE );
else return Type(TypeDistiller<T>::Get(),VOLATILE|REFERENCE);
}
};
/** */
template<typename T> class TypeDistiller<const volatile T &> {
public:
static Type Get() {
Type t = Type::ByTypeInfo(typeid(T));
if ( t ) return Type( t, CONST | VOLATILE | REFERENCE );
else return Type(TypeDistiller<T>::Get(),CONST|VOLATILE|REFERENCE)
;
}
};
#ifndef TYPEDISTILLER_STRING_SPECIALIZATION #ifndef TYPEDISTILLER_STRING_SPECIALIZATION
#define TYPEDISTILLER_STRING_SPECIALIZATION # define TYPEDISTILLER_STRING_SPECIALIZATION
template<> class TypeDistiller<std::string> { template <> class TypeDistiller<std::string> {
public: public:
static Type Get() { static Type
return TypeBuilder("std::basic_string<char>"); Get() {
} return TypeBuilder("std::basic_string<char>");
}; }
};
#endif #endif
/** /**
* getType will return a reference to a Type (create it if necessery) * getType will return a reference to a Type (create it if necessery)
* representating the type of the template parameter * representating the type of the template parameter
* @return reference to Type * @return reference to Type
*/ */
template < typename T > template <typename T>
const Type& GetType() { const Type&
static Type t = TypeDistiller<T>::Get(); GetType() {
return t; static Type t = TypeDistiller<T>::Get();
} return t;
}
/**
* @struct FuntionDistiller TypeBuilder.h Reflex/Builder/TypeBuilder.h /**
* @author Pere Mato * @struct FuntionDistiller TypeBuilder.h Reflex/Builder/TypeBuilder.h
* @date 29/07/2004 * @author Pere Mato
* @ingroup RefBld * @date 29/07/2004
*/ * @ingroup RefBld
template< typename S > class FunctionDistiller; */
template <typename S> class FunctionDistiller;
// This define is necessary for all Sun Forte compilers with version < 5
.5 (SunWSpro8) // This define is necessary for all Sun Forte compilers with version < 5.5
#if ( (defined(__SUNPRO_CC)) && (__SUNPRO_CC<0x550) ) (SunWSpro8)
#define __R_TN__ typename #if ((defined(__SUNPRO_CC)) && (__SUNPRO_CC < 0x550))
# define __R_TN__ typename
#else #else
#define __R_TN__ # define __R_TN__
#endif #endif
/** */ /** */
template< typename R > template <typename R>
class FunctionDistiller<R(void)> { class FunctionDistiller<R(void)> {
public: public:
static Type Get() { static Type
Type t = Type::ByTypeInfo(typeid(R(void))); Get() {
if ( t ) return t; Type t = Type::ByTypeInfo(typeid(R(void)));
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
std::vector<Type>(), if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
typeid(R(void))); R>::Get(),
} std::vector<Ty
}; pe>(),
typeid(R(void)
/** */ )); }
template < typename R, typename T0 > }
class FunctionDistiller<__R_TN__ R(__R_TN__ T0)> {
public: };
static Type Get() {
Type t = Type::ByTypeInfo(typeid(R(T0))); /** */
if ( t ) return t; template <typename R, typename T0>
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), class FunctionDistiller<__R_TN__ R(__R_TN__ T0)> {
Tools::MakeVector( TypeDistiller<T0>::Get() ), public:
typeid(R(T0))); static Type
} Get() {
}; Type t = Type::ByTypeInfo(typeid(R(T0)));
/** */ if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
template < typename R, typename T0, typename T1 > R>::Get(),
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1)> { Tools::MakeVec
public: tor(TypeDistiller<T0>::Get()),
static Type Get() { typeid(R(T0)))
Type t = Type::ByTypeInfo(typeid(R(T0, T1))); ; }
if ( t ) return t; }
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), };
TypeDistiller<T1>::Get()),
typeid(R(T0, T1))); /** */
} template <typename R, typename T0, typename T1>
}; class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1)> {
public:
/** */ static Type
template < typename R, typename T0, typename T1, typename T2 > Get() {
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 Type t = Type::ByTypeInfo(typeid(R(T0, T1)));
)> {
public: if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
static Type Get() { R>::Get(),
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2))); Tools::MakeVec
if ( t ) return t; tor(TypeDistiller<T0>::Get(),
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), TypeDistiller<T1>::Get()),
TypeDistiller<T1>::Get(), typeid(R(T0, T
TypeDistiller<T2>::Get()), 1))); }
typeid(R(T0, T1, T2))); }
}
}; };
/** */ /** */
template < typename R, typename T0, typename T1, typename T2, typename T template <typename R, typename T0, typename T1, typename T2>
3 > class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2)>
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 {
, public:
__R_TN__ T3)> { static Type
public: Get() {
static Type Get() { Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2)));
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3)));
if ( t ) return t; if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), Tools::MakeVec
TypeDistiller<T1>::Get(), tor(TypeDistiller<T0>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get()), TypeDistiller<T1>::Get(),
typeid(R(T0, T1, T2, T3)));
} TypeDistiller<T2>::Get()),
}; typeid(R(T0, T
1, T2))); }
/** */ }
template < typename R, typename T0, typename T1, typename T2, typename T
3, };
typename T4 >
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 /** */
, template <typename R, typename T0, typename T1, typename T2, typename T3>
__R_TN__ T3, __R_TN__ T4)> { class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
public: __R_TN__ T3)> {
static Type Get() { public:
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4))); static Type
if ( t ) return t; Get() {
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3)));
Tools::MakeVector( TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(), if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
TypeDistiller<T2>::Get(), R>::Get(),
TypeDistiller<T3>::Get(), Tools::MakeVec
TypeDistiller<T4>::Get()), tor(TypeDistiller<T0>::Get(),
typeid(R(T0, T1, T2, T3, T4)));
} TypeDistiller<T1>::Get(),
};
TypeDistiller<T2>::Get(),
/** */
template < typename R, typename T0, typename T1, typename T2, typename T TypeDistiller<T3>::Get()),
3, typeid(R(T0, T
typename T4, typename T5 > 1, T2, T3))); }
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 }
,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5)> { };
public:
static Type Get() { /** */
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5))); template <typename R, typename T0, typename T1, typename T2, typename T3,
if ( t ) return t; typename T4>
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
Tools::MakeVector( TypeDistiller<T0>::Get(), __R_TN__ T3, __R_TN__ T4)> {
TypeDistiller<T1>::Get(), public:
TypeDistiller<T2>::Get(), static Type
TypeDistiller<T3>::Get(), Get() {
TypeDistiller<T4>::Get(), Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4)));
TypeDistiller<T5>::Get()),
typeid(R(T0, T1, T2, T3, T4, T5))); if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
} R>::Get(),
}; Tools::MakeVec
tor(TypeDistiller<T0>::Get(),
/** */
template < typename R, typename T0, typename T1, typename T2, typename T TypeDistiller<T1>::Get(),
3,
typename T4, typename T5, typename T6 > TypeDistiller<T2>::Get(),
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2
, TypeDistiller<T3>::Get(),
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6)> { TypeDistiller<T4>::Get()),
public: typeid(R(T0, T
static Type Get() { 1, T2, T3, T4))); }
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6))); }
if ( t ) return t;
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), };
Tools::MakeVector( TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(), /** */
TypeDistiller<T2>::Get(), template <typename R, typename T0, typename T1, typename T2, typename T3,
TypeDistiller<T3>::Get(), typename T4, typename T5>
TypeDistiller<T4>::Get(), class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
TypeDistiller<T5>::Get(), __R_TN__ T3, __R_TN__ T4, __R_TN__ T5)>
TypeDistiller<T6>::Get()), {
typeid(R(T0, T1, T2, T3, T4, T5, T6))); public:
} static Type
}; Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5)));
/** */
template < typename R, typename T0, typename T1, typename T2, typename T if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
3, R>::Get(),
typename T4, typename T5, typename T6, typename T7 > Tools::MakeVec
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 tor(TypeDistiller<T0>::Get(),
,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, TypeDistiller<T1>::Get(),
__R_TN__ T6, __R_TN__ T7)> {
public: TypeDistiller<T2>::Get(),
static Type Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7) TypeDistiller<T3>::Get(),
));
if ( t ) return t; TypeDistiller<T4>::Get(),
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), TypeDistiller<T5>::Get()),
TypeDistiller<T1>::Get(), typeid(R(T0, T
TypeDistiller<T2>::Get(), 1, T2, T3, T4, T5))); }
TypeDistiller<T3>::Get(), }
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(), };
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get()), /** */
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7))); template <typename R, typename T0, typename T1, typename T2, typename T3,
} typename T4, typename T5, typename T6>
}; class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
/** */ __R_TN__ T6)> {
template < typename R, typename T0, typename T1, typename T2, typename T public:
3, static Type
typename T4, typename T5, typename T6, typename T7, Get() {
typename T8 > Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6)));
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2
, if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, R>::Get(),
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8)> { Tools::MakeVec
public: tor(TypeDistiller<T0>::Get(),
static Type Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, TypeDistiller<T1>::Get(),
T8)));
if ( t ) return t; TypeDistiller<T2>::Get(),
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), TypeDistiller<T3>::Get(),
TypeDistiller<T1>::Get(),
TypeDistiller<T2>::Get(), TypeDistiller<T4>::Get(),
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(), TypeDistiller<T5>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(), TypeDistiller<T6>::Get()),
TypeDistiller<T7>::Get(), typeid(R(T0, T
TypeDistiller<T8>::Get()), 1, T2, T3, T4, T5, T6))); }
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8))); }
}
}; };
/** */ /** */
template < typename R, typename T0, typename T1, typename T2, typename T template <typename R, typename T0, typename T1, typename T2, typename T3,
3, typename T4, typename T5, typename T6, typename T7>
typename T4, typename T5, typename T6, typename T7, class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
typename T8, typename T9 > __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 __R_TN__ T6, __R_TN__ T7)> {
, public:
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, static Type
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, Get() {
__R_TN__ T9)> { Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7)));
public:
static Type Get() { if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, R>::Get(),
T8, T9))); Tools::MakeVec
if ( t ) return t; tor(TypeDistiller<T0>::Get(),
else return FunctionTypeBuilder( TypeDistiller<R>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(), TypeDistiller<T1>::Get(),
TypeDistiller<T1>::Get(),
TypeDistiller<T2>::Get(), TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(), TypeDistiller<T3>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(), TypeDistiller<T4>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(), TypeDistiller<T5>::Get(),
TypeDistiller<T9>::Get()),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9))); TypeDistiller<T6>::Get(),
}
}; TypeDistiller<T7>::Get()),
typeid(R(T0, T
/** */ 1, T2, T3, T4, T5, T6, T7))); }
template < typename R, typename T0, typename T1, typename T2, typename T }
3,
typename T4, typename T5, typename T6, typename T7, };
typename T8, typename T9, typename T10 >
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 /** */
, template <typename R, typename T0, typename T1, typename T2, typename T3,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, typename T4, typename T5, typename T6, typename T7,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, typename T8>
__R_TN__ T9, __R_TN__ T10)> { class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
public: __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
static Type Get() { __R_TN__ T6, __R_TN__ T7, __R_TN__ T8)>
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, {
T8, T9, T10))); public:
if ( t ) return t; static Type
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), Get() {
Tools::MakeVector( TypeDistiller<T0>::Get(), Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
TypeDistiller<T1>::Get(), )));
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(), if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
TypeDistiller<T4>::Get(), R>::Get(),
TypeDistiller<T5>::Get(), Tools::MakeVec
TypeDistiller<T6>::Get(), tor(TypeDistiller<T0>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(), TypeDistiller<T1>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get()), TypeDistiller<T2>::Get(),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)));
} TypeDistiller<T3>::Get(),
};
TypeDistiller<T4>::Get(),
/** */
template < typename R, typename T0, typename T1, typename T2, typename T TypeDistiller<T5>::Get(),
3,
typename T4, typename T5, typename T6, typename T7, TypeDistiller<T6>::Get(),
typename T8, typename T9, typename T10, typename T11 >
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 TypeDistiller<T7>::Get(),
,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, TypeDistiller<T8>::Get()),
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, typeid(R(T0, T
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11)> { 1, T2, T3, T4, T5, T6, T7, T8))); }
public: }
static Type Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, };
T8, T9, T10, T11)));
if ( t ) return t; /** */
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), template <typename R, typename T0, typename T1, typename T2, typename T3,
Tools::MakeVector( TypeDistiller<T0>::Get(), typename T4, typename T5, typename T6, typename T7,
TypeDistiller<T1>::Get(), typename T8, typename T9>
TypeDistiller<T2>::Get(), class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
TypeDistiller<T3>::Get(), __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
TypeDistiller<T4>::Get(), __R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
TypeDistiller<T5>::Get(), __R_TN__ T9)> {
TypeDistiller<T6>::Get(), public:
TypeDistiller<T7>::Get(), static Type
TypeDistiller<T8>::Get(), Get() {
TypeDistiller<T9>::Get(), Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
TypeDistiller<T10>::Get(), , T9)));
TypeDistiller<T11>::Get()),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11))); if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
} R>::Get(),
}; Tools::MakeVec
tor(TypeDistiller<T0>::Get(),
/** */
template < typename R, typename T0, typename T1, typename T2, typename T TypeDistiller<T1>::Get(),
3,
typename T4, typename T5, typename T6, typename T7, TypeDistiller<T2>::Get(),
typename T8, typename T9, typename T10, typename T11,
typename T12 > TypeDistiller<T3>::Get(),
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2
, TypeDistiller<T4>::Get(),
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, TypeDistiller<T5>::Get(),
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
__R_TN__ T12)> { TypeDistiller<T6>::Get(),
public:
static Type Get() { TypeDistiller<T7>::Get(),
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7,
T8, T9, T10, T11, T12))); TypeDistiller<T8>::Get(),
if ( t ) return t;
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), TypeDistiller<T9>::Get()),
Tools::MakeVector( TypeDistiller<T0>::Get(), typeid(R(T0, T
TypeDistiller<T1>::Get(), 1, T2, T3, T4, T5, T6, T7, T8, T9))); }
TypeDistiller<T2>::Get(), }
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(), };
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(), /** */
TypeDistiller<T7>::Get(), template <typename R, typename T0, typename T1, typename T2, typename T3,
TypeDistiller<T8>::Get(), typename T4, typename T5, typename T6, typename T7,
TypeDistiller<T9>::Get(), typename T8, typename T9, typename T10>
TypeDistiller<T10>::Get(), class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
TypeDistiller<T11>::Get(), __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
TypeDistiller<T12>::Get()), __R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 __R_TN__ T9, __R_TN__ T10)> {
))); public:
} static Type
}; Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
/** */ , T9, T10)));
template < typename R, typename T0, typename T1, typename T2, typename T
3, if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
typename T4, typename T5, typename T6, typename T7, R>::Get(),
typename T8, typename T9, typename T10, typename T11, Tools::MakeVec
typename T12, typename T13 > tor(TypeDistiller<T0>::Get(),
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2
, TypeDistiller<T1>::Get(),
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, TypeDistiller<T2>::Get(),
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
__R_TN__ T12, __R_TN__ T13)> { TypeDistiller<T3>::Get(),
public:
static Type Get() { TypeDistiller<T4>::Get(),
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7,
T8, T9, T10, T11, T12, T13))); TypeDistiller<T5>::Get(),
if ( t ) return t;
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), TypeDistiller<T6>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(), TypeDistiller<T7>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(), TypeDistiller<T8>::Get(),
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(), TypeDistiller<T9>::Get(),
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get(), TypeDistiller<T10>::Get()),
TypeDistiller<T8>::Get(), typeid(R(T0, T
TypeDistiller<T9>::Get(), 1, T2, T3, T4, T5, T6, T7, T8, T9, T10))); }
TypeDistiller<T10>::Get(), } // Get
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get(), };
TypeDistiller<T13>::Get()),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 /** */
, T13))); template <typename R, typename T0, typename T1, typename T2, typename T3,
} typename T4, typename T5, typename T6, typename T7,
}; typename T8, typename T9, typename T10, typename T11>
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
/** */ __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
template < typename R, typename T0, typename T1, typename T2, typename T __R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
3, __R_TN__ T9, __R_TN__ T10, __R_TN__ T11)
typename T4, typename T5, typename T6, typename T7, > {
typename T8, typename T9, typename T10, typename T11, public:
typename T12, typename T13, typename T14 > static Type
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 Get() {
, Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, , T9, T10, T11)));
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11, if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
__R_TN__ T12, __R_TN__ T13, __R_TN__ T14)> { R>::Get(),
public: Tools::MakeVec
static Type Get() { tor(TypeDistiller<T0>::Get(),
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7,
T8, T9, T10, T11, T12, T13, T14))); TypeDistiller<T1>::Get(),
if ( t ) return t;
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), TypeDistiller<T2>::Get(),
Tools::MakeVector( TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(), TypeDistiller<T3>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(), TypeDistiller<T4>::Get(),
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(), TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get(), TypeDistiller<T6>::Get(),
TypeDistiller<T8>::Get(),
TypeDistiller<T9>::Get(), TypeDistiller<T7>::Get(),
TypeDistiller<T10>::Get(),
TypeDistiller<T11>::Get(), TypeDistiller<T8>::Get(),
TypeDistiller<T12>::Get(),
TypeDistiller<T13>::Get(), TypeDistiller<T9>::Get(),
TypeDistiller<T14>::Get()),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 TypeDistiller<T10>::Get(),
, T13, T14)));
} TypeDistiller<T11>::Get()),
}; typeid(R(T0, T
1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11))); }
/** */ } // Get
template < typename R, typename T0, typename T1, typename T2, typename T
3, };
typename T4, typename T5, typename T6, typename T7,
typename T8, typename T9, typename T10, typename T11, /** */
typename T12, typename T13, typename T14, typename T15 > template <typename R, typename T0, typename T1, typename T2, typename T3,
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2 typename T4, typename T5, typename T6, typename T7,
, typename T8, typename T9, typename T10, typename T11,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5, typename T12>
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8, class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11, __R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T12, __R_TN__ T13, __R_TN__ T14, __R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
__R_TN__ T15)> { __R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
public: __R_TN__ T12)> {
static Type Get() { public:
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, static Type
T8, T9, T10, T11, T12, T13, T14, T15))); Get() {
if ( t ) return t; Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
else return FunctionTypeBuilder( TypeDistiller<R>::Get(), , T9, T10, T11, T12)));
Tools::MakeVector( TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(), if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
TypeDistiller<T2>::Get(), R>::Get(),
TypeDistiller<T3>::Get(), Tools::MakeVec
TypeDistiller<T4>::Get(), tor(TypeDistiller<T0>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(), TypeDistiller<T1>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(), TypeDistiller<T2>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get(), TypeDistiller<T3>::Get(),
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get(), TypeDistiller<T4>::Get(),
TypeDistiller<T13>::Get(),
TypeDistiller<T14>::Get(), TypeDistiller<T5>::Get(),
TypeDistiller<T15>::Get()),
typeid(R( T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 TypeDistiller<T6>::Get(),
, T13, T14, T15)));
} TypeDistiller<T7>::Get(),
};
TypeDistiller<T8>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get(),
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get()),
typeid(R(T0, T
1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12))); }
} // Get
};
/** */
template <typename R, typename T0, typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7,
typename T8, typename T9, typename T10, typename T11,
typename T12, typename T13>
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
__R_TN__ T12, __R_TN__ T13)> {
public:
static Type
Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
, T9, T10, T11, T12, T13)));
if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
R>::Get(),
Tools::MakeVec
tor(TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get(),
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get(),
TypeDistiller<T13>::Get()),
typeid(R(T0, T
1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13))); }
} // Get
};
/** */
template <typename R, typename T0, typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7,
typename T8, typename T9, typename T10, typename T11,
typename T12, typename T13, typename T14>
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
__R_TN__ T12, __R_TN__ T13, __R_TN__ T14
)> {
public:
static Type
Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
, T9, T10, T11, T12, T13, T14)));
if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
R>::Get(),
Tools::MakeVec
tor(TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get(),
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get(),
TypeDistiller<T13>::Get(),
TypeDistiller<T14>::Get()),
typeid(R(T0, T
1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14))); }
} // Get
};
/** */
template <typename R, typename T0, typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7,
typename T8, typename T9, typename T10, typename T11,
typename T12, typename T13, typename T14, typename T15>
class FunctionDistiller<__R_TN__ R(__R_TN__ T0, __R_TN__ T1, __R_TN__ T2,
__R_TN__ T3, __R_TN__ T4, __R_TN__ T5,
__R_TN__ T6, __R_TN__ T7, __R_TN__ T8,
__R_TN__ T9, __R_TN__ T10, __R_TN__ T11,
__R_TN__ T12, __R_TN__ T13, __R_TN__ T14
,
__R_TN__ T15)> {
public:
static Type
Get() {
Type t = Type::ByTypeInfo(typeid(R(T0, T1, T2, T3, T4, T5, T6, T7, T8
, T9, T10, T11, T12, T13, T14, T15)));
if (t) { return t; } else { return FunctionTypeBuilder(TypeDistiller<
R>::Get(),
Tools::MakeVec
tor(TypeDistiller<T0>::Get(),
TypeDistiller<T1>::Get(),
TypeDistiller<T2>::Get(),
TypeDistiller<T3>::Get(),
TypeDistiller<T4>::Get(),
TypeDistiller<T5>::Get(),
TypeDistiller<T6>::Get(),
TypeDistiller<T7>::Get(),
TypeDistiller<T8>::Get(),
TypeDistiller<T9>::Get(),
TypeDistiller<T10>::Get(),
TypeDistiller<T11>::Get(),
TypeDistiller<T12>::Get(),
TypeDistiller<T13>::Get(),
TypeDistiller<T14>::Get(),
TypeDistiller<T15>::Get()),
typeid(R(T0, T
1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15))); }
} // Get
};
#undef __R_TN__ #undef __R_TN__
// end of the Sun Forte CC fix // end of the Sun Forte CC fix
} // namespace Reflex } // namespace Reflex
#endif #endif
 End of changes. 13 change blocks. 
897 lines changed or deleted 1447 lines changed or added


 TypeName.h   TypeName.h 
// @(#)root/reflex:$Id: TypeName.h 25669 2008-10-02 21:37:03Z pcanal $ // @(#)root/reflex:$Id: TypeName.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypeName #ifndef Reflex_TypeName
#define Reflex_TypeName #define Reflex_TypeName
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
namespace Reflex { namespace Reflex {
// forward declarations
class TypeBase;
class Type;
/**
* class TypeName TypeName.h Reflex/TypeName.h
* @author Stefan Roiser
* @date 06/11/2004
* @ingroup Ref
*/
class RFLX_API TypeName {
friend class Type;
friend class TypeBase;
public:
/** default constructor */
TypeName(const char* nnam,
TypeBase * typeBas,
const std::type_info * ti = 0);
// forward declarations /**
class TypeBase; * ByName will look for a At given as a string and return a pointer to
class Type; * its reflexion At
* @param key fully qualified Name of the At as string
/** * @return pointer to At or 0 if none is found
* class TypeName TypeName.h Reflex/TypeName.h */
* @author Stefan Roiser static Type ByName(const std::string& key);
* @date 06/11/2004
* @ingroup Ref /**
*/ * byTypeId will look for a At given as a string representation of a
class RFLX_API TypeName { * type_info and return a pointer to its reflexion At
* @param tid string representation of the type_info At
friend class Type; * @return pointer to At or 0 if none is found
friend class TypeBase; */
static Type ByTypeInfo(const std::type_info& ti);
public:
static void CleanUp();
/** default constructor */
TypeName( const char * nnam, /**
TypeBase * typeBas, * DeleteType will call the destructor of the TypeBase this TypeName is
const std::type_info * ti = 0 ); * pointing to and remove it's information from the data structures. The
* TypeName information will remain.
/** */
* ByName will look for a At given as a string and return a pointer to void DeleteType() const;
* its reflexion At
* @param key fully qualified Name of the At as string /**
* @return pointer to At or 0 if none is found * Hide this type from any lookup by appending the string " @HIDDEN@" to
*/ its name.
static Type ByName( const std::string & key ); */
void HideName();
/**
* byTypeId will look for a At given as a string representation of a /**
* type_info and return a pointer to its reflexion At * Un-Hide this type from any lookup by removing the string " @HIDDEN@"
* @param tid string representation of the type_info At to its name.
* @return pointer to At or 0 if none is found */
*/ void UnhideName();
static Type ByTypeInfo( const std::type_info & ti );
/**
static void CleanUp(); * Name will return the string representation of the At (unique)
* @return At Name as a string
/** */
* DeleteType will call the destructor of the TypeBase this TypeName i const std::string& Name() const;
s
* pointing to and remove it's information from the data structures. T /**
he * Name_c_str returns a char* pointer to the unqualified At Name
* TypeName information will remain. * @ return c string to unqualified At Name
*/ */
void DeleteType() const; const char* Name_c_str() const;
/** /**
* Hide this type from any lookup by appending the string " @HIDDEN@" * At returns the At object of this TypeName
to its name. * @return corresponding Type to this TypeName
*/ */
void HideName(); Type ThisType() const;
/** /**
* Un-Hide this type from any lookup by removing the string " @HIDDEN * At will return a pointer to the nth Type in the system
@" to its name. * @param nth number of At to return
*/ * @return pointer to nth Type in the system
void UnhideName(); */
static Type TypeAt(size_t nth);
/**
* Name will return the string representation of the At (unique) /**
* @return At Name as a string * Size will return the number of currently defined types in
*/ * the system
const std::string & Name() const; * @return number of currently defined types
*/
/** static size_t TypeSize();
* Name_c_str returns a char* pointer to the unqualified At Name
* @ return c string to unqualified At Name static Type_Iterator Type_Begin();
*/ static Type_Iterator Type_End();
const char * Name_c_str() const; static Reverse_Type_Iterator Type_RBegin();
static Reverse_Type_Iterator Type_REnd();
/**
* At returns the At object of this TypeName private:
* @return corresponding Type to this TypeName /** destructor */
*/ ~TypeName();
Type ThisType() const;
/** Set the type_info in the hash_map to this */
/** void SetTypeId(const std::type_info& ti) const;
* At will return a pointer to the nth Type in the system
* @param nth number of At to return private:
* @return pointer to nth Type in the system /** the Name of the At */
*/ std::string fName;
static Type TypeAt( size_t nth );
/**
/** * pointer to a TypebeBase if the At is implemented
* Size will return the number of currently defined types in * @label type base
* the system * @link aggregation
* @return number of currently defined types * @supplierCardinality 1
*/ * @clientCardinality 1
static size_t TypeSize(); */
mutable
static Type_Iterator Type_Begin(); TypeBase * fTypeBase;
static Type_Iterator Type_End();
static Reverse_Type_Iterator Type_RBegin(); /**
static Reverse_Type_Iterator Type_REnd(); * Pointer back to the type
* @label this type
private: * @link aggregation
* @supplierCardinality 1
/** destructor */ * @clientCardinality 1
~TypeName(); */
Type* fThisType;
/** Set the type_info in the hash_map to this */
void SetTypeId( const std::type_info & ti ) const;
private:
/** the Name of the At */
std::string fName;
/**
* pointer to a TypebeBase if the At is implemented
* @label type base
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
mutable
TypeBase * fTypeBase;
/**
* Pointer back to the type
* @label this type
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
Type * fThisType;
}; // class TypeName }; // class TypeName
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const std::string & Reflex::TypeName::Name() const { inline const std::string&
Reflex::TypeName::Name() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName; return fName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::TypeName::Name_c_str() const { inline const char*
Reflex::TypeName::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName.c_str(); return fName.c_str();
} }
#endif // Reflex_TypeName #endif // Reflex_TypeName
 End of changes. 6 change blocks. 
133 lines changed or deleted 128 lines changed or added


 TypeTemplate.h   TypeTemplate.h 
// @(#)root/reflex:$Id: TypeTemplate.h 22845 2008-03-26 13:41:38Z axel $ // @(#)root/reflex:$Id: TypeTemplate.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypeTemplate #ifndef Reflex_TypeTemplate
#define Reflex_TypeTemplate #define Reflex_TypeTemplate
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class Type;
class TypeTemplateName;
/**
* @class TypeTemplate TypeTemplate.h Reflex/TypeTemplate.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API TypeTemplate {
public:
/** default constructor */
TypeTemplate(const TypeTemplateName * typeTemplateName = 0);
// forward declarations /** copy constructor */
class Type; TypeTemplate(const TypeTemplate &rh);
class TypeTemplateName;
/**
* @class TypeTemplate TypeTemplate.h Reflex/TypeTemplate.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API TypeTemplate {
public:
/** default constructor */
TypeTemplate( const TypeTemplateName * typeTemplateName = 0 );
/** copy constructor */
TypeTemplate( const TypeTemplate & rh );
/** destructor */
~TypeTemplate();
/**
* operator bool will return true if the type template is resolved
* @return true if type template is resolved
*/
operator bool () const;
/**
* operator == will return true if two type templates are the same
* @return true if type templates match
*/
bool operator == ( const TypeTemplate & rh ) const;
/**
* ByName will return a type template corresponding to the argument na
me
* @param type template name to lookup
* @param nTemplateParams looks up the template family with this numbe
r of template parameters
* if it is set to 0, the first occurence of the template famil
y name will be returned
* @return corresponding type template to name
*/
static TypeTemplate ByName( const std::string & name,
size_t nTemplateParams = 0 );
/**
* Id will return a memory address which is a unique id for this type
template
* @return unique id of this type template
*/
void * Id() const;
/**
* Name will return the Name of the template family and a list of
* all currently available instantiations
* @return template family Name with all instantiantion
*/
std::string Name( unsigned int mod = 0 ) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance c
ontainer
* @return the begin iterator of the instance container
*/
Type_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance conta
iner
* @return the end iterator of the instance container
*/
Type_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance
container
* @return the rbegin iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance con
tainer
* @return the rend iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_REnd() const;
/**
* TemplateInstanceAt will return a pointer to the nth template instan
tion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Type TemplateInstanceAt( size_t nth ) const;
/**
* TemplateInstanceSize will return the number of template instantions
for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterDefaultAt will return the nth TemplateParameterAt
default value as string
* @param nth template TemplateParameterAt
* @return default value of nth template TemplateParameterAt
*/
std::string TemplateParameterDefaultAt( size_t nth ) const;
/**
* TemplateParameterDefault_Begin returns the begin of the container o
f template parameter default names
* @return begin of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_Begin() const;
/**
* TemplateParameterDefault_End returns the end of the container of te
mplate parameter default names
* @return end of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_End() const;
/**
* TemplateParameterDefault_RBegin returns the reverse begin of the co
ntainer of template parameter default names
* @return reverse begin of container of template parameter default na
mes
*/
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
/**
* TemplateParameterDefault_REnd returns the reverse end of the contai
ner of template parameter default names
* @return reverse end of container of template parameter default name
s
*/
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth TemplateParameterA
t
* @param nth template TemplateParameterAt
* @return Name of nth template TemplateParameterAt
*/
std::string TemplateParameterNameAt( size_t nth ) const;
/**
* TemplateParameterName_Begin returns the begin of the container of t
emplate parameter names
* @return begin of container of template parameter names
*/
StdString_Iterator TemplateParameterName_Begin() const;
/**
* TemplateParameterName_End returns the end of the container of templ
ate parameter names
* @return end of container of template parameter names
*/
StdString_Iterator TemplateParameterName_End() const;
/**
* TemplateParameterName_RBegin returns the reverse begin of the conta
iner of template parameter names
* @return reverse begin of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
/**
* TemplateParameterName_REnd returns the reverse end of the container
of template parameter names
* @return reverse end of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TypeTemplateAt will return the nth type template defined
* @param nth type template
* @return nth type template
*/
static TypeTemplate TypeTemplateAt( size_t nth );
/**
* TypeTemplateSize will return the number of type templates defined
* @return number of defined type templates
*/
static size_t TypeTemplateSize();
/**
* TypeTemplate_Begin returns the begin iterator of the type template
container
* @return begin iterator of type template container
*/
static TypeTemplate_Iterator TypeTemplate_Begin();
/**
* TypeTemplate_End returns the end iterator of the type template cont
ainer
* @return end iterator of type template container
*/
static TypeTemplate_Iterator TypeTemplate_End();
/**
* TypeTemplate_Rbegin returns the rbegin iterator of the type templat
e container
* @return rbegin iterator of type template container
*/
static Reverse_TypeTemplate_Iterator TypeTemplate_RBegin();
/**
* TypeTemplate_Rend returns the rend iterator of the type template co
ntainer
* @return rend iterator of type template container
*/
static Reverse_TypeTemplate_Iterator TypeTemplate_REnd();
/**
* Unload will unload the dictionary information of a type template
*/
void Unload() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to
the local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance( const Type & templateInstance ) const;
private:
/**
* pointer to the type template implementation
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
* @label type template impl
*/
const TypeTemplateName * fTypeTemplateName;
}; // class TypeTemplate /** destructor */
~TypeTemplate();
/**
* operator bool will return true if the type template is resolved
* @return true if type template is resolved
*/
operator bool() const;
/**
* operator == will return true if two type templates are the same
* @return true if type templates match
*/
bool operator ==(const TypeTemplate& rh) const;
/**
* ByName will return a type template corresponding to the argument name
* @param type template name to lookup
* @param nTemplateParams looks up the template family with this number
of template parameters
* if it is set to 0, the first occurence of the template family
name will be returned
* @return corresponding type template to name
*/
static TypeTemplate ByName(const std::string& name,
size_t nTemplateParams = 0);
/**
* Id will return a memory address which is a unique id for this type te
mplate
* @return unique id of this type template
*/
void* Id() const;
/**
* Name will return the Name of the template family and a list of
* all currently available instantiations
* @return template family Name with all instantiantion
*/
std::string Name(unsigned int mod = 0) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance con
tainer
* @return the begin iterator of the instance container
*/
Type_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance contain
er
* @return the end iterator of the instance container
*/
Type_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance c
ontainer
* @return the rbegin iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance conta
iner
* @return the rend iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_REnd() const;
/**
* TemplateInstanceAt will return a pointer to the nth template instanti
on
* @param nth template instantion
* @return pointer to nth template instantion
*/
Type TemplateInstanceAt(size_t nth) const;
/**
* TemplateInstanceSize will return the number of template instantions f
or
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterDefaultAt will return the nth TemplateParameterAt de
fault value as string
* @param nth template TemplateParameterAt
* @return default value of nth template TemplateParameterAt
*/
std::string TemplateParameterDefaultAt(size_t nth) const;
/**
* TemplateParameterDefault_Begin returns the begin of the container of
template parameter default names
* @return begin of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_Begin() const;
/**
* TemplateParameterDefault_End returns the end of the container of temp
late parameter default names
* @return end of container of template parameter default names
*/
StdString_Iterator TemplateParameterDefault_End() const;
/**
* TemplateParameterDefault_RBegin returns the reverse begin of the cont
ainer of template parameter default names
* @return reverse begin of container of template parameter default name
s
*/
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
/**
* TemplateParameterDefault_REnd returns the reverse end of the containe
r of template parameter default names
* @return reverse end of container of template parameter default names
*/
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth TemplateParameterAt
* @param nth template TemplateParameterAt
* @return Name of nth template TemplateParameterAt
*/
std::string TemplateParameterNameAt(size_t nth) const;
/**
* TemplateParameterName_Begin returns the begin of the container of tem
plate parameter names
* @return begin of container of template parameter names
*/
StdString_Iterator TemplateParameterName_Begin() const;
/**
* TemplateParameterName_End returns the end of the container of templat
e parameter names
* @return end of container of template parameter names
*/
StdString_Iterator TemplateParameterName_End() const;
/**
* TemplateParameterName_RBegin returns the reverse begin of the contain
er of template parameter names
* @return reverse begin of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
/**
* TemplateParameterName_REnd returns the reverse end of the container o
f template parameter names
* @return reverse end of container of template parameter names
*/
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TypeTemplateAt will return the nth type template defined
* @param nth type template
* @return nth type template
*/
static TypeTemplate TypeTemplateAt(size_t nth);
/**
* TypeTemplateSize will return the number of type templates defined
* @return number of defined type templates
*/
static size_t TypeTemplateSize();
/**
* TypeTemplate_Begin returns the begin iterator of the type template co
ntainer
* @return begin iterator of type template container
*/
static TypeTemplate_Iterator TypeTemplate_Begin();
/**
* TypeTemplate_End returns the end iterator of the type template contai
ner
* @return end iterator of type template container
*/
static TypeTemplate_Iterator TypeTemplate_End();
/**
* TypeTemplate_Rbegin returns the rbegin iterator of the type template
container
* @return rbegin iterator of type template container
*/
static Reverse_TypeTemplate_Iterator TypeTemplate_RBegin();
/**
* TypeTemplate_Rend returns the rend iterator of the type template cont
ainer
* @return rend iterator of type template container
*/
static Reverse_TypeTemplate_Iterator TypeTemplate_REnd();
/**
* Unload will unload the dictionary information of a type template
*/
void Unload() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to th
e local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance(const Type& templateInstance) const;
private:
/**
* pointer to the type template implementation
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
* @label type template impl
*/
const TypeTemplateName* fTypeTemplateName;
}; // class TypeTemplate
} // namespace Reflex } // namespace Reflex
#include "Reflex/internal/TypeTemplateName.h" #include "Reflex/internal/TypeTemplateName.h"
#include "Reflex/internal/TypeTemplateImpl.h" #include "Reflex/internal/TypeTemplateImpl.h"
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate::TypeTemplate( const TypeTemplateName * typeTem plateName ) inline Reflex::TypeTemplate::TypeTemplate(const TypeTemplateName* typeTempl ateName)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fTypeTemplateName( typeTemplateName ) {} : fTypeTemplateName(typeTemplateName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate::TypeTemplate( const TypeTemplate & rh ) inline Reflex::TypeTemplate::TypeTemplate(const TypeTemplate& rh)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fTypeTemplateName( rh.fTypeTemplateName ) {} : fTypeTemplateName(rh.fTypeTemplateName) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate::~TypeTemplate() {} inline Reflex::TypeTemplate::~TypeTemplate() {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::TypeTemplate::operator bool () const { inline
Reflex::TypeTemplate::operator bool() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( this->fTypeTemplateName && this->fTypeTemplateName->fTypeTemplateIm if (this->fTypeTemplateName && this->fTypeTemplateName->fTypeTemplateImp
pl ) return true; l) {
return true;
}
return false; return false;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline bool Reflex::TypeTemplate::operator == ( const TypeTemplate & rh ) c inline bool
onst { Reflex::TypeTemplate::operator ==(const TypeTemplate& rh) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ( fTypeTemplateName == rh.fTypeTemplateName ); return fTypeTemplateName == rh.fTypeTemplateName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline void * Reflex::TypeTemplate::Id() const { inline void*
Reflex::TypeTemplate::Id() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return (void*)fTypeTemplateName; return (void*) fTypeTemplateName;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeTemplate::TemplateInstanceSize() const { inline size_t
Reflex::TypeTemplate::TemplateInstanceSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateInsta if (*this) {
nceSize(); return fTypeTemplateName->fTypeTemplateImpl->TemplateInstanceSize();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeTemplate::TemplateParameterSize() const { inline size_t
Reflex::TypeTemplate::TemplateParameterSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterSize(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterSize();
}
return 0; return 0;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::TypeTemplate::TemplateParameterDefaultAt( size_t inline std::string
nth ) const { Reflex::TypeTemplate::TemplateParameterDefaultAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterDefaultAt( nth ); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterDefault
At(nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplate::TemplateParameterDe inline Reflex::StdString_Iterator
fault_Begin() const { Reflex::TypeTemplate::TemplateParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterDefault_Begin(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterDefault
_Begin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplate::TemplateParameterDe inline Reflex::StdString_Iterator
fault_End() const { Reflex::TypeTemplate::TemplateParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterDefault_End(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterDefault
_End();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplate::TemplatePar inline Reflex::Reverse_StdString_Iterator
ameterDefault_RBegin() const { Reflex::TypeTemplate::TemplateParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterDefault_RBegin(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterDefault
_RBegin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplate::TemplatePar inline Reflex::Reverse_StdString_Iterator
ameterDefault_REnd() const { Reflex::TypeTemplate::TemplateParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterDefault_REnd(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterDefault
_REnd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::TypeTemplate::TemplateParameterNameAt( size_t nt inline std::string
h ) const { Reflex::TypeTemplate::TemplateParameterNameAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterNameAt( nth ); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterNameAt(
nth);
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplate::TemplateParameterNa inline Reflex::StdString_Iterator
me_Begin() const { Reflex::TypeTemplate::TemplateParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterName_Begin(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterName_Be
gin();
}
return Dummy::StdStringCont().begin(); return Dummy::StdStringCont().begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplate::TemplateParameterNa inline Reflex::StdString_Iterator
me_End() const { Reflex::TypeTemplate::TemplateParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterName_End(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterName_En
d();
}
return Dummy::StdStringCont().end(); return Dummy::StdStringCont().end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplate::TemplatePar inline Reflex::Reverse_StdString_Iterator
ameterName_RBegin() const { Reflex::TypeTemplate::TemplateParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterName_RBegin(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterName_RB
egin();
}
return Dummy::StdStringCont().rbegin(); return Dummy::StdStringCont().rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplate::TemplatePar inline Reflex::Reverse_StdString_Iterator
ameterName_REnd() const { Reflex::TypeTemplate::TemplateParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( * this ) return fTypeTemplateName->fTypeTemplateImpl->TemplateParam if (*this) {
eterName_REnd(); return fTypeTemplateName->fTypeTemplateImpl->TemplateParameterName_RE
nd();
}
return Dummy::StdStringCont().rend(); return Dummy::StdStringCont().rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeTemplate::TypeTemplateSize() { inline size_t
Reflex::TypeTemplate::TypeTemplateSize() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return TypeTemplateName::TypeTemplateSize(); return TypeTemplateName::TypeTemplateSize();
} }
#endif // Reflex_TypeTemplate #endif // Reflex_TypeTemplate
 End of changes. 40 change blocks. 
313 lines changed or deleted 338 lines changed or added


 TypeTemplateImpl.h   TypeTemplateImpl.h 
// @(#)root/reflex:$Id: TypeTemplateImpl.h 24138 2008-06-04 12:50:27Z axel $ // @(#)root/reflex:$Id: TypeTemplateImpl.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypeTemplateImpl #ifndef Reflex_TypeTemplateImpl
#define Reflex_TypeTemplateImpl #define Reflex_TypeTemplateImpl
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
#include "Reflex/Scope.h" #include "Reflex/Scope.h"
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( push ) # pragma warning( push )
#pragma warning( disable : 4251 ) # pragma warning( disable : 4251 )
#endif #endif
namespace Reflex { namespace Reflex {
// forward declarations
class Type;
class TypeTemplate;
class TypeTemplateName;
class ClassTemplateInstance;
/**
* @class TypeTemplateImpl TypeTemplateImpl.h Reflex/TypeTemplateImpl.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API TypeTemplateImpl {
public:
/** default constructor */
TypeTemplateImpl(const char* templateName,
const Scope &scop,
std::vector<std::string> parameterNames,
std::vector<std::string> parameterDefaults = std::vecto
r<std::string>());
// forward declarations /** destructor */
class Type; virtual ~TypeTemplateImpl();
class TypeTemplate;
class TypeTemplateName;
class ClassTemplateInstance;
/**
* @class TypeTemplateImpl TypeTemplateImpl.h Reflex/TypeTemplateImpl.h
* @author Stefan Roiser
* @date 2005-02-03
* @ingroup Ref
*/
class RFLX_API TypeTemplateImpl {
public:
/** default constructor */
TypeTemplateImpl( const char * templateName,
const Scope & scop,
std::vector < std::string > parameterNames,
std::vector < std::string > parameterDefaults = std::vector<std::s
tring>());
/** destructor */
virtual ~TypeTemplateImpl();
/**
* operator == will return true if two At templates are the same
* @return true if At templates match
*/
bool operator == ( const TypeTemplateImpl & rh ) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance c
ontainer
* @return the begin iterator of the instance container
*/
Type_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance conta
iner
* @return the end iterator of the instance container
*/
Type_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance
container
* @return the rbegin iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance con
tainer
* @return the rend iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_REnd() const;
/**
* instantion will return a pointer to the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Type TemplateInstanceAt( size_t nth ) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt
default value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt( size_t nth ) const;
StdString_Iterator TemplateParameterDefault_Begin() const;
StdString_Iterator TemplateParameterDefault_End() const;
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterA
t
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt( size_t nth ) const;
StdString_Iterator TemplateParameterName_Begin() const;
StdString_Iterator TemplateParameterName_End() const;
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* Return the member template API class corresponding to this member t
emplate impl
* @return corresponding member template
*/
TypeTemplate ThisTypeTemplate() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to
the local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance( const Type & templateInstance ) const;
private:
/**
* pointer back to the corresponding scope
* @label type template scope
* @clientCardinality 0..*
* @supplierCardinality 1
*/
Scope fScope;
/**
* pointer to the class template instances
* @supplierCardinality 1..*
* @clientCardinality 0..1
* @label template instances
*/
mutable
std::vector < Type > fTemplateInstances;
/**
* container of template parameter names
*/
mutable
std::vector < std::string > fParameterNames;
/**
* template parameter default values
*/
mutable
std::vector < std::string > fParameterDefaults;
/**
* number of required template parameters
*/
size_t fReqParameters;
/**
* pointer back to the template name
* @label type template name
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
TypeTemplateName * fTypeTemplateName;
}; // class TypeTemplateImpl /**
* operator == will return true if two At templates are the same
* @return true if At templates match
*/
bool operator ==(const TypeTemplateImpl& rh) const;
/**
* TemplateInstance_Begin returns the begin iterator of the instance con
tainer
* @return the begin iterator of the instance container
*/
Type_Iterator TemplateInstance_Begin() const;
/**
* TemplateInstance_End returns the end iterator of the instance contain
er
* @return the end iterator of the instance container
*/
Type_Iterator TemplateInstance_End() const;
/**
* TemplateInstance_RBegin returns the rbegin iterator of the instance c
ontainer
* @return the rbegin iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_RBegin() const;
/**
* TemplateInstance_Rend returns the rend iterator of the instance conta
iner
* @return the rend iterator of the instance container
*/
Reverse_Type_Iterator TemplateInstance_REnd() const;
/**
* instantion will return a pointer to the nth template instantion
* @param nth template instantion
* @return pointer to nth template instantion
*/
Type TemplateInstanceAt(size_t nth) const;
/**
* instantionSize will return the number of template instantions for
* this template family
* @return number of template instantions
*/
size_t TemplateInstanceSize() const;
/**
* TemplateParameterSize will return the number of template parameters
* @return number of template parameters
*/
size_t TemplateParameterSize() const;
/**
* TemplateParameterDefaultAt will return the nth FunctionParameterAt de
fault value as string
* @param nth template FunctionParameterAt
* @return default value of nth template FunctionParameterAt
*/
std::string TemplateParameterDefaultAt(size_t nth) const;
StdString_Iterator TemplateParameterDefault_Begin() const;
StdString_Iterator TemplateParameterDefault_End() const;
Reverse_StdString_Iterator TemplateParameterDefault_RBegin() const;
Reverse_StdString_Iterator TemplateParameterDefault_REnd() const;
/**
* TemplateParameterNameAt will the Name of the nth FunctionParameterAt
* @param nth template FunctionParameterAt
* @return Name of nth template FunctionParameterAt
*/
std::string TemplateParameterNameAt(size_t nth) const;
StdString_Iterator TemplateParameterName_Begin() const;
StdString_Iterator TemplateParameterName_End() const;
Reverse_StdString_Iterator TemplateParameterName_RBegin() const;
Reverse_StdString_Iterator TemplateParameterName_REnd() const;
/**
* Return the member template API class corresponding to this member tem
plate impl
* @return corresponding member template
*/
TypeTemplate ThisTypeTemplate() const;
public:
/**
* AddTemplateInstance adds one TemplateInstanceAt of the template to th
e local container
* @param templateInstance the template TemplateInstanceAt
*/
void AddTemplateInstance(const Type& templateInstance) const;
private:
/**
* pointer back to the corresponding scope
* @label type template scope
* @clientCardinality 0..*
* @supplierCardinality 1
*/
Scope fScope;
/**
* pointer to the class template instances
* @supplierCardinality 1..*
* @clientCardinality 0..1
* @label template instances
*/
mutable
std::vector<Type> fTemplateInstances;
/**
* container of template parameter names
*/
mutable
std::vector<std::string> fParameterNames;
/**
* template parameter default values
*/
mutable
std::vector<std::string> fParameterDefaults;
/**
* number of required template parameters
*/
size_t fReqParameters;
/**
* pointer back to the template name
* @label type template name
* @link aggregation
* @clientCardinality 1
* @supplierCardinality 1
*/
TypeTemplateName* fTypeTemplateName;
}; // class TypeTemplateImpl
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline size_t Reflex::TypeTemplateImpl::TemplateParameterSize() const { inline size_t
Reflex::TypeTemplateImpl::TemplateParameterSize() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.size(); return fParameterNames.size();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::TypeTemplateImpl::TemplateParameterDefaultAt( si inline std::string
ze_t nth ) const { Reflex::TypeTemplateImpl::TemplateParameterDefaultAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fParameterDefaults.size() ) return fParameterDefaults[ nth ]; if (nth < fParameterDefaults.size()) {
return fParameterDefaults[nth];
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplateImpl::TemplateParamet inline Reflex::StdString_Iterator
erDefault_Begin() const { Reflex::TypeTemplateImpl::TemplateParameterDefault_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterDefaults.begin(); return fParameterDefaults.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplateImpl::TemplateParamet inline Reflex::StdString_Iterator
erDefault_End() const { Reflex::TypeTemplateImpl::TemplateParameterDefault_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterDefaults.end(); return fParameterDefaults.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplateImpl::Templat inline Reflex::Reverse_StdString_Iterator
eParameterDefault_RBegin() const { Reflex::TypeTemplateImpl::TemplateParameterDefault_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterDefaults).rbegin(); return ((const std::vector<std::string> &)fParameterDefaults).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplateImpl::Templat inline Reflex::Reverse_StdString_Iterator
eParameterDefault_REnd() const { Reflex::TypeTemplateImpl::TemplateParameterDefault_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterDefaults).rend(); return ((const std::vector<std::string> &)fParameterDefaults).rend();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline std::string Reflex::TypeTemplateImpl::TemplateParameterNameAt( size_ inline std::string
t nth ) const { Reflex::TypeTemplateImpl::TemplateParameterNameAt(size_t nth) const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
if ( nth < fParameterNames.size() ) return fParameterNames[ nth ]; if (nth < fParameterNames.size()) {
return fParameterNames[nth];
}
return ""; return "";
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplateImpl::TemplateParamet inline Reflex::StdString_Iterator
erName_Begin() const { Reflex::TypeTemplateImpl::TemplateParameterName_Begin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.begin(); return fParameterNames.begin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::StdString_Iterator Reflex::TypeTemplateImpl::TemplateParamet inline Reflex::StdString_Iterator
erName_End() const { Reflex::TypeTemplateImpl::TemplateParameterName_End() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fParameterNames.end(); return fParameterNames.end();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplateImpl::Templat inline Reflex::Reverse_StdString_Iterator
eParameterName_RBegin() const { Reflex::TypeTemplateImpl::TemplateParameterName_RBegin() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterNames).rbegin(); return ((const std::vector<std::string> &)fParameterNames).rbegin();
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::Reverse_StdString_Iterator Reflex::TypeTemplateImpl::Templat inline Reflex::Reverse_StdString_Iterator
eParameterName_REnd() const { Reflex::TypeTemplateImpl::TemplateParameterName_REnd() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return ((const std::vector<std::string>&)fParameterNames).rend(); return ((const std::vector<std::string> &)fParameterNames).rend();
} }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) # pragma warning( pop )
#endif #endif
#endif // Reflex_TypeTemplateImpl #endif // Reflex_TypeTemplateImpl
 End of changes. 23 change blocks. 
198 lines changed or deleted 197 lines changed or added


 TypeTemplateName.h   TypeTemplateName.h 
// @(#)root/reflex:$Id: TypeTemplateName.h 22729 2008-03-19 10:20:10Z pcana l $ // @(#)root/reflex:$Id: TypeTemplateName.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypeTemplateName #ifndef Reflex_TypeTemplateName
#define Reflex_TypeTemplateName #define Reflex_TypeTemplateName
// Include files // Include files
#include "Reflex/Kernel.h" #include "Reflex/Kernel.h"
namespace Reflex { namespace Reflex {
// forward declarations
class TypeTemplate;
class TypeTemplateImpl;
/**
* @class TypeTemplateName TypeTemplateName.h Reflex/internal/TypeTemplateN
ame.h
* @author Stefan Roiser
* @date 8/8/2006
* @ingroup Ref
*/
class RFLX_API TypeTemplateName {
friend class TypeTemplate;
friend class TypeTemplateImpl;
public:
/** constructor */
TypeTemplateName(const char* name,
TypeTemplateImpl * typeTemplImpl);
// forward declarations /**
class TypeTemplate; * ByName will return a type template corresponding to the argument name
class TypeTemplateImpl; * @param type template name to lookup
* @param nTemplateParams looks up the template family with this number
/** of template parameters
* @class TypeTemplateName TypeTemplateName.h Reflex/internal/TypeTemplat * if it is set to 0, the first occurence of the template family
eName.h name will be returned
* @author Stefan Roiser * @return corresponding type template to name
* @date 8/8/2006 */
* @ingroup Ref static TypeTemplate ByName(const std::string& name,
*/ size_t nTemplateParams = 0);
class RFLX_API TypeTemplateName {
/**
friend class TypeTemplate; * CleanUp is called at the end of the process
friend class TypeTemplateImpl; */
static void CleanUp();
public:
/*
/** constructor */ * DeleteTypeTemplate will remove the dictionary information
TypeTemplateName( const char * name, * of one type template from memory
TypeTemplateImpl * typeTemplImpl ); */
void DeleteTypeTemplate() const;
/**
* ByName will return a type template corresponding to the argument na /**
me * Name will return the name of the type template
* @param type template name to lookup * @return name of type template
* @param nTemplateParams looks up the template family with this numbe */
r of template parameters std::string Name(unsigned int mod) const;
* if it is set to 0, the first occurence of the template famil
y name will be returned /**
* @return corresponding type template to name * Name_c_str will return a char * pointer to the type template name
*/ * @return type template name as char *
static TypeTemplate ByName( const std::string & name, */
size_t nTemplateParams = 0 ); const char* Name_c_str() const;
/** /**
* CleanUp is called at the end of the process * ThisTypeTemplate will return the TypeTemplate API class of this type
*/ template
static void CleanUp(); * @return API type template class
*/
/* TypeTemplate ThisTypeTemplate() const;
* DeleteTypeTemplate will remove the dictionary information
* of one type template from memory /**
*/ * TypeTemplateAt will return the nth type template defined
void DeleteTypeTemplate() const; * @param nth type template
* @return nth type template
/** */
* Name will return the name of the type template static TypeTemplate TypeTemplateAt(size_t nth);
* @return name of type template
*/ /**
std::string Name( unsigned int mod ) const; * TypeTemplateSize will return the number of type templates defined
* @return number of defined type templates
/** */
* Name_c_str will return a char * pointer to the type template name static size_t TypeTemplateSize();
* @return type template name as char *
*/ /**
const char * Name_c_str() const; * TypeTemplate_Begin returns the begin iterator of the type template co
ntainer
/** * @return begin iterator of type template container
* ThisTypeTemplate will return the TypeTemplate API class of this typ */
e template static TypeTemplate_Iterator TypeTemplate_Begin();
* @return API type template class
*/ /**
TypeTemplate ThisTypeTemplate() const; * TypeTemplate_End returns the end iterator of the type template contai
ner
/** * @return end iterator of type template container
* TypeTemplateAt will return the nth type template defined */
* @param nth type template static TypeTemplate_Iterator TypeTemplate_End();
* @return nth type template
*/ /**
static TypeTemplate TypeTemplateAt( size_t nth ); * TypeTemplate_Rbegin returns the rbegin iterator of the type template
container
/** * @return rbegin iterator of type template container
* TypeTemplateSize will return the number of type templates defined */
* @return number of defined type templates static Reverse_TypeTemplate_Iterator TypeTemplate_RBegin();
*/
static size_t TypeTemplateSize(); /**
* TypeTemplate_Rend returns the rend iterator of the type template cont
/** ainer
* TypeTemplate_Begin returns the begin iterator of the type template * @return rend iterator of type template container
container */
* @return begin iterator of type template container static Reverse_TypeTemplate_Iterator TypeTemplate_REnd();
*/
static TypeTemplate_Iterator TypeTemplate_Begin(); private:
/** destructor */
/** ~TypeTemplateName();
* TypeTemplate_End returns the end iterator of the type template cont
ainer private:
* @return end iterator of type template container /**
*/ * The name of the type template
static TypeTemplate_Iterator TypeTemplate_End(); */
std::string fName;
/**
* TypeTemplate_Rbegin returns the rbegin iterator of the type templat /**
e container * Pointer to the implementation of the type template
* @return rbegin iterator of type template container * @label type template impl
*/ * @link aggregation
static Reverse_TypeTemplate_Iterator TypeTemplate_RBegin(); * @supplierCardinality 0..1
* @clientCardinality 1
/** */
* TypeTemplate_Rend returns the rend iterator of the type template co mutable
ntainer TypeTemplateImpl * fTypeTemplateImpl;
* @return rend iterator of type template container
*/ /**
static Reverse_TypeTemplate_Iterator TypeTemplate_REnd(); * This type template
* @label this type template
private: * @link aggregation
* @supplierCardinality 1
/** destructor */ * @clientCardinality 1
~TypeTemplateName(); */
TypeTemplate* fThisTypeTemplate;
private:
/**
* The name of the type template
*/
std::string fName;
/**
* Pointer to the implementation of the type template
* @label type template impl
* @link aggregation
* @supplierCardinality 0..1
* @clientCardinality 1
*/
mutable
TypeTemplateImpl * fTypeTemplateImpl;
/**
* This type template
* @label this type template
* @link aggregation
* @supplierCardinality 1
* @clientCardinality 1
*/
TypeTemplate * fThisTypeTemplate;
}; // class TypeTemplate }; // class TypeTemplate
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline const char * Reflex::TypeTemplateName::Name_c_str() const { inline const char*
Reflex::TypeTemplateName::Name_c_str() const {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fName.c_str(); return fName.c_str();
} }
#endif // Reflex_TypeTemplateName #endif // Reflex_TypeTemplateName
 End of changes. 5 change blocks. 
139 lines changed or deleted 134 lines changed or added


 TypedefBuilder.h   TypedefBuilder.h 
// @(#)root/reflex:$Id: TypedefBuilder.h 22729 2008-03-19 10:20:10Z pcanal $ // @(#)root/reflex:$Id: TypedefBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_TypedefBuilder #ifndef Reflex_TypedefBuilder
#define Reflex_TypedefBuilder #define Reflex_TypedefBuilder
// Include files // Include files
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Type.h" #include "Reflex/Type.h"
namespace Reflex{ namespace Reflex {
// forward declarations
// forward declarations /**
* @class TypedefBuilderImpl TypedefBuilder.h Reflex/Builder/TypedefBuilder
Impl.h
* @author Stefan Roiser
* @date 14/3/2005
* @ingroup RefBld
*/
class RFLX_API TypedefBuilderImpl {
public:
/** constructor */
TypedefBuilderImpl(const char* typ,
const Type &typedefType);
/** /** destructor */
* @class TypedefBuilderImpl TypedefBuilder.h Reflex/Builder/TypedefBuild virtual ~TypedefBuilderImpl() {}
erImpl.h
* @author Stefan Roiser
* @date 14/3/2005
* @ingroup RefBld
*/
class RFLX_API TypedefBuilderImpl {
public:
/** constructor */
TypedefBuilderImpl( const char * typ,
const Type & typedefType );
/** destructor */
virtual ~TypedefBuilderImpl() {}
/**
* AddProperty will add a property to the typedef currently being buil
t
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
void AddProperty( const char * key,
Any value );
/**
* AddProperty will add a property to the typedef currently being buil
t
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
void AddProperty( const char * key,
const char * value );
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private:
/** the typedef currently being built */
Type fTypedef;
}; // class TypdefBuilderImpl /**
* AddProperty will add a property to the typedef currently being built
* @param key the PropertyNth key
* @param value the value of the PropertyNth
*/
void AddProperty(const char* key,
Any value);
/** /**
* @class TypedefBuilder TypedefBuilder.h Reflex/Builder/TypedefBuilder.h * AddProperty will add a property to the typedef currently being built
* @author Stefan Roiser * @param key the PropertyNth key
* @date 30/3/2004 * @param value the value of the PropertyNth
* @ingroup RefBld */
*/ void AddProperty(const char* key,
template < typename T > const char* value);
class TypedefBuilder {
/*
public: * ToType will return the currently produced Type (class)
* @return the type currently being built
/** constructor */ */
TypedefBuilder(const char * nam); Type ToType();
/** destructor */ private:
virtual ~TypedefBuilder() {} /** the typedef currently being built */
Type fTypedef;
/**
* AddProperty will add a property to the typedef currently being buil }; // class TypdefBuilderImpl
t
* @param key the property key /**
* @param value the value of the property * @class TypedefBuilder TypedefBuilder.h Reflex/Builder/TypedefBuilder.h
* @return a reference to the building class * @author Stefan Roiser
*/ * @date 30/3/2004
template < typename P > * @ingroup RefBld
TypedefBuilder & AddProperty( const char * key, */
P value ); template <typename T>
class TypedefBuilder {
/* public:
* ToType will return the currently produced Type (class) /** constructor */
* @return the type currently being built TypedefBuilder(const char* nam);
*/
Type ToType();
private: /** destructor */
virtual ~TypedefBuilder() {}
/** the type of the typedef */ /**
TypedefBuilderImpl fTypedefBuilderImpl; * AddProperty will add a property to the typedef currently being built
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
template <typename P>
TypedefBuilder& AddProperty(const char* key,
P value);
/*
* ToType will return the currently produced Type (class)
* @return the type currently being built
*/
Type ToType();
private:
/** the type of the typedef */
TypedefBuilderImpl fTypedefBuilderImpl;
}; // class TypedefBuilder }; // class TypedefBuilder
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template <typename T>
inline Reflex::TypedefBuilder<T>::TypedefBuilder( const char * nam ) inline Reflex::TypedefBuilder<T>::TypedefBuilder(const char* nam)
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
: fTypedefBuilderImpl( nam, TypeDistiller<T>::Get()) {} : fTypedefBuilderImpl(nam, TypeDistiller<T>::Get()) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template < typename P > template <typename T> template <typename P>
inline Reflex::TypedefBuilder<T> & inline Reflex::TypedefBuilder<T>&
Reflex::TypedefBuilder<T>::AddProperty( const char * key, Reflex::TypedefBuilder<T
P value ) { >::AddProperty(const char* key,
P value) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fTypedefBuilderImpl.AddProperty( key, value ); fTypedefBuilderImpl.AddProperty(key, value);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > inline Reflex::Type template <typename T> inline Reflex::Type
Reflex::TypedefBuilder<T>::ToType() { Reflex::TypedefBuilder<T
>::ToType() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fTypedefBuilderImpl.ToType(); return fTypedefBuilderImpl.ToType();
} }
#endif // Reflex_TypedefBuilder #endif // Reflex_TypedefBuilder
 End of changes. 14 change blocks. 
97 lines changed or deleted 90 lines changed or added


 UniformProposal.h   UniformProposal.h 
skipping to change at line 19 skipping to change at line 19
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_UniformProposal #ifndef ROOSTATS_UniformProposal
#define ROOSTATS_UniformProposal #define ROOSTATS_UniformProposal
#ifndef ROOT_Rtypes #ifndef ROOT_Rtypes
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
#ifndef RooStats_ProposalFunction #ifndef ROOSTATS_ProposalFunction
#include "RooStats/ProposalFunction.h" #include "RooStats/ProposalFunction.h"
#endif #endif
#ifndef ROO_ARG_SET
#include "RooArgSet.h" #include "RooArgSet.h"
#endif
#ifndef ROO_MSG_SERVICE
#include "RooMsgService.h" #include "RooMsgService.h"
#endif
#ifndef ROO_REAL_VAR
#include "RooRealVar.h" #include "RooRealVar.h"
#endif
#ifndef ROOT_TIterator
#include "TIterator.h" #include "TIterator.h"
#endif
namespace RooStats { namespace RooStats {
class UniformProposal : public ProposalFunction { class UniformProposal : public ProposalFunction {
public: public:
UniformProposal() : ProposalFunction() {} UniformProposal() : ProposalFunction() {}
// Populate xPrime with a new proposed point // Populate xPrime with a new proposed point
virtual void Propose(RooArgSet& xPrime, RooArgSet& x); virtual void Propose(RooArgSet& xPrime, RooArgSet& x);
// Determine whether or not the proposal density is symmetric for // Determine whether or not the proposal density is symmetric for
// points x1 and x2 - that is, whether the probabilty of reaching x2 // points x1 and x2 - that is, whether the probabilty of reaching x2
// from x1 is equal to the probability of reaching x1 from x2 // from x1 is equal to the probability of reaching x1 from x2
virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2); virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2);
// Return the probability of proposing the point xPrime given the sta // Return the probability of proposing the point x1 given the startin
rting g
// point x // point x2
virtual Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x); virtual Double_t GetProposalDensity(RooArgSet& x1, RooArgSet& x2);
virtual ~UniformProposal() {} virtual ~UniformProposal() {}
ClassDef(UniformProposal,1) // A concrete implementation of ProposalF unction, that uniformly samples the parameter space. ClassDef(UniformProposal,1) // A concrete implementation of ProposalF unction, that uniformly samples the parameter space.
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
5 lines changed or deleted 13 lines changed or added


 UnionBuilder.h   UnionBuilder.h 
// @(#)root/reflex:$Id: UnionBuilder.h 28733 2009-05-28 04:34:44Z pcanal $ // @(#)root/reflex:$Id: UnionBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_UnionBuilder #ifndef Reflex_UnionBuilder
#define Reflex_UnionBuilder #define Reflex_UnionBuilder
// Include files // Include files
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
#include "Reflex/Member.h" #include "Reflex/Member.h"
namespace Reflex namespace Reflex {
{
// forward declarations // forward declarations
class Union; class Union;
class Type; class Type;
/** /**
* @class UnionBuilderImpl UnionBuilder.h Reflex/Builder/UnionBuilder.h * @class UnionBuilderImpl UnionBuilder.h Reflex/Builder/UnionBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 14/3/2005 * @date 14/3/2005
* @ingroup RefBld * @ingroup RefBld
*/ */
class RFLX_API UnionBuilderImpl { class RFLX_API UnionBuilderImpl {
public: public:
/** constructor */ /** constructor */
UnionBuilderImpl(const char* nam, size_t size, const std::type_info& ti, unsigned int modifiers = 0, TYPE typ = UNION); UnionBuilderImpl(const char* nam, size_t size, const std::type_info & ti , unsigned int modifiers = 0, TYPE typ = UNION);
/** destructor */ /** destructor */
virtual ~UnionBuilderImpl(); virtual ~UnionBuilderImpl();
/** /**
* AddItem will add one union item * AddItem will add one union item
* @param Name the Name of the union item * @param Name the Name of the union item
* @param At the At of the union item * @param At the At of the union item
*/ */
void AddItem(const char* nam, const Type& typ); void AddItem(const char* nam,
const Type& typ);
/** AddDataMember will add the information about one data /** AddDataMember will add the information about one data
* MemberAt of the union * MemberAt of the union
* *
* @param Name of the data MemberAt * @param Name of the data MemberAt
* @param At of the data MemberAt * @param At of the data MemberAt
* @param Offset of the data MemberAt * @param Offset of the data MemberAt
* @param modifiers the modifiers of the data MemberAt * @param modifiers the modifiers of the data MemberAt
*/ */
void AddDataMember(const char* nam, const Type& typ, size_t offs, unsign void AddDataMember(const char* nam,
ed int modifiers = 0); const Type& typ,
size_t offs,
unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one /** AddFunctionMember will add the information about one
* function MemberAt of the union * function MemberAt of the union
* *
* @param Name of the function MemberAt * @param Name of the function MemberAt
* @param At of the function MemberAt * @param At of the function MemberAt
* @param stubFP Stub function pointer for the function * @param stubFP Stub function pointer for the function
* @param stubCxt Stub user context for the stub function * @param stubCxt Stub user context for the stub function
* @param params parameter names and default values (semi-colon separate * @param params parameter names and default values (semi-colon separat
d) ed)
* @param modifiers the modifiers of the function MemberAt * @param modifiers the modifiers of the function MemberAt
*/ */
void AddFunctionMember(const char* nam, const Type& typ, StubFunction st void AddFunctionMember(const char* nam,
ubFP, void* stubCtx = 0, const char* params = 0, unsigned int modifiers = 0 const Type& typ,
); StubFunction stubFP,
void* stubCtx = 0,
/** const char* params = 0,
* AddProperty will add a PropertyNth to the PropertyNth stack unsigned int modifiers = 0);
* which will be emtpied with the next build of a union
* or union item
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
void AddProperty(const char* key, Any value); /**
void AddProperty(const char* key, const char* value); * AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emtpied with the next build of a union
* or union item
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
void AddProperty(const char* key,
Any value);
void AddProperty(const char* key,
const char* value);
/** SetSizeOf will set the SizeOf property for this union. /** SetSizeOf will set the SizeOf property for this union.
* It currently ignores all actual content. * It currently ignores all actual content.
* @size Size of the union * @size Size of the union
*/ */
void SetSizeOf(size_t size); void SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
protected: protected:
friend class UnionBuilder; friend class UnionBuilder;
/** /**
* EnableCallback Enable or disable the callback call in the destructor * EnableCallback Enable or disable the callback call in the destructor
* @param enable true to enable callback call, false to disable callbac k call * @param enable true to enable callback call, false to disable callbac k call
*/ */
void EnableCallback(const bool enable = true); void EnableCallback(const bool enable = true);
private: private:
/** the union currently being built */ /** the union currently being built */
Union* fUnion; Union* fUnion;
/** the last union item built */ /** the last union item built */
Member fLastMember; Member fLastMember;
/** flag, fire callback in destructor */ /** flag, fire callback in destructor */
bool fCallbackEnabled; bool fCallbackEnabled;
}; // class UnionBuilderImpl }; // class UnionBuilderImpl
/** /**
* @class UnionBuilder UnionBuilder.h Reflex/Builder/UnionBuilder.h * @class UnionBuilder UnionBuilder.h Reflex/Builder/UnionBuilder.h
* @author Stefan Roiser * @author Stefan Roiser
* @date 30/3/2004 * @date 30/3/2004
* @ingroup RefBld * @ingroup RefBld
*/ */
class RFLX_API UnionBuilder { class RFLX_API UnionBuilder {
public: public:
/** constructor */ /** constructor */
UnionBuilder(const char* nam, const std::type_info& ti, size_t size, uns igned int modifiers = 0, TYPE typ = UNION); UnionBuilder(const char* nam, const std::type_info & ti, size_t size, un signed int modifiers = 0, TYPE typ = UNION);
/** destructor */ /** destructor */
virtual ~UnionBuilder(); virtual ~UnionBuilder();
/** /**
* AddItem will add one union item * AddItem will add one union item
* @param Name the Name of the union item * @param Name the Name of the union item
* @param At the At of the union item * @param At the At of the union item
* @return a reference to the UnionBuilder * @return a reference to the UnionBuilder
*/ */
template <typename T> UnionBuilder& AddItem(const char* nam); template <typename T> UnionBuilder& AddItem(const char* nam);
/** /**
* AddItem will add one union item * AddItem will add one union item
* @param Name the Name of the union item * @param Name the Name of the union item
* @param At the At of the union item * @param At the At of the union item
* @return a reference to the UnionBuilder * @return a reference to the UnionBuilder
*/ */
UnionBuilder& AddItem(const char* nam, const char* typ); UnionBuilder& AddItem(const char* nam,
const char* typ);
/** AddDataMember will add the information about one data /** AddDataMember will add the information about one data
* MemberAt of the union * MemberAt of the union
* *
* @param Name of the data MemberAt * @param Name of the data MemberAt
* @param Offset of data MemberAt * @param Offset of data MemberAt
* @param modifiers the modifiers of the data MemberAt * @param modifiers the modifiers of the data MemberAt
* @return a reference to the UnionBuilder * @return a reference to the UnionBuilder
*/ */
template <class T> UnionBuilder& AddDataMember(const char* nam, size_t o template <class T> UnionBuilder& AddDataMember(const char* nam,
ffs, unsigned int modifiers = 0); size_t offs,
UnionBuilder& AddDataMember(const Type& typ, const char* nam, size_t off unsigned int modifiers =
s, unsigned int modifiers = 0); 0);
UnionBuilder& AddDataMember(const Type& typ,
const char* nam,
size_t offs,
unsigned int modifiers = 0);
/** AddFunctionMember will add the information about one /** AddFunctionMember will add the information about one
* function MemberAt of the union * function MemberAt of the union
* *
* @param Name of the function MemberAt * @param Name of the function MemberAt
* @param function templated function MemberAt to extract At information * @param function templated function MemberAt to extract At informatio
* @param stubFP Stub function pointer for the function n
* @param stubCxt Stub user context for the stub function * @param stubFP Stub function pointer for the function
* @param params parameter names and default values (semi-colon separate * @param stubCxt Stub user context for the stub function
d) * @param params parameter names and default values (semi-colon separat
* @param modifiers the modifiers of the data MemberAt ed)
* @return a reference to the UnionBuilder * @param modifiers the modifiers of the data MemberAt
*/ * @return a reference to the UnionBuilder
template <class F> UnionBuilder& AddFunctionMember(const char* nam, Stub */
Function stubFP, void* stubCtx = 0, const char* params = 0, unsigned int mo template <class F> UnionBuilder& AddFunctionMember(const char* nam,
difiers = 0); StubFunction stubFP,
UnionBuilder& AddFunctionMember(const Type& typ, const char* nam, StubFu void* stubCtx = 0,
nction stubFP, void* stubCtx = 0, const char* params = 0, unsigned int modi const char* params =
fiers = 0); 0,
unsigned int modifier
/** s = 0);
* AddProperty will add a PropertyNth to the PropertyNth stack UnionBuilder& AddFunctionMember(const Type& typ,
* which will be emtpied with the next build of a union const char* nam,
* or union item StubFunction stubFP,
* @param key the PropertyNth key void* stubCtx = 0,
* @param value the value of the PropertyNth const char* params = 0,
* @return a reference to the building class unsigned int modifiers = 0);
*/
template <typename P> UnionBuilder& AddProperty(const char* key, P value /**
); * AddProperty will add a PropertyNth to the PropertyNth stack
* which will be emtpied with the next build of a union
* or union item
* @param key the PropertyNth key
* @param value the value of the PropertyNth
* @return a reference to the building class
*/
template <typename P> UnionBuilder& AddProperty(const char* key,
P value);
/** SetSizeOf will set the SizeOf property for this union. /** SetSizeOf will set the SizeOf property for this union.
* It currently ignores all actual content. * It currently ignores all actual content.
* @size Size of the union * @size Size of the union
*/ */
UnionBuilder& SetSizeOf(size_t size); UnionBuilder& SetSizeOf(size_t size);
/* /*
* ToType will return the currently produced Type (class) * ToType will return the currently produced Type (class)
* @return the type currently being built * @return the type currently being built
*/ */
Type ToType(); Type ToType();
protected: protected:
#ifdef G__COMMON_H #ifdef G__COMMON_H
friend int ::G__search_tagname(const char*, int); friend int::G__search_tagname(const char*, int);
#endif #endif
/** /**
* EnableCallback Enable or disable the callback call in the destructor * EnableCallback Enable or disable the callback call in the destructor
* @param enable true to enable callback call, false to disable callbac k call * @param enable true to enable callback call, false to disable callbac k call
*/ */
UnionBuilder& EnableCallback(const bool enable = true); UnionBuilder& EnableCallback(const bool enable = true);
private: private:
/** the union information */ /** the union information */
UnionBuilderImpl fUnionBuilderImpl; UnionBuilderImpl fUnionBuilderImpl;
}; //class UnionBuilder }; //class UnionBuilder
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template <typename T> Reflex::UnionBuilder& Reflex::UnionBuilder::AddItem(c template <typename T> Reflex::UnionBuilder&
onst char* nam) Reflex::UnionBuilder::AddItem(const char* nam) {
{
// -- !!! Obsolete, do not use. // -- !!! Obsolete, do not use.
fUnionBuilderImpl.AddItem(nam, TypeDistiller<T>::Get()); fUnionBuilderImpl.AddItem(nam, TypeDistiller<T>::Get());
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template<typename T> Reflex::UnionBuilder& Reflex::UnionBuilder::AddDataMem template <typename T> Reflex::UnionBuilder&
ber(const char* nam, size_t offs, unsigned int modifiers /*= 0*/) Reflex::UnionBuilder::AddDataMember(const char* nam,
{ size_t offs,
unsigned int modifiers /*= 0*/) {
fUnionBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers); fUnionBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modi fiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename F> Reflex::UnionBuilder& Reflex::UnionBuilder::AddFuncti template <typename F> Reflex::UnionBuilder&
onMember(const char* nam, StubFunction stubFP, void* stubCtx /*= 0*/, const Reflex::UnionBuilder::AddFunctionMember(const char* nam,
char* params /*= 0*/, unsigned int modifiers /*= 0*/) StubFunction stubFP,
{ void* stubCtx /*= 0*/,
const char* params /*= 0*/,
unsigned int modifiers /*= 0*/) {
fUnionBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers); fUnionBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), st ubFP, stubCtx, params, modifiers);
return *this; return *this;
} }
//_________________________________________________________________________ _____ //_________________________________________________________________________ _____
template <typename P> Reflex::UnionBuilder& Reflex::UnionBuilder::AddProper template <typename P> Reflex::UnionBuilder&
ty(const char* key, P value) Reflex::UnionBuilder::AddProperty(const char* key,
{ P value) {
fUnionBuilderImpl.AddProperty(key, value); fUnionBuilderImpl.AddProperty(key, value);
return *this; return *this;
} }
#endif // Reflex_UnionBuilder #endif // Reflex_UnionBuilder
 End of changes. 31 change blocks. 
138 lines changed or deleted 151 lines changed or added


 ValueObject.h   ValueObject.h 
// @(#)root/reflex:$Id: ValueObject.h 26137 2008-11-11 11:15:21Z axel $ // @(#)root/reflex:$Id: ValueObject.h 29288 2009-07-01 13:03:35Z axel $
// Author: Pere Mato 2006 // Author: Pere Mato 2006
// Copyright CERN, CH-1211 Geneva 23, 2004-2005, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2005, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ValueObject #ifndef Reflex_ValueObject
#define Reflex_ValueObject #define Reflex_ValueObject
// Include files // Include files
#include "Reflex/Any.h" #include "Reflex/Any.h"
#include "Reflex/Object.h" #include "Reflex/Object.h"
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
namespace Reflex { namespace Reflex {
/**
* @class ValueObject ValueObject.h Reflex/ValueObject.h
* @author Pere Mato
* @date 01/09/2006
* @ingroup Ref
*/
class RFLX_API ValueObject: public Object {
public:
/** constructor */
ValueObject();
/** constructor */
template <typename T>
static ValueObject Create(const T& v);
/** constructor */
ValueObject(const ValueObject &o);
/** destructor */
~ValueObject();
/** get the actual value */
template <typename T> const T& Value();
template <typename T> ValueObject& Assign(const T&);
private:
/** the value of the generic object by value */
Any fValue;
/** }; // class ValueObject
* @class ValueObject ValueObject.h Reflex/ValueObject.h
* @author Pere Mato
* @date 01/09/2006
* @ingroup Ref
*/
class RFLX_API ValueObject : public Object {
public:
/** constructor */
ValueObject();
/** constructor */
template <typename T>
static ValueObject Create(const T& v);
/** constructor */
ValueObject( const ValueObject& o);
/** destructor */
~ValueObject();
/** get the actual value */
template<typename T> const T& Value();
template<typename T> ValueObject& Assign(const T&);
private:
/** the value of the generic object by value */
Any fValue;
}; // class ValueObject
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::ValueObject::ValueObject() { inline Reflex::ValueObject::ValueObject() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template <typename T> template <typename T>
inline Reflex::ValueObject Reflex::ValueObject::Create(const T& v) { inline Reflex::ValueObject
Reflex::ValueObject::Create(const T& v) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
ValueObject ret; ValueObject ret;
ret.Assign(v); ret.Assign(v);
return ret; return ret;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::ValueObject::ValueObject( const ValueObject& o) inline Reflex::ValueObject::ValueObject(const ValueObject& o):
: Object( o.TypeOf(), 0 ), Object(o.TypeOf(), 0),
fValue(o.fValue) { fValue(o.fValue) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
if ( TypeOf().IsPointer() ) fAddress = *(void**)fValue.Address(); if (TypeOf().IsPointer()) {
else fAddress = fValue.Address(); fAddress = *(void**) fValue.Address();
} else { fAddress = fValue.Address(); }
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename T > template <typename T>
inline Reflex::ValueObject& Reflex::ValueObject::Assign(const T& v) { inline Reflex::ValueObject&
Reflex::ValueObject::Assign(const T& v) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fValue = Any(v); fValue = Any(v);
fType = GetType<T>(); fType = GetType<T>();
if ( TypeOf().IsPointer() ) fAddress = *(void**)fValue.Address();
else fAddress = fValue.Address(); if (TypeOf().IsPointer()) {
return *this; fAddress = *(void**) fValue.Address();
} else { fAddress = fValue.Address(); }
return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
inline Reflex::ValueObject::~ValueObject() { inline Reflex::ValueObject::~ValueObject() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template<typename T> template <typename T>
inline const T& Reflex::ValueObject::Value() { inline const T&
Reflex::ValueObject::Value() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return *(T*)fAddress; return *(T*) fAddress;
} }
#endif // Reflex_ValueObject #endif // Reflex_ValueObject
 End of changes. 9 change blocks. 
53 lines changed or deleted 55 lines changed or added


 VariableBuilder.h   VariableBuilder.h 
// @(#)root/reflex:$Id: VariableBuilder.h 28992 2009-06-15 09:20:22Z axel $ // @(#)root/reflex:$Id: VariableBuilder.h 29288 2009-07-01 13:03:35Z axel $
// Author: Stefan Roiser 2004 // Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
// //
// Permission to use, copy, modify, and distribute this software for any // Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and // purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives. // permissions notice appear in all copies and derivatives.
// //
// This software is provided "as is" without express or implied warranty. // This software is provided "as is" without express or implied warranty.
#ifndef Reflex_VariableBuilder #ifndef Reflex_VariableBuilder
#define Reflex_VariableBuilder #define Reflex_VariableBuilder
// Include files // Include files
#include "Reflex/Reflex.h" #include "Reflex/Reflex.h"
#include "Reflex/Builder/TypeBuilder.h" #include "Reflex/Builder/TypeBuilder.h"
namespace Reflex { namespace Reflex {
// forward declarations
// forward declarations /** @class VariableBuilder VariableBuilder.h Reflex/Builder/VariableBuilder
.h
* @author Stefan Roiser
* @date 6/4/2005
* @ingroup RefBld
*/
class RFLX_API VariableBuilder {
public:
/** constructor */
VariableBuilder(const char* nam,
const Type &typ,
size_t offs,
unsigned int modifiers = 0);
/** @class VariableBuilder VariableBuilder.h Reflex/Builder/VariableBuil /** destructor */
der.h virtual ~VariableBuilder();
* @author Stefan Roiser
* @date 6/4/2005
* @ingroup RefBld
*/
class RFLX_API VariableBuilder {
public:
/** constructor */
VariableBuilder( const char * nam,
const Type & typ,
size_t offs,
unsigned int modifiers = 0 );
/** destructor */
virtual ~VariableBuilder();
/**
* AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
VariableBuilder & AddProperty( const char * key,
Any value );
VariableBuilder & AddProperty( const char * key,
const char * value );
/**
* ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private:
/** function member */
Member fDataMember;
}; // class VariableBuilder
/** /**
* @class VariableBuilderImpl VariableBuilder.h Reflex/Builder/VariableBu * AddProperty will add a property
ilder.h * @param key the property key
* @author Stefan Roiser * @param value the value of the property
* @date 6/4/2005 * @return a reference to the building class
* @ingroup RefBld */
*/ VariableBuilder& AddProperty(const char* key,
class RFLX_API VariableBuilderImpl { Any value);
VariableBuilder& AddProperty(const char* key,
public: const char* value);
/** constructor */
VariableBuilderImpl( const char * nam,
const Type & typ,
size_t offs,
unsigned int modifiers = 0 );
/** destructor */
~VariableBuilderImpl();
/** AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
void AddProperty( const char * key,
Any value );
void AddProperty( const char * key,
const char * value );
/**
* ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private: /**
* ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private:
/** function member */
Member fDataMember;
}; // class VariableBuilder
/**
* @class VariableBuilderImpl VariableBuilder.h Reflex/Builder/VariableBuil
der.h
* @author Stefan Roiser
* @date 6/4/2005
* @ingroup RefBld
*/
class RFLX_API VariableBuilderImpl {
public:
/** constructor */
VariableBuilderImpl(const char* nam,
const Type &typ,
size_t offs,
unsigned int modifiers = 0);
/** destructor */
~VariableBuilderImpl();
/** AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
void AddProperty(const char* key,
Any value);
void AddProperty(const char* key,
const char* value);
/** member being built */ /**
Member fDataMember; * ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private:
/** member being built */
Member fDataMember;
}; // class VariableBuilderImpl
/**
* @class VariableBuilderT VariableBuilder.h Reflex/Builder/VariableBuilder
.h
* @author Stefan Roiser
* @date 6/4/2005
* @ingroup RefBld
*/
template <typename D> class VariableBuilderT {
public:
/** constructor */
VariableBuilderT(const char* nam,
size_t offs,
unsigned int modifiers = 0);
}; // class VariableBuilderImpl /** destructor */
virtual ~VariableBuilderT() {}
/** /**
* @class VariableBuilderT VariableBuilder.h Reflex/Builder/VariableBuild * AddProperty will add a property
er.h * @param key the property key
* @author Stefan Roiser * @param value the value of the property
* @date 6/4/2005 * @return a reference to the building class
* @ingroup RefBld */
*/ template <typename P>
template < typename D > class VariableBuilderT { VariableBuilderT& AddProperty(const char* key,
P value);
public:
/** constructor */
VariableBuilderT( const char * nam,
size_t offs,
unsigned int modifiers = 0 );
/** destructor */
virtual ~VariableBuilderT() {}
/**
* AddProperty will add a property
* @param key the property key
* @param value the value of the property
* @return a reference to the building class
*/
template < typename P >
VariableBuilderT & AddProperty( const char * key, P value );
/**
* ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private:
/** data member builder implementation */ /**
VariableBuilderImpl fDataMemberBuilderImpl; * ToMember will return the member currently being built
* @return member currently being built
*/
Member ToMember();
private:
/** data member builder implementation */
VariableBuilderImpl fDataMemberBuilderImpl;
}; // class VariableBuilderT }; // class VariableBuilderT
} // namespace Reflex } // namespace Reflex
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename D > template <typename D>
inline Reflex::VariableBuilderT<D>::VariableBuilderT( const char * nam, inline Reflex::VariableBuilderT<D>::VariableBuilderT(const char* nam,
size_t offs, size_t offs,
unsigned int mo unsigned int modifiers
difiers ) )
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
------ ------
: fDataMemberBuilderImpl( nam, : fDataMemberBuilderImpl(nam,
TypeDistiller<D>::Get(), TypeDistiller<D>::Get(),
offs, offs,
modifiers ) {} modifiers) {
}
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename D > template < typename P > template <typename D> template <typename P>
inline Reflex::VariableBuilderT<D> & inline Reflex::VariableBuilderT<D>&
Reflex::VariableBuilderT<D>::AddProperty( const char * key, Reflex::VariableBuilderT<D
P value ) { >::AddProperty(const char* key,
P value) {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
fDataMemberBuilderImpl.AddProperty(key, value); fDataMemberBuilderImpl.AddProperty(key, value);
return * this; return *this;
} }
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
template < typename D > inline Reflex::Member template <typename D> inline Reflex::Member
Reflex::VariableBuilderT<D>::ToMember() { Reflex::VariableBuilderT<D
>::ToMember() {
//------------------------------------------------------------------------- ------ //------------------------------------------------------------------------- ------
return fDataMemberBuilderImpl.ToMember(); return fDataMemberBuilderImpl.ToMember();
} }
#endif // Reflex_VariableBuilder #endif // Reflex_VariableBuilder
 End of changes. 15 change blocks. 
137 lines changed or deleted 131 lines changed or added


 WrappedTF1.h   WrappedTF1.h 
// @(#)root/mathmore:$Id: WrappedTF1.h 28964 2009-06-12 16:08:04Z moneta $ // @(#)root/mathmore:$Id: WrappedTF1.h 29513 2009-07-17 15:30:07Z moneta $
// Author: L. Moneta Wed Sep 6 09:52:26 2006 // Author: L. Moneta Wed Sep 6 09:52:26 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class WrappedTF1 // Header file for class WrappedTF1
skipping to change at line 103 skipping to change at line 103
/// return parameter name (this is stored in TF1) /// return parameter name (this is stored in TF1)
std::string ParameterName(unsigned int i) const { std::string ParameterName(unsigned int i) const {
return std::string(fFunc->GetParName(i)); return std::string(fFunc->GetParName(i));
} }
using BaseGradFunc::operator(); using BaseGradFunc::operator();
/// evaluate the derivative of the function with respect to the paramete rs /// evaluate the derivative of the function with respect to the paramete rs
void ParameterGradient(double x, const double * par, double * grad ) co nst; void ParameterGradient(double x, const double * par, double * grad ) co nst;
static void SetDerivStepSize(double eps) { fgEps = eps; } /// precision value used for calculating the derivative step-size
/// h = eps * |x|. The default is 0.001, give a smaller in case function
changes rapidly
static void SetDerivPrecision(double eps);
/// get precision value used for calculating the derivative step-size
static double GetDerivPrecision();
private: private:
/// evaluate function passing coordinates x and vector of parameters /// evaluate function passing coordinates x and vector of parameters
double DoEvalPar (double x, const double * p ) const { double DoEvalPar (double x, const double * p ) const {
fX[0] = x; fX[0] = x;
if (fFunc->GetMethodCall() ) fFunc->InitArgs(fX,p); // needed for in terpreted functions if (fFunc->GetMethodCall() ) fFunc->InitArgs(fX,p); // needed for in terpreted functions
return fFunc->EvalPar(fX,p); return fFunc->EvalPar(fX,p);
} }
skipping to change at line 136 skipping to change at line 141
/// evaluate the derivative of the function with respect to the paramete rs /// evaluate the derivative of the function with respect to the paramete rs
double DoParameterDerivative(double x, const double * p, unsigned int i par ) const; double DoParameterDerivative(double x, const double * p, unsigned int i par ) const;
bool fLinear; // flag for linear functions bool fLinear; // flag for linear functions
bool fPolynomial; // flag for polynomial functions bool fPolynomial; // flag for polynomial functions
TF1 * fFunc; // pointer to ROOT function TF1 * fFunc; // pointer to ROOT function
mutable double fX[1]; //! cached vector for x value (needed for TF1::EvalPar signature) mutable double fX[1]; //! cached vector for x value (needed for TF1::EvalPar signature)
std::vector<double> fParams; // cached vector with parameter values std::vector<double> fParams; // cached vector with parameter values
static double fgEps; // epsilon used in derivative calculation static double fgEps; // epsilon used in derivative calculation h ~ eps |x|
}; };
} // end namespace Fit } // end namespace Fit
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Fit_WrappedTF1 */ #endif /* ROOT_Fit_WrappedTF1 */
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added


 compiledata.h   compiledata.h 
/* This is file is automatically generated */ /* This is file is automatically generated */
#define BUILD_ARCH "linux" #define BUILD_ARCH "linux"
#define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-128.1.10.el5 #1 SMP Fri May 8 10:39:02 CEST 2009 i686 i686 i386 GNU/Linux" #define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-128.7.1.el5 #1 SMP Mon Aug 24 16:57:26 CEST 2009 i686 i686 i386 GNU/Linux"
#define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686-slc5-gcc34-opt/b in/g++" #define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3/i686-slc5-gcc34-opt/b in/g++"
#define COMPILERVERS "gcc432" #define COMPILERVERS "gcc432"
#define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFil es -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib" #define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFil es -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib"
#define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic" #define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic"
#define CXXOPT "-O2" #define CXXOPT "-O2"
#define CXXDEBUG "-g" #define CXXDEBUG "-g"
#define ROOTBUILD "" #define ROOTBUILD ""
#define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint " #define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint "
#define INCLUDEPATH "-I$ROOTSYS/include" #define INCLUDEPATH "-I$ROOTSYS/include"
#define OBJEXT "o" #define OBJEXT "o"
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/