Go to the documentation of this file.
35 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
41 #pragma clang diagnostic push
42 #pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor"
45 #include "CLHEP/Utility/defs.h"
46 #include "CLHEP/Utility/noncopyable.h"
47 #include "CLHEP/Utility/type_traits.h"
77 :
public std::exception
80 inline virtual char const *
what()
const throw();
87 return "bad_weak_ptr";
112 virtual void *
get_deleter( std::type_info
const & ti ) = 0;
115 virtual void dispose()
throw() = 0;
116 inline virtual void destroy()
throw();
131 assert( n_shared_ptrs == 0 || n_weak_ptrs >= 1 );
157 return n_shared_ptrs ? ++n_shared_ptrs :
false;
171 if( 0 == --n_shared_ptrs )
179 if( 0 == --n_weak_ptrs )
186 assert( n_weak_ptrs == 0 );
194 return n_shared_ptrs;
205 template<
typename P >
216 inline void *
operator new ( std::size_t );
217 inline void operator delete (
void * );
220 inline virtual void *
get_deleter( std::type_info
const & );
221 inline virtual void dispose()
throw();
229 template<
typename P >
235 template<
typename P >
239 template<
typename P >
246 template<
typename P >
253 template<
typename P >
257 return std::allocator<this_type>().allocate( 1 );
260 template<
typename P >
264 std::allocator<this_type>().deallocate(
static_cast<this_type*
>(p), 1 );
280 inline void *
operator new ( std::size_t );
281 inline void operator delete (
void * );
284 inline virtual void *
get_deleter( std::type_info
const & );
285 inline virtual void dispose()
throw();
295 template<
typename P,
typename D >
302 template<
typename P,
typename D >
306 template<
typename P,
typename D >
313 template<
typename P,
typename D >
317 return ti ==
typeid(
D) ? &
reinterpret_cast<char&
>(
deleter ) : 0;
320 template<
typename P,
typename D >
324 return std::allocator<this_type>().allocate( 1 );
327 template<
typename P,
typename D >
331 std::allocator<this_type>().deallocate(
static_cast<this_type*
>(p), 1 );
348 inline virtual void *
get_deleter( std::type_info
const & );
349 inline virtual void dispose()
throw();
350 inline virtual void destroy()
throw();
361 template<
typename P,
typename D,
typename A >
369 template<
typename P,
typename D,
typename A >
373 template<
typename P,
typename D,
typename A >
380 template<
typename P,
typename D,
typename A >
384 typename A::template rebind< this_type >::other this_allocator( allocator );
386 this_allocator.destroy(
this );
387 this_allocator.deallocate(
this, 1 );
390 template<
typename P,
typename D,
typename A >
394 return ti ==
typeid(
D ) ? &
reinterpret_cast<char&
>(
deleter ) : 0;
413 template< typename P >
416 template< typename P, typename
D >
418 template< typename P, typename
D, typename A >
420 template< typename P >
437 inline
void *
get_deleter( std::type_info const & ) const;
438 inline
bool unique() const throw();
439 inline
bool empty() const throw();
460 template<
typename P >
475 template<
typename P,
typename D >
490 template<
typename P,
typename D,
typename A >
496 typedef typename A::template rebind<ctrl_block>::other
497 ctrl_block_allocator;
498 ctrl_block_allocator cba(
a );
502 acb_ptr = cba.allocate( 1 );
503 new(
static_cast<void*
>(acb_ptr) ) ctrl_block(p, d,
a);
509 cba.deallocate(
static_cast<ctrl_block*
>( acb_ptr ), 1 );
514 template<
typename P >
531 other.acb_ptr = acb_ptr;
536 : acb_ptr( other.acb_ptr )
550 if( acb_ptr != 0 ) acb_ptr->release();
578 return acb_ptr == 0 ? 0L : acb_ptr->
use_count();
584 return lhs.acb_ptr == rhs.acb_ptr;
590 return std::less<abstract_ctrl_block*>()( lhs.acb_ptr, rhs.acb_ptr );
612 inline
bool empty() const throw();
634 : acb_ptr( other.acb_ptr )
650 other.acb_ptr = acb_ptr;
655 : acb_ptr( other.acb_ptr )
700 return acb_ptr == 0 ? 0L : acb_ptr->
use_count();
706 return lhs.acb_ptr == rhs.acb_ptr;
712 return std::less<abstract_ctrl_block*>()( lhs.acb_ptr, rhs.acb_ptr );
716 : acb_ptr( other.acb_ptr )
724 : acb_ptr( other.acb_ptr )
745 template<
typename T >
780 template<
typename X,
typename Y,
typename T >
788 pe->_internal_accept_owner( ppx,
const_cast<Y*
>( py ) );
791 template<
typename X,
typename Y,
typename T >
799 pe->_internal_accept_owner( ppx,
const_cast<Y*
>( py ) );
813 template<
typename P >
816 typedef shared_ptr<P> this_type;
827 template< typename P2 >
830 template< typename P2, typename
D >
832 template< typename P2, typename
D, typename A >
840 template< typename P2 >
843 template< typename P2 >
845 template< typename P2 >
847 template< typename P2 >
849 template< typename P2 >
851 template< typename P2 >
853 template< typename P2 >
855 template< typename P2 >
858 template< typename AP >
863 template< typename P2 >
868 template< typename P2 >
870 template< typename P2 >
871 inline
shared_ptr & operator = ( std::auto_ptr<P2> & );
872 template< typename AP >
877 inline
void reset() throw();
878 template< typename P2 >
879 inline
void reset( P2 * );
880 template< typename P2, typename
D >
881 inline
void reset( P2 *,
D );
882 template< typename P2, typename
D, typename A >
883 inline
void reset( P2 *,
D, A );
884 template< typename P2 >
888 inline operator
bool () const throw();
889 inline reference operator * () const throw();
890 inline P * operator -> () const throw();
893 inline P *
get() const throw();
894 inline
bool unique() const throw();
898 template< typename P2 >
906 sp::shared_ctrl_handle pn;
910 template< typename P, typename P2 >
912 template< typename P, typename P2 >
914 template< typename P, typename P2 >
917 template< typename P >
920 template< typename P, typename P2 >
922 template< typename P, typename P2 >
924 template< typename P, typename P2 >
927 template< typename P >
929 template< typename
D, typename P >
932 template< typename C, typename T, typename P >
933 inline std::basic_ostream<C,T> & operator << ( std::basic_ostream<C,T> &
937 template< typename P >
943 template<
typename P >
944 template<
typename P2 >
952 template<
typename P >
953 template<
typename P2,
typename D >
961 template<
typename P >
962 template<
typename P2,
typename D,
typename A >
970 template<
typename P >
978 template<
typename P >
986 template<
typename P >
987 template<
typename P2 >
995 template<
typename P >
996 template<
typename P2 >
1007 template<
typename P >
1008 template<
typename P2 >
1016 template<
typename P >
1017 template<
typename P2 >
1025 template<
typename P >
1026 template<
typename P2 >
1034 template<
typename P >
1035 template<
typename P2 >
1046 template<
typename P >
1047 template<
typename P2 >
1055 throw std::bad_cast();
1058 template<
typename P >
1059 template<
typename P2 >
1064 P2 * tmp = other.get();
1069 template<
typename P >
1070 template<
typename AP >
1077 typename AP::element_type * tmp = other.get();
1082 template<
typename P >
1083 template<
typename P2 >
1091 template<
typename P >
1092 template<
typename P2 >
1100 template<
typename P >
1101 template<
typename P2 >
1109 template<
typename P >
1110 template<
typename AP >
1118 template<
typename P >
1125 template<
typename P >
1126 template<
typename P2 >
1130 assert( p == 0 || p != px );
1134 template<
typename P >
1135 template<
typename P2,
typename D >
1142 template<
typename P >
1143 template<
typename P2,
typename D,
typename A >
1150 template<
typename P >
1151 template<
typename P2 >
1158 template<
typename P >
1164 template<
typename P >
1173 template<
typename P >
1181 template<
typename P >
1188 template<
typename P >
1195 template<
typename P >
1202 template<
typename P >
1203 template<
typename P2 >
1210 template<
typename P >
1214 return pn.get_deleter( ti );
1217 template<
typename P >
1221 return px == other.px && pn == other.pn;
1224 template<
typename P,
typename P2 >
1228 return a.get() ==
b.get();
1231 template<
typename P,
typename P2 >
1235 return a.get() !=
b.get();
1238 template<
typename P,
typename P2 >
1242 return a._internal_less(
b);
1245 template<
typename P >
1252 template<
typename P,
typename P2 >
1259 template<
typename P,
typename P2 >
1266 template<
typename P,
typename P2 >
1273 template<
typename P >
1280 template<
typename D,
typename P >
1284 return static_cast<D*
>( p._internal_get_deleter(
typeid(
D)) );
1287 template<
typename C,
typename T,
typename P >
1288 std::basic_ostream<C,T> &
1300 template<
typename P >
1303 typedef weak_ptr<P> this_type;
1316 template< typename P2 >
1321 template< typename P2 >
1326 template< typename P2 >
1328 template< typename P2 >
1333 inline
long use_count() const throw();
1334 inline
bool expired() const throw();
1335 inline
bool _empty() const;
1336 inline
void reset() throw();
1339 inline
void _internal_assign( P * px2, sp::shared_ctrl_handle const & pn2 );
1340 template< typename P2 >
1341 inline
bool _internal_less(
weak_ptr<P2> const & rhs ) const;
1345 sp::weak_ctrl_handle pn;
1349 template< typename P, typename P2 >
1352 template< typename P >
1355 template< typename P >
1361 template<
typename P >
1362 template<
typename P2 >
1366 : px( r.lock().get() )
1370 template<
typename P >
1371 template<
typename P2 >
1379 template<
typename P >
1380 template<
typename P2 >
1384 px = r.
lock().get();
1389 template<
typename P >
1390 template<
typename P2 >
1399 template<
typename P >
1406 template<
typename P >
1413 template<
typename P >
1420 template<
typename P >
1427 template<
typename P >
1434 template<
typename P >
1442 template<
typename P >
1450 template<
typename P >
1451 template<
typename P2 >
1458 template<
typename P,
typename P2 >
1462 return a._internal_less(
b);
1465 template<
typename P >
1478 inline void operator () (
void const * )
const;
1482 do_nothing_deleter::operator () (
void const * )
const
1489 #if defined __GNUC__
1490 #if __GNUC__ > 3 && __GNUC_MINOR__ > 6
1491 #pragma GCC diagnostic pop
1495 #pragma clang diagnostic pop
1500 #endif // CLHEP_MEMORY_H
1509 template<
typename T >
1510 class enable_shared_from_this
1513 enable_shared_from_this()
1516 ~enable_shared_from_this()
1519 enable_shared_from_this( enable_shared_from_this
const & )
1522 enable_shared_from_this &
1523 operator = ( enable_shared_from_this
const & )
1532 shared_ptr<T> p( weak_this_ );
1533 assert( p.get() ==
this );
1538 shared_from_this()
const
1540 shared_ptr<T const> p( weak_this_ );
1541 assert( p.get() ==
this );
1548 template<
typename X,
typename Y >
1550 _internal_accept_owner( shared_ptr<X>
const * ppx,
Y * py )
const
1552 if( weak_this_.expired() )
1553 weak_this_ = shared_ptr<T>( *ppx, py );
1557 mutable weak_ptr<T> weak_this_;
1566 class esft2_deleter_wrapper
1569 shared_ptr<void> deleter_;
1572 esft2_deleter_wrapper()
1575 template<
typename T >
1577 set_deleter( shared_ptr<T>
const &
deleter )
1582 template<
typename T >
1586 assert( deleter_.use_count() <= 1 );
1593 template<
typename T >
1594 class enable_shared_from_this2
1598 enable_shared_from_this2()
1601 enable_shared_from_this2( enable_shared_from_this2
const & )
1604 enable_shared_from_this2 & operator = ( enable_shared_from_this2
const & )
1609 ~enable_shared_from_this2()
1611 assert( shared_this_.use_count() <= 1 );
1615 mutable weak_ptr<T> weak_this_;
1616 mutable shared_ptr<T> shared_this_;
1624 return shared_ptr<T>( weak_this_ );
1628 shared_from_this()
const
1631 return shared_ptr<T>( weak_this_ );
1636 void init_weak_once()
const
1638 if( weak_this_._empty() )
1640 shared_this_.reset(
static_cast< T*
>( 0 )
1641 , detail::esft2_deleter_wrapper()
1643 weak_this_ = shared_this_;
1650 template<
typename X,
typename Y >
1652 _internal_accept_owner( shared_ptr<X> * ppx,
Y * py )
const
1656 if( weak_this_.use_count() == 0 )
1657 weak_this_ = shared_ptr<T>( *ppx, py );
1658 else if( shared_this_.use_count() != 0 )
1660 assert( ppx->unique() );
1662 detail::esft2_deleter_wrapper * pd
1663 = boost::get_deleter<detail::esft2_deleter_wrapper>( shared_this_ );
1666 pd->set_deleter( *ppx );
1668 ppx->reset( shared_this_, ppx->get() );
1669 shared_this_.reset();
there is no operator*(HepRotation). In reallity
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno while ZMerrno to note the handler and logger used when the exception was ZMthrow n etc The resulting pointer should generally be checked against in case ZMerrno does not go back as far as requested ZMerrno for example
void * _internal_get_deleter(std::type_info const &) const
ZOOM classes Symbol pollution
Ouch may be arbitrary text to be associated with this particular as described below Resulting log message Assuming that the ExcTest program has been compiled with appropriate compiler switches that enable use of exceptions
ctrl_block_pda(P *, D, A)
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes all ZOOM generated ZMexception classes will use at least ZMx as their name prefix More typically
Oops it is classified as an Oops occurrence
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom cc
void swap(weak_ctrl_handle &)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
bool operator<(shared_ctrl_handle const &lhs, shared_ctrl_handle const &rhs)
Introduction to the Use of Zoom Exceptions W E Oct
virtual void * get_deleter(std::type_info const &)
shared_ptr< P > dynamic_pointer_cast(shared_ptr< P2 > const &)
void class_invariant() const
shared_ptr< P > static_pointer_cast(shared_ptr< P2 > const &)
logging can probably cease although we can make it safe to continue running(e.g., by supplying a default value instead of a value we can 't for some reason calculate)
if should always be reported to the software s developers and or maintainers Using handlers In the Exceptions a handler is the term for an instance of a class that processes a ZMthrow n exception A handler is responsible for having the exception instance logged
any previously defined ZMexception may be used as the parent Oops is the exception s name as it is to appear in the log Such a quoted exception name string should for clarity be closely related to the actual name but as shown here might omit some package identifying baggage ExcTest is the logged message ZMthrow()
bool operator!=(const BasicVector3D< float > &a, const BasicVector3D< float > &b)
bool operator==(const BasicVector3D< float > &a, const BasicVector3D< float > &b)
typically not worth logging since it s probably just a temporary placeholder ZMexINFO In the normal course of events
virtual void * get_deleter(std::type_info const &)
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss here
it s generally safe to ignore the warning because you ll probably get just about the result you intended
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still recorded
When exceptions are the ZMthrow macro looks we know the try part will throw why not just consider how ZMthrow is typically used
#define ZMexStandardDefinition(Parent, Class)
void swap(this_type &other)
virtual void * get_deleter(std::type_info const &ti)=0
it has advantages For I leave the ZMthrows but substitute I replaced ZMthrow with ZMthrowA in this package when will issue its message and I introduce a macro ZMthrowC which I use wherever it seems there is a sensible way to continue processing after reporting the problem we don t want to change the functionallity when this is used in the ZOOM context To retain true ZOOM Exception we provide in ZMxpv h a define of ENABLE_ZOOM_EXCEPTIONS In CLEHP this is not and ZMthrowA and ZMthrowC become macros that behave as above When we build for ZOOM
bool _internal_equiv(shared_ptr const &) const
bool operator<(weak_ptr< P > const &a, weak_ptr< P2 > const &b)
void swap(shared_ctrl_handle &)
friend bool operator<(weak_ctrl_handle const &, weak_ctrl_handle const &)
shared_ptr< P > lock() const
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return but since these methods or signatures don t appear in the original ZOOM this can t break any code
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno while ZMerrno to note the handler and logger used when the exception was ZMthrow n etc The resulting pointer should generally be checked against in case ZMerrno does not go back as far as requested ZMerrno erase() Remove the most recently-recorded exception. This can be useful if
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno size() Return the(integer) number of ZMthrow 'n exceptions currently recorded. 5) ZMerrno.clear() Set an internal counter to zero. This counter is available(see next function) to user code to track ZMthrow 'n exceptions that have occurred during any arbitrary time interval. 6) ZMerrno.countSinceCleared() Return the(integer) number of ZMthrow 'n exceptions that have been recorded via ZMerrno.write()
Introduction to the Use of Zoom Exceptions W E Brown
typically not worth logging since it s probably just a temporary placeholder ZMexINFO In the normal course of here is news worth logging
this formatted text is the function s string result this method sends the formatted string s to the ostream destination specified when the logger was instantiated as its a code describing if any
virtual void * get_deleter(std::type_info const &)
void sp_enable_shared_from_this(...)
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno get() gives a(const pointer to) the latest recorded exception
any previously defined ZMexception may be used as the parent Oops is the exception s name as it is to appear in the log Such a quoted exception name string should for clarity be closely related to the actual name but as shown here might omit some package identifying baggage ExcTest is the logged message prefix(normally indicating the package, facility, or program giving rise to the message). 5) ZMexWARNING is the default severity level of ZMxOops.(See below for a complete list of possible severity levels and the intended significance of each.) 3. Constructing/throwing an instance of the new exception class --------------------------------------------------------------- This Exceptions package provides a facility
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return type
Ouch may be arbitrary text to be associated with this particular as described below Resulting log message Assuming that the ExcTest program has been compiled with appropriate compiler switches that enable use of the logged message resulting from the above ZMthrow(...) example will be W it is considered a Warning
exctest1 cc this occurrence arose from this associated compilation unit
We should separate methods that force the load of the Rotation class For practical that implies that methods like and that as in the ThreeVector class we separate the cc files Also again we have the rotation methods returning HepLorentzVector &rather than void
bool operator==(shared_ctrl_handle const &lhs, shared_ctrl_handle const &rhs)
this formatted text is the function s string result this method sends the formatted string s to the ostream destination specified when the logger was instantiated as its result
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In if a program uses only the methods found in the original CLHEP very little additional code is linked in Classes The corresponding classes I am not giving up on it eventually being in use
shared_ptr< P > const_pointer_cast(shared_ptr< P2 > const &)
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes all ZOOM generated ZMexception classes will use at least ZMx as their name prefix More to avoid internal name the names start with a short string identifying the package
weak_ctrl_handle & operator=(shared_ctrl_handle const &)
shared_ctrl_handle & operator=(shared_ctrl_handle const &)
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix ZMex(or, in the case of the preprocessor, "ZMEX") in order to help avoid namespace pollution. For example
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes all ZOOM generated ZMexception classes will use at least ZMx as their name prefix More to avoid internal name clashes
it has advantages For I leave the ZMthrows but substitute I replaced ZMthrow with ZMthrowA in this package when will issue its message and I introduce a macro ZMthrowC which I use wherever it seems there is a sensible way to continue processing after reporting the problem we don t want to change the functionallity when this is used in the ZOOM context To retain true ZOOM Exception we provide in ZMxpv h a define of ENABLE_ZOOM_EXCEPTIONS In CLEHP this is not defined
void sp_enable_shared_from_this(shared_ptr< X > const *ppx, Y const *py, enable_shared_from_this< T > const *pe)
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In particular
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom The usual way of seeding a generator is via the default which makes use of the table of and the seed is the xor of a mask which starts with a bit and the seed from the table But it and often does
P * get_pointer(shared_ptr< P > const &)
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno while ZMerrno to note the handler and logger used when the exception was ZMthrow n etc The resulting pointer should generally be checked against in case ZMerrno does not go back as far as requested ZMerrno for there is a loop of known ignorable all nonetheless duly recorded by the handler These exceptions can be more interesting
subsequent instances will be thrown after handling a logger is the term for an instance of a class that records to a designated destination a ZMthrow n exception A logger is responsible only for routing the message associated with an exception instance
friend bool operator==(weak_ctrl_handle const &, weak_ctrl_handle const &)
set(pkginclude_HEADERS itos.h) INSTALL(FILES $
Methods applicble to containers of as in std::list< LorentzVector > s
bool _internal_less(shared_ptr< P2 > const &) const
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and below
The given behavior will apply to any exceptions ZMthrow n after the handler has been established Available handlers Here is a list of the five standard handlers that are defined via the Exceptions package Each is accompanied by a brief description of its after become the object of a C throw but will have no further affect on subsequent control flow after be thrown if its severity is ZMexERROR or but be ignored if of a lesser severity Note
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return but since these methods or signatures don t appear in the original ZOOM this can t break any so I leave the void return type alone for those After discussion with A P and I have modified the return types of other CLHEP methods which return void and would by the same reasoning be better returning *this These include rotate and boost methods in LorentzVector h HepLorentzVector explicit and leads to division by zero if this vector has which takes very little time I think the zoom implementation is therefore better This
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes all ZOOM generated ZMexception classes will use at least ZMx as their name prefix More to avoid internal name the names start with a short string identifying the e g ZMxHep for HepTuple
D * get_deleter(shared_ptr< P > const &)
void swap(weak_ptr< P > &a, weak_ptr< P > &b)
void * get_deleter(std::type_info const &) const
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom The usual way of seeding a generator is via the default which makes use of the table of and the seed is the xor of a mask which starts with a bit and the seed from the table But it can
logging can probably cease after(say) 50 of the same warnings. ZMexERROR We encountered something such that
it has advantages For I leave the ZMthrows in
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In if a program uses only the methods found in the original CLHEP classes
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the header
the naive Gaussian approximation is inaccurate at a level which
user code seldom needs to call this function directly ZMerrno count() Return the(integer) number of ZMthrow 'n exceptions ever recorded via ZMerrno.write()
virtual const char * what() const
At least for we will omit so as not to introduce template complications into CLHEP If necessary
void swap(shared_ptr< P > &)
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes are(directly or indirectly) derived. Additionally
any side effects of that construction would occur twice The semantics of throw on the other are that x is not constructed an extra time The macro used achievs this
We should separate methods that force the load of the Rotation class For practical purposes
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last cleared(see previous function). 7) ZMerrno.name(unsigned int k=0) Return the name(as logged) of the latest-but-k exception currently recorded via ZMerrno. Thus
often useful for progress reporting and for debugging purposes ZMexWARNING Something unusual has but we have a quite reasonable action to take
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno name() gives the(string) name of the latest recorded exception
often useful for progress reporting and for debugging purposes ZMexWARNING Something unusual has happened
most use the Hep3Vector implementations Since UnitVector is not in it may eventually become part of so I chose to parallel the situation for SpaceVector w r t Hep3Vector Thus
virtual ~abstract_ctrl_block()
it is important to be consistent ZMexception is the name of the parent exception class of ZMxOops