| CollectionProxy.h | | CollectionProxy.h | |
|
| // @(#)root/reflex:$Id: CollectionProxy.h 23409 2008-04-23 07:41:37Z axel $ | | // @(#)root/reflex:$Id: CollectionProxy.h 27278 2009-01-28 14:02:41Z 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. | |
| | | | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| #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__ | |
|
| template <typename T> struct Environ { | | struct EnvironBase { | |
| | | EnvironBase() : fIdx(0), fSize(0), fObject(0), fStart(0), fTemp(0), f | |
| | | DeleteTemp(false), fRefSize(1), fSpace(0) | |
| | | { | |
| | | // fprintf("Running default constructor on %p\n",this); | |
| | | } | |
| | | virtual ~EnvironBase() {} | |
| | | size_t fIdx; | |
| | | size_t fSize; | |
| | | void* fObject; | |
| | | void* fStart; | |
| | | void* fTemp; | |
| | | bool fDeleteTemp; | |
| | | int fRefSize; | |
| | | size_t fSpace; | |
| | | }; | |
| | | template <typename T> struct Environ : public EnvironBase { | |
| typedef T Iter_t; | | typedef T Iter_t; | |
|
| char buff[64]; | | Iter_t fIterator; | |
| size_t idx; | | T& iter() { return fIterator; } | |
| size_t size; | | static void *Create() { | |
| void* object; | | return new Environ(); | |
| void* start; | | } | |
| void* temp; | | | |
| bool delete_temp; | | | |
| int refSize; | | | |
| size_t space; | | | |
| T& iter() { return *(T*)buff; } | | | |
| }; | | }; | |
| #else | | #else | |
|
| | | 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* address(T ref) { | |
| return (void*)&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) { | | static inline PCont_t object(void* ptr) { | |
|
| return PCont_t(PEnv_t(ptr)->object); | | return PCont_t(PEnv_t(ptr)->fObject); | |
| } | | } | |
| static void* size(void* env) { | | static void* size(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| e->size = PCont_t(e->object)->size(); | | e->fSize = PCont_t(e->fObject)->size(); | |
| return &e->size; | | return &e->fSize; | |
| } | | } | |
| static void* clear(void* env) { | | static void* clear(void* env) { | |
| object(env)->clear(); | | object(env)->clear(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* first(void* env) { | | static void* first(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| // Assume iterators do not need destruction | | // Assume iterators do not need destruction | |
|
| ::new(e->buff) Iter_t(c->begin()); | | e->fIterator = c->begin(); | |
| e->size = c->size(); | | e->fSize = c->size(); | |
| if ( 0 == e->size ) return e->start = 0; | | 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->start = address(ref); | | return e->fStart = address(ref); | |
| } | | } | |
| static void* next(void* env) { | | static void* next(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| for ( ; e->idx > 0 && e->iter() != c->end(); ++(e->iter()), --e->i | | for ( ; e->fIdx > 0 && e->iter() != c->end(); ++(e->iter()), --e-> | |
| dx ) {} | | fIdx ) {} | |
| // TODO: Need to find something for going backwards.... | | // TODO: Need to find something for going backwards.... | |
| if ( e->iter() == c->end() ) return 0; | | 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) { | | static void* construct(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| ::new(m) Value_t(); | | ::new(m) Value_t(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* collect(void* env) { | | static void* collect(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | | for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | |
| ::new(m) Value_t(*i); | | ::new(m) Value_t(*i); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* destruct(void* env) { | | static void* destruct(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i < e->size; ++i, ++m ) | | for (size_t i=0; i < e->fSize; ++i, ++m ) | |
| m->~Value_t(); | | m->~Value_t(); | |
| return 0; | | 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 vector, list, deque | | * containers like vector, list, deque | |
| * | | * | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 180 | |
| template <class T> struct Pushback : 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* resize(void* env) { | | static void* resize(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| c->resize(e->size); | | c->resize(e->fSize); | |
| e->idx = 0; | | e->fIdx = 0; | |
| return e->start = address(*c->begin()); | | return e->fStart = address(*c->begin()); | |
| } | | } | |
| static void* feed(void* env) { | | static void* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->push_back(*m); | | c->push_back(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| /** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h | | /** @class TCollectionProxy::Map TCollectionProxy.h TCollectionProxy.h | |
| * | | * | |
| | | | |
| skipping to change at line 207 | | skipping to change at line 217 | |
| template <class T> struct Insert : public CollType<T> { | | template <class T> struct Insert : 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* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->insert(*m); | | c->insert(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* resize(void* /* env */ ) { | | static void* resize(void* /* env */ ) { | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| skipping to change at line 240 | | skipping to change at line 250 | |
| template <class T> struct MapInsert : public CollType<T> { | | template <class T> struct MapInsert : 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* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->insert(*m); | | c->insert(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* resize(void* /* env */ ) { | | static void* resize(void* /* env */ ) { | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return ((char*)&((PValue_t(0x1000))->second)) - ((char*)PValue_t(0
x1000)); | | return ((char*)&((PValue_t(0x1000))->second)) - ((char*)PValue_t(0
x1000)); | |
| } | | } | |
| }; | | }; | |
| | | | |
| skipping to change at line 285 | | skipping to change at line 295 | |
| 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)(); | |
| }; | | }; | |
| | | | |
| template <typename T> struct CFTGenerator { | | template <typename T> struct CFTGenerator { | |
| static CollFuncTable* Generate() { | | static CollFuncTable* Generate() { | |
| typedef typename T::Value_t Value_t; | | typedef typename T::Value_t Value_t; | |
| typedef std::pair<Value_t,Value_t> Pair_t; | | typedef std::pair<Value_t,Value_t> Pair_t; | |
| Pair_t* ptr = (Pair_t*)0x1000; | | Pair_t* ptr = (Pair_t*)0x1000; | |
| CollFuncTable* p = new CollFuncTable(); | | CollFuncTable* p = new CollFuncTable(); | |
| p->iter_size = sizeof(typename T::Iter_t); | | p->iter_size = sizeof(typename T::Iter_t); | |
| p->value_diff = ((char*)&ptr->second) - ((char*)&ptr->first); | | p->value_diff = ((char*)&ptr->second) - ((char*)&ptr->first); | |
| p->value_offset = T::value_offset(); | | p->value_offset = T::value_offset(); | |
| p->size_func = T::size; | | p->size_func = T::size; | |
| p->first_func = T::first; | | p->first_func = T::first; | |
| p->next_func = T::next; | | p->next_func = T::next; | |
| p->clear_func = T::clear; | | p->clear_func = T::clear; | |
| p->resize_func = T::resize; | | p->resize_func = T::resize; | |
| p->collect_func = T::collect; | | p->collect_func = T::collect; | |
| p->construct_func = T::construct; | | p->construct_func = T::construct; | |
| p->destruct_func = T::destruct; | | p->destruct_func = T::destruct; | |
| p->feed_func = T::feed; | | p->feed_func = T::feed; | |
|
| | | p->create_env = T::Env_t::Create; | |
| return p; | | return p; | |
| } | | } | |
| }; | | }; | |
| struct CFTNullGenerator { | | struct CFTNullGenerator { | |
| static void* Void_func(void*) { | | static void* Void_func(void*) { | |
| return 0; | | return 0; | |
| } | | } | |
|
| | | static void* Void_func0() { return 0; } | |
| static CollFuncTable* Generate() { | | static CollFuncTable* Generate() { | |
| CollFuncTable* p = new CollFuncTable(); | | CollFuncTable* p = new CollFuncTable(); | |
| p->iter_size = 4; | | p->iter_size = 4; | |
| p->value_diff = 0; | | p->value_diff = 0; | |
| p->value_offset = 0; | | p->value_offset = 0; | |
| p->size_func = Void_func; | | p->size_func = Void_func; | |
| p->first_func = Void_func; | | p->first_func = Void_func; | |
| p->next_func = Void_func; | | p->next_func = Void_func; | |
| p->clear_func = Void_func; | | p->clear_func = Void_func; | |
| p->resize_func = Void_func; | | p->resize_func = Void_func; | |
| p->collect_func = Void_func; | | p->collect_func = Void_func; | |
| p->construct_func = Void_func; | | p->construct_func = Void_func; | |
| p->destruct_func = Void_func; | | p->destruct_func = Void_func; | |
| p->feed_func = Void_func; | | p->feed_func = Void_func; | |
|
| | | p->create_env = Void_func0; | |
| return p; | | return p; | |
| } | | } | |
| }; | | }; | |
| // General proxy (dummy) | | // General proxy (dummy) | |
| template <typename A> struct Proxy {}; | | template <typename A> struct Proxy {}; | |
| | | | |
| // Specialization for std::vector | | // Specialization for std::vector | |
| template <class T, class A> struct Proxy< std::vector<T,A> > { | | template <class T, class A> struct Proxy< std::vector<T,A> > { | |
| static CollFuncTable* Generate() { | | static CollFuncTable* Generate() { | |
| return CFTGenerator<Pushback<std::vector<T,A> > >::Generate(); | | return CFTGenerator<Pushback<std::vector<T,A> > >::Generate(); | |
| | | | |
End of changes. 23 change blocks. |
| 44 lines changed or deleted | | 59 lines changed or added | |
|
| Member.h | | Member.h | |
|
| // @(#)root/reflex:$Id: Member.h 26631 2008-12-03 15:50:16Z axel $ | | // @(#)root/reflex:$Id: Member.h 27509 2009-02-19 03:32:22Z pcanal $ | |
| // 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 343 | | skipping to change at line 343 | |
| * Name returns the Name of the member | | * Name returns the Name of the member | |
| * @param mod modifiers can be or'ed as argument | | * @param mod modifiers can be or'ed as argument | |
| * SCOPED - fully scoped name | | * SCOPED - fully scoped name | |
| * FINAL - resolve all typedefs | | * FINAL - resolve all typedefs | |
| * QUALIFIED - cv and reference qualification | | * QUALIFIED - cv and reference qualification | |
| * @return name of the member | | * @return name of the member | |
| */ | | */ | |
| std::string Name( unsigned int mod = 0 ) const; | | 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 | | * Offset returns the offset of the data member relative to the start
of the scope | |
| * @return offset of member as int | | * @return offset of member as int | |
| */ | | */ | |
| size_t Offset() const; | | size_t Offset() const; | |
|
| | | void InterpreterOffset(char*); | |
| | | char*& InterpreterOffset() const; | |
| | | | |
| /** | | /** | |
| * FunctionParameterSize returns the number of parameters | | * FunctionParameterSize returns the number of parameters | |
| * @param required if true only returns the number of required paramet
ers | | * @param required if true only returns the number of required paramet
ers | |
| * @return number of parameters | | * @return number of parameters | |
| */ | | */ | |
| size_t FunctionParameterSize( bool required = false ) const; | | size_t FunctionParameterSize( bool required = false ) const; | |
| | | | |
| /** FunctionParameterAt nth default value if declared*/ | | /** FunctionParameterAt nth default value if declared*/ | |
| std::string FunctionParameterDefaultAt( size_t nth ) const; | | std::string FunctionParameterDefaultAt( size_t nth ) const; | |
| | | | |
| skipping to change at line 486 | | skipping to change at line 494 | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| if ( (*this) && rh ) | | if ( (*this) && 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) && rh ) | | if ( (*this) && rh ) | |
|
| return ( TypeOf() == rh.TypeOf() && Name() == rh.Name() ); | | return ( TypeOf() == rh.TypeOf() && 0==strcmp(Name_c_str(),rh.Name_c_
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 ); | |
| } | | } | |
| | | | |
| | | | |
| skipping to change at line 745 | | skipping to change at line 753 | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| 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 { | |
| | | //---------------------------------------------------------------------- | |
| | | --------- | |
| | | if ( *this ) return fMemberBase->Name_c_str( ); | |
| | | 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) | |
| | | { | |
| | | if (*this) { | |
| | | fMemberBase->InterpreterOffset(offset); | |
| | | } | |
| | | } | |
| | | | |
| | | inline char*& Reflex::Member::InterpreterOffset() const | |
| | | { | |
| | | 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 )
const { | | inline std::string Reflex::Member::FunctionParameterDefaultAt( size_t nth )
const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| | | | |
| skipping to change at line 930 | | skipping to change at line 957 | |
| 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) { | |
| | | return s && rh.operator bool(); | |
| | | } | |
| | | inline bool operator||(short s, const Reflex::Member & rh) { | |
| | | 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. 7 change blocks. |
| 2 lines changed or deleted | | 37 lines changed or added | |
|
| MemberBase.h | | MemberBase.h | |
|
| // @(#)root/reflex:$Id: MemberBase.h 26631 2008-12-03 15:50:16Z axel $ | | // @(#)root/reflex:$Id: MemberBase.h 27509 2009-02-19 03:32:22Z pcanal $ | |
| // 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 169 | | skipping to change at line 169 | |
| | | | |
| /** return the type of the member (function or data member) */ | | /** return the type of the member (function or data member) */ | |
| TYPE MemberType() const; | | TYPE MemberType() const; | |
| | | | |
| /** returns the string representation of the member species */ | | /** returns the string representation of the member species */ | |
| std::string MemberTypeAsString() const; | | std::string MemberTypeAsString() const; | |
| | | | |
| /** return the name of the member */ | | /** return the name of the member */ | |
| virtual std::string Name( unsigned int mod = 0 ) const; | | virtual std::string Name( unsigned int mod = 0 ) 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 */ | | /** return the offset of the member */ | |
| virtual size_t Offset() const; | | virtual size_t Offset() const; | |
|
| | | virtual void InterpreterOffset(char*); | |
| | | virtual char*& InterpreterOffset() const; | |
| | | | |
| /** number of parameters */ | | /** number of parameters */ | |
| virtual size_t FunctionParameterSize( bool required = false ) const; | | virtual size_t FunctionParameterSize( bool required = false ) const; | |
| | | | |
| /** FunctionParameterDefaultAt returns the nth default value if decla
red*/ | | /** FunctionParameterDefaultAt returns the nth default value if decla
red*/ | |
| virtual std::string FunctionParameterDefaultAt( size_t nth ) const; | | virtual std::string FunctionParameterDefaultAt( size_t nth ) const; | |
| | | | |
| virtual StdString_Iterator FunctionParameterDefault_Begin() const; | | virtual StdString_Iterator FunctionParameterDefault_Begin() const; | |
| virtual StdString_Iterator FunctionParameterDefault_End() const; | | virtual StdString_Iterator FunctionParameterDefault_End() const; | |
| virtual Reverse_StdString_Iterator FunctionParameterDefault_RBegin()
const; | | virtual Reverse_StdString_Iterator FunctionParameterDefault_RBegin()
const; | |
| | | | |
| skipping to change at line 516 | | skipping to change at line 524 | |
| 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 { | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| | | 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 char*& Reflex::MemberBase::InterpreterOffset() const { | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| | | static char* p = 0; | |
| | | return p; | |
| | | } | |
| | | | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| inline size_t Reflex::MemberBase::FunctionParameterSize( bool /* required *
/ ) const { | | inline size_t Reflex::MemberBase::FunctionParameterSize( bool /* required *
/ ) const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return 0; | | return 0; | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline std::string Reflex::MemberBase::FunctionParameterDefaultAt( size_t /
* nth */ ) const { | | inline std::string Reflex::MemberBase::FunctionParameterDefaultAt( size_t /
* nth */ ) const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return ""; | | return ""; | |
| } | | } | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 33 lines changed or added | |
|
| Scope.h | | Scope.h | |
|
| // @(#)root/reflex:$Id: Scope.h 23635 2008-05-01 21:39:49Z russo $ | | // @(#)root/reflex:$Id: Scope.h 27509 2009-02-19 03:32:22Z pcanal $ | |
| // 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 66 | | skipping to change at line 66 | |
| * inequal operator | | * inequal operator | |
| */ | | */ | |
| bool operator != ( const Scope & rh ) const; | | bool operator != ( const Scope & rh ) const; | |
| | | | |
| /** | | /** | |
| * the bool operator will return true if the Scope is resolved (implem
ented) | | * the bool operator will return true if the Scope is resolved (implem
ented) | |
| * @return true if Scope is implemented | | * @return true if Scope is implemented | |
| */ | | */ | |
| operator bool () const; | | operator bool () const; | |
| | | | |
|
| #ifdef 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 operator!() const { return !operator bool(); } | |
| bool operator&&(bool right) const { return operator bool() && right;
} | | bool operator&&(bool right) const { return operator bool() && right;
} | |
| bool operator&&(int 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&&(long right) const { return operator bool() && right;
} | |
| bool operator&&(const Scope &right) const; | | bool operator&&(const Scope &right) const; | |
| bool operator&&(const Type &right) const; | | bool operator&&(const Type &right) const; | |
| bool operator&&(const Member &right) const; | | bool operator&&(const Member &right) const; | |
| bool operator||(bool right) const { return operator bool() || right;
} | | bool operator||(bool right) const { return operator bool() || right;
} | |
| bool operator||(int right) const { return operator bool() || right; } | | bool operator||(int right) const { return operator bool() || right; } | |
| | | | |
| skipping to change at line 461 | | skipping to change at line 461 | |
| * Name returns the name of the type | | * Name returns the name of the type | |
| * @param mod qualifiers can be or'ed | | * @param mod qualifiers can be or'ed | |
| * FINAL - resolve typedefs | | * FINAL - resolve typedefs | |
| * SCOPED - fully scoped name | | * SCOPED - fully scoped name | |
| * QUALIFIED - cv, reference qualification | | * QUALIFIED - cv, reference qualification | |
| * @return name of the type | | * @return name of the type | |
| */ | | */ | |
| std::string Name( unsigned int mod = 0 ) const; | | std::string Name( unsigned int mod = 0 ) const; | |
| | | | |
| /** | | /** | |
|
| * Name_c_str returns a char* pointer to the unqualified type name | | * Name_c_str returns a char* pointer to the qualified type name | |
| * @return c string to unqualified type name | | * @return c string to unqualified type name | |
| */ | | */ | |
| const char * Name_c_str() const; | | const char * Name_c_str() const; | |
| | | | |
| /** | | /** | |
| * Properties will return a PropertyList attached to this item | | * Properties will return a PropertyList attached to this item | |
| * @return PropertyList of this type | | * @return PropertyList of this type | |
| */ | | */ | |
| PropertyList Properties() const; | | PropertyList Properties() const; | |
| | | | |
| | | | |
| skipping to change at line 750 | | skipping to change at line 750 | |
| * @param typ the type of the data member | | * @param typ the type of the data member | |
| * @param offs the offset of the data member relative to the beginning
of the scope | | * @param offs the offset of the data member relative to the beginning
of the scope | |
| * @param modifiers of the data member | | * @param modifiers of the data member | |
| */ | | */ | |
| void AddDataMember( const char * name, | | void AddDataMember( const char * name, | |
| const Type & type, | | const Type & type, | |
| size_t offset, | | size_t offset, | |
| unsigned int modifiers = 0 ) const; | | unsigned int modifiers = 0 ) const; | |
| | | | |
| /** | | /** | |
|
| | | * AddDataMember will add the information about a data member | |
| | | * @param output a placeholder for 'Member' pointing to the data memb | |
| | | er | |
| | | * @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 beginnin | |
| | | g of the scope | |
| | | * @param modifiers of the data member | |
| | | */ | |
| | | void AddDataMember(Member& output, const char* name, const Type& type | |
| | | , size_t offset, unsigned int modifiers = 0, char* interpreterOffset = 0) c | |
| | | onst; | |
| | | | |
| | | /** | |
| * AddFunctionMember will add the information about a function member | | * AddFunctionMember will add the information about a function member | |
| * @param fm function member to add | | * @param fm function member to add | |
| */ | | */ | |
| void AddFunctionMember( const Member & fm ) const; | | void AddFunctionMember( const Member & fm ) const; | |
| | | | |
| /** | | /** | |
| * AddFunctionMember will add the information about a function member | | * AddFunctionMember will add the information about a function member | |
| * @param nam the name of the function member | | * @param nam the name of the function member | |
| * @param typ the type of the function member | | * @param typ the type of the function member | |
| * @param stubFP a pointer to the stub function | | * @param stubFP a pointer to the stub function | |
| | | | |
| skipping to change at line 1437 | | skipping to change at line 1447 | |
| } | | } | |
| 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) { | |
| | | 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. 5 change blocks. |
| 3 lines changed or deleted | | 23 lines changed or added | |
|
| TApplication.h | | TApplication.h | |
|
| // @(#)root/base:$Id: TApplication.h 26263 2008-11-18 12:00:21Z rdm $ | | // @(#)root/base:$Id: TApplication.h 27160 2009-01-15 16:24:27Z pcanal $ | |
| // Author: Fons Rademakers 22/12/95 | | // Author: Fons Rademakers 22/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 108 | | skipping to change at line 108 | |
| void InitializeGraphics(); | | void InitializeGraphics(); | |
| virtual void GetOptions(Int_t *argc, char **argv); | | virtual void GetOptions(Int_t *argc, char **argv); | |
| TSignalHandler *GetSignalHandler() const { return fSigHandler; } | | TSignalHandler *GetSignalHandler() const { return fSigHandler; } | |
| virtual void SetEchoMode(Bool_t mode); | | virtual void SetEchoMode(Bool_t mode); | |
| | | | |
| virtual void HandleException(Int_t sig); | | virtual void HandleException(Int_t sig); | |
| virtual void HandleIdleTimer(); //*SIGNAL* | | virtual void HandleIdleTimer(); //*SIGNAL* | |
| virtual Bool_t HandleTermInput() { return kFALSE; } | | virtual Bool_t HandleTermInput() { return kFALSE; } | |
| virtual void Init() { fAppImp->Init(); } | | virtual void Init() { fAppImp->Init(); } | |
| virtual Long_t ProcessLine(const char *line, Bool_t sync = kFALSE, Int_
t *error = 0); | | virtual Long_t ProcessLine(const char *line, Bool_t sync = kFALSE, Int_
t *error = 0); | |
|
| virtual Long_t ProcessFile(const char *file, Int_t *error = 0); | | virtual Long_t ProcessFile(const char *file, Int_t *error = 0, Bool_t k
eep = kFALSE); | |
| virtual void Run(Bool_t retrn = kFALSE); | | virtual void Run(Bool_t retrn = kFALSE); | |
| virtual void SetIdleTimer(UInt_t idleTimeInSec, const char *command); | | virtual void SetIdleTimer(UInt_t idleTimeInSec, const char *command); | |
| virtual void RemoveIdleTimer(); | | virtual void RemoveIdleTimer(); | |
| const char *GetIdleCommand() const { return fIdleCommand; } | | const char *GetIdleCommand() const { return fIdleCommand; } | |
| virtual void StartIdleing(); | | virtual void StartIdleing(); | |
| virtual void StopIdleing(); | | virtual void StopIdleing(); | |
| | | | |
| virtual const char *ApplicationName() const { return fAppImp->Applicatio
nName(); } | | virtual const char *ApplicationName() const { return fAppImp->Applicatio
nName(); } | |
| virtual void Show() { fAppImp->Show(); } | | virtual void Show() { fAppImp->Show(); } | |
| virtual void Hide() { fAppImp->Hide(); } | | virtual void Hide() { fAppImp->Hide(); } | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 149 | |
| | | | |
| Bool_t IsRunning() const { return fIsRunning; } | | Bool_t IsRunning() const { return fIsRunning; } | |
| Bool_t ReturnFromRun() const { return fReturnFromRun; } | | Bool_t ReturnFromRun() const { return fReturnFromRun; } | |
| void SetReturnFromRun(Bool_t ret) { fReturnFromRun = ret; } | | void SetReturnFromRun(Bool_t ret) { fReturnFromRun = ret; } | |
| | | | |
| virtual void LineProcessed(const char *line); //*SIGNAL* | | virtual void LineProcessed(const char *line); //*SIGNAL* | |
| virtual void Terminate(Int_t status = 0); //*SIGNAL* | | virtual void Terminate(Int_t status = 0); //*SIGNAL* | |
| virtual void KeyPressed(Int_t key); //*SIGNAL* | | virtual void KeyPressed(Int_t key); //*SIGNAL* | |
| virtual void ReturnPressed(char *text ); //*SIGNAL* | | virtual void ReturnPressed(char *text ); //*SIGNAL* | |
| | | | |
|
| static Long_t ExecuteFile(const char *file, Int_t *error = 0); | | static Long_t ExecuteFile(const char *file, Int_t *error = 0, Bool_t k
eep = kFALSE); | |
| static TList *GetApplications(); | | static TList *GetApplications(); | |
| static void CreateApplication(); | | static void CreateApplication(); | |
| static void NeedGraphicsLibs(); | | static void NeedGraphicsLibs(); | |
| | | | |
| ClassDef(TApplication,0) //GUI application singleton | | ClassDef(TApplication,0) //GUI application singleton | |
| }; | | }; | |
| | | | |
| R__EXTERN TApplication *gApplication; | | R__EXTERN TApplication *gApplication; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| TChair.h | | TChair.h | |
|
| // @(#)root/table:$Id: TChair.h 20882 2007-11-19 11:31:26Z rdm $ | | // @(#)root/table:$Id: TChair.h 27157 2009-01-15 14:05:12Z brun $ | |
| // Author: Valery Fine(fine@bnl.gov) 13/03/2000 | | // Author: Valery Fine(fine@bnl.gov) 13/03/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 57 | | skipping to change at line 57 | |
| virtual void AddAt(const void *c, Int_t i){GetThisTable()->Add
At(c,i);} | | virtual void AddAt(const void *c, Int_t i){GetThisTable()->Add
At(c,i);} | |
| const void *At(Int_t i) const {return GetThisTable()->At(i);} | | const void *At(Int_t i) const {return GetThisTable()->At(i);} | |
| virtual void Browse(TBrowser *b){GetThisTable()->Browse(b);} | | virtual void Browse(TBrowser *b){GetThisTable()->Browse(b);} | |
| virtual void CopySet(TChair &chair){GetThisTable()->CopySet(*c
hair.GetThisTable());} | | virtual void CopySet(TChair &chair){GetThisTable()->CopySet(*c
hair.GetThisTable());} | |
| Int_t CopyRows(const TChair *srcChair, Int_t srcRow=0,
Int_t dstRow=0, Int_t nRows=0, Bool_t expand=kFALSE) | | Int_t CopyRows(const TChair *srcChair, Int_t srcRow=0,
Int_t dstRow=0, Int_t nRows=0, Bool_t expand=kFALSE) | |
| {return GetThisTable()->CopyRows(srcChair->GetThi
sTable(),srcRow,dstRow,nRows,expand);} | | {return GetThisTable()->CopyRows(srcChair->GetThi
sTable(),srcRow,dstRow,nRows,expand);} | |
| virtual void Draw(Option_t *opt){GetThisTable()->Draw(opt);} | | virtual void Draw(Option_t *opt){GetThisTable()->Draw(opt);} | |
| virtual TH1 *Draw(TCut varexp, TCut selection, Option_t *optio
n="", | | virtual TH1 *Draw(TCut varexp, TCut selection, Option_t *optio
n="", | |
| Int_t nentries=1000000000, Int_t firstentry=0) | | Int_t nentries=1000000000, Int_t firstentry=0) | |
| {return GetThisTable()->Draw(varexp,selection,opt
ion,nentries,firstentry);} | | {return GetThisTable()->Draw(varexp,selection,opt
ion,nentries,firstentry);} | |
|
| virtual TH1 *Draw(const Text_t *varexp, const Text_t *selectio
n, Option_t *option="", | | virtual TH1 *Draw(const char *varexp, const char *selection, O
ption_t *option="", | |
| Int_t nentries=1000000000, Int_t firstentry=
0) { | | Int_t nentries=1000000000, Int_t firstentry=
0) { | |
| return GetThisTable()->Draw(varexp,selection,opt
ion,nentries,firstentry);} | | return GetThisTable()->Draw(varexp,selection,opt
ion,nentries,firstentry);} | |
| virtual Char_t *GetArray() const {return (Char_t *)GetThisTabl
e()->GetArray();} | | virtual Char_t *GetArray() const {return (Char_t *)GetThisTabl
e()->GetArray();} | |
| virtual TClass *GetRowClass() const {return GetThisTable()->GetRo
wClass();} | | virtual TClass *GetRowClass() const {return GetThisTable()->GetRo
wClass();} | |
| virtual Long_t GetNRows() const {return GetThisTable()->GetNR
ows();} | | virtual Long_t GetNRows() const {return GetThisTable()->GetNR
ows();} | |
| virtual Long_t GetRowSize() const {return GetThisTable()->GetRo
wSize();} | | virtual Long_t GetRowSize() const {return GetThisTable()->GetRo
wSize();} | |
| virtual Long_t GetTableSize() const{return GetThisTable()->GetTa
bleSize();} | | virtual Long_t GetTableSize() const{return GetThisTable()->GetTa
bleSize();} | |
| const TTable *Table() const {return fTable; } | | const TTable *Table() const {return fTable; } | |
| virtual TTableDescriptor *GetRowDescriptors() const {return GetThi
sTable()->GetRowDescriptors();} | | virtual TTableDescriptor *GetRowDescriptors() const {return GetThi
sTable()->GetRowDescriptors();} | |
| virtual const Char_t *GetType() const {return GetT
hisTable()->GetType();} | | virtual const Char_t *GetType() const {return GetT
hisTable()->GetType();} | |
|
| virtual void Fit(const Text_t *formula ,const Text_t *varexp,
const Text_t *selection="",Option_t *option="",Option_t *goption="", | | virtual void Fit(const char *formula ,const char *varexp, cons
t char *selection="",Option_t *option="",Option_t *goption="", | |
| Int_t nentries=1000000000, Int_t firstentry=0
) { | | Int_t nentries=1000000000, Int_t firstentry=0
) { | |
| GetThisTable()->Fit(formula,varexp,selection,opt
ion,goption,nentries,firstentry);} | | GetThisTable()->Fit(formula,varexp,selection,opt
ion,goption,nentries,firstentry);} | |
| virtual Long_t HasData() const { return GetThisTable()->HasData
();} | | virtual Long_t HasData() const { return GetThisTable()->HasData
();} | |
| virtual Bool_t IsFolder() const { return GetThisTable()->IsFolde
r();} | | virtual Bool_t IsFolder() const { return GetThisTable()->IsFolde
r();} | |
| virtual void ls(Option_t *option="") const {GetThisTable()->ls
(option);} | | virtual void ls(Option_t *option="") const {GetThisTable()->ls
(option);} | |
| virtual void ls(Int_t deep) const {GetThisTable()->ls(deep);} | | virtual void ls(Int_t deep) const {GetThisTable()->ls(deep);} | |
| Int_t NaN() {return GetThisTable()->NaN();} | | Int_t NaN() {return GetThisTable()->NaN();} | |
| virtual Char_t *MakeExpression(const Char_t *expressions[],Int_t
nExpressions) | | virtual Char_t *MakeExpression(const Char_t *expressions[],Int_t
nExpressions) | |
| {return GetThisTable()->MakeExpression(expressions
,nExpressions);} | | {return GetThisTable()->MakeExpression(expressions
,nExpressions);} | |
| virtual Char_t *Print(Char_t *buf,Int_t n) const { return GetThis
Table()->Print(buf, n);} | | virtual Char_t *Print(Char_t *buf,Int_t n) const { return GetThis
Table()->Print(buf, n);} | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| TClass.h | | TClass.h | |
|
| // @(#)root/meta:$Id: TClass.h 26606 2008-12-02 20:36:09Z pcanal $ | | // @(#)root/meta:$Id: TClass.h 27287 2009-01-29 04:52:36Z pcanal $ | |
| // Author: Rene Brun 07/01/95 | | // Author: Rene Brun 07/01/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 91 | | skipping to change at line 91 | |
| private: | | private: | |
| | | | |
| mutable TObjArray *fStreamerInfo; //Array of TVirtualStreamerInfo | | mutable TObjArray *fStreamerInfo; //Array of TVirtualStreamerInfo | |
| mutable std::map<std::string, TObjArray*> *fConversionStreamerInfo; //Ar
ray of the streamer infos derived from another class. | | mutable std::map<std::string, TObjArray*> *fConversionStreamerInfo; //Ar
ray of the streamer infos derived from another class. | |
| TList *fRealData; //linked list for persistent member
s including base classes | | TList *fRealData; //linked list for persistent member
s including base classes | |
| TList *fBase; //linked list for base classes | | TList *fBase; //linked list for base classes | |
| TList *fData; //linked list for data members | | TList *fData; //linked list for data members | |
| TList *fMethod; //linked list for methods | | TList *fMethod; //linked list for methods | |
| TList *fAllPubData; //all public data members (includin
g from base classes) | | TList *fAllPubData; //all public data members (includin
g from base classes) | |
| TList *fAllPubMethod; //all public methods (including fro
m base classes) | | TList *fAllPubMethod; //all public methods (including fro
m base classes) | |
|
| | | mutable TList *fClassMenuList; //list of class menu items | |
| | | | |
| const char *fDeclFileName; //name of class declaration file | | const char *fDeclFileName; //name of class declaration file | |
| const char *fImplFileName; //name of class implementation file | | const char *fImplFileName; //name of class implementation file | |
| Short_t fDeclFileLine; //line of class declaration | | Short_t fDeclFileLine; //line of class declaration | |
| Short_t fImplFileLine; //line of class implementation | | Short_t fImplFileLine; //line of class implementation | |
| UInt_t fInstanceCount; //number of instances of this class | | UInt_t fInstanceCount; //number of instances of this class | |
| UInt_t fOnHeap; //number of instances on heap | | UInt_t fOnHeap; //number of instances on heap | |
| mutable UInt_t fCheckSum; //checksum of data members and base
classes | | mutable UInt_t fCheckSum; //checksum of data members and base
classes | |
| TVirtualCollectionProxy *fCollectionProxy; //Collection interface | | TVirtualCollectionProxy *fCollectionProxy; //Collection interface | |
| Version_t fClassVersion; //Class version Identifier | | Version_t fClassVersion; //Class version Identifier | |
| ClassInfo_t *fClassInfo; //pointer to CINT class info class | | ClassInfo_t *fClassInfo; //pointer to CINT class info class | |
| TString fContextMenuTitle;//context menu title | | TString fContextMenuTitle;//context menu title | |
|
| TList *fClassMenuList; //list of class menu items | | | |
| const type_info *fTypeInfo; //pointer to the C++ type informati
on. | | const type_info *fTypeInfo; //pointer to the C++ type informati
on. | |
| ShowMembersFunc_t fShowMembers; //pointer to the class's ShowMember
s function | | ShowMembersFunc_t fShowMembers; //pointer to the class's ShowMember
s function | |
|
| | | mutable void *fInterShowMembers;//Interpreter call setup for ShowMe
mbers | |
| TClassStreamer *fStreamer; //pointer to streamer function | | TClassStreamer *fStreamer; //pointer to streamer function | |
| TString fSharedLibs; //shared libraries containing class
code | | TString fSharedLibs; //shared libraries containing class
code | |
| | | | |
| TVirtualIsAProxy *fIsA; //!pointer to the class's IsA proxy
. | | TVirtualIsAProxy *fIsA; //!pointer to the class's IsA proxy
. | |
| IsAGlobalFunc_t fGlobalIsA; //pointer to a global IsA function. | | IsAGlobalFunc_t fGlobalIsA; //pointer to a global IsA function. | |
| mutable TMethodCall *fIsAMethod; //!saved info to call a IsA membe
r function | | mutable TMethodCall *fIsAMethod; //!saved info to call a IsA membe
r function | |
| | | | |
| ROOT::NewFunc_t fNew; //pointer to a function newing one
object. | | ROOT::NewFunc_t fNew; //pointer to a function newing one
object. | |
| ROOT::NewArrFunc_t fNewArray; //pointer to a function newing an a
rray of objects. | | ROOT::NewArrFunc_t fNewArray; //pointer to a function newing an a
rray of objects. | |
| ROOT::DelFunc_t fDelete; //pointer to a function deleting on
e object. | | ROOT::DelFunc_t fDelete; //pointer to a function deleting on
e object. | |
| | | | |
| skipping to change at line 207 | | skipping to change at line 209 | |
| ShowMembersFunc_t showmember, | | ShowMembersFunc_t showmember, | |
| const char *dfil, const char *ifil, | | const char *dfil, const char *ifil, | |
| Int_t dl, Int_t il, Bool_t silent = kFALSE); | | Int_t dl, Int_t il, Bool_t silent = kFALSE); | |
| virtual ~TClass(); | | virtual ~TClass(); | |
| | | | |
| void AddInstance(Bool_t heap = kFALSE) { fInstanceCount++;
if (heap) fOnHeap++; } | | void AddInstance(Bool_t heap = kFALSE) { fInstanceCount++;
if (heap) fOnHeap++; } | |
| void AddImplFile(const char *filename, int line); | | void AddImplFile(const char *filename, int line); | |
| void AddRef(TClassRef *ref); | | void AddRef(TClassRef *ref); | |
| void AdoptSchemaRules( ROOT::TSchemaRuleSet *rules ); | | void AdoptSchemaRules( ROOT::TSchemaRuleSet *rules ); | |
| virtual void Browse(TBrowser *b); | | virtual void Browse(TBrowser *b); | |
|
| void BuildRealData(void *pointer=0); | | void BuildRealData(void *pointer=0, Bool_t isTransient = k
FALSE); | |
| void BuildEmulatedRealData(const char *name, Long_t offset
, TClass *cl); | | void BuildEmulatedRealData(const char *name, Long_t offset
, TClass *cl); | |
|
| void CalculateStreamerOffset(); | | void CalculateStreamerOffset() const; | |
| | | Bool_t CallShowMembers(void* obj, TMemberInspector &insp, ch | |
| | | ar *parent, | |
| | | Int_t isATObject = -1) const; | |
| Bool_t CanSplit() const; | | Bool_t CanSplit() const; | |
| Bool_t CanIgnoreTObjectStreamer() { return TestBit(kIgnoreTO
bjectStreamer);} | | Bool_t CanIgnoreTObjectStreamer() { return TestBit(kIgnoreTO
bjectStreamer);} | |
|
| | | TObject *Clone(const char *newname="") const; | |
| void CopyCollectionProxy(const TVirtualCollectionProxy&); | | void CopyCollectionProxy(const TVirtualCollectionProxy&); | |
| void Draw(Option_t *option=""); | | void Draw(Option_t *option=""); | |
| void Dump() const { TDictionary::Dump(); } | | void Dump() const { TDictionary::Dump(); } | |
| void Dump(void *obj) const; | | void Dump(void *obj) const; | |
| char *EscapeChars(const char *text) const; | | char *EscapeChars(const char *text) const; | |
| TVirtualStreamerInfo *FindStreamerInfo(UInt_t checksum) const; | | TVirtualStreamerInfo *FindStreamerInfo(UInt_t checksum) const; | |
| TVirtualStreamerInfo *GetConversionStreamerInfo( const char* onfile_
classname, Int_t version ) const; | | TVirtualStreamerInfo *GetConversionStreamerInfo( const char* onfile_
classname, Int_t version ) const; | |
| TVirtualStreamerInfo *FindConversionStreamerInfo( const char* onfile
_classname, UInt_t checksum ) const; | | TVirtualStreamerInfo *FindConversionStreamerInfo( const char* onfile
_classname, UInt_t checksum ) const; | |
| TVirtualStreamerInfo *GetConversionStreamerInfo( const TClass* onfil
e_cl, Int_t version ) const; | | TVirtualStreamerInfo *GetConversionStreamerInfo( const TClass* onfil
e_cl, Int_t version ) const; | |
| TVirtualStreamerInfo *FindConversionStreamerInfo( const TClass* onfi
le_cl, UInt_t checksum ) const; | | TVirtualStreamerInfo *FindConversionStreamerInfo( const TClass* onfi
le_cl, UInt_t checksum ) const; | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 262 | |
| Short_t GetImplFileLine() const { return fImplFileLine; } | | Short_t GetImplFileLine() const { return fImplFileLine; } | |
| TClass *GetActualClass(const void *object) const; | | TClass *GetActualClass(const void *object) const; | |
| TClass *GetBaseClass(const char *classname); | | TClass *GetBaseClass(const char *classname); | |
| TClass *GetBaseClass(const TClass *base); | | TClass *GetBaseClass(const TClass *base); | |
| Int_t GetBaseClassOffset(const TClass *base); | | Int_t GetBaseClassOffset(const TClass *base); | |
| TClass *GetBaseDataMember(const char *datamember); | | TClass *GetBaseDataMember(const char *datamember); | |
| ROOT::DirAutoAdd_t GetDirectoryAutoAdd() const; | | ROOT::DirAutoAdd_t GetDirectoryAutoAdd() const; | |
| UInt_t GetInstanceCount() const { return fInstanceCount; } | | UInt_t GetInstanceCount() const { return fInstanceCount; } | |
| UInt_t GetHeapInstanceCount() const { return fOnHeap; } | | UInt_t GetHeapInstanceCount() const { return fOnHeap; } | |
| void GetMenuItems(TList *listitems); | | void GetMenuItems(TList *listitems); | |
|
| TList *GetMenuList() const { return fClassMenuList; } | | TList *GetMenuList() const; | |
| TMethod *GetMethod(const char *method, const char *params); | | TMethod *GetMethod(const char *method, const char *params); | |
| TMethod *GetMethodWithPrototype(const char *method, const char
*proto); | | TMethod *GetMethodWithPrototype(const char *method, const char
*proto); | |
| TMethod *GetMethodAny(const char *method); | | TMethod *GetMethodAny(const char *method); | |
| TMethod *GetMethodAllAny(const char *method); | | TMethod *GetMethodAllAny(const char *method); | |
| Int_t GetNdata(); | | Int_t GetNdata(); | |
| ROOT::NewFunc_t GetNew() const; | | ROOT::NewFunc_t GetNew() const; | |
| ROOT::NewArrFunc_t GetNewArray() const; | | ROOT::NewArrFunc_t GetNewArray() const; | |
| Int_t GetNmethods(); | | Int_t GetNmethods(); | |
| TRealData *GetRealData(const char *name) const; | | TRealData *GetRealData(const char *name) const; | |
| TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | | TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | |
| | | | |
End of changes. 8 change blocks. |
| 5 lines changed or deleted | | 11 lines changed or added | |
|
| TCollectionProxyInfo.h | | TCollectionProxyInfo.h | |
|
| // @(#)root/cont:$Id: TCollectionProxyInfo.h 26123 2008-11-10 15:40:40Z pca
nal $ | | // @(#)root/cont:$Id: TCollectionProxyInfo.h 27255 2009-01-27 10:59:53Z pca
nal $ | |
| // Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007 | | // Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 57 | | skipping to change at line 57 | |
| /** @class TCollectionProxyInfo::Environ TCollectionProxyInfo.h TCollecti
onProxyInfo.h | | /** @class TCollectionProxyInfo::Environ TCollectionProxyInfo.h TCollecti
onProxyInfo.h | |
| * | | * | |
| * Small helper to save proxy environment in the event of | | * Small helper to save proxy environment in the event of | |
| * recursive calls. | | * recursive calls. | |
| * | | * | |
| * @author M.Frank | | * @author M.Frank | |
| * @version 1.0 | | * @version 1.0 | |
| * @date 10/10/2004 | | * @date 10/10/2004 | |
| */ | | */ | |
| #ifndef __CINT__ | | #ifndef __CINT__ | |
|
| template <typename T> struct Environ { | | struct EnvironBase { | |
| | | EnvironBase() : fIdx(0), fSize(0), fObject(0), fStart(0), fTemp(0), f | |
| | | UseTemp(kFALSE), fRefCount(1), fSpace(0) | |
| | | { | |
| | | // fprintf("Running default constructor on %p\n",this); | |
| | | } | |
| | | virtual ~EnvironBase() {} | |
| | | size_t fIdx; | |
| | | size_t fSize; | |
| | | void* fObject; | |
| | | void* fStart; | |
| | | void* fTemp; | |
| | | Bool_t fUseTemp; | |
| | | int fRefCount; | |
| | | size_t fSpace; | |
| | | }; | |
| | | template <typename T> struct Environ : public EnvironBase { | |
| typedef T Iter_t; | | typedef T Iter_t; | |
|
| char buff[64]; | | Iter_t fIterator; | |
| size_t idx; | | T& iter() { return fIterator; } | |
| size_t size; | | static void *Create() { | |
| void* object; | | return new Environ(); | |
| void* start; | | } | |
| void* temp; | | | |
| Bool_t use_temp; | | | |
| int refCount; | | | |
| size_t space; | | | |
| T& iter() { return *(T*)buff; } | | | |
| }; | | }; | |
| #else | | #else | |
|
| | | struct EnvironBase; | |
| template <typename T> struct Environ; | | template <typename T> struct Environ; | |
| #endif | | #endif | |
| #if defined(R__VCXX6) | | #if defined(R__VCXX6) | |
| template <class T> void Destruct(T* obj) { obj->~T(); } | | template <class T> void Destruct(T* obj) { obj->~T(); } | |
| #endif | | #endif | |
| | | | |
| template <class T, class Q> struct PairHolder { | | template <class T, class Q> struct PairHolder { | |
| T first; | | T first; | |
| Q second; | | Q second; | |
| PairHolder() {} | | PairHolder() {} | |
| | | | |
| skipping to change at line 117 | | skipping to change at line 128 | |
| 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; | |
| | | | |
| virtual ~Type() {} | | virtual ~Type() {} | |
| | | | |
| static inline PCont_t object(void* ptr) { | | static inline PCont_t object(void* ptr) { | |
|
| return PCont_t(PEnv_t(ptr)->object); | | return PCont_t(PEnv_t(ptr)->fObject); | |
| } | | } | |
| static void* size(void* env) { | | static void* size(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| e->size = PCont_t(e->object)->size(); | | e->fSize = PCont_t(e->fObject)->size(); | |
| return &e->size; | | return &e->fSize; | |
| } | | } | |
| static void* clear(void* env) { | | static void* clear(void* env) { | |
| object(env)->clear(); | | object(env)->clear(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* first(void* env) { | | static void* first(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| | | #if 0 | |
| // Assume iterators do not need destruction | | // Assume iterators do not need destruction | |
| ::new(e->buff) Iter_t(c->begin()); | | ::new(e->buff) Iter_t(c->begin()); | |
|
| e->size = c->size(); | | #endif | |
| if ( 0 == e->size ) return e->start = 0; | | e->fIterator = c->begin(); | |
| | | e->fSize = c->size(); | |
| | | if ( 0 == e->fSize ) return e->fStart = 0; | |
| TYPENAME T::const_reference ref = *(e->iter()); | | TYPENAME T::const_reference ref = *(e->iter()); | |
|
| return e->start = address(ref); | | return e->fStart = address(ref); | |
| } | | } | |
| static void* next(void* env) { | | static void* next(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| for (; e->idx > 0 && e->iter() != c->end(); ++(e->iter()), --e->id | | for (; e->fIdx > 0 && e->iter() != c->end(); ++(e->iter()), --e->f | |
| x){ } | | Idx){ } | |
| // TODO: Need to find something for going backwards.... | | // TODO: Need to find something for going backwards.... | |
| if ( e->iter() == c->end() ) return 0; | | if ( e->iter() == c->end() ) return 0; | |
| TYPENAME T::const_reference ref = *(e->iter()); | | TYPENAME T::const_reference ref = *(e->iter()); | |
| return address(ref); | | return address(ref); | |
| } | | } | |
| static void* construct(void* env) { | | static void* construct(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| ::new(m) Value_t(); | | ::new(m) Value_t(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* collect(void* env) { | | static void* collect(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | | for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | |
| ::new(m) Value_t(*i); | | ::new(m) Value_t(*i); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* destruct(void* env) { | | static void* destruct(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| #if defined(R__VCXX6) | | #if defined(R__VCXX6) | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| for (size_t i=0; i < e->size; ++i, ++m ) | | for (size_t i=0; i < e->fSize; ++i, ++m ) | |
| ROOT::Destruct(m); | | ROOT::Destruct(m); | |
| #else | | #else | |
|
| for (size_t i=0; i < e->size; ++i, ++m ) | | for (size_t i=0; i < e->fSize; ++i, ++m ) | |
| m->~Value_t(); | | m->~Value_t(); | |
| #endif | | #endif | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| /** @class TCollectionProxyInfo::Map TCollectionProxyInfo.h TCollectionP
roxyInfo.h | | /** @class TCollectionProxyInfo::Map TCollectionProxyInfo.h TCollectionP
roxyInfo.h | |
| * | | * | |
| * Small helper to encapsulate all necessary data accesses for | | * Small helper to encapsulate all necessary data accesses for | |
| * containers like vector, list, deque | | * containers like vector, list, deque | |
| | | | |
| skipping to change at line 196 | | skipping to change at line 210 | |
| template <class T> struct Pushback : public Type<T> { | | template <class T> struct Pushback : public Type<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* resize(void* env) { | | static void* resize(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| c->resize(e->size); | | c->resize(e->fSize); | |
| e->idx = 0; | | e->fIdx = 0; | |
| return e->start = address(*c->begin()); | | return e->fStart = e->fSize ? address(*c->begin()) : 0; | |
| } | | } | |
| static void* feed(void* env) { | | static void* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); // Here start is actually a 'buff | | PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf | |
| er' outside the buffer. | | fer' outside the buffer. | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->push_back(*m); | | c->push_back(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| /** @class TCollectionProxyInfo::Map TCollectionProxyInfo.h TCollectionP
roxyInfo.h | | /** @class TCollectionProxyInfo::Map TCollectionProxyInfo.h TCollectionP
roxyInfo.h | |
| * | | * | |
| | | | |
| skipping to change at line 233 | | skipping to change at line 247 | |
| template <class T> struct Insert : public Type<T> { | | template <class T> struct Insert : public Type<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* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->insert(*m); | | c->insert(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* resize(void* /* env */ ) { | | static void* resize(void* /* env */ ) { | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| skipping to change at line 266 | | skipping to change at line 280 | |
| template <class T> struct MapInsert : public Type<T> { | | template <class T> struct MapInsert : public Type<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* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); | | PValue_t m = PValue_t(e->fStart); | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->insert(*m); | | c->insert(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* resize(void* /* env */ ) { | | static void* resize(void* /* env */ ) { | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return ((char*)&((PValue_t(0x1000))->second)) - ((char*)PValue_t(0
x1000)); | | return ((char*)&((PValue_t(0x1000))->second)) - ((char*)PValue_t(0
x1000)); | |
| } | | } | |
| }; | | }; | |
| | | | |
| skipping to change at line 296 | | skipping to change at line 310 | |
| int fValueOffset; | | int fValueOffset; | |
| void* (*fSizeFunc)(void*); | | void* (*fSizeFunc)(void*); | |
| void* (*fResizeFunc)(void*); | | void* (*fResizeFunc)(void*); | |
| void* (*fClearFunc)(void*); | | void* (*fClearFunc)(void*); | |
| void* (*fFirstFunc)(void*); | | void* (*fFirstFunc)(void*); | |
| void* (*fNextFunc)(void*); | | void* (*fNextFunc)(void*); | |
| void* (*fConstructFunc)(void*); | | void* (*fConstructFunc)(void*); | |
| void* (*fDestructFunc)(void*); | | void* (*fDestructFunc)(void*); | |
| void* (*fFeedFunc)(void*); | | void* (*fFeedFunc)(void*); | |
| void* (*fCollectFunc)(void*); | | void* (*fCollectFunc)(void*); | |
|
| | | void* (*fCreateEnv)(); | |
| | | | |
| public: | | public: | |
| TCollectionProxyInfo(const type_info& info, | | TCollectionProxyInfo(const type_info& info, | |
| 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)() | |
| ) : | | ) : | |
| fInfo(info), fIterSize(iter_size), fValueDiff(value_diff), | | fInfo(info), fIterSize(iter_size), fValueDiff(value_diff), | |
| fValueOffset(value_offset), | | fValueOffset(value_offset), | |
| fSizeFunc(size_func),fResizeFunc(resize_func),fClearFunc(clear_fun
c), | | fSizeFunc(size_func),fResizeFunc(resize_func),fClearFunc(clear_fun
c), | |
| fFirstFunc(first_func),fNextFunc(next_func),fConstructFunc(constru
ct_func), | | fFirstFunc(first_func),fNextFunc(next_func),fConstructFunc(constru
ct_func), | |
|
| fDestructFunc(destruct_func),fFeedFunc(feed_func),fCollectFunc(col | | fDestructFunc(destruct_func),fFeedFunc(feed_func),fCollectFunc(col | |
| lect_func) | | lect_func), | |
| | | fCreateEnv(create_env) | |
| { | | { | |
| } | | } | |
| | | | |
| /// Generate proxy from template | | /// Generate proxy from template | |
| template <class T> static ROOT::TCollectionProxyInfo* Generate(const
T&) { | | template <class T> static ROOT::TCollectionProxyInfo* Generate(const
T&) { | |
| // Generate a TCollectionProxyInfo given a TCollectionProxyInfo::T
ype | | // Generate a TCollectionProxyInfo given a TCollectionProxyInfo::T
ype | |
| // template (used to described the behavior of the stl collection. | | // template (used to described the behavior of the stl collection. | |
| // Typical use looks like: | | // Typical use looks like: | |
| // ::ROOT::TCollectionProxyInfo::Generate(TCollectionProxyInf
o::Pushback< vector<string> >())); | | // ::ROOT::TCollectionProxyInfo::Generate(TCollectionProxyInf
o::Pushback< vector<string> >())); | |
| | | | |
| | | | |
| skipping to change at line 341 | | skipping to change at line 358 | |
| (((char*)&p->second)-((char*
)&p->first)), | | (((char*)&p->second)-((char*
)&p->first)), | |
| T::value_offset(), | | T::value_offset(), | |
| T::size, | | T::size, | |
| T::resize, | | T::resize, | |
| T::clear, | | T::clear, | |
| T::first, | | T::first, | |
| T::next, | | T::next, | |
| T::construct, | | T::construct, | |
| T::destruct, | | T::destruct, | |
| T::feed, | | T::feed, | |
|
| T::collect); | | T::collect, | |
| | | T::Env_t::Create); | |
| } | | } | |
| | | | |
| template <class T> static ROOT::TCollectionProxyInfo Get(const T&) { | | template <class T> static ROOT::TCollectionProxyInfo Get(const T&) { | |
| | | | |
| // Generate a TCollectionProxyInfo given a TCollectionProxyInfo::T
ype | | // Generate a TCollectionProxyInfo given a TCollectionProxyInfo::T
ype | |
| // template (used to described the behavior of the stl collection. | | // template (used to described the behavior of the stl collection. | |
| // Typical use looks like: | | // Typical use looks like: | |
| // ::ROOT::TCollectionProxyInfo::Get(TCollectionProxyInfo::Pu
shback< vector<string> >())); | | // ::ROOT::TCollectionProxyInfo::Get(TCollectionProxyInfo::Pu
shback< vector<string> >())); | |
| | | | |
| PairHolder<TYPENAME T::Value_t, TYPENAME T::Value_t>* p = | | PairHolder<TYPENAME T::Value_t, TYPENAME T::Value_t>* p = | |
| | | | |
| skipping to change at line 365 | | skipping to change at line 383 | |
| (((char*)&p->second)-((char*)&p-
>first)), | | (((char*)&p->second)-((char*)&p-
>first)), | |
| T::value_offset(), | | T::value_offset(), | |
| T::size, | | T::size, | |
| T::resize, | | T::resize, | |
| T::clear, | | T::clear, | |
| T::first, | | T::first, | |
| T::next, | | T::next, | |
| T::construct, | | T::construct, | |
| T::destruct, | | T::destruct, | |
| T::feed, | | T::feed, | |
|
| T::collect); | | T::collect, | |
| | | T::Env_t::Create); | |
| } | | } | |
| | | | |
| }; | | }; | |
| | | | |
| template <> struct TCollectionProxyInfo::Type<std::vector<bool> > | | template <> struct TCollectionProxyInfo::Type<std::vector<bool> > | |
| : public Address<std::vector<bool>::const_reference> | | : public Address<std::vector<bool>::const_reference> | |
| { | | { | |
| typedef std::vector<bool> Cont_t; | | typedef std::vector<bool> Cont_t; | |
| typedef std::vector<bool>::iterator Iter_t; | | typedef std::vector<bool>::iterator Iter_t; | |
| typedef std::vector<bool>::value_type Value_t; | | typedef std::vector<bool>::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; | |
| | | | |
| virtual ~Type() {} | | virtual ~Type() {} | |
| | | | |
| static inline PCont_t object(void* ptr) { | | static inline PCont_t object(void* ptr) { | |
|
| return PCont_t(PEnv_t(ptr)->object); | | return PCont_t(PEnv_t(ptr)->fObject); | |
| } | | } | |
| static void* size(void* env) { | | static void* size(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| e->size = PCont_t(e->object)->size(); | | e->fSize = PCont_t(e->fObject)->size(); | |
| return &e->size; | | return &e->fSize; | |
| } | | } | |
| static void* clear(void* env) { | | static void* clear(void* env) { | |
| object(env)->clear(); | | object(env)->clear(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* first(void* env) { | | static void* first(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| | | #if 0 | |
| // Assume iterators do not need destruction | | // Assume iterators do not need destruction | |
| ::new(e->buff) Iter_t(c->begin()); | | ::new(e->buff) Iter_t(c->begin()); | |
|
| e->size = c->size(); | | #endif | |
| | | e->fIterator = c->begin(); | |
| | | e->fSize = c->size(); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* next(void* env) { | | static void* next(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| for (; e->idx > 0 && e->iter() != c->end(); ++(e->iter()), --e->id | | for (; e->fIdx > 0 && e->iter() != c->end(); ++(e->iter()), --e->f | |
| x){ } | | Idx){ } | |
| // TODO: Need to find something for going backwards.... | | // TODO: Need to find something for going backwards.... | |
| return 0; | | return 0; | |
| } | | } | |
| static void* construct(void*) { | | static void* construct(void*) { | |
| // Nothing to construct. | | // Nothing to construct. | |
| return 0; | | return 0; | |
| } | | } | |
| static void* collect(void* env) { | | static void* collect(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); // 'start' is a buffer outside th | | PValue_t m = PValue_t(e->fStart); // 'start' is a buffer outside t | |
| e container. | | he container. | |
| for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | | for (Iter_t i=c->begin(); i != c->end(); ++i, ++m ) | |
| ::new(m) Value_t(*i); | | ::new(m) Value_t(*i); | |
| return 0; | | return 0; | |
| } | | } | |
| static void* destruct(void*) { | | static void* destruct(void*) { | |
| // Nothing to destruct. | | // Nothing to destruct. | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 439 | | skipping to change at line 461 | |
| typedef std::vector<bool> Cont_t; | | typedef std::vector<bool> Cont_t; | |
| typedef Cont_t::iterator Iter_t; | | typedef Cont_t::iterator Iter_t; | |
| typedef Cont_t::value_type Value_t; | | typedef Cont_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* resize(void* env) { | | static void* resize(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| c->resize(e->size); | | c->resize(e->fSize); | |
| e->idx = 0; | | e->fIdx = 0; | |
| return 0; | | return 0; | |
| } | | } | |
| static void* feed(void* env) { | | static void* feed(void* env) { | |
| PEnv_t e = PEnv_t(env); | | PEnv_t e = PEnv_t(env); | |
|
| PCont_t c = PCont_t(e->object); | | PCont_t c = PCont_t(e->fObject); | |
| PValue_t m = PValue_t(e->start); // Here start is actually a 'buff | | PValue_t m = PValue_t(e->fStart); // Here start is actually a 'buf | |
| er' outside the container. | | fer' outside the container. | |
| for (size_t i=0; i<e->size; ++i, ++m) | | for (size_t i=0; i<e->fSize; ++i, ++m) | |
| c->push_back(*m); | | c->push_back(*m); | |
| return 0; | | return 0; | |
| } | | } | |
| static int value_offset() { | | static int value_offset() { | |
| return 0; | | return 0; | |
| } | | } | |
| }; | | }; | |
| | | | |
| #ifndef __CINT__ | | #ifndef __CINT__ | |
| // Need specialization for boolean references due to stupid STL vector<b
ool> | | // Need specialization for boolean references due to stupid STL vector<b
ool> | |
| | | | |
End of changes. 32 change blocks. |
| 67 lines changed or deleted | | 90 lines changed or added | |
|
| TDocOutput.h | | TDocOutput.h | |
|
| // @(#)root/html:$Id: TDocOutput.h 26807 2008-12-10 17:47:42Z axel $ | | // @(#)root/html:$Id: TDocOutput.h 27562 2009-02-21 10:55:11Z axel $ | |
| // Author: Axel Naumann 2007-01-09 | | // Author: Axel Naumann 2007-01-09 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 65 | | skipping to change at line 65 | |
| void AddLink(TSubString& str, TString& link, const char* comme
nt); | | void AddLink(TSubString& str, TString& link, const char* comme
nt); | |
| void ProcessDocInDir(std::ostream& out, const char* indir, con
st char* outdir, const char* linkdir); | | void ProcessDocInDir(std::ostream& out, const char* indir, con
st char* outdir, const char* linkdir); | |
| Bool_t RunDot(const char* filename, std::ostream* outMap = 0, EG
raphvizTool gvwhat = kDot); | | Bool_t RunDot(const char* filename, std::ostream* outMap = 0, EG
raphvizTool gvwhat = kDot); | |
| void WriteHtmlHeader(std::ostream& out, const char *titleNoSpe
cial, | | void WriteHtmlHeader(std::ostream& out, const char *titleNoSpe
cial, | |
| const char* dir /*=""*/, TClass *cls /*=0
*/, | | const char* dir /*=""*/, TClass *cls /*=0
*/, | |
| const char* header); | | const char* header); | |
| void WriteHtmlFooter(std::ostream& out, const char *dir, | | void WriteHtmlFooter(std::ostream& out, const char *dir, | |
| const char *lastUpdate, const char *autho
r, | | const char *lastUpdate, const char *autho
r, | |
| const char *copyright, const char* footer
); | | const char *copyright, const char* footer
); | |
| virtual void WriteSearch(std::ostream& out); | | virtual void WriteSearch(std::ostream& out); | |
|
| | | void WriteLocation(std::ostream& out, TModuleDocInfo* module,
const char* classname = 0); | |
| void WriteModuleLinks(std::ostream& out); | | void WriteModuleLinks(std::ostream& out); | |
| void WriteModuleLinks(std::ostream& out, TModuleDocInfo* super
); | | void WriteModuleLinks(std::ostream& out, TModuleDocInfo* super
); | |
|
| void WriteTopLinks(std::ostream& out, TModuleDocInfo* module,
const char* classname = 0); | | void WriteTopLinks(std::ostream& out, TModuleDocInfo* module,
const char* classname = 0, Bool_t withLocation = kTRUE); | |
| | | | |
| public: | | public: | |
| enum EFileType { kSource, kInclude, kTree, kDoc }; | | enum EFileType { kSource, kInclude, kTree, kDoc }; | |
| | | | |
| TDocOutput(THtml& html); | | TDocOutput(THtml& html); | |
| virtual ~TDocOutput(); | | virtual ~TDocOutput(); | |
| | | | |
| virtual void AdjustSourcePath(TString& line, const char* relpath = "..
/"); | | virtual void AdjustSourcePath(TString& line, const char* relpath = "..
/"); | |
| void Convert(std::istream& in, const char* infilename, | | void Convert(std::istream& in, const char* infilename, | |
| const char* outfilename, const char *title, | | const char* outfilename, const char *title, | |
| | | | |
| skipping to change at line 113 | | skipping to change at line 114 | |
| virtual Bool_t ReferenceIsRelative(const char* reference) const; | | virtual Bool_t ReferenceIsRelative(const char* reference) const; | |
| | | | |
| virtual const char* ReplaceSpecialChars(char c); | | virtual const char* ReplaceSpecialChars(char c); | |
| void ReplaceSpecialChars(std::ostream &out, const char *string
); | | void ReplaceSpecialChars(std::ostream &out, const char *string
); | |
| void ReplaceSpecialChars(TString& text); | | void ReplaceSpecialChars(TString& text); | |
| void ReplaceSpecialChars(TString& text, Ssiz_t &pos); | | void ReplaceSpecialChars(TString& text, Ssiz_t &pos); | |
| | | | |
| virtual void WriteHtmlHeader(std::ostream &out, const char *title, con
st char* dir="", TClass *cls=0); | | virtual void WriteHtmlHeader(std::ostream &out, const char *title, con
st char* dir="", TClass *cls=0); | |
| virtual void WriteHtmlFooter(std::ostream &out, const char *dir="", co
nst char *lastUpdate="", | | virtual void WriteHtmlFooter(std::ostream &out, const char *dir="", co
nst char *lastUpdate="", | |
| const char *author="", const char *copyri
ght=""); | | const char *author="", const char *copyri
ght=""); | |
|
| | | void WriteLineNumbers(std::ostream& out, Long_t nLines, const
TString& infileBase) const; | |
| | | | |
| ClassDef(TDocOutput, 0); // generates documentation web pages | | ClassDef(TDocOutput, 0); // generates documentation web pages | |
| }; | | }; | |
| | | | |
| #endif // ROOT_TDocOutput | | #endif // ROOT_TDocOutput | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 4 lines changed or added | |
|
| TDocParser.h | | TDocParser.h | |
|
| // @(#)root/html:$Id: TDocParser.h 26807 2008-12-10 17:47:42Z axel $ | | // @(#)root/html:$Id: TDocParser.h 27531 2009-02-19 16:51:35Z axel $ | |
| // Author: Axel Naumann 2007-01-09 | | // Author: Axel Naumann 2007-01-09 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 108 | | skipping to change at line 108 | |
| TString fLineComment; // current line with links and dire
ctives for doc | | TString fLineComment; // current line with links and dire
ctives for doc | |
| TString fLineSource; // current line with links | | TString fLineSource; // current line with links | |
| TString fComment; // current comment | | TString fComment; // current comment | |
| TString fFirstClassDoc; // first class-doc found - per file, ta
ken if fLastClassDoc is empty | | TString fFirstClassDoc; // first class-doc found - per file, ta
ken if fLastClassDoc is empty | |
| TString fLastClassDoc; // last class-doc found - becomes class
doc at ClassImp or first method | | TString fLastClassDoc; // last class-doc found - becomes class
doc at ClassImp or first method | |
| TClass* fCurrentClass; // current class context of sources bei
ng parsed | | TClass* fCurrentClass; // current class context of sources bei
ng parsed | |
| TClass* fRecentClass; // recently seen class context of sourc
es being parsed, e.g. for Convert() | | TClass* fRecentClass; // recently seen class context of sourc
es being parsed, e.g. for Convert() | |
| TString fCurrentModule; // current module context of sources be
ing parsed | | TString fCurrentModule; // current module context of sources be
ing parsed | |
| TString fCurrentMethodTag;// name_idx of the currently parsed met
hod | | TString fCurrentMethodTag;// name_idx of the currently parsed met
hod | |
| Int_t fDirectiveCount; // index of directive for current metho
d | | Int_t fDirectiveCount; // index of directive for current metho
d | |
|
| | | Long_t fLineNumber; // source line number | |
| TString fCurrentFile; // current source / header file name | | TString fCurrentFile; // current source / header file name | |
| std::map<std::string /*name*/, Int_t > fMethodCounts; // current cla
ss's method names | | std::map<std::string /*name*/, Int_t > fMethodCounts; // current cla
ss's method names | |
| EDocContext fDocContext; // current context of parsed sources fo
r documenting | | EDocContext fDocContext; // current context of parsed sources fo
r documenting | |
| std::list<UInt_t> fParseContext; // current context of parsed sources | | std::list<UInt_t> fParseContext; // current context of parsed sources | |
| Bool_t fCheckForMethod; // whether to check the current line fo
r a method | | Bool_t fCheckForMethod; // whether to check the current line fo
r a method | |
| enum { | | enum { | |
| kClassDoc_Uninitialized, | | kClassDoc_Uninitialized, | |
| kClassDoc_LookingNothingFound, | | kClassDoc_LookingNothingFound, | |
| kClassDoc_LookingHaveSomething, | | kClassDoc_LookingHaveSomething, | |
| kClassDoc_Written, | | kClassDoc_Written, | |
| kClassDoc_Ignore, | | kClassDoc_Ignore, | |
| kClassDoc_NumStates | | kClassDoc_NumStates | |
| } fClassDocState; // whether we found the class description | | } fClassDocState; // whether we found the class description | |
| Bool_t fCommentAtBOL; // at the beginning of the current line
, fParseContext contained kComment | | Bool_t fCommentAtBOL; // at the beginning of the current line
, fParseContext contained kComment | |
| TString fClassDescrTag; // tag for finding the class descriptio
n | | TString fClassDescrTag; // tag for finding the class descriptio
n | |
| TString fSourceInfoTags[kNumSourceInfos]; // tags for source info
elements (copyright, last changed, author) | | TString fSourceInfoTags[kNumSourceInfos]; // tags for source info
elements (copyright, last changed, author) | |
| TList fDirectiveHandlers;// handler for doc directives (TDocDir
ective objects) | | TList fDirectiveHandlers;// handler for doc directives (TDocDir
ective objects) | |
|
| | | Bool_t fAllowDirectives; // whether directives are to be interp
reted | |
| std::set<UInt_t> fExtraLinesWithAnchor; // lines that need an additional
anchor | | std::set<UInt_t> fExtraLinesWithAnchor; // lines that need an additional
anchor | |
| TString fSourceInfo[kNumSourceInfos];// author, last changed, ... | | TString fSourceInfo[kNumSourceInfos];// author, last changed, ... | |
| TList fMethods[3]; // methods as TMethodWrapper objects (b
y access) | | TList fMethods[3]; // methods as TMethodWrapper objects (b
y access) | |
| TList fDataMembers[6]; // data members (by access, plus enums) | | TList fDataMembers[6]; // data members (by access, plus enums) | |
| | | | |
| static std::set<std::string> fgKeywords; // C++ keywords | | static std::set<std::string> fgKeywords; // C++ keywords | |
| | | | |
| void AddClassMethodsRecursively(TBaseClass* bc); | | void AddClassMethodsRecursively(TBaseClass* bc); | |
| void AddClassDataMembersRecursively(TBaseClass* bc); | | void AddClassDataMembersRecursively(TBaseClass* bc); | |
| EParseContext Context() const { return fParseContext.empty() ? kComment
: (EParseContext)(fParseContext.back() & kParseContextMask); } | | EParseContext Context() const { return fParseContext.empty() ? kComment
: (EParseContext)(fParseContext.back() & kParseContextMask); } | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 179 | |
| void Convert(std::ostream& out, std::istream& in, const char* r
elpath, | | void Convert(std::ostream& out, std::istream& in, const char* r
elpath, | |
| Bool_t isCode); | | Bool_t isCode); | |
| void DecrementMethodCount(const char* name); | | void DecrementMethodCount(const char* name); | |
| virtual void DecorateKeywords(std::ostream& out, const char* text); | | virtual void DecorateKeywords(std::ostream& out, const char* text); | |
| virtual void DecorateKeywords(TString& text); | | virtual void DecorateKeywords(TString& text); | |
| virtual void DeleteDirectiveOutput() const; | | virtual void DeleteDirectiveOutput() const; | |
| const TList* GetMethods(EAccess access) const { return &fMethods[access
]; } | | const TList* GetMethods(EAccess access) const { return &fMethods[access
]; } | |
| TClass* GetCurrentClass() const { return fCurrentClass; } | | TClass* GetCurrentClass() const { return fCurrentClass; } | |
| void GetCurrentModule(TString& out_module) const; | | void GetCurrentModule(TString& out_module) const; | |
| TDocOutput* GetDocOutput() const { return fDocOutput; } | | TDocOutput* GetDocOutput() const { return fDocOutput; } | |
|
| | | Long_t GetLineNumber() const { return fLineNumber; } | |
| const TList* GetDataMembers(EAccess access) const { return &fDataMember
s[access]; } | | const TList* GetDataMembers(EAccess access) const { return &fDataMember
s[access]; } | |
| const TList* GetEnums(EAccess access) const { return &fDataMembers[acce
ss+3]; } | | const TList* GetEnums(EAccess access) const { return &fDataMembers[acce
ss+3]; } | |
| const char* GetSourceInfo(ESourceInfo type) const { return fSourceInfo
[type]; } | | const char* GetSourceInfo(ESourceInfo type) const { return fSourceInfo
[type]; } | |
| void SetCurrentModule(const char* module) { fCurrentModule = mo
dule; } | | void SetCurrentModule(const char* module) { fCurrentModule = mo
dule; } | |
| | | | |
| UInt_t InContext(Int_t context) const; | | UInt_t InContext(Int_t context) const; | |
| static Bool_t IsName(UChar_t c); | | static Bool_t IsName(UChar_t c); | |
| static Bool_t IsWord(UChar_t c); | | static Bool_t IsWord(UChar_t c); | |
| | | | |
| virtual void Parse(std::ostream& out); | | virtual void Parse(std::ostream& out); | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| TEveCalo.h | | TEveCalo.h | |
|
| // @(#)root/eve:$Id: TEveCalo.h 26772 2008-12-09 19:57:49Z matevz $ | | // @(#)root/eve:$Id: TEveCalo.h 27157 2009-01-15 14:05:12Z brun $ | |
| // 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 70 | | skipping to change at line 70 | |
| | | | |
| Bool_t fCellIdCacheOK; // Flag cell ids cache state | | Bool_t fCellIdCacheOK; // Flag cell ids cache state | |
| | | | |
| void AssignCaloVizParameters(TEveCaloViz* cv); | | void AssignCaloVizParameters(TEveCaloViz* cv); | |
| | | | |
| void SetupColorHeight(Float_t value, Int_t slice, Float_t& height) const
; | | void SetupColorHeight(Float_t value, Int_t slice, Float_t& height) const
; | |
| | | | |
| virtual void BuildCellIdCache() = 0; | | virtual void BuildCellIdCache() = 0; | |
| | | | |
| public: | | public: | |
|
| TEveCaloViz(TEveCaloData* data=0, const Text_t* n="TEveCaloViz", const T
ext_t* t=""); | | TEveCaloViz(TEveCaloData* data=0, const char* n="TEveCaloViz", const cha
r* t=""); | |
| | | | |
| virtual ~TEveCaloViz(); | | virtual ~TEveCaloViz(); | |
| | | | |
| TEveCaloData* GetData() const { return fData; } | | TEveCaloData* GetData() const { return fData; } | |
| virtual void SetData(TEveCaloData* d); | | virtual void SetData(TEveCaloData* d); | |
| virtual void DataChanged(); | | virtual void DataChanged(); | |
| | | | |
| virtual Float_t GetValToHeight() const; | | virtual Float_t GetValToHeight() const; | |
| | | | |
| Float_t GetDataSliceThreshold(Int_t slice) const; | | Float_t GetDataSliceThreshold(Int_t slice) const; | |
| | | | |
| skipping to change at line 160 | | skipping to change at line 160 | |
| | | | |
| Bool_t fRnrEndCapFrame; | | Bool_t fRnrEndCapFrame; | |
| Bool_t fRnrBarrelFrame; | | Bool_t fRnrBarrelFrame; | |
| | | | |
| Color_t fFrameColor; | | Color_t fFrameColor; | |
| UChar_t fFrameTransparency; | | UChar_t fFrameTransparency; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
| public: | | public: | |
|
| TEveCalo3D(TEveCaloData* d=0, const Text_t* n="TEveCalo3D", const Text_t
* t="xx"); | | TEveCalo3D(TEveCaloData* d=0, const char* n="TEveCalo3D", const char* t=
"xx"); | |
| virtual ~TEveCalo3D() {} | | virtual ~TEveCalo3D() {} | |
| virtual void ComputeBBox(); | | virtual void ComputeBBox(); | |
| | | | |
| virtual Bool_t CanEditMainColor() const { return kTRUE; } | | virtual Bool_t CanEditMainColor() const { return kTRUE; } | |
| virtual Bool_t CanEditMainTransparency() const { return kTRUE; } | | virtual Bool_t CanEditMainTransparency() const { return kTRUE; } | |
| | | | |
| void SetRnrFrame(Bool_t e, Bool_t b) { fRnrEndCapFrame = e; fRnr
BarrelFrame = b; } | | void SetRnrFrame(Bool_t e, Bool_t b) { fRnrEndCapFrame = e; fRnr
BarrelFrame = b; } | |
| void GetRnrFrame(Bool_t &e, Bool_t &b) const { e = fRnrEndCapFrame; b =
fRnrBarrelFrame; } | | void GetRnrFrame(Bool_t &e, Bool_t &b) const { e = fRnrEndCapFrame; b =
fRnrBarrelFrame; } | |
| | | | |
| ClassDef(TEveCalo3D, 0); // Class for 3D visualization of calorimeter ev
ent data. | | ClassDef(TEveCalo3D, 0); // Class for 3D visualization of calorimeter ev
ent data. | |
| | | | |
| skipping to change at line 193 | | skipping to change at line 193 | |
| | | | |
| TEveProjection::EPType_e fOldProjectionType; | | TEveProjection::EPType_e fOldProjectionType; | |
| | | | |
| protected: | | protected: | |
| std::vector<TEveCaloData::vCellId_t*> fCellLists; | | std::vector<TEveCaloData::vCellId_t*> fCellLists; | |
| std::vector<Int_t> fBinIds; | | std::vector<Int_t> fBinIds; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
| public: | | public: | |
|
| TEveCalo2D(const Text_t* n="TEveCalo2D", const Text_t* t=""); | | TEveCalo2D(const char* n="TEveCalo2D", const char* t=""); | |
| virtual ~TEveCalo2D(){} | | virtual ~TEveCalo2D(){} | |
| | | | |
| virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | | virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable*
model); | |
| virtual void UpdateProjection(); | | virtual void UpdateProjection(); | |
| virtual void SetDepth(Float_t x){fDepth = x;} | | virtual void SetDepth(Float_t x){fDepth = x;} | |
| | | | |
| 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. | |
| }; | | }; | |
| | | | |
| skipping to change at line 249 | | skipping to change at line 249 | |
| 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; | |
| | | | |
| virtual void BuildCellIdCache(); | | virtual void BuildCellIdCache(); | |
| | | | |
| public: | | public: | |
|
| TEveCaloLego(TEveCaloData* data=0, const Text_t* n="TEveCaloLego", const
Text_t* 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; } | | Bool_t GetTopViewUseMaxColor() const { return fTopViewUseMaxColor; } | |
| void SetTopViewUseMaxColor(Bool_t x) { fTopViewUseMaxColor = x; } | | void SetTopViewUseMaxColor(Bool_t x) { fTopViewUseMaxColor = x; } | |
| | | | |
| Color_t GetTopViewTowerColor() const { return fTopViewTowerColor; } | | Color_t GetTopViewTowerColor() const { return fTopViewTowerColor; } | |
| void SetTopViewTowerColor(Color_t x) { fTopViewTowerColor = x; } | | void SetTopViewTowerColor(Color_t x) { fTopViewTowerColor = x; } | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| TEveCaloLegoGL.h | | TEveCaloLegoGL.h | |
|
| // @(#)root/eve:$Id: TEveCaloLegoGL.h 26250 2008-11-17 20:56:44Z matevz $ | | // @(#)root/eve:$Id: TEveCaloLegoGL.h 27370 2009-02-06 18:58:23Z matevz $ | |
| // Author: Matevz 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_TEveCaloLegoGL | | #ifndef ROOT_TEveCaloLegoGL | |
| #define ROOT_TEveCaloLegoGL | | #define ROOT_TEveCaloLegoGL | |
| | | | |
| #include "TGLObject.h" | | #include "TGLObject.h" | |
|
| #include "TEveCaloData.h" | | | |
| #include "TGLIncludes.h" | | #include "TGLIncludes.h" | |
| #include "TGLAxisPainter.h" | | #include "TGLAxisPainter.h" | |
|
| | | | |
| | | #include "TEveCaloData.h" | |
| | | #include "TEveVSDStructs.h" | |
| | | #include "TEveCalo.h" | |
| | | | |
| #include <map> | | #include <map> | |
| | | | |
| 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 TAxis* fEtaAxis; | | // axis | |
| mutable TAxis* fPhiAxis; | | mutable TAxis *fEtaAxis; | |
| mutable Int_t fBinStep; | | mutable TAxis *fPhiAxis; | |
| | | mutable TAxis *fZAxis; | |
| mutable TGLAxisAttrib fXAxisAtt; | | | |
| mutable TGLAxisAttrib fYAxisAtt; | | mutable TEveVector fXAxisTitlePos; | |
| mutable TGLAxisAttrib fZAxisAtt; | | mutable TEveVector fYAxisTitlePos; | |
| | | mutable TEveVector fZAxisTitlePos; | |
| | | mutable TEveVector fBackPlaneXConst[2]; | |
| | | mutable TEveVector fBackPlaneYConst[2]; | |
| | | | |
| | | mutable TGLAxisPainter fAxisPainter; | |
| | | mutable Int_t fBinStep; | |
| | | | |
|
| mutable TGLAxisPainter fAxisPainter; | | | |
| protected: | | protected: | |
| Int_t GetGridStep(TGLRnrCtx &rnrCtx) const; | | Int_t GetGridStep(TGLRnrCtx &rnrCtx) const; | |
|
| void SetAxis(TAxis *orig, TAxis *curr) const; | | void RebinAxis(TAxis *orig, TAxis *curr) const; | |
| | | | |
| Bool_t PhiShiftInterval(Float_t &min, Float_t &max) const; | | | |
| | | | |
|
| void DrawZScales3D(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Float_t | | void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Flo | |
| y0, Float_t y1) const; | | at_t y0, Float_t y1) const; | |
| void DrawZAxis(TGLRnrCtx &rnrCtx, Float_t azX, Float_t azY) const; | | void DrawAxis3D(TGLRnrCtx &rnrCtx) const; | |
| | | void DrawAxis2D(TGLRnrCtx &rnrCtx) const; | |
| void DrawXYScales(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Float_t | | | |
| y0, Float_t y1) const; | | | |
| void DrawHistBase(TGLRnrCtx &rnrCtx) const; | | void DrawHistBase(TGLRnrCtx &rnrCtx) const; | |
| | | | |
| void DrawCells2D() const; | | void DrawCells2D() const; | |
| | | | |
| void DrawCells3D(TGLRnrCtx & rnrCtx) const; | | void DrawCells3D(TGLRnrCtx & rnrCtx) const; | |
|
| void MakeQuad(Float_t x, Float_t y, Float_t z, | | void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw | |
| Float_t xw, Float_t yw, Float_t zh) const; | | , Float_t zh) const; | |
| void MakeDisplayList() const; | | void MakeDisplayList() const; | |
| | | | |
|
| | | void WrapTwoPi(Float_t &min, Float_t &max) const; | |
| | | | |
| | | 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; | |
| | | | |
| TEveCaloLego *fM; // Model object. | | | |
| | | | |
| 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(); | |
| | | | |
| virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; | | virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; | |
|
| | | | |
| virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } | | virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } | |
| virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & re
c); | | virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & re
c); | |
| | | | |
| ClassDef(TEveCaloLegoGL, 0); // GL renderer class for TEveCaloLego. | | ClassDef(TEveCaloLegoGL, 0); // GL renderer class for TEveCaloLego. | |
| }; | | }; | |
| | | | |
|
| | | //_________________________________________________________________________ | |
| | | _____ | |
| | | inline void TEveCaloLegoGL::WrapTwoPi(Float_t &min, Float_t &max) const | |
| | | { | |
| | | // static const Float_t pi = TMath::Pi() + 1e-6; | |
| | | if (fM->GetPhiMax()>TMath::Pi() && max<=fM->GetPhiMin()) | |
| | | { | |
| | | min += TMath::TwoPi(); | |
| | | max += TMath::TwoPi(); | |
| | | } | |
| | | else if (fM->GetPhiMin()<-TMath::Pi() && min>=fM->GetPhiMax()) | |
| | | { | |
| | | min -= TMath::TwoPi(); | |
| | | max -= TMath::TwoPi(); | |
| | | } | |
| | | | |
| | | } | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 27 lines changed or deleted | | 49 lines changed or added | |
|
| TEveElement.h | | TEveElement.h | |
|
| // @(#)root/eve:$Id: TEveElement.h 26717 2008-12-07 22:07:55Z matevz $ | | // @(#)root/eve:$Id: TEveElement.h 27577 2009-02-23 14:34: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 114 | | skipping to change at line 114 | |
| public: | | public: | |
| TEveElement(); | | TEveElement(); | |
| TEveElement(Color_t& main_color); | | TEveElement(Color_t& main_color); | |
| TEveElement(const TEveElement& e); | | TEveElement(const TEveElement& e); | |
| virtual ~TEveElement(); | | virtual ~TEveElement(); | |
| | | | |
| virtual TEveElement* CloneElement() const { return new TEveElement(*this
); } | | virtual TEveElement* CloneElement() const { return new TEveElement(*this
); } | |
| virtual TEveElement* CloneElementRecurse(Int_t level=0) const; | | virtual TEveElement* CloneElementRecurse(Int_t level=0) const; | |
| virtual void CloneChildrenRecurse(TEveElement* dest, Int_t level
=0) const; | | virtual void CloneChildrenRecurse(TEveElement* dest, Int_t level
=0) const; | |
| | | | |
|
| virtual const Text_t* GetElementName() const; | | virtual const char* GetElementName() const; | |
| virtual const Text_t* GetElementTitle() const; | | virtual const char* GetElementTitle() const; | |
| virtual void SetElementName (const Text_t* name); | | virtual void SetElementName (const char* name); | |
| virtual void SetElementTitle(const Text_t* title); | | virtual void SetElementTitle(const char* title); | |
| virtual void SetElementNameTitle(const Text_t* name, const Text_t* title | | virtual void SetElementNameTitle(const char* name, const char* title); | |
| ); | | | |
| virtual void NameTitleChanged(); | | virtual void NameTitleChanged(); | |
| | | | |
| const TString& GetVizTag() const { return fVizTag; } | | const TString& GetVizTag() const { return fVizTag; } | |
| void SetVizTag(const TString& tag) { fVizTag = tag; } | | void SetVizTag(const TString& tag) { fVizTag = tag; } | |
| | | | |
| TEveElement* GetVizModel() const { return fVizModel; } | | TEveElement* GetVizModel() const { return fVizModel; } | |
| void SetVizModel(TEveElement* model); | | void SetVizModel(TEveElement* model); | |
| Bool_t FindVizModel(); | | Bool_t FindVizModel(); | |
| | | | |
| Bool_t ApplyVizTag(const TString& tag, const TString& fallback_t
ag=""); | | Bool_t ApplyVizTag(const TString& tag, const TString& fallback_t
ag=""); | |
| | | | |
| skipping to change at line 214 | | skipping to change at line 214 | |
| | | | |
| virtual sLTI_i FindItem(TGListTree* ltree); | | virtual sLTI_i FindItem(TGListTree* ltree); | |
| virtual sLTI_i FindItem(TGListTree* ltree, | | virtual sLTI_i FindItem(TGListTree* ltree, | |
| TGListTreeItem* parent_lti); | | TGListTreeItem* parent_lti); | |
| virtual TGListTreeItem* FindListTreeItem(TGListTree* ltree); | | virtual TGListTreeItem* FindListTreeItem(TGListTree* ltree); | |
| virtual TGListTreeItem* FindListTreeItem(TGListTree* ltree, | | virtual TGListTreeItem* FindListTreeItem(TGListTree* ltree, | |
| TGListTreeItem* parent_lti); | | TGListTreeItem* parent_lti); | |
| | | | |
| virtual Int_t GetNItems() const { return fItems.size(); } | | virtual Int_t GetNItems() const { return fItems.size(); } | |
| | | | |
|
| void SpawnEditor(); // *MENU* | | void SpawnEditor(); // *MENU* | |
| virtual void ExportToCINT(Text_t* var_name); // *MENU* | | virtual void ExportToCINT(char* var_name); // *MENU* | |
| | | | |
| | | void DumpSourceObject() const; // *MENU* | |
| | | void PrintSourceObject() const; // *MENU* | |
| | | void ExportSourceObjectToCINT(char* var_name) const; // *MENU* | |
| | | | |
| virtual Bool_t AcceptElement(TEveElement* el); | | virtual Bool_t AcceptElement(TEveElement* el); | |
| | | | |
| virtual void AddElement(TEveElement* el); | | virtual void AddElement(TEveElement* el); | |
| virtual void RemoveElement(TEveElement* el); | | virtual void RemoveElement(TEveElement* el); | |
| virtual void RemoveElementLocal(TEveElement* el); | | virtual void RemoveElementLocal(TEveElement* el); | |
| virtual void RemoveElements(); | | virtual void RemoveElements(); | |
| virtual void RemoveElementsLocal(); | | virtual void RemoveElementsLocal(); | |
| | | | |
| virtual void Destroy(); // *MENU* | | virtual void Destroy(); // *MENU* | |
| | | | |
| skipping to change at line 378 | | skipping to change at line 382 | |
| | | | |
| public: | | public: | |
| TEveElementObjectPtr(TObject* obj, Bool_t own=kTRUE); | | TEveElementObjectPtr(TObject* obj, Bool_t own=kTRUE); | |
| TEveElementObjectPtr(TObject* obj, Color_t& mainColor, Bool_t own=kTRUE)
; | | TEveElementObjectPtr(TObject* obj, Color_t& mainColor, Bool_t own=kTRUE)
; | |
| TEveElementObjectPtr(const TEveElementObjectPtr& e); | | TEveElementObjectPtr(const TEveElementObjectPtr& e); | |
| virtual ~TEveElementObjectPtr(); | | virtual ~TEveElementObjectPtr(); | |
| | | | |
| virtual TEveElementObjectPtr* CloneElement() const { return new TEveElem
entObjectPtr(*this); } | | virtual TEveElementObjectPtr* CloneElement() const { return new TEveElem
entObjectPtr(*this); } | |
| | | | |
| virtual TObject* GetObject(const TEveException& eh="TEveElementObjectPtr
::GetObject ") const; | | virtual TObject* GetObject(const TEveException& eh="TEveElementObjectPtr
::GetObject ") const; | |
|
| virtual void ExportToCINT(Text_t* var_name); | | virtual void ExportToCINT(char* var_name); | |
| | | | |
| Bool_t GetOwnObject() const { return fOwnObject; } | | Bool_t GetOwnObject() const { return fOwnObject; } | |
| void SetOwnObject(Bool_t o) { fOwnObject = o; } | | void SetOwnObject(Bool_t o) { fOwnObject = o; } | |
| | | | |
| ClassDef(TEveElementObjectPtr, 0); // TEveElement with external TObject
as a holder of visualization data. | | ClassDef(TEveElementObjectPtr, 0); // TEveElement with external TObject
as a holder of visualization data. | |
| }; | | }; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| // TEveElementList | | // TEveElementList | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
| skipping to change at line 402 | | skipping to change at line 406 | |
| { | | { | |
| private: | | private: | |
| TEveElementList& operator=(const TEveElementList&); // Not implemented | | TEveElementList& operator=(const TEveElementList&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| Color_t fColor; // Color of the object. | | Color_t fColor; // Color of the object. | |
| Bool_t fDoColor; // Should serve fColor as the main color of the
object. | | Bool_t fDoColor; // Should serve fColor as the main color of the
object. | |
| TClass *fChildClass; // Class of acceptable children, others are reje
cted. | | TClass *fChildClass; // Class of acceptable children, others are reje
cted. | |
| | | | |
| public: | | public: | |
|
| TEveElementList(const Text_t* n="TEveElementList", const Text_t* t="", | | TEveElementList(const char* n="TEveElementList", const char* t="", | |
| Bool_t doColor=kFALSE); | | Bool_t doColor=kFALSE); | |
| TEveElementList(const TEveElementList& e); | | TEveElementList(const TEveElementList& e); | |
| virtual ~TEveElementList() {} | | virtual ~TEveElementList() {} | |
| | | | |
| virtual TEveElementList* CloneElement() const { return new TEveElementLi
st(*this); } | | virtual TEveElementList* CloneElement() const { return new TEveElementLi
st(*this); } | |
| | | | |
|
| virtual const Text_t* GetElementName() const { return GetName(); } | | virtual const char* GetElementName() const { return GetName(); } | |
| virtual const Text_t* GetElementTitle() const { return GetTitle(); } | | virtual const char* GetElementTitle() const { return GetTitle(); } | |
| | | | |
|
| virtual void SetElementName (const Text_t* name) | | virtual void SetElementName (const char* name) | |
| { TNamed::SetName(name); NameTitleChanged(); } | | { TNamed::SetName(name); NameTitleChanged(); } | |
| | | | |
|
| virtual void SetElementTitle(const Text_t* title) | | virtual void SetElementTitle(const char* title) | |
| { TNamed::SetTitle(title); NameTitleChanged(); } | | { TNamed::SetTitle(title); NameTitleChanged(); } | |
| | | | |
|
| virtual void SetElementNameTitle(const Text_t* name, const Text_t* title
) | | virtual void SetElementNameTitle(const char* name, const char* title) | |
| { TNamed::SetNameTitle(name, title); NameTitleChanged(); } | | { TNamed::SetNameTitle(name, title); NameTitleChanged(); } | |
| | | | |
| virtual Bool_t CanEditMainColor() const { return fDoColor; } | | virtual Bool_t CanEditMainColor() const { return fDoColor; } | |
| | | | |
| TClass* GetChildClass() const { return fChildClass; } | | TClass* GetChildClass() const { return fChildClass; } | |
| void SetChildClass(TClass* c) { fChildClass = c; } | | void SetChildClass(TClass* c) { fChildClass = c; } | |
| | | | |
| virtual Bool_t AcceptElement(TEveElement* el); | | virtual Bool_t AcceptElement(TEveElement* el); | |
| | | | |
| ClassDef(TEveElementList, 0); // List of TEveElement objects with a poss
ibility to limit the class of accepted elements. | | ClassDef(TEveElementList, 0); // List of TEveElement objects with a poss
ibility to limit the class of accepted elements. | |
| | | | |
End of changes. 9 change blocks. |
| 16 lines changed or deleted | | 19 lines changed or added | |
|
| TEvePointSet.h | | TEvePointSet.h | |
|
| // @(#)root/eve:$Id: TEvePointSet.h 26662 2008-12-04 20:25:08Z matevz $ | | // @(#)root/eve:$Id: TEvePointSet.h 27556 2009-02-20 17:38:28Z 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: | |
| TString fTitle; // Title/tooltip of the TEvePointSet. | | TString fTitle; // Title/tooltip of the TEvePointSet. | |
| TArrayI *fIntIds; // Optional array of integer ideices. | | TArrayI *fIntIds; // Optional array of integer ideices. | |
| Int_t fIntIdsPerPoint; // Number of integer indices assigned to each
point. | | Int_t fIntIdsPerPoint; // Number of integer indices assigned to each
point. | |
| | | | |
| void AssertIntIdsSize(); | | void AssertIntIdsSize(); | |
| | | | |
| public: | | public: | |
| TEvePointSet(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ); | | TEvePointSet(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ); | |
|
| TEvePointSet(const Text_t* name, Int_t n_points=0, ETreeVarType_e tv_typ
e=kTVT_XYZ); | | TEvePointSet(const char* name, Int_t n_points=0, ETreeVarType_e tv_type=
kTVT_XYZ); | |
| TEvePointSet(const TEvePointSet& e); | | TEvePointSet(const TEvePointSet& e); | |
| virtual ~TEvePointSet(); | | virtual ~TEvePointSet(); | |
| | | | |
| virtual TEvePointSet* CloneElement() const { return new TEvePointSet(*th
is); } | | virtual TEvePointSet* CloneElement() const { return new TEvePointSet(*th
is); } | |
| | | | |
|
| | | virtual void ClonePoints(const TEvePointSet& e); | |
| | | | |
| virtual void ComputeBBox(); | | virtual void ComputeBBox(); | |
| | | | |
| void Reset(Int_t n_points=0, Int_t n_int_ids=0); | | void Reset(Int_t n_points=0, Int_t n_int_ids=0); | |
| Int_t GrowFor(Int_t n_points); | | Int_t GrowFor(Int_t n_points); | |
| | | | |
|
| virtual const Text_t* GetTitle() const { return fTitle; } | | virtual const char* GetTitle() const { return fTitle; } | |
| virtual const Text_t* GetElementName() const { return TPointSet3D::Get | | virtual const char* GetElementName() const { return TPointSet3D::GetNa | |
| Name(); } | | me(); } | |
| virtual const Text_t* GetElementTitle() const { return fTitle; } | | virtual const char* GetElementTitle() const { return fTitle; } | |
| virtual void SetElementName (const Text_t* n) { fName = n; NameTitleCh | | virtual void SetElementName (const char* n) { fName = n; NameTitleChan | |
| anged(); } | | ged(); } | |
| virtual void SetTitle(const Text_t* t) { fTitle = t; NameTitleCh | | virtual void SetTitle(const char* t) { fTitle = t; NameTitleChan | |
| anged(); } | | ged(); } | |
| virtual void SetElementTitle(const Text_t* t) { fTitle = t; NameTitleCh | | virtual void SetElementTitle(const char* t) { fTitle = t; NameTitleChan | |
| anged(); } | | ged(); } | |
| virtual void SetElementNameTitle(const Text_t* n, const Text_t* t) | | virtual void SetElementNameTitle(const char* n, const char* t) | |
| { fName = n; fTitle = t; NameTitleChanged(); } | | { fName = n; fTitle = t; NameTitleChanged(); } | |
| | | | |
| Int_t GetIntIdsPerPoint() const { return fIntIdsPerPoint; } | | Int_t GetIntIdsPerPoint() const { return fIntIdsPerPoint; } | |
| Int_t* GetPointIntIds(Int_t p) const; | | Int_t* GetPointIntIds(Int_t p) const; | |
| Int_t GetPointIntId(Int_t p, Int_t i) const; | | Int_t GetPointIntId(Int_t p, Int_t i) const; | |
| | | | |
| void SetPointIntIds(Int_t* ids); | | void SetPointIntIds(Int_t* ids); | |
| void SetPointIntIds(Int_t n, Int_t* ids); | | void SetPointIntIds(Int_t n, Int_t* ids); | |
| | | | |
| virtual void SetMarkerColor(Color_t col) { SetMainColor(col); } | | virtual void SetMarkerColor(Color_t col) { SetMainColor(col); } | |
| | | | |
| skipping to change at line 123 | | skipping to change at line 125 | |
| TEvePointSet** fBins; // Pointers to subjugated TEveP
ointSet's. | | TEvePointSet** fBins; // Pointers to subjugated TEveP
ointSet'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 Text_t* name="TEvePointSetArray", const Text_t*
title=""); | | TEvePointSetArray(const char* name="TEvePointSetArray", const char* titl
e=""); | |
| virtual ~TEvePointSetArray(); | | virtual ~TEvePointSetArray(); | |
| | | | |
| virtual void RemoveElementLocal(TEveElement* el); | | virtual void RemoveElementLocal(TEveElement* el); | |
| virtual void RemoveElementsLocal(); | | virtual void RemoveElementsLocal(); | |
| | | | |
| virtual void SetMarkerColor(Color_t tcolor=1); | | virtual void SetMarkerColor(Color_t tcolor=1); | |
| virtual void SetMarkerStyle(Style_t mstyle=1); | | virtual void SetMarkerStyle(Style_t mstyle=1); | |
| virtual void SetMarkerSize(Size_t msize=1); | | virtual void SetMarkerSize(Size_t msize=1); | |
| | | | |
| virtual void TakeAction(TEvePointSelector*); | | virtual void TakeAction(TEvePointSelector*); | |
| | | | |
| virtual Int_t Size(Bool_t under=kFALSE, Bool_t over=kFALSE) const; | | virtual Int_t Size(Bool_t under=kFALSE, Bool_t over=kFALSE) const; | |
| | | | |
|
| void InitBins(const Text_t* quant_name, Int_t nbins, Double_t min, Dou
ble_t max); | | void InitBins(const char* quant_name, Int_t nbins, Double_t min, Doubl
e_t max); | |
| Bool_t Fill(Double_t x, Double_t y, Double_t z, Double_t quant); | | Bool_t Fill(Double_t x, Double_t y, Double_t z, Double_t quant); | |
| void SetPointId(TObject* id); | | void SetPointId(TObject* id); | |
| void CloseBins(); | | void CloseBins(); | |
| | | | |
| void SetOwnIds(Bool_t o); | | void SetOwnIds(Bool_t o); | |
| | | | |
| Int_t GetDefPointSetCapacity() const { return fDefPointSetCapacity; } | | Int_t GetDefPointSetCapacity() const { return fDefPointSetCapacity; } | |
| void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; } | | void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; } | |
| | | | |
| Int_t GetNBins() const { return fNBins; } | | Int_t GetNBins() const { return fNBins; } | |
| | | | |
End of changes. 6 change blocks. |
| 15 lines changed or deleted | | 17 lines changed or added | |
|
| TEveTrack.h | | TEveTrack.h | |
|
| // @(#)root/eve:$Id: TEveTrack.h 25515 2008-09-23 17:20:48Z matevz $ | | // @(#)root/eve:$Id: TEveTrack.h 27556 2009-02-20 17:38:28Z 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 | |
|
| | | 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(); | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 84 | |
| 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* rs); | |
| 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; } | |
| | | | |
| 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 ImportHits(); // *MENU* | | void SetLockPoints(Bool_t l) { fLockPoints = l; } | |
| void ImportClusters(); // *MENU* | | Bool_t GetLockPoints() const { return fLockPoints; } | |
| void ImportClustersFromIndex(); // *MENU* | | | |
| void ImportKine(); // *MENU* | | | |
| void ImportKineWithArgs(Bool_t importMother=kTRUE, Bool_t impDaugters=kT | | | |
| RUE, | | | |
| Bool_t colorPdg =kTRUE, Bool_t recurse =kT | | | |
| RUE); // *MENU* | | | |
| void PrintKineStack(); // *MENU* | | | |
| void PrintPathMarks(); // *MENU* | | | |
| | | | |
|
| //-------------------------------- | | //------------------------------------------------------------------- | |
| | | | |
| virtual void SecSelected(TEveTrack*); // *SIGNAL* | | virtual void SecSelected(TEveTrack*); // *SIGNAL* | |
| virtual void SetLineStyle(Style_t lstyle); | | virtual void SetLineStyle(Style_t lstyle); | |
| | | | |
| virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE); | | virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE); | |
| | | | |
| 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; | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 162 | |
| 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* rs=0); | |
|
| TEveTrackList(const Text_t* name, TEveTrackPropagator* rs=0); | | TEveTrackList(const char* name, TEveTrackPropagator* rs=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* rs); | |
| 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; } | |
| | | | |
| skipping to change at line 216 | | skipping to change at line 211 | |
| void SelectByP (Float_t min_p, Float_t max_p); | | void SelectByP (Float_t min_p, Float_t max_p); | |
| void SelectByP (Float_t min_p, Float_t max_p, TEveElement* el); | | void SelectByP (Float_t min_p, Float_t max_p, TEveElement* el); | |
| | | | |
| Float_t GetMinPt() const { return fMinPt; } | | Float_t GetMinPt() const { return fMinPt; } | |
| Float_t GetMaxPt() const { return fMaxPt; } | | Float_t GetMaxPt() const { return fMaxPt; } | |
| Float_t GetLimPt() const { return fLimPt; } | | Float_t GetLimPt() const { return fLimPt; } | |
| Float_t GetMinP() const { return fMinP; } | | Float_t GetMinP() const { return fMinP; } | |
| Float_t GetMaxP() const { return fMaxP; } | | Float_t GetMaxP() const { return fMaxP; } | |
| Float_t GetLimP() const { return fLimP; } | | Float_t GetLimP() const { return fLimP; } | |
| | | | |
|
| //-------------------------------- | | //------------------------------------------------------------------- | |
| | | | |
| TEveTrack* FindTrackByLabel(Int_t label); // *MENU* | | TEveTrack* FindTrackByLabel(Int_t label); // *MENU* | |
| TEveTrack* FindTrackByIndex(Int_t index); // *MENU* | | TEveTrack* FindTrackByIndex(Int_t index); // *MENU* | |
| | | | |
|
| void ImportHits(); // *MENU* | | | |
| void ImportClusters(); // *MENU* | | | |
| | | | |
| 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; | |
| | | | |
| ClassDef(TEveTrackList, 1); // A list of tracks supporting change of com
mon attributes and selection based on track parameters. | | ClassDef(TEveTrackList, 1); // A list of tracks supporting change of com
mon attributes and selection based on track parameters. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 26 lines changed or deleted | | 16 lines changed or added | |
|
| TEveTrackPropagator.h | | TEveTrackPropagator.h | |
|
| // @(#)root/eve:$Id: TEveTrackPropagator.h 26778 2008-12-09 21:56:51Z matev
z $ | | // @(#)root/eve:$Id: TEveTrackPropagator.h 27157 2009-01-15 14:05:12Z 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 48 | | skipping to change at line 48 | |
| | | | |
| virtual void PrintField(Float_t x, Float_t y, Float_t z) const | | virtual void PrintField(Float_t x, Float_t y, Float_t z) const | |
| { | | { | |
| TEveVector b = GetField(x, y, z); | | TEveVector b = GetField(x, y, z); | |
| printf("v(%f, %f, %f) B(%f, %f, %f) \n", x, y, z, b.fX, b.fY, b.fZ); | | printf("v(%f, %f, %f) B(%f, %f, %f) \n", x, y, z, b.fX, b.fY, b.fZ); | |
| } | | } | |
| | | | |
| virtual TEveVector GetField(const TEveVector &v) const { return GetField
(v.fX, v.fY, v.fZ);} | | virtual TEveVector GetField(const TEveVector &v) const { return GetField
(v.fX, v.fY, v.fZ);} | |
| virtual TEveVector GetField(Float_t x, Float_t y, Float_t z) const = 0; | | virtual TEveVector GetField(Float_t x, Float_t y, Float_t z) const = 0; | |
| | | | |
|
| virtual Float_t GetMaxFieldMag() const = 0; | | | |
| | | | |
| ClassDef(TEveMagField, 0); // Abstract interface to magnetic field | | ClassDef(TEveMagField, 0); // Abstract interface to magnetic field | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveMagFieldConst | | // TEveMagFieldConst | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveMagFieldConst : public TEveMagField | | class TEveMagFieldConst : public TEveMagField | |
| { | | { | |
| protected: | | protected: | |
| TEveVector fB; | | TEveVector fB; | |
| | | | |
| public: | | public: | |
|
| TEveMagFieldConst(Float_t x, Float_t y, Float_t z) : TEveMagField(), fB(x,
y, z) | | TEveMagFieldConst(Float_t x, Float_t y, Float_t z) : TEveMagField(), fB(
x, y, z) | |
| { fFieldConstant = kTRUE; } | | { fFieldConstant = kTRUE; } | |
| virtual ~TEveMagFieldConst() {} | | virtual ~TEveMagFieldConst() {} | |
| | | | |
| using TEveMagField::GetField; | | using TEveMagField::GetField; | |
| virtual TEveVector GetField(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/)
const { return fB; } | | virtual TEveVector GetField(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/)
const { return fB; } | |
| | | | |
|
| virtual Float_t GetMaxFieldMag() const { return fB.Mag(); } | | | |
| | | | |
| ClassDef(TEveMagFieldConst, 0); // Interface to constant magnetic field. | | ClassDef(TEveMagFieldConst, 0); // Interface to constant magnetic field. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveMagFieldDuo | | // TEveMagFieldDuo | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveMagFieldDuo : public TEveMagField | | class TEveMagFieldDuo : public TEveMagField | |
| { | | { | |
| protected: | | protected: | |
| | | | |
| skipping to change at line 98 | | skipping to change at line 94 | |
| fBIn(0,0,bIn), fBOut(0,0,bOut), fR2(r*r) | | fBIn(0,0,bIn), fBOut(0,0,bOut), fR2(r*r) | |
| { | | { | |
| fFieldConstant = kFALSE; | | fFieldConstant = kFALSE; | |
| } | | } | |
| virtual ~TEveMagFieldDuo() {} | | virtual ~TEveMagFieldDuo() {} | |
| | | | |
| using TEveMagField::GetField; | | using TEveMagField::GetField; | |
| virtual TEveVector GetField(Float_t x, Float_t y, Float_t /*z*/) const | | virtual TEveVector GetField(Float_t x, Float_t y, Float_t /*z*/) const | |
| { return ((x*x+y*y)<fR2) ? fBIn : fBOut; } | | { return ((x*x+y*y)<fR2) ? fBIn : fBOut; } | |
| | | | |
|
| virtual Float_t GetMaxFieldMag() const { return TMath::Max(fBIn.Mag() | | | |
| , fBOut.Mag()); } | | | |
| | | | |
| ClassDef(TEveMagFieldDuo, 0); // Interface to magnetic field with two di
fferent values depending of radius. | | ClassDef(TEveMagFieldDuo, 0); // Interface to magnetic field with two di
fferent values depending of radius. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveTrackPropagator | | // TEveTrackPropagator | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveTrackPropagator : public TEveElementList, | | class TEveTrackPropagator : public TEveElementList, | |
| public TEveRefBackPtr | | public TEveRefBackPtr | |
| { | | { | |
| friend class TEveTrackPropagatorSubEditor; | | friend class TEveTrackPropagatorSubEditor; | |
| | | | |
| public: | | public: | |
| struct Helix_t | | struct Helix_t | |
| { | | { | |
| Int_t fCharge; // Charge of tracked particle. | | Int_t fCharge; // Charge of tracked particle. | |
| Float_t fMinAng; // Minimal angular step between two helix points. | | Float_t fMinAng; // Minimal angular step between two helix points. | |
| Float_t fDelta; // Maximal error at the mid-point of the line conn
ecting two helix points. | | Float_t fDelta; // Maximal error at the mid-point of the line conn
ecting two helix points. | |
|
| | | Float_t fMaxStep; // Maximum allowed step size. | |
| | | Float_t fCurrentStep; | |
| | | | |
| Float_t fPhi; // Accumulated angle to check fMaxOrbs by propagat
or. | | Float_t fPhi; // Accumulated angle to check fMaxOrbs by propagat
or. | |
| Bool_t fValid; // Corner case pT~0 or B~0, possible in variable m
ag field. | | Bool_t fValid; // Corner case pT~0 or B~0, possible in variable m
ag field. | |
| | | | |
| // ---------------------------------------------------------------- | | // ---------------------------------------------------------------- | |
| | | | |
| // 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 fPlDir; // Momentum parallel to mag field. | |
|
| Float_t fTStep; // Transverse step arc-length in cm. | | Float_t fLStep; // Transverse step arc-length in cm. | |
| | | | |
| // ---------------------------------------------------------------- | | // ---------------------------------------------------------------- | |
| | | | |
| Helix_t(); | | Helix_t(); | |
| | | | |
|
| void UpdateHelix(const TEveVector & p, const TEveVector& b, Bool_t fu | | void UpdateHelix(const TEveVector & p, const TEveVector& b, Bool_t fu | |
| llUpdate, Float_t fraction = -1); | | llUpdate); | |
| void UpdateRG (const TEveVector & p, const TEveVector& b, Float_t b | | void UpdateRK (const TEveVector & p, const TEveVector& b); | |
| Max = -1, Float_t maxStep = -1); | | | |
| void Step (const TEveVector4& v, const TEveVector& p, TEveVector4& v
Out, TEveVector& pOut); | | void Step (const TEveVector4& v, const TEveVector& p, TEveVector4& v
Out, TEveVector& pOut); | |
| | | | |
|
| Float_t GetStep() { return fTStep * TMath::Sqrt(1 + fLam*fLam); } | | Float_t GetStep() { return fLStep * TMath::Sqrt(1 + fLam*fLam); } | |
| Float_t GetStep2() { return fTStep * fTStep * (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 | |
| | | | |
| protected: | | protected: | |
|
| EStepper_e fStepper; | | EStepper_e fStepper; | |
| | | | |
| TEveMagField* fMagFieldObj; | | TEveMagField* fMagFieldObj; | |
| | | | |
| // Track extrapolation limits | | // Track extrapolation limits | |
| Float_t fMaxR; // Max radius for track extrapo
lation | | Float_t fMaxR; // Max radius for track extrapo
lation | |
| Float_t fMaxZ; // Max z-coordinate for track e
xtrapolation. | | Float_t fMaxZ; // Max z-coordinate for track e
xtrapolation. | |
| Int_t fNMax; // max steps | | Int_t fNMax; // max steps | |
| // Helix limits | | // Helix limits | |
| Float_t fMaxOrbs; // Maximal angular path of trac
ks' orbits (1 ~ 2Pi). | | Float_t fMaxOrbs; // Maximal angular path of trac
ks' orbits (1 ~ 2Pi). | |
| | | | |
|
| Float_t fMaxStepRG; // Maximum step size in stepper | | | |
| RungeKuta. | | | |
| | | | |
| // Path-mark / first-vertex control | | // Path-mark / first-vertex control | |
| Bool_t fEditPathMarks; // Show widgets for path-mark c
ontrol in GUI editor. | | Bool_t fEditPathMarks; // Show widgets for path-mark c
ontrol in GUI editor. | |
| Bool_t fFitDaughters; // Pass through daughter creati
on points when extrapolating a track. | | Bool_t fFitDaughters; // Pass through daughter creati
on points when extrapolating a track. | |
| Bool_t fFitReferences; // Pass through given track-ref
erences when extrapolating a track. | | Bool_t fFitReferences; // Pass through given track-ref
erences when extrapolating a track. | |
| Bool_t fFitDecay; // Pass through decay point whe
n extrapolating a track. | | Bool_t fFitDecay; // Pass through decay point whe
n extrapolating a track. | |
| Bool_t fFitCluster2Ds; // Pass through 2D-clusters whe
n extrapolating a track. | | Bool_t fFitCluster2Ds; // Pass through 2D-clusters whe
n extrapolating a track. | |
| Bool_t fRnrDaughters; // Render daughter path-marks. | | Bool_t fRnrDaughters; // Render daughter path-marks. | |
| Bool_t fRnrReferences; // Render track-reference path-
marks. | | Bool_t fRnrReferences; // Render track-reference path-
marks. | |
| Bool_t fRnrDecay; // Render decay path-marks. | | Bool_t fRnrDecay; // Render decay path-marks. | |
| Bool_t fRnrCluster2Ds; // Render 2D-clusters. | | Bool_t fRnrCluster2Ds; // Render 2D-clusters. | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 185 | |
| 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
r &pOut, Float_t fraction); | | void Step(TEveVector4 &v, TEveVector &p, TEveVector4 &vOut, TEveVecto
r &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); | |
| | | | |
| public: | | public: | |
|
| TEveTrackPropagator(const Text_t* n="TEveTrackPropagator", const Text_t*
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 "); | |
| | | | |
| virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kF
ALSE); | | virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kF
ALSE); | |
| | | | |
| // propagation | | // propagation | |
| | | | |
| skipping to change at line 241 | | skipping to change at line 235 | |
| | | | |
| void SetMagField(Float_t bX, Float_t bY, Float_t bZ); | | void SetMagField(Float_t bX, Float_t bY, Float_t bZ); | |
| void SetMagField(Float_t b) { SetMagField(0.f, 0.f, b); } | | void SetMagField(Float_t b) { SetMagField(0.f, 0.f, b); } | |
| void SetMagFieldObj(TEveMagField * x); | | void SetMagFieldObj(TEveMagField * x); | |
| | | | |
| void SetMaxR(Float_t x); | | void SetMaxR(Float_t x); | |
| void SetMaxZ(Float_t x); | | void SetMaxZ(Float_t x); | |
| void SetMaxOrbs(Float_t x); | | void SetMaxOrbs(Float_t x); | |
| void SetMinAng(Float_t x); | | void SetMinAng(Float_t x); | |
| void SetDelta(Float_t x); | | void SetDelta(Float_t x); | |
|
| | | void SetMaxStep(Float_t x); | |
| | | | |
| void SetEditPathMarks(Bool_t x) { fEditPathMarks = x; } | | void SetEditPathMarks(Bool_t x) { fEditPathMarks = x; } | |
| void SetRnrDaughters(Bool_t x); | | void SetRnrDaughters(Bool_t x); | |
| void SetRnrReferences(Bool_t x); | | void SetRnrReferences(Bool_t x); | |
| void SetRnrDecay(Bool_t x); | | void SetRnrDecay(Bool_t x); | |
| void SetRnrCluster2Ds(Bool_t x); | | void SetRnrCluster2Ds(Bool_t x); | |
| void SetFitDaughters(Bool_t x); | | void SetFitDaughters(Bool_t x); | |
| void SetFitReferences(Bool_t x); | | void SetFitReferences(Bool_t x); | |
| void SetFitDecay(Bool_t x); | | void SetFitDecay(Bool_t x); | |
| void SetFitCluster2Ds(Bool_t x); | | void SetFitCluster2Ds(Bool_t x); | |
| | | | |
| skipping to change at line 263 | | skipping to change at line 258 | |
| TEveVector GetMagField(Float_t x, Float_t y, Float_t z) { return fMagFie
ldObj->GetField(x, y, z); } | | TEveVector GetMagField(Float_t x, Float_t y, Float_t z) { return fMagFie
ldObj->GetField(x, y, z); } | |
| void PrintMagField(Float_t x, Float_t y, Float_t z) const; | | void PrintMagField(Float_t x, Float_t y, Float_t z) const; | |
| | | | |
| EStepper_e GetStepper() const { return fStepper;} | | EStepper_e GetStepper() const { return fStepper;} | |
| | | | |
| Float_t GetMaxR() const { return fMaxR; } | | Float_t GetMaxR() const { return fMaxR; } | |
| Float_t GetMaxZ() const { return fMaxZ; } | | Float_t GetMaxZ() const { return fMaxZ; } | |
| Float_t GetMaxOrbs() const { return fMaxOrbs; } | | Float_t GetMaxOrbs() const { return fMaxOrbs; } | |
| Float_t GetMinAng() const { return fH.fMinAng; } | | Float_t GetMinAng() const { return fH.fMinAng; } | |
| Float_t GetDelta() const { return fH.fDelta; } | | Float_t GetDelta() const { return fH.fDelta; } | |
|
| | | Float_t GetMaxStep() const { return fH.fMaxStep; } | |
| | | | |
| Bool_t GetEditPathMarks() const { return fEditPathMarks; } | | Bool_t GetEditPathMarks() const { return fEditPathMarks; } | |
| Bool_t GetRnrDaughters() const { return fRnrDaughters; } | | Bool_t GetRnrDaughters() const { return fRnrDaughters; } | |
| Bool_t GetRnrReferences() const { return fRnrReferences; } | | Bool_t GetRnrReferences() const { return fRnrReferences; } | |
| Bool_t GetRnrDecay() const { return fRnrDecay; } | | Bool_t GetRnrDecay() const { return fRnrDecay; } | |
| Bool_t GetRnrCluster2Ds() const { return fRnrCluster2Ds; } | | Bool_t GetRnrCluster2Ds() const { return fRnrCluster2Ds; } | |
| Bool_t GetFitDaughters() const { return fFitDaughters; } | | Bool_t GetFitDaughters() const { return fFitDaughters; } | |
| Bool_t GetFitReferences() const { return fFitReferences; } | | Bool_t GetFitReferences() const { return fFitReferences; } | |
| Bool_t GetFitDecay() const { return fFitDecay; } | | Bool_t GetFitDecay() const { return fFitDecay; } | |
| Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; } | | Bool_t GetFitCluster2Ds() const { return fFitCluster2Ds; } | |
| | | | |
End of changes. 15 change blocks. |
| 22 lines changed or deleted | | 15 lines changed or added | |
|
| TEveWindow.h | | TEveWindow.h | |
|
| // @(#)root/eve:$Id: TEveWindow.h 26873 2008-12-12 12:58:21Z matevz $ | | // @(#)root/eve:$Id: TEveWindow.h 27157 2009-01-15 14:05:12Z brun $ | |
| // 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 | |
| | | | |
| static UInt_t fgMainFrameDefWidth; | | static UInt_t fgMainFrameDefWidth; | |
| static UInt_t fgMainFrameDefHeight; | | static UInt_t fgMainFrameDefHeight; | |
| | | | |
| static Pixel_t fgCurrentBackgroundColor; | | static Pixel_t fgCurrentBackgroundColor; | |
| static Pixel_t fgMiniBarBackgroundColor; | | static Pixel_t fgMiniBarBackgroundColor; | |
| | | | |
| virtual void PreDeleteElement(); | | virtual void PreDeleteElement(); | |
| | | | |
| public: | | public: | |
|
| TEveWindow(const Text_t* n="TEveWindow", const Text_t* t=""); | | TEveWindow(const char* n="TEveWindow", const char* t=""); | |
| virtual ~TEveWindow(); | | virtual ~TEveWindow(); | |
| | | | |
| virtual void NameTitleChanged(); | | virtual void NameTitleChanged(); | |
| | | | |
| virtual TGFrame* GetGUIFrame() = 0; | | virtual TGFrame* GetGUIFrame() = 0; | |
| virtual void PreUndock(); | | virtual void PreUndock(); | |
| virtual void PostDock(); | | virtual void PostDock(); | |
| | | | |
| virtual Bool_t CanMakeNewSlots() const { return kFALSE; } | | virtual Bool_t CanMakeNewSlots() const { return kFALSE; } | |
| virtual TEveWindowSlot* NewSlot() { return 0; } | | virtual TEveWindowSlot* NewSlot() { return 0; } | |
| | | | |
| skipping to change at line 292 | | skipping to change at line 292 | |
| TEveWindowSlot(const TEveWindowSlot&); // Not implemented | | TEveWindowSlot(const TEveWindowSlot&); // Not implemented | |
| TEveWindowSlot& operator=(const TEveWindowSlot&); // Not implemented | | TEveWindowSlot& operator=(const TEveWindowSlot&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TGTextButton *fEmptyButt; | | TGTextButton *fEmptyButt; | |
| TGCompositeFrame *fEmbedBuffer; | | TGCompositeFrame *fEmbedBuffer; | |
| | | | |
| virtual void SetCurrent(Bool_t curr); | | virtual void SetCurrent(Bool_t curr); | |
| | | | |
| public: | | public: | |
|
| TEveWindowSlot(const Text_t* n="TEveWindowSlot", const Text_t* t=""); | | TEveWindowSlot(const char* n="TEveWindowSlot", const char* t=""); | |
| virtual ~TEveWindowSlot(); | | virtual ~TEveWindowSlot(); | |
| | | | |
| virtual TGFrame* GetGUIFrame(); | | virtual TGFrame* GetGUIFrame(); | |
| | | | |
| TEveWindowPack* MakePack(); // *MENU* | | TEveWindowPack* MakePack(); // *MENU* | |
| TEveWindowTab* MakeTab(); // *MENU* | | TEveWindowTab* MakeTab(); // *MENU* | |
| | | | |
| TEveWindowFrame* MakeFrame(TGFrame* frame=0); | | TEveWindowFrame* MakeFrame(TGFrame* frame=0); | |
| | | | |
| TGCompositeFrame* StartEmbedding(); | | TGCompositeFrame* StartEmbedding(); | |
|
| TEveWindowFrame* StopEmbedding(const Text_t* name=0); | | TEveWindowFrame* StopEmbedding(const char* name=0); | |
| | | | |
| ClassDef(TEveWindowSlot, 0); // An unoccupied eve-window slot. | | ClassDef(TEveWindowSlot, 0); // An unoccupied eve-window slot. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| // TEveWindowFrame | | // TEveWindowFrame | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| class TEveWindowFrame : public TEveWindow | | class TEveWindowFrame : public TEveWindow | |
| { | | { | |
| private: | | private: | |
| TEveWindowFrame(const TEveWindowFrame&); // Not implemented | | TEveWindowFrame(const TEveWindowFrame&); // Not implemented | |
| TEveWindowFrame& operator=(const TEveWindowFrame&); // Not implemented | | TEveWindowFrame& operator=(const TEveWindowFrame&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TGFrame *fGUIFrame; | | TGFrame *fGUIFrame; | |
| | | | |
| public: | | public: | |
|
| TEveWindowFrame(TGFrame* frame, const Text_t* n="TEveWindowFrame", const
Text_t* t=""); | | TEveWindowFrame(TGFrame* frame, const char* n="TEveWindowFrame", const c
har* t=""); | |
| virtual ~TEveWindowFrame(); | | virtual ~TEveWindowFrame(); | |
| | | | |
| virtual TGFrame* GetGUIFrame() { return fGUIFrame; } | | virtual TGFrame* GetGUIFrame() { return fGUIFrame; } | |
| | | | |
| TGCompositeFrame* GetGUICompositeFrame(); | | TGCompositeFrame* GetGUICompositeFrame(); | |
| | | | |
| ClassDef(TEveWindowFrame, 0); // Eve-window containing any TGFrame. | | ClassDef(TEveWindowFrame, 0); // Eve-window containing any TGFrame. | |
| }; | | }; | |
| | | | |
| //=========================================================================
===== | | //=========================================================================
===== | |
| | | | |
| skipping to change at line 346 | | skipping to change at line 346 | |
| class TEveWindowPack : public TEveWindow | | class TEveWindowPack : public TEveWindow | |
| { | | { | |
| private: | | private: | |
| TEveWindowPack(const TEveWindowPack&); // Not implemented | | TEveWindowPack(const TEveWindowPack&); // Not implemented | |
| TEveWindowPack& operator=(const TEveWindowPack&); // Not implemented | | TEveWindowPack& operator=(const TEveWindowPack&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TGPack *fPack; | | TGPack *fPack; | |
| | | | |
| public: | | public: | |
|
| TEveWindowPack(TGPack* p, const Text_t* n="TEveWindowPack", const Text_t
* t=""); | | TEveWindowPack(TGPack* p, const char* n="TEveWindowPack", const char* t=
""); | |
| virtual ~TEveWindowPack(); | | virtual ~TEveWindowPack(); | |
| | | | |
| virtual TGFrame* GetGUIFrame(); | | virtual TGFrame* GetGUIFrame(); | |
| | | | |
| virtual Bool_t CanMakeNewSlots() const { return kTRUE; } | | virtual Bool_t CanMakeNewSlots() const { return kTRUE; } | |
| virtual TEveWindowSlot* NewSlot(); // *MENU* | | virtual TEveWindowSlot* NewSlot(); // *MENU* | |
| | | | |
| void FlipOrientation(); // *MENU* | | void FlipOrientation(); // *MENU* | |
| void SetVertical(Bool_t x=kTRUE); | | void SetVertical(Bool_t x=kTRUE); | |
| void SetHorizontal() { SetVertical(kFALSE); } | | void SetHorizontal() { SetVertical(kFALSE); } | |
| | | | |
| skipping to change at line 379 | | skipping to change at line 379 | |
| class TEveWindowTab : public TEveWindow | | class TEveWindowTab : public TEveWindow | |
| { | | { | |
| private: | | private: | |
| TEveWindowTab(const TEveWindowTab&); // Not implemented | | TEveWindowTab(const TEveWindowTab&); // Not implemented | |
| TEveWindowTab& operator=(const TEveWindowTab&); // Not implemented | | TEveWindowTab& operator=(const TEveWindowTab&); // Not implemented | |
| | | | |
| protected: | | protected: | |
| TGTab *fTab; | | TGTab *fTab; | |
| | | | |
| public: | | public: | |
|
| TEveWindowTab(TGTab* tab, const Text_t* n="TEveWindowTab", const Text_t*
t=""); | | TEveWindowTab(TGTab* tab, const char* n="TEveWindowTab", const char* t="
"); | |
| virtual ~TEveWindowTab(); | | virtual ~TEveWindowTab(); | |
| | | | |
| virtual TGFrame* GetGUIFrame(); | | virtual TGFrame* GetGUIFrame(); | |
| | | | |
| virtual Bool_t CanMakeNewSlots() const { return kTRUE; } | | virtual Bool_t CanMakeNewSlots() const { return kTRUE; } | |
| virtual TEveWindowSlot* NewSlot(); // *MENU* | | virtual TEveWindowSlot* NewSlot(); // *MENU* | |
| | | | |
| TGTab* GetTab() const { return fTab; } | | TGTab* GetTab() const { return fTab; } | |
| | | | |
| ClassDef(TEveWindowTab, 0); // Eve-window containing a TGTab. | | ClassDef(TEveWindowTab, 0); // Eve-window containing a TGTab. | |
| | | | |
End of changes. 7 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| TGLAxisPainter.h | | TGLAxisPainter.h | |
|
| // @(#)root/eve:$Id: TGLAxisPainter.h 26367 2008-11-21 18:08:30Z matevz $ | | // @(#)root/eve:$Id: TGLAxisPainter.h 27342 2009-02-03 20:25:20Z matevz $ | |
| // Author: Matevz Tadel 2007 | | // 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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOT_TGLAxisPainter | | #ifndef ROOT_TGLAxisPainter | |
| #define ROOT_TGLAxisPainter | | #define ROOT_TGLAxisPainter | |
| | | | |
|
| #include "TAttAxis.h" | | | |
| #include "TGLUtil.h" | | #include "TGLUtil.h" | |
|
| #include "TString.h" | | | |
| #include "TGLFontManager.h" | | #include "TGLFontManager.h" | |
| | | | |
|
| | | class TAttAxis; | |
| | | class TAxis; | |
| class TGLRnrCtx; | | class TGLRnrCtx; | |
|
| class TGLFont; | | | |
| | | | |
|
| class TGLAxisAttrib: public TAttAxis | | class TGLAxisPainter | |
| { | | { | |
|
| friend class TGLAxisPainter; | | | |
| | | | |
| protected: | | | |
| TGLVector3 fDir; | | | |
| Double_t fMin; | | | |
| Double_t fMax; | | | |
| | | | |
| Float_t fTMScale[3]; | | | |
| TGLVector3 fTMOff[3]; | | | |
| Int_t fTMNDim; | | | |
| | | | |
| TGLFont::ETextAlign_e fTextAlign; | | | |
| | | | |
| Bool_t fRelativeFontSize; | | | |
| Int_t fAbsLabelFontSize; | | | |
| Int_t fAbsTitleFontSize; | | | |
| | | | |
| TString fLabelFontName; | | | |
| TString fTitleFontName; | | | |
| | | | |
| TString fTitle; | | | |
| TString fTitleUnits; | | | |
| TGLVector3 fTitlePos; | | | |
| | | | |
| public: | | public: | |
|
| TGLAxisAttrib(); | | typedef std::pair <Float_t, Float_t> Lab_t; // label <pos, value> pa | |
| virtual ~TGLAxisAttrib(){} | | ir | |
| | | typedef std::vector<Lab_t> LabVec_t; | |
| // Getters && Setters | | typedef std::pair <Float_t, Int_t> TM_t; // tick-mark <pos, order | |
| | | > pair | |
| TGLVector3& RefDir() { return fDir; } | | typedef std::vector<TM_t> TMVec_t; // vector od tick line | |
| void SetRng(Double_t min, Double_t max) { fMin=min; fMax=max;} | | s | |
| void GetRng(Double_t &min, Double_t &max) {min=fMin; max=fMax;} | | | |
| | | | |
| TGLVector3& RefTMOff(Int_t i) { return fTMOff[i]; } | | | |
| void SetTMNDim(Int_t i) {fTMNDim=i;} | | | |
| Int_t GetTMNDim() {return fTMNDim;} | | | |
| | | | |
| void SetTextAlign(TGLFont::ETextAlign_e a) {fTextAlign=a;} | | | |
| TGLFont::ETextAlign_e GetTextAlign() const { return fTextAlign;} | | | |
| | | | |
|
| void SetRelativeFontSize(Bool_t x) { fRelativeFontSize=x; } | | private: | |
| Bool_t GetRelativeFontSize() const {return fRelativeFontSize;} | | TGLAxisPainter(const TGLAxisPainter&); // Not implemented | |
| | | TGLAxisPainter& operator=(const TGLAxisPainter&); // Not implemented | |
| | | | |
|
| void SetAbsLabelFontSize(Int_t fs) {fAbsLabelFontSize=fs;} | | // Print format derived from attributers. | |
| Int_t GetAbsLabelFontSize()const {return fAbsLabelFontSize;} | | Int_t fExp; | |
| void SetAbsTitleFontSize(Int_t fs) {fAbsTitleFontSize=fs;} | | Int_t fMaxDigits; | |
| Int_t GetAbsTitleFontSize() const {return fAbsTitleFontSize;} | | Int_t fDecimals; | |
| | | char fFormat[8]; | |
| | | | |
| | | // Font derived from axis attributes. | |
| | | TGLFont fLabelFont; | |
| | | TGLFont fTitleFont; | |
| | | | |
|
| void SetLabelFontName(const char* name) { fLabelFontName = name; } | | // Print format. | |
| const char* GetLabelFontName() const {return fLabelFontName.Data();} | | void LabelsLimits(const char *label, Int_t &first, Int_t &last) const; | |
| void SetTitleFontName(const char* name) { fTitleFontName = name; } | | void FormAxisValue(Float_t x, char* lab) const; | |
| const char* GetTitleFontName() const {return fTitleFontName.Data();} | | | |
| | | | |
|
| void SetTitle(const char* title) {fTitle = title;} | | protected: | |
| const char* GetTitle() const {return fTitle.Data();} | | TAttAxis *fAttAxis; // Model. | |
| | | LabVec_t fLabVec; // List of Labels position-value pairs | |
| | | TMVec_t fTMVec; // List of tick-mark position-value pairs | |
| | | | |
| | | // | |
| | | // Additional axis attributes required for GL rendering: | |
| | | | |
| | | // Orientation | |
| | | TGLVector3 fDir; | |
| | | TGLVector3 fTMOff[3]; | |
| | | Int_t fTMNDim; | |
| | | | |
| | | // Font. | |
| | | Bool_t fUseRelativeFontSize; | |
| | | Int_t fAbsoluteLabelFontSize; | |
| | | Int_t fAbsoluteTitleFontSize; | |
| | | | |
|
| void SetTitleUnits(const char* un) {fTitleUnits = un;} | | // Labels options. Allready exist in TAttAxis, but can't be set. | |
| const char* GetTitleUnits() const {return fTitleUnits.Data();} | | TGLFont::ETextAlign_e fLabelAlign; | |
| | | | |
|
| TGLVector3& RefTitlePos() {return fTitlePos;} | | public: | |
| | | TGLAxisPainter(); | |
| | | virtual ~TGLAxisPainter(); | |
| | | | |
|
| // override TAttAxis function | | // GetSets. | |
| virtual void SetNdivisions(Int_t n, Bool_t /*optim*/=kTRUE) { fNd | | Int_t GetTMNDim() const { return fTMNDim; } | |
| ivisions =n; } | | void SetTMNDim(Int_t x) { fTMNDim = x; } | |
| | | | |
|
| ClassDef(TGLAxisAttrib, 0); // GL axis attributes. | | TGLVector3& RefDir() { return fDir; } | |
| }; | | TGLVector3& RefTMOff(Int_t i) { return fTMOff[i]; } | |
| | | | |
|
| /************************************************************************** | | Bool_t GetUseRelativeFontSize() const { return fUseRelativeFontSiz | |
| / | | e; } | |
| | | void SetUseRelativeFontSize( Bool_t x ) { fUseRelativeFontSize = | |
| | | x; } | |
| | | | |
|
| class TGLAxisPainter | | void SetAbsoluteLabelFontSize(Int_t fs) { fAbsoluteLabelFontSize | |
| { | | =fs; } | |
| private: | | Int_t GetAbsoluteLabelFontSize() const { return fAbsoluteLabelFon | |
| TGLAxisPainter(const TGLAxisPainter&); // Not implemented | | tSize; } | |
| TGLAxisPainter& operator=(const TGLAxisPainter&); // Not implemented | | | |
| | | | |
|
| protected: | | void SetAbsoluteTitleFontSize(Int_t fs) { fAbsoluteTitleFontSize | |
| void DrawTick(TGLVector3 &tv, Int_t order) const; | | =fs; } | |
| | | Int_t GetAbsoluteTitleFontSize() const { return fAbsoluteTitleFon | |
| | | tSize; } | |
| | | | |
|
| void RnrText(const char* txt, TGLVector3 pos, TGLFont &font) const; | | TGLFont::ETextAlign_e GetLabelAlign() const { return fLabelAlign; } | |
| void LabelsLimits(const char *label, Int_t &first, Int_t &last) const; | | void SetLabelAlign(TGLFont::ETextAlign_e x) { fLabelAlign = x; } | |
| | | | |
|
| TGLAxisAttrib* fAtt; | | LabVec_t& RefLabVec() { return fLabVec; } | |
| | | TMVec_t& RefTMVec() { return fTMVec; } | |
| | | | |
|
| Int_t fMaxDigits; | | void SetAttAxis(TAttAxis* a) { fAttAxis = a; } | |
| Int_t fDecimals; // cached | | TAttAxis* GetAttAxis() { return fAttAxis; } | |
| char fFormat[8]; // cached | | | |
| Int_t fExp; //cached | | | |
| | | | |
|
| public: | | // Utility. | |
| TGLAxisPainter(); | | void SetLabelFont(TGLRnrCtx &rnrCtx, Double_t refLength = -1); | |
| virtual ~TGLAxisPainter() {} | | void SetTitleFont(TGLRnrCtx &rnrCtx, Double_t refLength = -1); | |
| | | void SetTextFormat(Double_t min, Double_t max, Double_t binWidth); | |
| | | | |
|
| void Paint(TGLRnrCtx& ctx, TGLAxisAttrib &atrib); | | // Renderers. | |
| | | void RnrTitle(const char* title, Float_t pos, TGLFont::ETextAlign_e alig | |
| | | n) const; | |
| | | void RnrLabels() const; | |
| | | void RnrLines() const; | |
| | | | |
|
| void SetTextFormat(Double_t binWidth); | | void PaintAxis(TGLRnrCtx& ctx, TAxis* ax); | |
| void SetAxisAtt(TGLAxisAttrib* axa){ fAtt = axa; } | | | |
| void FormAxisValue(Float_t x, char* lab) const; | | | |
| | | | |
| ClassDef(TGLAxisPainter, 0); // GL axis painter. | | ClassDef(TGLAxisPainter, 0); // GL axis painter. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 26 change blocks. |
| 94 lines changed or deleted | | 88 lines changed or added | |
|
| TGLFontManager.h | | TGLFontManager.h | |
|
| // @(#)root/gl:$Id: TGLFontManager.h 26772 2008-12-09 19:57:49Z matevz $ | | // @(#)root/gl:$Id: TGLFontManager.h 27564 2009-02-21 12:37:20Z matevz $ | |
| // Author: Olivier Couet 12/04/2007 | | // Author: Olivier Couet 12/04/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 67 | | skipping to change at line 67 | |
| Int_t GetSize() const { return fSize;} | | Int_t GetSize() const { return fSize;} | |
| Int_t GetFile() const { return fFile;} | | Int_t GetFile() const { return fFile;} | |
| EMode GetMode() const { return fMode;} | | EMode GetMode() const { return fMode;} | |
| | | | |
| Int_t GetTrashCount() const { return fTrashCount; } | | Int_t GetTrashCount() const { return fTrashCount; } | |
| void SetTrashCount(Int_t c) const { fTrashCount = c; } | | void SetTrashCount(Int_t c) const { fTrashCount = c; } | |
| Int_t IncTrashCount() const { return ++fTrashCount; } | | Int_t IncTrashCount() const { return ++fTrashCount; } | |
| | | | |
| void SetFont(FTFont *f) { fFont =f;} | | void SetFont(FTFont *f) { fFont =f;} | |
| const FTFont* GetFont() const { return fFont; } | | const FTFont* GetFont() const { return fFont; } | |
|
| void SetManager(TGLFontManager *mng) {fManager = mng;} | | void SetManager(TGLFontManager *mng) { fManager = mng; } | |
| const TGLFontManager* GetManager() const { return fManager; } | | const TGLFontManager* GetManager() const { return fManager; } | |
| | | | |
|
| Float_t GetDepth() const { return fDepth;} | | Float_t GetDepth() const { return fDepth; } | |
| void SetDepth(Float_t d) { fDepth = d; } | | void SetDepth(Float_t d) { fDepth = d; } | |
| | | | |
| // FTGL wrapper functions | | // FTGL wrapper functions | |
|
| void BBox(const Text_t* txt, | | Float_t GetAscent() const; | |
| Float_t& llx, Float_t& lly, Float_t& llz, | | Float_t GetDescent() const; | |
| Float_t& urx, Float_t& ury, Float_t& urz) const; | | Float_t GetLineHeight() const; | |
| | | void MeasureBaseLineParams(Float_t& ascent, Float_t& descent, Float_t | |
| | | & line_height, | |
| | | const char* txt="Xj") const; | |
| | | | |
| | | void BBox(const char* txt, | |
| | | Float_t& llx, Float_t& lly, Float_t& llz, | |
| | | Float_t& urx, Float_t& ury, Float_t& urz) const; | |
| | | | |
|
| void Render(const Text_t* txt) const; | | void Render(const char* txt) const; | |
| void RenderBitmap(const Text_t* txt, Float_t x, Float_t y, Float_t zs, | | void RenderBitmap(const char* txt, Float_t x, Float_t y, Float_t zs, ET | |
| ETextAlign_e align) const; | | extAlign_e align) 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 134 | | skipping to change at line 140 | |
| static TObjArray fgFontFileArray; // map font-id to ttf-font-fi
le | | static TObjArray fgFontFileArray; // map font-id to ttf-font-fi
le | |
| static FontSizeVec_t fgFontSizeArray; // map of valid font-size | | static FontSizeVec_t fgFontSizeArray; // map of valid font-size | |
| static Bool_t fgStaticInitDone; // global initialization flag | | static Bool_t fgStaticInitDone; // global initialization flag | |
| static void InitStatics(); | | static void InitStatics(); | |
| | | | |
| public: | | public: | |
| 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 Text_t* name, TGLFont::EMode mode,
TGLFont& 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, Int_t min = -1, Int_t m
ax = -1); | | static Int_t GetFontSize(Float_t ds, Int_t min = -1, Int_t m
ax = -1); | |
| static const char* GetFontNameFromId(Int_t); | | static const char* GetFontNameFromId(Int_t); | |
| | | | |
| void ClearFontTrash(); | | void ClearFontTrash(); | |
| | | | |
| | | | |
End of changes. 6 change blocks. |
| 11 lines changed or deleted | | 18 lines changed or added | |
|
| TGLTF3Painter.h | | TGLTF3Painter.h | |
| #ifndef ROOT_TGLTF3Painter | | #ifndef ROOT_TGLTF3Painter | |
| #define ROOT_TGLTF3Painter | | #define ROOT_TGLTF3Painter | |
| | | | |
| #include <vector> | | #include <vector> | |
| #include <list> | | #include <list> | |
| | | | |
| #ifndef ROOT_TGLPlotPainter | | #ifndef ROOT_TGLPlotPainter | |
| #include "TGLPlotPainter.h" | | #include "TGLPlotPainter.h" | |
| #endif | | #endif | |
|
| | | #ifndef ROOT_TGLIsoMesh | |
| | | #include "TGLIsoMesh.h" | |
| | | #endif | |
| #ifndef ROOT_TGLUtil | | #ifndef ROOT_TGLUtil | |
| #include "TGLUtil.h" | | #include "TGLUtil.h" | |
| #endif | | #endif | |
| | | | |
| class TGLOrthoCamera; | | class TGLOrthoCamera; | |
| class TF3; | | class TF3; | |
| | | | |
|
| | | /* | |
| | | Draw TF3 using marching cubes. | |
| | | */ | |
| | | | |
| class TGLTF3Painter : public TGLPlotPainter { | | class TGLTF3Painter : public TGLPlotPainter { | |
| private: | | private: | |
| enum ETF3Style { | | enum ETF3Style { | |
| kDefault, | | kDefault, | |
| kMaple0, | | kMaple0, | |
| kMaple1, | | kMaple1, | |
| kMaple2 | | kMaple2 | |
| }; | | }; | |
| | | | |
| ETF3Style fStyle; | | ETF3Style fStyle; | |
| | | | |
|
| public: | | Rgl::Mc::TIsoMesh<Double_t> fMesh; | |
| struct TriFace_t { | | | |
| TGLVertex3 fXYZ[3]; | | | |
| TGLVector3 fNormals[3]; | | | |
| }; | | | |
| | | | |
| private: | | | |
| std::vector<TriFace_t> fMesh; | | | |
| TF3 *fF3; | | TF3 *fF3; | |
| | | | |
| TGLTH3Slice fXOZSlice; | | TGLTH3Slice fXOZSlice; | |
| TGLTH3Slice fYOZSlice; | | TGLTH3Slice fYOZSlice; | |
| TGLTH3Slice fXOYSlice; | | TGLTH3Slice fXOYSlice; | |
| | | | |
| public: | | public: | |
| TGLTF3Painter(TF3 *fun, TH1 *hist, TGLOrthoCamera *camera, TGLPlotCoordi
nates *coord, | | TGLTF3Painter(TF3 *fun, TH1 *hist, TGLOrthoCamera *camera, TGLPlotCoordi
nates *coord, | |
| TGLPaintDevice *dev = 0); | | TGLPaintDevice *dev = 0); | |
| | | | |
| char *GetPlotInfo(Int_t px, Int_t py); | | char *GetPlotInfo(Int_t px, Int_t py); | |
| Bool_t InitGeometry(); | | Bool_t InitGeometry(); | |
| void StartPan(Int_t px, Int_t py); | | void StartPan(Int_t px, Int_t py); | |
| void Pan(Int_t px, Int_t py); | | void Pan(Int_t px, Int_t py); | |
| void AddOption(const TString &stringOption); | | void AddOption(const TString &stringOption); | |
| void ProcessEvent(Int_t event, Int_t px, Int_t py); | | void ProcessEvent(Int_t event, Int_t px, Int_t py); | |
| | | | |
| private: | | private: | |
| void InitGL()const; | | void InitGL()const; | |
| void DrawPlot()const; | | void DrawPlot()const; | |
|
| | | // | |
| | | void DrawToSelectionBuffer()const; | |
| | | void DrawDefaultPlot()const; | |
| | | void DrawMaplePlot()const; | |
| | | // | |
| | | | |
| void SetSurfaceColor()const; | | void SetSurfaceColor()const; | |
| Bool_t HasSections()const; | | Bool_t HasSections()const; | |
| | | | |
| void DrawSectionXOZ()const; | | void DrawSectionXOZ()const; | |
| void DrawSectionYOZ()const; | | void DrawSectionYOZ()const; | |
| void DrawSectionXOY()const; | | void DrawSectionXOY()const; | |
| | | | |
| ClassDef(TGLTF3Painter, 0) // GL TF3 painter. | | ClassDef(TGLTF3Painter, 0) // GL TF3 painter. | |
| }; | | }; | |
| | | | |
| /* | | /* | |
| Iso painter draws iso surfaces - "gliso" option for TH3XXX::Draw. | | Iso painter draws iso surfaces - "gliso" option for TH3XXX::Draw. | |
| Can be one-level iso (as standard non-gl "iso" option), | | Can be one-level iso (as standard non-gl "iso" option), | |
| or multi-level iso: equidistant contours (if you only specify | | or multi-level iso: equidistant contours (if you only specify | |
| number of contours, or at user defined levels). | | number of contours, or at user defined levels). | |
| */ | | */ | |
| | | | |
| class TGLIsoPainter : public TGLPlotPainter { | | class TGLIsoPainter : public TGLPlotPainter { | |
|
| public: | | | |
| //Triangle face of iso mesh. | | | |
| struct TriFace_t { | | | |
| TGLVertex3 fXYZ[3]; | | | |
| TGLVector3 fNormal;//Flat normal. | | | |
| TGLVector3 fPerVertexNormals[3];//Smoothed normals for each vertex. | | | |
| }; | | | |
| //Each of cubes (marching-cubes) has a | | | |
| //corresponding set of triangles in a mesh, possibly empty. | | | |
| //fFirst is the number of the first triangle, | | | |
| //fLast is the end of the range (excluded). | | | |
| struct Range_t { | | | |
| Range_t() : fFirst(-1), fLast(0) | | | |
| { | | | |
| } | | | |
| Range_t(Int_t f, Int_t l) : fFirst(f), fLast(l) | | | |
| { | | | |
| } | | | |
| Int_t fFirst; | | | |
| Int_t fLast; | | | |
| }; | | | |
| struct Mesh_t { | | | |
| //std::vector<Range_t> fBoxRanges; | | | |
| std::vector<TriFace_t> fMesh; | | | |
| void Swap(Mesh_t &rhs) | | | |
| { | | | |
| //std::swap(fBoxRanges, rhs.fBoxRanges); | | | |
| std::swap(fMesh, rhs.fMesh); | | | |
| } | | | |
| }; | | | |
| | | | |
| private: | | private: | |
|
| TGLTH3Slice fXOZSlice; | | typedef Rgl::Mc::TIsoMesh<Float_t> Mesh_t; | |
| TGLTH3Slice fYOZSlice; | | | |
| TGLTH3Slice fXOYSlice; | | | |
| | | | |
| Mesh_t fDummyMesh; | | | |
| | | | |
| typedef std::list<Mesh_t> MeshList_t; | | typedef std::list<Mesh_t> MeshList_t; | |
| typedef std::list<Mesh_t>::iterator MeshIter_t; | | typedef std::list<Mesh_t>::iterator MeshIter_t; | |
| typedef std::list<Mesh_t>::const_iterator ConstMeshIter_t; | | typedef std::list<Mesh_t>::const_iterator ConstMeshIter_t; | |
| | | | |
|
| | | TGLTH3Slice fXOZSlice; | |
| | | TGLTH3Slice fYOZSlice; | |
| | | TGLTH3Slice fXOYSlice; | |
| | | | |
| | | Mesh_t fDummyMesh; | |
| //List of meshes. | | //List of meshes. | |
|
| MeshList_t fIsos; | | MeshList_t fIsos; | |
| //Cheched meshes (will be used if geometry must be rebuilt | | //Cached meshes (will be used if geometry must be rebuilt | |
| //after TPad::PaintModified) | | //after TPad::PaintModified) | |
|
| MeshList_t fCache; | | MeshList_t fCache; | |
| //Min and max bin contents. | | //Min and max bin contents. | |
|
| Rgl::Range_t fMinMax; | | Rgl::Range_t fMinMax; | |
| //Palette. One color per iso-surface. | | //Palette. One color per iso-surface. | |
|
| TGLLevelPalette fPalette; | | TGLLevelPalette fPalette; | |
| //Iso levels. Equidistant or user-defined. | | //Iso levels. Equidistant or user-defined. | |
|
| std::vector<Double_t> fColorLevels; | | std::vector<Double_t> fColorLevels; | |
| | | | |
| //Now meshes are initialized only once. | | //Now meshes are initialized only once. | |
| //To be changed in future. | | //To be changed in future. | |
|
| Bool_t fInit; | | Bool_t fInit; | |
| | | | |
| public: | | public: | |
| TGLIsoPainter(TH1 *hist, TGLOrthoCamera *camera, TGLPlotCoordinates *coo
rd, | | TGLIsoPainter(TH1 *hist, TGLOrthoCamera *camera, TGLPlotCoordinates *coo
rd, | |
| TGLPaintDevice *dev = 0); | | TGLPaintDevice *dev = 0); | |
|
| | | | |
| //TGLPlotPainter final-overriders. | | //TGLPlotPainter final-overriders. | |
| char *GetPlotInfo(Int_t px, Int_t py); | | char *GetPlotInfo(Int_t px, Int_t py); | |
| Bool_t InitGeometry(); | | Bool_t InitGeometry(); | |
| void StartPan(Int_t px, Int_t py); | | void StartPan(Int_t px, Int_t py); | |
| void Pan(Int_t px, Int_t py); | | void Pan(Int_t px, Int_t py); | |
| void AddOption(const TString &option); | | void AddOption(const TString &option); | |
| void ProcessEvent(Int_t event, Int_t px, Int_t py); | | void ProcessEvent(Int_t event, Int_t px, Int_t py); | |
| | | | |
| private: | | private: | |
| //TGLPlotPainter final-overriders. | | //TGLPlotPainter final-overriders. | |
| void InitGL()const; | | void InitGL()const; | |
| void DrawPlot()const; | | void DrawPlot()const; | |
| void DrawSectionXOZ()const; | | void DrawSectionXOZ()const; | |
| void DrawSectionYOZ()const; | | void DrawSectionYOZ()const; | |
| void DrawSectionXOY()const; | | void DrawSectionXOY()const; | |
| //Auxiliary methods. | | //Auxiliary methods. | |
| Bool_t HasSections()const; | | Bool_t HasSections()const; | |
| void SetSurfaceColor(Int_t ind)const; | | void SetSurfaceColor(Int_t ind)const; | |
| void SetMesh(Mesh_t &mesh, Double_t isoValue); | | void SetMesh(Mesh_t &mesh, Double_t isoValue); | |
| void DrawMesh(const Mesh_t &mesh, Int_t level)const; | | void DrawMesh(const Mesh_t &mesh, Int_t level)const; | |
|
| void CheckBox(const std::vector<TriFace_t> &mesh, TriFace_t &face, c
onst Range_t &box); | | | |
| void FindMinMax(); | | void FindMinMax(); | |
| | | | |
| TGLIsoPainter(const TGLIsoPainter &); | | TGLIsoPainter(const TGLIsoPainter &); | |
| TGLIsoPainter &operator = (const TGLIsoPainter &); | | TGLIsoPainter &operator = (const TGLIsoPainter &); | |
| | | | |
| ClassDef(TGLIsoPainter, 0) // Iso option for TH3. | | ClassDef(TGLIsoPainter, 0) // Iso option for TH3. | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 15 change blocks. |
| 55 lines changed or deleted | | 26 lines changed or added | |
|
| TGLViewer.h | | TGLViewer.h | |
|
| // @(#)root/gl:$Id: TGLViewer.h 26849 2008-12-11 21:39:15Z matevz $ | | // @(#)root/gl:$Id: TGLViewer.h 27577 2009-02-23 14:34:36Z 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 105 | | skipping to change at line 105 | |
| TGLManipSet *fSelectedPShapeRef; //! | | TGLManipSet *fSelectedPShapeRef; //! | |
| // Overlay | | // Overlay | |
| TGLOverlayElement *fCurrentOvlElm; //! current overlay element | | TGLOverlayElement *fCurrentOvlElm; //! current overlay element | |
| TGLOvlSelectRecord fOvlSelRec; //! select record from last
overlay select | | TGLOvlSelectRecord fOvlSelRec; //! select record from last
overlay select | |
| | | | |
| TGEventHandler *fEventHandler; //! event handler | | TGEventHandler *fEventHandler; //! event handler | |
| | | | |
| // Mouse ineraction | | // Mouse ineraction | |
| public: | | public: | |
| enum EPushAction { kPushStd, | | enum EPushAction { kPushStd, | |
|
| kPushCamCenter }; | | kPushCamCenter, kPushAnnotate }; | |
| enum EDragAction { kDragNone, | | enum EDragAction { kDragNone, | |
| kDragCameraRotate, kDragCameraTruck, kDragCameraDol
ly, | | kDragCameraRotate, kDragCameraTruck, kDragCameraDol
ly, | |
| kDragOverlay }; | | kDragOverlay }; | |
| protected: | | protected: | |
| 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) | |
| | | | |
| skipping to change at line 221 | | skipping to change at line 221 | |
| 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, | |
| Double_t center[3], Double_t hRotate, Double_t
vRotate); | | Double_t center[3], Double_t hRotate, Double_t
vRotate); | |
| void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol
ly, | | void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dol
ly, | |
| Double_t center[3], Double_t hRotate, Double_t
vRotate); | | Double_t center[3], Double_t hRotate, Double_t
vRotate); | |
| void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re
ferenceOn, Double_t* referencePos) const; | | void GetGuideState(Int_t & axesType, Bool_t & axesDepthTest, Bool_t & re
ferenceOn, Double_t* referencePos) const; | |
| void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenc
eOn, const Double_t* referencePos); | | void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenc
eOn, const Double_t* referencePos); | |
| void SetDrawCameraCenter(Bool_t x); | | void SetDrawCameraCenter(Bool_t x); | |
| Bool_t GetDrawCameraCenter() { return fDrawCameraCenter; } | | Bool_t GetDrawCameraCenter() { return fDrawCameraCenter; } | |
| void PickCameraCenter() { fPushAction = kPushCamCenter; RefreshPadE
ditor(this); } | | void PickCameraCenter() { fPushAction = kPushCamCenter; RefreshPadE
ditor(this); } | |
|
| | | void PickAnnotate() { fPushAction = kPushAnnotate; RefreshPadE
ditor(this); } | |
| TGLCameraOverlay* GetCameraOverlay() const { return fCameraOverlay; } | | TGLCameraOverlay* GetCameraOverlay() const { return fCameraOverlay; } | |
| void SetCameraOverlay(TGLCameraOverlay* m) { fCameraOverlay = m; } | | void SetCameraOverlay(TGLCameraOverlay* m) { fCameraOverlay = m; } | |
| | | | |
| EPushAction GetPushAction() const { return fPushAction; } | | EPushAction GetPushAction() const { return fPushAction; } | |
| EDragAction GetDragAction() const { return fDragAction; } | | EDragAction GetDragAction() const { return fDragAction; } | |
| | | | |
| const TGLPhysicalShape * GetSelected() const; | | const TGLPhysicalShape * GetSelected() const; | |
| | | | |
| // Draw and selection | | // Draw and selection | |
| | | | |
| | | | |
| skipping to change at line 286 | | skipping to change at line 287 | |
| virtual void MouseOver(TGLPhysicalShape*); // *SIGNAL* | | virtual void MouseOver(TGLPhysicalShape*); // *SIGNAL* | |
| virtual void MouseOver(TGLPhysicalShape*, UInt_t state); // *SIGNAL* | | virtual void MouseOver(TGLPhysicalShape*, UInt_t state); // *SIGNAL* | |
| virtual void Activated() { Emit("Activated()"); } // *SIGNAL* | | virtual void Activated() { Emit("Activated()"); } // *SIGNAL* | |
| virtual void Clicked(TObject *obj); //*SIGNAL* | | virtual void Clicked(TObject *obj); //*SIGNAL* | |
| virtual void Clicked(TObject *obj, UInt_t button, UInt_t state); //*SIGN
AL* | | virtual void Clicked(TObject *obj, UInt_t button, UInt_t state); //*SIGN
AL* | |
| virtual void DoubleClicked() { Emit("DoubleClicked()"); } // *SIGNAL* | | virtual void DoubleClicked() { Emit("DoubleClicked()"); } // *SIGNAL* | |
| | | | |
| TGEventHandler *GetEventHandler() const { return fEventHandler; } | | TGEventHandler *GetEventHandler() const { return fEventHandler; } | |
| virtual void SetEventHandler(TGEventHandler *handler); | | virtual void SetEventHandler(TGEventHandler *handler); | |
| | | | |
|
| | | virtual void RemoveOverlayElement(TGLOverlayElement* el); | |
| | | | |
| TGLSelectRecord& GetSelRec() { return fSelRec; } | | TGLSelectRecord& GetSelRec() { return fSelRec; } | |
| TGLOvlSelectRecord& GetOvlSelRec() { return fOvlSelRec; } | | TGLOvlSelectRecord& GetOvlSelRec() { return fOvlSelRec; } | |
| TGLOverlayElement* GetCurrentOvlElm() const { return fCurrentOvlElm; } | | TGLOverlayElement* GetCurrentOvlElm() const { return fCurrentOvlElm; } | |
| void ClearCurrentOvlElm(); | | void ClearCurrentOvlElm(); | |
| | | | |
| ClassDef(TGLViewer,0) // Standard ROOT GL viewer. | | ClassDef(TGLViewer,0) // Standard ROOT GL viewer. | |
| }; | | }; | |
| | | | |
| // TODO: Find a better place/way to do this | | // TODO: Find a better place/way to do this | |
| class TGLRedrawTimer : public TTimer | | class TGLRedrawTimer : public TTimer | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| TGenCollectionProxy.h | | TGenCollectionProxy.h | |
|
| // @(#)root/io:$Id: TGenCollectionProxy.h 25450 2008-09-18 21:13:42Z pcanal
$ | | // @(#)root/io:$Id: TGenCollectionProxy.h 27255 2009-01-27 10:59:53Z pcanal
$ | |
| // Author: Markus Frank 28/10/04 | | // Author: Markus Frank 28/10/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. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| #ifndef ROOT_TGenCollectionProxy | | #ifndef ROOT_TGenCollectionProxy | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 204 | |
| */ | | */ | |
| struct Method { | | struct Method { | |
| typedef void* (*Call_t)(void*); | | typedef void* (*Call_t)(void*); | |
| Call_t call; | | Call_t call; | |
| Method() : call(0) { } | | Method() : call(0) { } | |
| Method(Call_t c) : call(c) { } | | Method(Call_t c) : call(c) { } | |
| Method(const Method& m) : call(m.call) { } | | Method(const Method& m) : call(m.call) { } | |
| void* invoke(void* obj) const { return (*call)(obj); } | | void* invoke(void* obj) const { return (*call)(obj); } | |
| }; | | }; | |
| | | | |
|
| | | /** @class TGenCollectionProxy::Method TGenCollectionProxy.h TGenCollect | |
| | | ionProxy.h | |
| | | * | |
| | | * Small helper to execute (compiler) generated function for the | |
| | | * access to STL or other containers. | |
| | | * | |
| | | * @author M.Frank | |
| | | * @version 1.0 | |
| | | * @date 10/10/2004 | |
| | | */ | |
| | | struct Method0 { | |
| | | typedef void* (*Call_t)(); | |
| | | Call_t call; | |
| | | Method0() : call(0) { } | |
| | | Method0(Call_t c) : call(c) { } | |
| | | Method0(const Method0& m) : call(m.call) { } | |
| | | void* invoke() const { return (*call)(); } | |
| | | }; | |
| | | | |
| protected: | | protected: | |
| typedef ROOT::TCollectionProxyInfo::Environ<char[64]> Env_t; | | typedef ROOT::TCollectionProxyInfo::Environ<char[64]> Env_t; | |
|
| typedef std::vector<Env_t*> Proxies_t; | | typedef ROOT::TCollectionProxyInfo::EnvironBase EnvironBase_t; | |
| | | typedef std::vector<EnvironBase_t*> Proxies_t; | |
| | | | |
| std::string fName; // Name of the class being proxied. | | std::string fName; // Name of the class being proxied. | |
| Bool_t fPointers; // Flag to indicate if containee has pointers
(key or value) | | Bool_t fPointers; // Flag to indicate if containee has pointers
(key or value) | |
| Method fClear; // Method cache for container accessors: clear
container | | Method fClear; // Method cache for container accessors: clear
container | |
| Method fSize; // Container accessors: size of container | | Method fSize; // Container accessors: size of container | |
| Method fResize; // Container accessors: resize container | | Method fResize; // Container accessors: resize container | |
| Method fFirst; // Container accessors: generic iteration: fir
st | | Method fFirst; // Container accessors: generic iteration: fir
st | |
| Method fNext; // Container accessors: generic iteration: nex
t | | Method fNext; // Container accessors: generic iteration: nex
t | |
| Method fConstruct; // Container accessors: block construct | | Method fConstruct; // Container accessors: block construct | |
| Method fDestruct; // Container accessors: block destruct | | Method fDestruct; // Container accessors: block destruct | |
| Method fFeed; // Container accessors: block feed | | Method fFeed; // Container accessors: block feed | |
| Method fCollect; // Method to collect objects from container | | Method fCollect; // Method to collect objects from container | |
|
| | | Method0 fCreateEnv; // Method to allocate an Environment holder. | |
| Value* fValue; // Descriptor of the container value type | | Value* fValue; // Descriptor of the container value type | |
| Value* fVal; // Descriptor of the Value_type | | Value* fVal; // Descriptor of the Value_type | |
| Value* fKey; // Descriptor of the key_type | | Value* fKey; // Descriptor of the key_type | |
|
| Env_t* fEnv; // Address of the currently proxied object | | EnvironBase_t*fEnv; // Address of the currently proxied object | |
| int fValOffset; // Offset from key to value (in maps) | | int fValOffset; // Offset from key to value (in maps) | |
| int fValDiff; // Offset between two consecutive value_types
(memory layout). | | int fValDiff; // Offset between two consecutive value_types
(memory layout). | |
| Proxies_t fProxyList; // Stack of recursive proxies | | Proxies_t fProxyList; // Stack of recursive proxies | |
| Proxies_t fProxyKept; // Optimization: Keep proxies once they were c
reated | | Proxies_t fProxyKept; // Optimization: Keep proxies once they were c
reated | |
| int fSTL_type; // STL container type | | int fSTL_type; // STL container type | |
| Info_t fTypeinfo; // Type information | | Info_t fTypeinfo; // Type information | |
| TClass* fOnFileClass; // On file class | | TClass* fOnFileClass; // On file class | |
| | | | |
| // Late initialization of collection proxy | | // Late initialization of collection proxy | |
| TGenCollectionProxy* Initialize() const; | | TGenCollectionProxy* Initialize() const; | |
| | | | |
End of changes. 5 change blocks. |
| 3 lines changed or deleted | | 24 lines changed or added | |
|
| TGeoShape.h | | TGeoShape.h | |
|
| // @(#)root/geom:$Id: TGeoShape.h 24870 2008-07-17 16:30:58Z brun $ | | // @(#)root/geom:$Id: TGeoShape.h 27466 2009-02-17 12:53:37Z brun $ | |
| // Author: Andrei Gheata 31/01/02 | | // Author: Andrei Gheata 31/01/02 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * 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 | |
| // TGeoShape - base class for geometric shapes. Provides virtual methods /
/ | | // TGeoShape - base class for geometric shapes. Provides virtual methods /
/ | |
| // for point and segment classification that has to be implemented by /
/ | | // for point and segment classification that has to be implemented by /
/ | |
| // all classes inheriting from it. /
/ | | // all classes inheriting from it. /
/ | |
| // /
/ | | // /
/ | |
| ///////////////////////////////////////////////////////////////////////////
/ | | ///////////////////////////////////////////////////////////////////////////
/ | |
| | | | |
| class TGeoShape : public TNamed | | class TGeoShape : public TNamed | |
| { | | { | |
| private: | | private: | |
| static TGeoMatrix *fgTransform; // current transformation matrix th
at applies to shape | | static TGeoMatrix *fgTransform; // current transformation matrix th
at applies to shape | |
|
| | | static Double_t fgEpsMch; // Machine round-off error | |
| public: | | public: | |
| enum EShapeType { | | enum EShapeType { | |
| kBitMask32 = 0xffffffff, | | kBitMask32 = 0xffffffff, | |
| kGeoNoShape = 0, | | kGeoNoShape = 0, | |
| kGeoBad = BIT(0), | | kGeoBad = BIT(0), | |
| kGeoRSeg = BIT(1), | | kGeoRSeg = BIT(1), | |
| kGeoPhiSeg = BIT(2), | | kGeoPhiSeg = BIT(2), | |
| kGeoThetaSeg = BIT(3), | | kGeoThetaSeg = BIT(3), | |
| kGeoVisX = BIT(4), | | kGeoVisX = BIT(4), | |
| kGeoVisY = BIT(5), | | kGeoVisY = BIT(5), | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 100 | |
| TGeoShape(); | | TGeoShape(); | |
| TGeoShape(const char *name); | | TGeoShape(const char *name); | |
| // destructor | | // destructor | |
| virtual ~TGeoShape(); | | virtual ~TGeoShape(); | |
| // methods | | // methods | |
| | | | |
| static Double_t Big() {return 1.E30;} | | static Double_t Big() {return 1.E30;} | |
| static TGeoMatrix *GetTransform(); | | static TGeoMatrix *GetTransform(); | |
| static void SetTransform(TGeoMatrix *matrix); | | static void SetTransform(TGeoMatrix *matrix); | |
| static Double_t Tolerance() {return 1.E-10;} | | static Double_t Tolerance() {return 1.E-10;} | |
|
| | | static Double_t ComputeEpsMch(); | |
| | | static Double_t EpsMch(); | |
| virtual Double_t Capacity() const = 0; | | virtual Double_t Capacity() const = 0; | |
| virtual void ComputeBBox() = 0; | | virtual void ComputeBBox() = 0; | |
| virtual void ComputeNormal(Double_t *point, Double_t *dir, Doub
le_t *norm) = 0; | | virtual void ComputeNormal(Double_t *point, Double_t *dir, Doub
le_t *norm) = 0; | |
| virtual Bool_t Contains(Double_t *point) const = 0; | | virtual Bool_t Contains(Double_t *point) const = 0; | |
| virtual Bool_t CouldBeCrossed(Double_t *point, Double_t *dir) con
st = 0; | | virtual Bool_t CouldBeCrossed(Double_t *point, Double_t *dir) con
st = 0; | |
| virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) = 0; | | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) = 0; | |
| virtual Double_t DistFromInside(Double_t *point, Double_t *dir, Int
_t iact=1, | | virtual Double_t DistFromInside(Double_t *point, Double_t *dir, Int
_t iact=1, | |
| Double_t step=TGeoShape::Big(), Double_t
*safe=0) const = 0; | | Double_t step=TGeoShape::Big(), Double_t
*safe=0) const = 0; | |
| virtual Double_t DistFromOutside(Double_t *point, Double_t *dir, In
t_t iact=1, | | virtual Double_t DistFromOutside(Double_t *point, Double_t *dir, In
t_t iact=1, | |
| Double_t step=TGeoShape::Big(), Double_t
*safe=0) const = 0; | | Double_t step=TGeoShape::Big(), Double_t
*safe=0) const = 0; | |
| | | | |
| skipping to change at line 132 | | skipping to change at line 135 | |
| Int_t GetId() const {return fShapeId;} | | Int_t GetId() const {return fShapeId;} | |
| virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix
*mat) const = 0; | | virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix
*mat) const = 0; | |
| virtual void GetMeshNumbers(Int_t &/*nvert*/, Int_t &/*nsegs*/,
Int_t &/*npols*/) const {;} | | virtual void GetMeshNumbers(Int_t &/*nvert*/, Int_t &/*nsegs*/,
Int_t &/*npols*/) const {;} | |
| virtual const char *GetName() const; | | virtual const char *GetName() const; | |
| virtual Int_t GetNmeshVertices() const {return 0;} | | virtual Int_t GetNmeshVertices() const {return 0;} | |
| char *GetPointerName() const; | | char *GetPointerName() const; | |
| virtual Bool_t IsComposite() const {return kFALSE;} | | virtual Bool_t IsComposite() const {return kFALSE;} | |
| virtual Bool_t IsCylType() const = 0; | | virtual Bool_t IsCylType() const = 0; | |
| static Bool_t IsCloseToPhi(Double_t epsil, Double_t *point, Doub
le_t c1, Double_t s1, Double_t c2, Double_t s2); | | static Bool_t IsCloseToPhi(Double_t epsil, Double_t *point, Doub
le_t c1, Double_t s1, Double_t c2, Double_t s2); | |
| static Bool_t IsCrossingSemiplane(Double_t *point, Double_t *dir
, Double_t cphi, Double_t sphi, Double_t &snext, Double_t &rxy); | | static Bool_t IsCrossingSemiplane(Double_t *point, Double_t *dir
, Double_t cphi, Double_t sphi, Double_t &snext, Double_t &rxy); | |
|
| | | static Bool_t IsSegCrossing(Double_t x1, Double_t y1, Double_t x
2, Double_t y2,Double_t x3, Double_t y3,Double_t x4, Double_t y4); | |
| static Bool_t IsInPhiRange(Double_t *point, Double_t phi1, Doubl
e_t phi2); | | static Bool_t IsInPhiRange(Double_t *point, Double_t phi1, Doubl
e_t phi2); | |
| virtual Bool_t IsReflected() const {return kFALSE;} | | virtual Bool_t IsReflected() const {return kFALSE;} | |
| Bool_t IsRunTimeShape() const {return TestShapeBit(kGeoRu
nTimeShape);} | | Bool_t IsRunTimeShape() const {return TestShapeBit(kGeoRu
nTimeShape);} | |
| Bool_t IsValid() const {return !TestShapeBit(kGeoInvalidS
hape);} | | Bool_t IsValid() const {return !TestShapeBit(kGeoInvalidS
hape);} | |
| virtual Bool_t IsValidBox() const = 0; | | virtual Bool_t IsValidBox() const = 0; | |
| virtual void InspectShape() const = 0; | | virtual void InspectShape() const = 0; | |
| virtual TBuffer3D *MakeBuffer3D() const {return 0;} | | virtual TBuffer3D *MakeBuffer3D() const {return 0;} | |
| static void NormalPhi(Double_t *point, Double_t *dir, Double_t
*norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2); | | static void NormalPhi(Double_t *point, Double_t *dir, Double_t
*norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2); | |
| virtual void Paint(Option_t *option=""); | | virtual void Paint(Option_t *option=""); | |
| virtual Double_t Safety(Double_t *point, Bool_t in=kTRUE) const = 0
; | | virtual Double_t Safety(Double_t *point, Bool_t in=kTRUE) const = 0
; | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| TH2.h | | TH2.h | |
|
| // @(#)root/hist:$Id: TH2.h 25487 2008-09-22 12:44:13Z moneta $ | | // @(#)root/hist:$Id: TH2.h 27184 2009-01-19 16:14:21Z 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 43 | | skipping to change at line 43 | |
| class TProfile; | | class TProfile; | |
| | | | |
| class TH2 : public TH1 { | | class TH2 : public TH1 { | |
| | | | |
| protected: | | protected: | |
| Double_t fScalefactor; //Scale factor | | Double_t fScalefactor; //Scale factor | |
| 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 | |
| | | | |
|
| virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not | | | |
| use | | | |
| virtual Int_t BufferFill(Double_t x, Double_t y, Double_t w); | | | |
| virtual TH1D *DoProjection(bool onX, const char *name, Int_t firstbi | | | |
| n, Int_t lastbin, Option_t *option) const; | | | |
| virtual TProfile *DoProfile(bool onX, const char *name, Int_t firstbin, | | | |
| Int_t lastbin, Option_t *option) const; | | | |
| virtual void DoFitSlices(bool onX, TF1 *f1, Int_t firstbin, Int_t l | | | |
| astbin, Int_t cut, Option_t *option, TObjArray* arr); | | | |
| | | | |
| public: | | | |
| TH2(); | | TH2(); | |
| TH2(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | | TH2(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | |
| ,Int_t nbinsy,Double_t ylow,Double
_t yup); | | ,Int_t nbinsy,Double_t ylow,Double
_t yup); | |
| TH2(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | | TH2(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | |
| ,Int_t nbinsy,Double_t ylow,Double
_t yup); | | ,Int_t nbinsy,Double_t ylow,Double
_t yup); | |
| TH2(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | | TH2(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | |
| ,Int_t nbinsy,const Double_t *ybin
s); | | ,Int_t nbinsy,const Double_t *ybin
s); | |
| TH2(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | | TH2(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | |
| ,Int_t nbinsy,const Double_t *ybin
s); | | ,Int_t nbinsy,const Double_t *ybin
s); | |
| TH2(const char *name,const char *title,Int_t nbinsx,const Float_t *xbin
s | | TH2(const char *name,const char *title,Int_t nbinsx,const Float_t *xbin
s | |
| ,Int_t nbinsy,const Float_t *ybin
s); | | ,Int_t nbinsy,const Float_t *ybin
s); | |
|
| | | | |
| | | virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not | |
| | | use | |
| | | virtual Int_t BufferFill(Double_t x, Double_t y, Double_t w); | |
| | | virtual TH1D *DoProjection(bool onX, const char *name, Int_t firstbi | |
| | | n, Int_t lastbin, Option_t *option) const; | |
| | | virtual TProfile *DoProfile(bool onX, const char *name, Int_t firstbin, | |
| | | Int_t lastbin, Option_t *option) const; | |
| | | virtual void DoFitSlices(bool onX, TF1 *f1, Int_t firstbin, Int_t l | |
| | | astbin, Int_t cut, Option_t *option, TObjArray* arr); | |
| | | | |
| | | public: | |
| TH2(const TH2&); | | TH2(const TH2&); | |
| virtual ~TH2(); | | virtual ~TH2(); | |
| virtual Int_t BufferEmpty(Int_t action=0); | | virtual Int_t BufferEmpty(Int_t action=0); | |
| virtual void Copy(TObject &hnew) const; | | virtual void Copy(TObject &hnew) const; | |
| Int_t Fill(Double_t) {return -1;} //MayNotUse | | Int_t Fill(Double_t) {return -1;} //MayNotUse | |
| Int_t Fill(const char*, Double_t) {return -1;} //MayNotUse | | Int_t Fill(const char*, Double_t) {return -1;} //MayNotUse | |
| virtual Int_t Fill(Double_t x, Double_t y); | | virtual Int_t Fill(Double_t x, Double_t y); | |
| virtual Int_t Fill(Double_t x, Double_t y, Double_t w); | | virtual Int_t Fill(Double_t x, Double_t y, Double_t w); | |
| virtual Int_t Fill(Double_t x, const char *namey, Double_t w); | | virtual Int_t Fill(Double_t x, const char *namey, Double_t w); | |
| virtual Int_t Fill(const char *namex, Double_t y, Double_t w); | | virtual Int_t Fill(const char *namex, Double_t y, Double_t w); | |
| | | | |
End of changes. 3 change blocks. |
| 12 lines changed or deleted | | 13 lines changed or added | |
|
| TH3.h | | TH3.h | |
|
| // @(#)root/hist:$Id: TH3.h 25433 2008-09-17 15:02:18Z brun $ | | // @(#)root/hist:$Id: TH3.h 27184 2009-01-19 16:14:21Z 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 44 | | skipping to change at line 44 | |
| | | | |
| 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 | |
| Double_t fTsumwxz; //Total Sum of weight*X*Z | | Double_t fTsumwxz; //Total Sum of weight*X*Z | |
| Double_t fTsumwyz; //Total Sum of weight*Y*Z | | Double_t fTsumwyz; //Total Sum of weight*Y*Z | |
| | | | |
|
| virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not u | | | |
| se | | | |
| virtual Int_t BufferFill(Double_t, Double_t, Double_t) {return -2;} / | | | |
| /may not use | | | |
| virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t | | | |
| w); | | | |
| | | | |
| public: | | | |
| TH3(); | | TH3(); | |
| TH3(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | | TH3(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double
_t xup | |
| ,Int_t nbinsy,Double_t ylow,Double_t yup | | ,Int_t nbinsy,Double_t ylow,Double_t yup | |
| ,Int_t nbinsz,Double_t zlow,Double_t zup)
; | | ,Int_t nbinsz,Double_t zlow,Double_t zup)
; | |
| TH3(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins | | TH3(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins | |
| ,Int_t nbinsy,const Float_t *ybins | | ,Int_t nbinsy,const Float_t *ybins | |
| ,Int_t nbinsz,const Float_t *zbins
); | | ,Int_t nbinsz,const Float_t *zbins
); | |
| TH3(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | | TH3(const char *name,const char *title,Int_t nbinsx,const Double_t *xbin
s | |
| ,Int_t nbinsy,const Double_t *ybin
s | | ,Int_t nbinsy,const Double_t *ybin
s | |
| ,Int_t nbinsz,const Double_t *zbin
s); | | ,Int_t nbinsz,const Double_t *zbin
s); | |
|
| | | virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not u | |
| | | se | |
| | | virtual Int_t BufferFill(Double_t, Double_t, Double_t) {return -2;} / | |
| | | /may not use | |
| | | virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t | |
| | | w); | |
| | | | |
| | | public: | |
| TH3(const TH3&); | | TH3(const TH3&); | |
| virtual ~TH3(); | | virtual ~TH3(); | |
| virtual Int_t BufferEmpty(Int_t action=0); | | virtual Int_t BufferEmpty(Int_t action=0); | |
| virtual void Copy(TObject &hnew) const; | | virtual void Copy(TObject &hnew) const; | |
| Int_t Fill(Double_t) {return -1;} //MayNotUse | | Int_t Fill(Double_t) {return -1;} //MayNotUse | |
| Int_t Fill(Double_t,Double_t) {return -1;} //MayNotUse | | Int_t Fill(Double_t,Double_t) {return -1;} //MayNotUse | |
| Int_t Fill(const char*, Double_t) {return -1;} //MayNotUse | | Int_t Fill(const char*, Double_t) {return -1;} //MayNotUse | |
| Int_t Fill(Double_t,const char*,Double_t) {return -1;} //MayN
otUse | | Int_t Fill(Double_t,const char*,Double_t) {return -1;} //MayN
otUse | |
| Int_t Fill(const char*,Double_t,Double_t) {return -1;} //MayN
otUse | | Int_t Fill(const char*,Double_t,Double_t) {return -1;} //MayN
otUse | |
| Int_t Fill(const char*,const char*,Double_t) {return -1;} //M
ayNotUse | | Int_t Fill(const char*,const char*,Double_t) {return -1;} //M
ayNotUse | |
| | | | |
End of changes. 3 change blocks. |
| 9 lines changed or deleted | | 9 lines changed or added | |
|
| TLinearFitter.h | | TLinearFitter.h | |
|
| // @(#)root/minuit:$Id: TLinearFitter.h 22564 2008-03-10 14:01:37Z moneta $ | | // @(#)root/minuit:$Id: TLinearFitter.h 27022 2008-12-19 10:34:54Z pcanal $ | |
| // Author: Anna Kreshuk 04/03/2005 | | // Author: Anna Kreshuk 04/03/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 182 | | skipping to change at line 182 | |
| TVectorD fAtbTemp2; //! | | TVectorD fAtbTemp2; //! | |
| TVectorD fAtbTemp3; //! | | TVectorD fAtbTemp3; //! | |
| | | | |
| TObjArray fFunctions; //array of basis functions | | TObjArray fFunctions; //array of basis functions | |
| TVectorD fY; //the values being fit | | TVectorD fY; //the values being fit | |
| Double_t fY2; //sum of square of y, used for chisquare | | Double_t fY2; //sum of square of y, used for chisquare | |
| Double_t fY2Temp; //! temporary variable used for num.stabil
ity | | Double_t fY2Temp; //! temporary variable used for num.stabil
ity | |
| TMatrixD fX; //values of x | | TMatrixD fX; //values of x | |
| TVectorD fE; //the errors if they are known | | TVectorD fE; //the errors if they are known | |
| TFormula *fInputFunction; //the function being fit | | TFormula *fInputFunction; //the function being fit | |
|
| | | Double_t fVal[1000]; //! temporary | |
| | | | |
| Int_t fNpoints; //number of points | | Int_t fNpoints; //number of points | |
| Int_t fNfunctions; //number of basis functions | | Int_t fNfunctions; //number of basis functions | |
| Int_t fFormulaSize; //length of the formula | | Int_t fFormulaSize; //length of the formula | |
| Int_t fNdim; //number of dimensions in the formula | | Int_t fNdim; //number of dimensions in the formula | |
| Int_t fNfixed; //number of fixed parameters | | Int_t fNfixed; //number of fixed parameters | |
| Int_t fSpecial; //=100+n if fitting a polynomial of deg.n | | Int_t fSpecial; //=100+n if fitting a polynomial of deg.n | |
| //=200+n if fitting an n-dimensional hyper
plane | | //=200+n if fitting an n-dimensional hyper
plane | |
| char *fFormula; //the formula | | char *fFormula; //the formula | |
| Bool_t fIsSet; //Has the formula been set? | | Bool_t fIsSet; //Has the formula been set? | |
| Bool_t fStoreData; //Is the data stored? | | Bool_t fStoreData; //Is the data stored? | |
| Double_t fChisquare; //Chisquare of the fit | | Double_t fChisquare; //Chisquare of the fit | |
| | | | |
| Int_t fH; //number of good points in robust fit | | Int_t fH; //number of good points in robust fit | |
| Bool_t fRobust; //true when performing a robust fit | | Bool_t fRobust; //true when performing a robust fit | |
| TBits fFitsample; //indices of points, used in the robust fi
t | | TBits fFitsample; //indices of points, used in the robust fi
t | |
| | | | |
| Bool_t *fFixedParams; //[fNfixed] array of fixed/released params | | Bool_t *fFixedParams; //[fNfixed] array of fixed/released params | |
| | | | |
|
| void AddToDesign(Double_t *x, Double_t y, Double_t e); | | void AddToDesign(Double_t *x, Double_t y, Double_t e); | |
| void ComputeTValues(); | | void ComputeTValues(); | |
| Int_t GraphLinearFitter(Double_t h); | | Int_t GraphLinearFitter(Double_t h); | |
| Int_t Graph2DLinearFitter(Double_t h); | | Int_t Graph2DLinearFitter(Double_t h); | |
| Int_t HistLinearFitter(); | | Int_t HistLinearFitter(); | |
| Int_t MultiGraphLinearFitter(Double_t h); | | Int_t MultiGraphLinearFitter(Double_t h); | |
| | | | |
| //robust fitting functions: | | //robust fitting functions: | |
| Int_t Partition(Int_t nmini, Int_t *indsubdat); | | Int_t Partition(Int_t nmini, Int_t *indsubdat); | |
| void RDraw(Int_t *subdat, Int_t *indsubdat); | | void RDraw(Int_t *subdat, Int_t *indsubdat); | |
| void CreateSubset(Int_t ntotal, Int_t h, Int_t *index); | | void CreateSubset(Int_t ntotal, Int_t h, Int_t *index); | |
| Double_t CStep(Int_t step, Int_t h, Double_t *residuals, Int_t *index,
Int_t *subdat, Int_t start, Int_t end); | | Double_t CStep(Int_t step, Int_t h, Double_t *residuals, Int_t *index,
Int_t *subdat, Int_t start, Int_t end); | |
| | | | |
| skipping to change at line 226 | | skipping to change at line 227 | |
| TLinearFitter(); | | TLinearFitter(); | |
| TLinearFitter(Int_t ndim, const char *formula, Option_t *opt="D"); | | TLinearFitter(Int_t ndim, const char *formula, Option_t *opt="D"); | |
| TLinearFitter(Int_t ndim); | | TLinearFitter(Int_t ndim); | |
| TLinearFitter(TFormula *function, Option_t *opt="D"); | | TLinearFitter(TFormula *function, Option_t *opt="D"); | |
| TLinearFitter(const TLinearFitter& tlf); | | TLinearFitter(const TLinearFitter& tlf); | |
| virtual ~TLinearFitter(); | | virtual ~TLinearFitter(); | |
| | | | |
| TLinearFitter& operator=(const TLinearFitter& tlf); | | TLinearFitter& operator=(const TLinearFitter& tlf); | |
| virtual void Add(TLinearFitter *tlf); | | virtual void Add(TLinearFitter *tlf); | |
| virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1); | | virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1); | |
|
| | | virtual void AddTempMatrices(); | |
| virtual void AssignData(Int_t npoints, Int_t xncols, Double_t *x,
Double_t *y, Double_t *e=0); | | virtual void AssignData(Int_t npoints, Int_t xncols, Double_t *x,
Double_t *y, Double_t *e=0); | |
| | | | |
| virtual void Clear(Option_t *option=""); | | virtual void Clear(Option_t *option=""); | |
| virtual void ClearPoints(); | | virtual void ClearPoints(); | |
| virtual void Chisquare(); | | virtual void Chisquare(); | |
| virtual Int_t Eval(); | | virtual Int_t Eval(); | |
| virtual Int_t EvalRobust(Double_t h=-1); | | virtual Int_t EvalRobust(Double_t h=-1); | |
| virtual Int_t ExecuteCommand(const char *command, Double_t *args, I
nt_t nargs); | | virtual Int_t ExecuteCommand(const char *command, Double_t *args, I
nt_t nargs); | |
| virtual void FixParameter(Int_t ipar); | | virtual void FixParameter(Int_t ipar); | |
| virtual void FixParameter(Int_t ipar, Double_t parvalue); | | virtual void FixParameter(Int_t ipar, Double_t parvalue); | |
| | | | |
| skipping to change at line 256 | | skipping to change at line 258 | |
| virtual Int_t GetNumberFreeParameters() const {return fNfunctions-f
Nfixed;} | | virtual Int_t GetNumberFreeParameters() const {return fNfunctions-f
Nfixed;} | |
| virtual Int_t GetNpoints() { return fNpoints; } | | virtual Int_t GetNpoints() { return fNpoints; } | |
| virtual void GetParameters(TVectorD &vpar); | | virtual void GetParameters(TVectorD &vpar); | |
| virtual Double_t GetParameter(Int_t ipar) const {return fParams(ipar);
} | | virtual Double_t GetParameter(Int_t ipar) const {return fParams(ipar);
} | |
| virtual Int_t GetParameter(Int_t ipar,char* name,Double_t& value,Do
uble_t& /*verr*/,Double_t& /*vlow*/, Double_t& /*vhigh*/) const; | | virtual Int_t GetParameter(Int_t ipar,char* name,Double_t& value,Do
uble_t& /*verr*/,Double_t& /*vlow*/, Double_t& /*vhigh*/) const; | |
| virtual const char *GetParName(Int_t ipar) const; | | virtual const char *GetParName(Int_t ipar) const; | |
| virtual Double_t GetParError(Int_t ipar) const; | | virtual Double_t GetParError(Int_t ipar) const; | |
| virtual Double_t GetParTValue(Int_t ipar); | | virtual Double_t GetParTValue(Int_t ipar); | |
| virtual Double_t GetParSignificance(Int_t ipar); | | virtual Double_t GetParSignificance(Int_t ipar); | |
| virtual void GetFitSample(TBits& bits); | | virtual void GetFitSample(TBits& bits); | |
|
| | | virtual Double_t GetY2() const {return fY2;} | |
| virtual Bool_t IsFixed(Int_t ipar) const {return fFixedParams[ipar];
} | | virtual Bool_t IsFixed(Int_t ipar) const {return fFixedParams[ipar];
} | |
| virtual Int_t Merge(TCollection *list); | | virtual Int_t Merge(TCollection *list); | |
| virtual void PrintResults(Int_t level, Double_t amin=0) const; | | virtual void PrintResults(Int_t level, Double_t amin=0) const; | |
| virtual void ReleaseParameter(Int_t ipar); | | virtual void ReleaseParameter(Int_t ipar); | |
| virtual void SetBasisFunctions(TObjArray * functions); | | virtual void SetBasisFunctions(TObjArray * functions); | |
| virtual void SetDim(Int_t n); | | virtual void SetDim(Int_t n); | |
| virtual void SetFormula(const char* formula); | | virtual void SetFormula(const char* formula); | |
| virtual void SetFormula(TFormula *function); | | virtual void SetFormula(TFormula *function); | |
| virtual void StoreData(Bool_t store) {fStoreData=store;} | | virtual void StoreData(Bool_t store) {fStoreData=store;} | |
|
| | | | |
| virtual Bool_t UpdateMatrix(); | | virtual Bool_t UpdateMatrix(); | |
| | | | |
| //dummy functions for TVirtualFitter: | | //dummy functions for TVirtualFitter: | |
| virtual Double_t Chisquare(Int_t /*npar*/, Double_t * /*params*/) const
{return 0;} | | virtual Double_t Chisquare(Int_t /*npar*/, Double_t * /*params*/) const
{return 0;} | |
| virtual Int_t GetErrors(Int_t /*ipar*/,Double_t & /*eplus*/, Double_
t & /*eminus*/, Double_t & /*eparab*/, Double_t & /*globcc*/) const {return
0;} | | virtual Int_t GetErrors(Int_t /*ipar*/,Double_t & /*eplus*/, Double_
t & /*eminus*/, Double_t & /*eparab*/, Double_t & /*globcc*/) const {return
0;} | |
| | | | |
| virtual Int_t GetStats(Double_t& /*amin*/, Double_t& /*edm*/, Double
_t& /*errdef*/, Int_t& /*nvpar*/, Int_t& /*nparx*/) const {return 0;} | | virtual Int_t GetStats(Double_t& /*amin*/, Double_t& /*edm*/, Double
_t& /*errdef*/, Int_t& /*nvpar*/, Int_t& /*nparx*/) const {return 0;} | |
| virtual Double_t GetSumLog(Int_t /*i*/) {return 0;} | | virtual Double_t GetSumLog(Int_t /*i*/) {return 0;} | |
| virtual void SetFitMethod(const char * /*name*/) {;} | | virtual void SetFitMethod(const char * /*name*/) {;} | |
| virtual Int_t SetParameter(Int_t /*ipar*/,const char * /*parname*/,D
ouble_t /*value*/,Double_t /*verr*/,Double_t /*vlow*/, Double_t /*vhigh*/)
{return 0;} | | virtual Int_t SetParameter(Int_t /*ipar*/,const char * /*parname*/,D
ouble_t /*value*/,Double_t /*verr*/,Double_t /*vlow*/, Double_t /*vhigh*/)
{return 0;} | |
| | | | |
|
| ClassDef(TLinearFitter, 1) //fit a set of data points with a linear comb
ination of functions | | ClassDef(TLinearFitter, 2) //fit a set of data points with a linear comb
ination of functions | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 4 lines changed or deleted | | 8 lines changed or added | |
|
| TPDGCode.h | | TPDGCode.h | |
|
| // @(#)root/vmc:$Id: TPDGCode.h 26965 2008-12-16 17:32:41Z brun $ | | // @(#)root/vmc:$Id: TPDGCode.h 27089 2009-01-05 20:13:29Z brun $ | |
| // Author: Andreas Morsch 13/04/2002 | | // Author: Andreas Morsch 13/04/2002 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | |
| * Copyright (C) 2002, ALICE Experiment at CERN. * | | * Copyright (C) 2002, ALICE Experiment at CERN. * | |
| * 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 | |
| kSd1=3103,kSd1Bar=-3103,kSu0=3201,kSu0Bar=-3201,kSu1=3203, | | kSd1=3103,kSd1Bar=-3103,kSu0=3201,kSu0Bar=-3201,kSu1=3203, | |
| kSu1Bar=-3203,kSearches0=7,kElectron=11,kPositron=-11,kNuE=12, | | kSu1Bar=-3203,kSearches0=7,kElectron=11,kPositron=-11,kNuE=12, | |
| kNuEBar=-12,kMuonMinus=13,kMuonPlus=-13,kNuMu=14,kNuMuBar=-14, | | kNuEBar=-12,kMuonMinus=13,kMuonPlus=-13,kNuMu=14,kNuMuBar=-14, | |
| kTauMinus=15,kTauPlus=-15,kNuTau=16,kNuTauBar=-16,kGamma=22, | | kTauMinus=15,kTauPlus=-15,kNuTau=16,kNuTauBar=-16,kGamma=22, | |
| kZ0=23,kWPlus=24,kWMinus=-24,kPi0=111,kRho770_0=113, | | kZ0=23,kWPlus=24,kWMinus=-24,kPi0=111,kRho770_0=113, | |
| kA2_1320_0=115,kRho3_1690_0=117,kK0Long=130,kPiPlus=211, | | kA2_1320_0=115,kRho3_1690_0=117,kK0Long=130,kPiPlus=211, | |
| kPiMinus=-211,kRho770Plus=213,kRho770Minus=-213, | | kPiMinus=-211,kRho770Plus=213,kRho770Minus=-213, | |
| kA2_1320Plus=215,kProton=2212,kProtonBar=-2212, | | kA2_1320Plus=215,kProton=2212,kProtonBar=-2212, | |
| kNeutron=2112,kNeutronBar=-2112,kK0Short=310,kK0=311, | | kNeutron=2112,kNeutronBar=-2112,kK0Short=310,kK0=311, | |
| kK0Bar=-311,kKPlus=321,kKMinus=-321,kLambda0=3122, | | kK0Bar=-311,kKPlus=321,kKMinus=-321,kLambda0=3122, | |
|
| kLambda0Bar=-3122,kSigmaMinus=3112,kSigmaBarPlus=-3112, | | kLambda1520=3124,kLambda0Bar=-3122,kSigmaMinus=3112,kSigmaBarPlus=
-3112, | |
| kSigmaPlus=3222,kSigmaBarMinus=-3222,kSigma0=3212, | | kSigmaPlus=3222,kSigmaBarMinus=-3222,kSigma0=3212, | |
| kSigma0Bar=-3212,kXiMinus=3312,kXiPlusBar=-3312, | | kSigma0Bar=-3212,kXiMinus=3312,kXiPlusBar=-3312, | |
| kOmegaMinus=3334,kOmegaPlusBar=-3334} | | kOmegaMinus=3334,kOmegaPlusBar=-3334} | |
| PDG_t; | | PDG_t; | |
| | | | |
| /* | | /* | |
| "a(2)(1320)-", -215 | | "a(2)(1320)-", -215 | |
| "rho(3)(1690)+", 217 | | "rho(3)(1690)+", 217 | |
| "rho(3)(1690)-", -217 | | "rho(3)(1690)-", -217 | |
| "eta0", 221 | | "eta0", 221 | |
| | | | |
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 26951 2008-12-16 12:04:38Z ganis $ | | // @(#)root/proof:$Id: TProof.h 27443 2009-02-12 19:18:17Z 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 115 | | skipping to change at line 115 | |
| // 11 -> 12: new progress message | | // 11 -> 12: new progress message | |
| // 12 -> 13: exchange version/architecture/compiler info | | // 12 -> 13: exchange version/architecture/compiler info | |
| // 13 -> 14: new proofserv environment setting | | // 13 -> 14: new proofserv environment setting | |
| // 14 -> 15: add support for entry lists; new version of TFileInfo | | // 14 -> 15: add support for entry lists; new version of TFileInfo | |
| // 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 | |
| | | | |
| // PROOF magic constants | | // PROOF magic constants | |
|
| const Int_t kPROOF_Protocol = 20; // protocol versi
on number | | const Int_t kPROOF_Protocol = 21; // 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_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 | |
| | | | |
| skipping to change at line 154 | | skipping to change at line 155 | |
| const char* const kUNTAR = "..."; | | const char* const kUNTAR = "..."; | |
| const char* const kUNTAR2 = "..."; | | const char* const kUNTAR2 = "..."; | |
| const char* const kUNTAR3 = "..."; | | const char* const kUNTAR3 = "..."; | |
| const char* const kGUNZIP = "gunzip"; | | const char* const kGUNZIP = "gunzip"; | |
| #endif | | #endif | |
| | | | |
| R__EXTERN TVirtualMutex *gProofMutex; | | R__EXTERN TVirtualMutex *gProofMutex; | |
| | | | |
| typedef void (*PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t procti
me); | | typedef void (*PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t procti
me); | |
| | | | |
|
| // Helper classes used for parallel startup | | | |
| class TProofThreadArg { | | | |
| public: | | | |
| TUrl *fUrl; | | | |
| TString fOrd; | | | |
| Int_t fPerf; | | | |
| TString fImage; | | | |
| TString fWorkdir; | | | |
| TString fMsd; | | | |
| TList *fSlaves; | | | |
| TProof *fProof; | | | |
| TCondorSlave *fCslave; | | | |
| TList *fClaims; | | | |
| Int_t fType; | | | |
| | | | |
| TProofThreadArg(const char *h, Int_t po, const char *o, Int_t pe, | | | |
| const char *i, const char *w, | | | |
| TList *s, TProof *prf); | | | |
| | | | |
| TProofThreadArg(TCondorSlave *csl, TList *clist, | | | |
| TList *s, TProof *prf); | | | |
| | | | |
| TProofThreadArg(const char *h, Int_t po, const char *o, | | | |
| const char *i, const char *w, const char *m, | | | |
| TList *s, TProof *prf); | | | |
| | | | |
| virtual ~TProofThreadArg() { if (fUrl) delete fUrl; } | | | |
| | | | |
| private: | | | |
| | | | |
| TProofThreadArg(const TProofThreadArg&); // Not implemented | | | |
| TProofThreadArg& operator=(const TProofThreadArg&); // Not implemented | | | |
| | | | |
| }; | | | |
| | | | |
| // PROOF Thread class for parallel startup | | | |
| class TProofThread { | | | |
| public: | | | |
| TThread *fThread; | | | |
| TProofThreadArg *fArgs; | | | |
| | | | |
| TProofThread(TThread *t, TProofThreadArg *a): fThread(t), fArgs(a) {} | | | |
| virtual ~TProofThread() { SafeDelete(fThread); SafeDelete(fArgs); } | | | |
| private: | | | |
| | | | |
| TProofThread(const TProofThread&); // Not implemented | | | |
| TProofThread& operator=(const TProofThread&); // Not implemented | | | |
| | | | |
| }; | | | |
| | | | |
| // PROOF Interrupt signal handler | | // PROOF Interrupt signal handler | |
| class TProofInterruptHandler : public TSignalHandler { | | class TProofInterruptHandler : public TSignalHandler { | |
| private: | | private: | |
| | | | |
| TProofInterruptHandler(const TProofInterruptHandler&); // Not implemente
d | | TProofInterruptHandler(const TProofInterruptHandler&); // Not implemente
d | |
| TProofInterruptHandler& operator=(const TProofInterruptHandler&); // Not
implemented | | TProofInterruptHandler& operator=(const TProofInterruptHandler&); // Not
implemented | |
| | | | |
| TProof *fProof; | | TProof *fProof; | |
| public: | | public: | |
| TProofInterruptHandler(TProof *p) | | TProofInterruptHandler(TProof *p) | |
| | | | |
| skipping to change at line 399 | | skipping to change at line 350 | |
| }; | | }; | |
| | | | |
| 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 | |
| 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 fMasterServ; //true if we are a master server | | | |
| 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 | |
| TList *fNonUniqueMasters; //list of all active masters with a n
onunique file system | | TList *fNonUniqueMasters; //list of all active masters with a n
onunique file system | |
| TMonitor *fActiveMonitor; //monitor activity on all active slave
sockets | | TMonitor *fActiveMonitor; //monitor activity on all active slave
sockets | |
| TMonitor *fUniqueMonitor; //monitor activity on all unique slave
sockets | | TMonitor *fUniqueMonitor; //monitor activity on all unique slave
sockets | |
| TMonitor *fAllUniqueMonitor; //monitor activity on all unique slav
e sockets, including all submasters | | TMonitor *fAllUniqueMonitor; //monitor activity on all unique slav
e sockets, including all submasters | |
| TMonitor *fCurrentMonitor; //currently active monitor | | TMonitor *fCurrentMonitor; //currently active monitor | |
| | | | |
| skipping to change at line 430 | | skipping to change at line 380 | |
| TMD5 fMD5; //file's md5 | | TMD5 fMD5; //file's md5 | |
| Long_t fModtime; //file's modification time | | Long_t fModtime; //file's modification time | |
| }; | | }; | |
| typedef std::map<TString, MD5Mod_t> FileMap_t; | | typedef std::map<TString, MD5Mod_t> FileMap_t; | |
| FileMap_t fFileMap; //map keeping track of a file's md5 an
d mod time | | FileMap_t fFileMap; //map keeping track of a file's md5 an
d mod time | |
| TDSet *fDSet; //current TDSet being validated | | TDSet *fDSet; //current TDSet being validated | |
| | | | |
| Int_t fNotIdle; //Number of non-idle sub-nodes | | Int_t fNotIdle; //Number of non-idle sub-nodes | |
| Bool_t fSync; //true if type of currently processed
query is sync | | Bool_t fSync; //true if type of currently processed
query is sync | |
| ERunStatus fRunStatus; //run status | | ERunStatus fRunStatus; //run status | |
|
| | | Bool_t fIsWaiting; //true if queries have been enqueued | |
| | | | |
| Bool_t fRedirLog; //redirect received log info | | Bool_t fRedirLog; //redirect received log info | |
| TString fLogFileName; //name of the temp file for redirected
logs | | TString fLogFileName; //name of the temp file for redirected
logs | |
| FILE *fLogFileW; //temp file to redirect logs | | FILE *fLogFileW; //temp file to redirect logs | |
| FILE *fLogFileR; //temp file to read redirected logs | | FILE *fLogFileR; //temp file to read redirected logs | |
| Bool_t fLogToWindowOnly; //send log to window only | | Bool_t fLogToWindowOnly; //send log to window only | |
| | | | |
| TList *fWaitingSlaves; //stores a TPair of the slaves's TSock
et and TMessage | | TList *fWaitingSlaves; //stores a TPair of the slaves's TSock
et and TMessage | |
| TList *fQueries; //list of TProofQuery objects | | TList *fQueries; //list of TProofQuery objects | |
| Int_t fOtherQueries; //number of queries in list from previ
ous sessions | | Int_t fOtherQueries; //number of queries in list from previ
ous sessions | |
| | | | |
| skipping to change at line 466 | | skipping to change at line 417 | |
| PrintProgress_t fPrintProgress; //Function function to display progres
s info in batch mode | | PrintProgress_t fPrintProgress; //Function function to display progres
s info in batch mode | |
| | | | |
| TVirtualMutex *fCloseMutex; // Avoid crashes in MarkBad or alike w
hile closing | | TVirtualMutex *fCloseMutex; // Avoid crashes in MarkBad or alike w
hile closing | |
| | | | |
| TList *fLoadedMacros; // List of loaded macros (just file na
mes) | | TList *fLoadedMacros; // List of loaded macros (just file na
mes) | |
| static TList *fgProofEnvList; // List of TNameds defining environmen
t | | static TList *fgProofEnvList; // List of TNameds defining environmen
t | |
| // variables to pass to proofserv | | // variables to pass to proofserv | |
| protected: | | protected: | |
| enum ESlaves { kAll, kActive, kUnique, kAllUnique }; | | enum ESlaves { kAll, kActive, kUnique, kAllUnique }; | |
| | | | |
|
| | | Bool_t fMasterServ; //true if we are a master server | |
| TUrl fUrl; //Url of the master | | TUrl fUrl; //Url of the master | |
| TString fConfFile; //file containing config information | | TString fConfFile; //file containing config information | |
| TString fConfDir; //directory containing cluster config i
nformation | | TString fConfDir; //directory containing cluster config i
nformation | |
| TString fImage; //master's image name | | TString fImage; //master's image name | |
| Int_t fProtocol; //remote PROOF server protocol version
number | | Int_t fProtocol; //remote PROOF server protocol version
number | |
| TList *fSlaves; //list of all slave servers as in confi
g file | | TList *fSlaves; //list of all slave servers as in confi
g file | |
| TList *fBadSlaves; //dead slaves (subset of all slaves) | | TList *fBadSlaves; //dead slaves (subset of all slaves) | |
| TMonitor *fAllMonitor; //monitor activity on all valid slave s
ockets | | TMonitor *fAllMonitor; //monitor activity on all valid slave s
ockets | |
| Bool_t fDataReady; //true if data is ready to be analyzed | | Bool_t fDataReady; //true if data is ready to be analyzed | |
| Long64_t fBytesReady; //number of bytes staged | | Long64_t fBytesReady; //number of bytes staged | |
| | | | |
| skipping to change at line 587 | | skipping to change at line 539 | |
| | | | |
| 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.); | |
| | | | |
| 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 parallel, 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); | |
| TVirtualProofPlayer *GetPlayer() const { return fPlayer; } | | TVirtualProofPlayer *GetPlayer() const { return fPlayer; } | |
| virtual TVirtualProofPlayer *MakePlayer(const char *player = 0, TSocket
*s = 0); | | virtual TVirtualProofPlayer *MakePlayer(const char *player = 0, TSocket
*s = 0); | |
| | | | |
| void UpdateDialog(); | | void UpdateDialog(); | |
| | | | |
| void HandleLibIncPath(const char *what, Bool_t add, const char *dirs)
; | | void HandleLibIncPath(const char *what, Bool_t add, const char *dirs)
; | |
| | | | |
| skipping to change at line 691 | | skipping to change at line 643 | |
| virtual void ShowCache(Bool_t all = kFALSE); | | virtual void ShowCache(Bool_t all = kFALSE); | |
| virtual void ClearCache(const char *file = 0); | | virtual void ClearCache(const char *file = 0); | |
| TList *GetListOfPackages(); | | TList *GetListOfPackages(); | |
| TList *GetListOfEnabledPackages(); | | TList *GetListOfEnabledPackages(); | |
| void ShowPackages(Bool_t all = kFALSE); | | void ShowPackages(Bool_t all = kFALSE); | |
| void ShowEnabledPackages(Bool_t all = kFALSE); | | void ShowEnabledPackages(Bool_t all = kFALSE); | |
| Int_t ClearPackages(); | | Int_t ClearPackages(); | |
| Int_t ClearPackage(const char *package); | | Int_t ClearPackage(const char *package); | |
| Int_t EnablePackage(const char *package, Bool_t notOnClient = kFAL
SE); | | Int_t EnablePackage(const char *package, Bool_t notOnClient = kFAL
SE); | |
| Int_t UploadPackage(const char *par, EUploadPackageOpt opt = kUnta
r); | | Int_t UploadPackage(const char *par, EUploadPackageOpt opt = kUnta
r); | |
|
| Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_t | | Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_t | |
| uniqueOnly = kTRUE); | | uniqueOnly = kTRUE, | |
| | | TList *wrks = 0); | |
| | | | |
|
| Int_t AddDynamicPath(const char *libpath, Bool_t onClient = kFALSE | | Int_t AddDynamicPath(const char *libpath, Bool_t onClient = kFALSE | |
| ); | | , TList *wrks = 0); | |
| Int_t AddIncludePath(const char *incpath, Bool_t onClient = kFALSE | | Int_t AddIncludePath(const char *incpath, Bool_t onClient = kFALSE | |
| ); | | , TList *wrks = 0); | |
| Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient = kFA
LSE); | | Int_t RemoveDynamicPath(const char *libpath, Bool_t onClient = kFA
LSE); | |
| Int_t RemoveIncludePath(const char *incpath, Bool_t onClient = kFA
LSE); | | Int_t RemoveIncludePath(const char *incpath, Bool_t onClient = kFA
LSE); | |
| | | | |
| //-- dataset management | | //-- dataset management | |
| Int_t UploadDataSet(const char *dataset, | | Int_t UploadDataSet(const char *dataset, | |
| TList *files, | | TList *files, | |
| const char *dest = 0, | | const char *dest = 0, | |
| Int_t opt = kAskUser, | | Int_t opt = kAskUser, | |
| TList *skippedFiles = 0); | | TList *skippedFiles = 0); | |
| Int_t UploadDataSet(const char *dataset, | | Int_t UploadDataSet(const char *dataset, | |
| | | | |
| skipping to change at line 762 | | skipping to change at line 715 | |
| Float_t GetRealTime() const { return fRealTime; } | | Float_t GetRealTime() const { return fRealTime; } | |
| Float_t GetCpuTime() const { return fCpuTime; } | | Float_t GetCpuTime() const { return fCpuTime; } | |
| | | | |
| Bool_t IsLite() const { return (fServType == TProofMgr::kProofLite)
; } | | Bool_t IsLite() const { return (fServType == TProofMgr::kProofLite)
; } | |
| Bool_t IsProofd() const { return (fServType == TProofMgr::kProofd);
} | | Bool_t IsProofd() const { return (fServType == TProofMgr::kProofd);
} | |
| Bool_t IsFolder() const { return kTRUE; } | | Bool_t IsFolder() const { return kTRUE; } | |
| Bool_t IsMaster() const { return fMasterServ; } | | Bool_t IsMaster() const { return fMasterServ; } | |
| Bool_t IsValid() const { return fValid; } | | Bool_t IsValid() const { return fValid; } | |
| Bool_t IsParallel() const { return GetParallel() > 0 ? kTRUE : kFAL
SE; } | | Bool_t IsParallel() const { return GetParallel() > 0 ? kTRUE : kFAL
SE; } | |
| Bool_t IsIdle() const { return (fNotIdle <= 0) ? kTRUE : kFALSE; } | | Bool_t IsIdle() const { return (fNotIdle <= 0) ? kTRUE : kFALSE; } | |
|
| | | Bool_t IsWaiting() const { return fIsWaiting; } | |
| | | | |
| ERunStatus GetRunStatus() const { return fRunStatus; } | | ERunStatus GetRunStatus() const { return fRunStatus; } | |
| TList *GetLoadedMacros() const { return fLoadedMacros; } | | TList *GetLoadedMacros() const { return fLoadedMacros; } | |
| | | | |
| //-- input list parameter handling | | //-- input list parameter handling | |
| void SetParameter(const char *par, const char *value); | | void SetParameter(const char *par, const char *value); | |
| void SetParameter(const char *par, Int_t value); | | void SetParameter(const char *par, Int_t value); | |
| void SetParameter(const char *par, Long_t value); | | void SetParameter(const char *par, Long_t value); | |
| void SetParameter(const char *par, Long64_t value); | | void SetParameter(const char *par, Long64_t value); | |
| void SetParameter(const char *par, Double_t value); | | void SetParameter(const char *par, Double_t value); | |
| | | | |
End of changes. 11 change blocks. |
| 60 lines changed or deleted | | 14 lines changed or added | |
|
| TProofServ.h | | TProofServ.h | |
|
| // @(#)root/proof:$Id: TProofServ.h 26993 2008-12-17 16:01:04Z rdm $ | | // @(#)root/proof:$Id: TProofServ.h 27034 2008-12-19 15:30:06Z 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 74 | | skipping to change at line 74 | |
| // For backward compatibility | | // For backward compatibility | |
| typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, | | typedef Int_t (*OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, | |
| TString &, TString &, TString &); | | TString &, TString &, TString &); | |
| | | | |
| class TProofServ : public TApplication { | | class TProofServ : public TApplication { | |
| | | | |
| friend class TProofServLite; | | friend class TProofServLite; | |
| friend class TXProofServ; | | friend class TXProofServ; | |
| | | | |
| public: | | public: | |
|
| enum EQueryAction { kQueryOK, kQueryModify, kQueryStop }; | | enum EQueryAction { kQueryOK, kQueryModify, kQueryStop, kQueryEnqueued }
; | |
| | | | |
| private: | | private: | |
| TString fService; //service we are running, either "proof
serv" or "proofslave" | | TString fService; //service we are running, either "proof
serv" or "proofslave" | |
| TString fUser; //user as which we run | | TString fUser; //user as which we run | |
| TString fGroup; //group the user belongs to | | TString fGroup; //group the user belongs to | |
| TString fConfDir; //directory containing cluster config i
nformation | | TString fConfDir; //directory containing cluster config i
nformation | |
| TString fConfFile; //file containing config information | | TString fConfFile; //file containing config information | |
| 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 | |
| | | | |
| skipping to change at line 179 | | skipping to change at line 179 | |
| 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); | |
| virtual void HandleRemove(TMessage *mess); | | virtual void HandleRemove(TMessage *mess); | |
| virtual void HandleRetrieve(TMessage *mess); | | virtual void HandleRetrieve(TMessage *mess); | |
| virtual void HandleWorkerLists(TMessage *mess); | | virtual void HandleWorkerLists(TMessage *mess); | |
| | | | |
|
| | | virtual void ProcessNext(); | |
| virtual Int_t Setup(); | | virtual Int_t Setup(); | |
| Int_t SetupCommon(); | | Int_t SetupCommon(); | |
| virtual void MakePlayer(); | | virtual void MakePlayer(); | |
| virtual void DeletePlayer(); | | virtual void DeletePlayer(); | |
| | | | |
| virtual Int_t Fork(); | | virtual Int_t Fork(); | |
| | | | |
| public: | | public: | |
| TProofServ(Int_t *argc, char **argv, FILE *flog = 0); | | TProofServ(Int_t *argc, char **argv, FILE *flog = 0); | |
| virtual ~TProofServ(); | | virtual ~TProofServ(); | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 226 | |
| | | | |
| Long_t GetVirtMemHWM() const { return fVirtMemHWM; } | | Long_t GetVirtMemHWM() const { return fVirtMemHWM; } | |
| | | | |
| const char *GetPrefix() const { return fPrefix; } | | const char *GetPrefix() const { return fPrefix; } | |
| | | | |
| void FlushLogFile(); | | void FlushLogFile(); | |
| | | | |
| Int_t CopyFromCache(const char *name, Bool_t cpbin); | | Int_t CopyFromCache(const char *name, Bool_t cpbin); | |
| Int_t CopyToCache(const char *name, Int_t opt = 0); | | Int_t CopyToCache(const char *name, Int_t opt = 0); | |
| | | | |
|
| virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange); | | virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, | |
| | | Bool_t resume = kFALSE); | |
| virtual void HandleException(Int_t sig); | | virtual void HandleException(Int_t sig); | |
| virtual Int_t HandleSocketInput(TMessage *mess, Bool_t all); | | virtual Int_t HandleSocketInput(TMessage *mess, Bool_t all); | |
| virtual void HandleSocketInput(); | | virtual void HandleSocketInput(); | |
| virtual void HandleUrgentData(); | | virtual void HandleUrgentData(); | |
| virtual void HandleSigPipe(); | | virtual void HandleSigPipe(); | |
| virtual void HandleTermination() { Terminate(0); } | | virtual void HandleTermination() { Terminate(0); } | |
| void Interrupt() { fInterrupt = kTRUE; } | | void Interrupt() { fInterrupt = kTRUE; } | |
| Bool_t IsEndMaster() const { return fEndMaster; } | | Bool_t IsEndMaster() const { return fEndMaster; } | |
| Bool_t IsMaster() const { return fMasterServ; } | | Bool_t IsMaster() const { return fMasterServ; } | |
| Bool_t IsParallel() const; | | Bool_t IsParallel() const; | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 5 lines changed or added | |
|
| TRecorder.h | | TRecorder.h | |
|
| // @(#)root/gui:$Id: TRecorder.h 26135 2008-11-11 09:37:55Z bellenot $ | | // @(#)root/gui:$Id: TRecorder.h 27550 2009-02-20 14:38:05Z 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 134 | | skipping to change at line 134 | |
| #endif | | #endif | |
| #ifndef ROOT_TTimer | | #ifndef ROOT_TTimer | |
| #include "TTimer.h" | | #include "TTimer.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TGClient | | #ifndef ROOT_TGClient | |
| #include "TGClient.h" | | #include "TGClient.h" | |
| #endif | | #endif | |
| #ifndef ROOT_TGFrame | | #ifndef ROOT_TGFrame | |
| #include "TGFrame.h" | | #include "TGFrame.h" | |
| #endif | | #endif | |
|
| | | #ifndef ROOT_TCanvas | |
| | | #include "TCanvas.h" | |
| | | #endif | |
| | | #ifndef ROOT_THashList | |
| | | #include "THashList.h" | |
| | | #endif | |
| | | | |
| #include <time.h> | | #include <time.h> | |
| | | | |
| class TMutex; | | class TMutex; | |
| class TTree; | | class TTree; | |
| class TFile; | | class TFile; | |
| class TGPictureButton; | | class TGPictureButton; | |
| class TGCheckButton; | | class TGCheckButton; | |
| class TGLabel; | | class TGLabel; | |
| class TRecorderState; | | class TRecorderState; | |
| | | | |
| skipping to change at line 166 | | skipping to change at line 172 | |
| | | | |
| class TRecEvent : public TObject | | class TRecEvent : public TObject | |
| { | | { | |
| private: | | private: | |
| TTime fEventTime; // Time of original event execution | | TTime fEventTime; // Time of original event execution | |
| | | | |
| public: | | public: | |
| //---- Types of events recorded in ROOT. | | //---- Types of events recorded in ROOT. | |
| enum ERecEventType { | | enum ERecEventType { | |
| kCmdEvent, // Commandline event | | kCmdEvent, // Commandline event | |
|
| kGuiEvent // GUI event | | kGuiEvent, // GUI event | |
| | | kExtraEvent | |
| }; | | }; | |
| | | | |
| // Replays (executes) the stored event again | | // Replays (executes) the stored event again | |
| virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE) = 0; | | virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE) = 0; | |
| | | | |
| // Returns what kind of event it stores | | // Returns what kind of event it stores | |
| virtual ERecEventType GetType() const = 0; | | virtual ERecEventType GetType() const = 0; | |
| | | | |
| virtual TTime GetTime() const { | | virtual TTime GetTime() const { | |
| // Returns time of original execution of stored event | | // Returns time of original execution of stored event | |
| | | | |
| skipping to change at line 229 | | skipping to change at line 236 | |
| // Returns what kind of event it stores (commandline event) | | // Returns what kind of event it stores (commandline event) | |
| return TRecEvent::kCmdEvent; | | return TRecEvent::kCmdEvent; | |
| } | | } | |
| | | | |
| virtual void ReplayEvent(Bool_t) { | | virtual void ReplayEvent(Bool_t) { | |
| // Stored command is executed again | | // Stored command is executed again | |
| cout << GetText() << endl; | | cout << GetText() << endl; | |
| gApplication->ProcessLine(GetText()); | | gApplication->ProcessLine(GetText()); | |
| } | | } | |
| | | | |
|
| ClassDef(TRecCmdEvent,1) // Class stores information about 1 commandli | | ClassDef(TRecCmdEvent,1) // Class stores information about 1 commandline | |
| ne event (= 1 command typed by user in commandline) | | event (= 1 command typed by user in commandline) | |
| | | }; | |
| | | | |
| | | ////////////////////////////////////////////////////////////////////////// | |
| | | // // | |
| | | // TRecExtraEvent // | |
| | | // // | |
| | | // Class used for storing information about 1 extra event. // | |
| | | // It means 1 TPaveLabel or 1 TLatex event produced in the Canvas // | |
| | | // // | |
| | | ////////////////////////////////////////////////////////////////////////// | |
| | | class TRecExtraEvent : public TRecEvent | |
| | | { | |
| | | private: | |
| | | TString fText; // Text of stored command | |
| | | | |
| | | public: | |
| | | TRecExtraEvent() { | |
| | | // Creates new empty TRecExtraEvent | |
| | | } | |
| | | | |
| | | void SetText(TString text) { | |
| | | // Saves text of a command (PaveLabel or Text) | |
| | | fText = text; | |
| | | } | |
| | | | |
| | | TString GetText() const { | |
| | | // Returns stored text of the command | |
| | | return fText; | |
| | | } | |
| | | | |
| | | virtual ERecEventType GetType() const { | |
| | | // Returns what kind of event it stores (Especial event) | |
| | | return TRecEvent::kExtraEvent; | |
| | | } | |
| | | | |
| | | virtual void ReplayEvent(Bool_t) { | |
| | | // Stored event is executed again | |
| | | | |
| | | gApplication->ProcessLine(GetText()); | |
| | | } | |
| | | | |
| | | ClassDef(TRecExtraEvent,1) // Class stores information about extra event | |
| | | s | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecGuiEvent // | | // TRecGuiEvent // | |
| // // | | // // | |
| // Class used for storing information about 1 GUI event in ROOT. // | | // Class used for storing information about 1 GUI event in ROOT. // | |
| // For list of possible GUI events see EGEventType. // | | // For list of possible GUI events see EGEventType. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| skipping to change at line 287 | | skipping to change at line 336 | |
| }; | | }; | |
| | | | |
| virtual ERecEventType GetType() const { | | virtual ERecEventType GetType() const { | |
| // Returns what kind of event it stores (GUI event) | | // Returns what kind of event it stores (GUI event) | |
| return TRecEvent::kGuiEvent; | | return TRecEvent::kGuiEvent; | |
| } | | } | |
| | | | |
| virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE); | | virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE); | |
| static Event_t *CreateEvent(TRecGuiEvent *ge); | | static Event_t *CreateEvent(TRecGuiEvent *ge); | |
| | | | |
|
| ClassDef(TRecGuiEvent,1) // Class stores information about 1 GUI
event in ROOT | | ClassDef(TRecGuiEvent,1) // Class stores information about 1 GUI event i
n ROOT | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecWinPair // | | // TRecWinPair // | |
| // // | | // // | |
| // Class used for storing of window IDs mapping. // | | // Class used for storing of window IDs mapping. // | |
| // Remapping of window IDs is needed for replaying events. // | | // Remapping of window IDs is needed for replaying events. // | |
| // - ID of original window is stored in fKey. // | | // - ID of original window is stored in fKey. // | |
| // - ID of a new window is stored in fValue. // | | // - ID of a new window is stored in fValue. // | |
| | | | |
| skipping to change at line 443 | | skipping to change at line 492 | |
| | | | |
| // Prints out the list of recorded commandline events | | // Prints out the list of recorded commandline events | |
| void ListCmd(const char *filename); | | void ListCmd(const char *filename); | |
| | | | |
| // Prints out the list of recorded GUI events | | // Prints out the list of recorded GUI events | |
| void ListGui(const char *filename); | | void ListGui(const char *filename); | |
| | | | |
| // Gets current state of recorder | | // Gets current state of recorder | |
| virtual TRecorder::ERecorderState GetState() const; | | virtual TRecorder::ERecorderState GetState() const; | |
| | | | |
|
| ClassDef(TRecorder,1) // Class provides direct recorder/repl | | // Saves all the canvases previous to the TRecorder | |
| ayer interface for a user. | | void PrevCanvases(const char *filename, Option_t *option); | |
| | | | |
| | | ClassDef(TRecorder,1) // Class provides direct recorder/replayer interfa | |
| | | ce for a user. | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorderState // | | // TRecorderState // | |
| // // | | // // | |
| // Abstract class that defines interface for a state of recorder. // | | // Abstract class that defines interface for a state of recorder. // | |
| // Inherited classes are: // | | // Inherited classes are: // | |
| // - TRecorderInactive // | | // - TRecorderInactive // | |
| // - TRecorderRecording // | | // - TRecorderRecording // | |
| | | | |
| skipping to change at line 468 | | skipping to change at line 520 | |
| // changing and deleting states. // | | // changing and deleting states. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| class TRecorderState | | class TRecorderState | |
| { | | { | |
| protected: | | protected: | |
| friend class TRecorder; | | friend class TRecorder; | |
| void ChangeState(TRecorder *r, TRecorderState *s, Bool_t deletePreviousS
tate) { r->ChangeState(s, deletePreviousState); } | | void ChangeState(TRecorder *r, TRecorderState *s, Bool_t deletePreviousS
tate) { r->ChangeState(s, deletePreviousState); } | |
| | | | |
| public: | | public: | |
|
| virtual ~TRecorderState() {} | | virtual ~TRecorderState() {} | |
| virtual void Start(TRecorder *, const char *, Option_t *, Window_t *,
Int_t) {} | | virtual void Start(TRecorder *, const char *, Option_t *, Window_t *,
Int_t) {} | |
| virtual void Stop(TRecorder *, Bool_t ) {} | | virtual void Stop(TRecorder *, Bool_t ) {} | |
| virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::ERep
layModes) { return false; } | | virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::ERep
layModes) { return false; } | |
| virtual void Pause(TRecorder *) {} | | virtual void Pause(TRecorder *) {} | |
| virtual void Resume(TRecorder *) {} | | virtual void Resume(TRecorder *) {} | |
| virtual void ReplayStop(TRecorder *) {} | | virtual void ReplayStop(TRecorder *) {} | |
| | | | |
| virtual void ListCmd(const char *) {} | | virtual void ListCmd(const char *) {} | |
| virtual void ListGui(const char *) {} | | virtual void ListGui(const char *) {} | |
| | | | |
|
| | | virtual void PrevCanvases(const char *, Option_t *) {} | |
| | | | |
| virtual TRecorder::ERecorderState GetState() const = 0; | | virtual TRecorder::ERecorderState GetState() const = 0; | |
| | | | |
| ClassDef(TRecorderState, 0) // Abstract class that defines interface for
a state of recorder | | ClassDef(TRecorderState, 0) // Abstract class that defines interface for
a state of recorder | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorderReplaying // | | // TRecorderReplaying // | |
| // // | | // // | |
| // Represents state of TRecorder when replaying previously recorded // | | // Represents state of TRecorder when replaying previously recorded // | |
| | | | |
| skipping to change at line 509 | | skipping to change at line 563 | |
| Bool_t PrepareNextEvent(); | | Bool_t PrepareNextEvent(); | |
| Bool_t RemapWindowReferences(); | | Bool_t RemapWindowReferences(); | |
| Bool_t CanOverlap(); | | Bool_t CanOverlap(); | |
| | | | |
| Bool_t FilterEvent(TRecGuiEvent *e); | | Bool_t FilterEvent(TRecGuiEvent *e); | |
| | | | |
| TRecorder *fRecorder; // Reference to recorder (owner of this state) i
s kept in order to switch | | TRecorder *fRecorder; // Reference to recorder (owner of this state) i
s kept in order to switch | |
| // recorder to INACTIVE state after replaying is
finished | | // recorder to INACTIVE state after replaying is
finished | |
| | | | |
| TFile *fFile; // ROOT file which the recorded events are being
read from | | TFile *fFile; // ROOT file which the recorded events are being
read from | |
|
| | | | |
| | | TCanvas *fCanv; // Used to record the previous canvases | |
| | | | |
| TTimer *fTimer; // Timer used for replaying | | TTimer *fTimer; // Timer used for replaying | |
| | | | |
| TTree *fWinTree; // TTree with recorded windows (=registered duri
ng recording) | | TTree *fWinTree; // TTree with recorded windows (=registered duri
ng recording) | |
| TTree *fGuiTree; // TTree with recorded GUI events | | TTree *fGuiTree; // TTree with recorded GUI events | |
| TTree *fCmdTree; // TTree with recorded commandline events | | TTree *fCmdTree; // TTree with recorded commandline events | |
|
| | | TTree *fExtraTree; // TTree with recorded extra events (PaveLabels
and Texts) | |
| | | | |
|
| ULong64_t fWin; // Window ID being currenty mapped | | ULong64_t fWin; // Window ID being currenty mapped | |
| TRecGuiEvent *fGuiEvent; // GUI event being currently replayed | | TRecGuiEvent *fGuiEvent; // GUI event being currently replayed | |
| TRecCmdEvent *fCmdEvent; // Commandline event being currently replayed | | TRecCmdEvent *fCmdEvent; // Commandline event being currently re | |
| | | played | |
| Int_t fRegWinCounter; // Counter of registered windows when repl | | TRecExtraEvent *fExtraEvent; // Extra event being currently replayed | |
| aying | | | |
| Int_t fGuiTreeCounter; // Counter of GUI events that have been re | | Int_t fRegWinCounter; // Counter of registered windows when r | |
| played | | eplaying | |
| Int_t fCmdTreeCounter; // Counter of commandline events that have | | Int_t fGuiTreeCounter; // Counter of GUI events that have been | |
| been replayed | | replayed | |
| | | Int_t fCmdTreeCounter; // Counter of commandline events that h | |
| | | ave been replayed | |
| | | Int_t fExtraTreeCounter; // Counter of extra events that have be | |
| | | en replayed | |
| | | | |
|
| Int_t fWinTreeEntries; // Number of registered windows during _re
cording_ | | Int_t fWinTreeEntries; // Number of registered windows during
_recording_ | |
| | | | |
| TMutex *fMutex; | | TMutex *fMutex; | |
| | | | |
|
| TList *fWindowList; // List of TRecWinPair objects. Mapping of
window IDs is stored here. | | TList *fWindowList; // List of TRecWinPair objects. Mapping
of window IDs is stored here. | |
| | | | |
|
| TRecEvent *fNextEvent; // The next event that is going to be re
played (GUI event or commandline) | | TRecEvent *fNextEvent; // The next event that is going to be r
eplayed (GUI event or commandline) | |
| | | | |
|
| TTime fPreviousEventTime; // Execution time of the previous
ly replayed event. | | TTime fPreviousEventTime; // Execution time of the previously rep
layed event. | |
| // It is used for computing time
difference between two events. | | // It is used for computing time
difference between two events. | |
| | | | |
|
| Bool_t fWaitingForWindow; // Signalizes that we wait for a | | Bool_t fWaitingForWindow; // Signalizes that we wait for a window | |
| window to be registered in order | | to be registered in order | |
| // to replay the next event fNext | | // to replay the next event fNextEvent. | |
| Event. | | // Registraion of windows can last diff | |
| // Registraion of windows can las | | erent time when recording and replaying. | |
| t different time when recording and replaying. | | // If there is an event ready to be rep | |
| // If there is an event ready to | | layed but the corresponding windows has not been yet | |
| be replayed but the corresponding windows has not been yet | | // registered, we wait (postopone fNext | |
| // registered, we wait (postopone | | Event) until it is registered. | |
| fNextEvent) until it is registered. | | | |
| | | Bool_t fEventReplayed; // Signalizes that the last event sent | |
| Bool_t fEventReplayed; // Signalizes that the last event | | to the replaying has been already replayed. | |
| sent to the replaying has been already replayed. | | // Sometimes an execution of an event c | |
| // Sometimes an execution of an e | | an take more time than during recording. | |
| vent can take more time than during recording. | | // This ensures that the next event is | |
| // This ensures that the next eve | | sent to replaying AFTER | |
| nt is sent to replaying AFTER | | // the replaying of the previous one fi | |
| // the replaying of the previous | | nishes and not earlier. | |
| one finishes and not earlier. | | // Exceptions: ButtonPress and ButtonRe | |
| // Exceptions: ButtonPress and Bu | | lease events (See TRecorderReplaying::CanBeOverlapped) | |
| ttonRelease events (See TRecorderReplaying::CanBeOverlapped) | | | |
| | | | |
|
| Bool_t fShowMouseCursor; // Specifies if mouse cursor shou | | Bool_t fShowMouseCursor; // Specifies if mouse cursor should be | |
| ld be also replayed | | also replayed | |
| | | | |
| | | Bool_t fFilterStatusBar; // Special flag to filter status bar el | |
| | | ement | |
| | | | |
| protected: | | protected: | |
| friend class TRecorderInactive; | | friend class TRecorderInactive; | |
| friend class TRecorderPaused; | | friend class TRecorderPaused; | |
| | | | |
| TRecorderReplaying(const char *filename); | | TRecorderReplaying(const char *filename); | |
| Bool_t Initialize(TRecorder *r, Bool_t showMouseCursor, TRecorder::E
ReplayModes mode); | | Bool_t Initialize(TRecorder *r, Bool_t showMouseCursor, TRecorder::E
ReplayModes mode); | |
| | | | |
| public: | | public: | |
| virtual TRecorder::ERecorderState GetState() const { return TRecorder::k
Replaying; } | | virtual TRecorder::ERecorderState GetState() const { return TRecorder::k
Replaying; } | |
| | | | |
|
| virtual void Pause(TRecorder *r); | | virtual void Pause(TRecorder *r); | |
| virtual void Continue(); | | virtual void Continue(); | |
| virtual void ReplayStop(TRecorder *r); | | virtual void ReplayStop(TRecorder *r); | |
| | | | |
|
| void RegisterWindow(Window_t w); //SLOT | | void RegisterWindow(Window_t w); //SLOT | |
| void ReplayRealtime(); //SLOT | | void ReplayRealtime(); //SLOT | |
| | | | |
| ClassDef(TRecorderReplaying, 0) // Represents state of TRecorder when re
playing | | ClassDef(TRecorderReplaying, 0) // Represents state of TRecorder when re
playing | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorderRecording // | | // TRecorderRecording // | |
| // // | | // // | |
| // Represents state of TRecorder when recording events. // | | // Represents state of TRecorder when recording events. // | |
| // // | | // // | |
| | | | |
| skipping to change at line 590 | | skipping to change at line 652 | |
| 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 | |
|
| | | 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) | |
| | | | |
| 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 | |
|
| | | TRecExtraEvent *fExtraEvent; // The newest extra event to be s
tored in TTree | |
| | | | |
| Bool_t fCmdEventPending; // Indication if there is a still
pending commandline event that should be stored. | | Bool_t fCmdEventPending; // Indication if there is a still
pending commandline event that should be stored. | |
| // Commandline events are stored
with 1 event delay to ensure skipping | | // Commandline events are stored
with 1 event delay to ensure skipping | |
| // the last event 'TRecorder::Sto
p' that is not supposed to be recorded | | // the last event 'TRecorder::Sto
p' that is not supposed to be recorded | |
| | | | |
| Int_t fRegWinCounter; // Counter of registered ROOT win
dows. | | Int_t fRegWinCounter; // Counter of registered ROOT win
dows. | |
| // It is increased every time whe
n a new window is registered | | // It is increased every time whe
n a new window is registered | |
| | | | |
| Int_t fFilteredIdsCount; // Only when GUI for recorder is
used: Count of windows in GUI recorder | | Int_t fFilteredIdsCount; // Only when GUI for recorder is
used: Count of windows in GUI recorder | |
| Window_t *fFilteredIds; // Only when GUI for recorer is u
sed: IDs of windows that creates that GUI. | | Window_t *fFilteredIds; // Only when GUI for recorer is u
sed: IDs of windows that creates that GUI. | |
| // Events for GUI recorder are no
t recorded. | | // Events for GUI recorder are no
t recorded. | |
|
| | | Bool_t fFilterEventPave; // Special flag to filter events | |
| | | during the pave recording | |
| | | | |
| protected: | | protected: | |
| friend class TRecorderInactive; | | friend class TRecorderInactive; | |
| 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 RecordGuiCNEvent(Event_t* e); //SLOT | |
|
| | | void RecordPave(const TObject* obj); //SLOT | |
| | | void RecordText(const TObject* obj); //SLOT | |
| | | void FilterEventPave(); //SLOT | |
| | | void StartEditing(); //SLOT | |
| | | | |
| | | 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 | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorderInactive // | | // TRecorderInactive // | |
| // // | | // // | |
| // Represents state of TRecorder just after its creation. // | | // Represents state of TRecorder just after its creation. // | |
| // Nor recording neither replaying is being executed in this state. // | | // Nor recording neither replaying is being executed in this state. // | |
| // // | | // // | |
| // Not intended to be used by a user directly. // | | // Not intended to be used by a user directly. // | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| class TRecorderInactive : public TRecorderState | | class TRecorderInactive : public TRecorderState | |
| { | | { | |
|
| | | | |
| | | private: | |
| | | TSeqCollection *fCollect; | |
| | | | |
| public: | | public: | |
| virtual ~TRecorderInactive() {} | | virtual ~TRecorderInactive() {} | |
| TRecorderInactive(){} | | TRecorderInactive(){} | |
| | | | |
| virtual void ListCmd(const char *filename); | | virtual void ListCmd(const char *filename); | |
| virtual void ListGui(const char *filename); | | virtual void ListGui(const char *filename); | |
| | | | |
| virtual void Start(TRecorder *r, const char *filename, Option_t *optio
n, Window_t *w = 0, Int_t winCount = 0); | | virtual void Start(TRecorder *r, const char *filename, Option_t *optio
n, Window_t *w = 0, Int_t winCount = 0); | |
| virtual Bool_t Replay(TRecorder *r, const char *filename, Bool_t showMou
seCursor, TRecorder::EReplayModes mode); | | virtual Bool_t Replay(TRecorder *r, const char *filename, Bool_t showMou
seCursor, TRecorder::EReplayModes mode); | |
| | | | |
| virtual TRecorder::ERecorderState GetState() const { return TRecorder::k
Inactive; } | | virtual TRecorder::ERecorderState GetState() const { return TRecorder::k
Inactive; } | |
| | | | |
| static void DumpRootEvent(TRecGuiEvent *e, Int_t n); | | static void DumpRootEvent(TRecGuiEvent *e, Int_t n); | |
| static long DisplayValid(Long_t n) { return ( n < 0 ? -1 : n); } | | static long DisplayValid(Long_t n) { return ( n < 0 ? -1 : n); } | |
| | | | |
|
| | | void PrevCanvases(const char *filename, Option_t *option); | |
| | | | |
| ClassDef(TRecorderInactive, 0) // Represents state of TRecorder after it
s creation | | ClassDef(TRecorderInactive, 0) // Represents state of TRecorder after it
s creation | |
| }; | | }; | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| // // | | // // | |
| // TRecorderPaused // | | // TRecorderPaused // | |
| // // | | // // | |
| // Represents state of TRecorder when replaying was paused // | | // Represents state of TRecorder when replaying was paused // | |
| // by a user. // | | // by a user. // | |
| // The paused replaying is remembered and after Resume call can // | | // The paused replaying is remembered and after Resume call can // | |
| | | | |
| skipping to change at line 725 | | skipping to change at line 804 | |
| void SetDefault(); | | void SetDefault(); | |
| | | | |
| public: | | public: | |
| TGRecorder(const TGWindow *p = 0, UInt_t w = 230, UInt_t h = 150); | | TGRecorder(const TGWindow *p = 0, UInt_t w = 230, UInt_t h = 150); | |
| virtual ~TGRecorder(); | | virtual ~TGRecorder(); | |
| | | | |
| void StartStop(); | | void StartStop(); | |
| void Update(); | | void Update(); | |
| void Replay(); | | void Replay(); | |
| | | | |
|
| ClassDef(TGRecorder,0) // GUI class of the event recorder. | | ClassDef(TGRecorder,0) // GUI class of the event recorder. | |
| }; | | }; | |
| | | | |
End of changes. 27 change blocks. |
| 51 lines changed or deleted | | 134 lines changed or added | |
|
| TRolke.h | | TRolke.h | |
|
| // @(#)root/physics:$Id: TRolke.h 20882 2007-11-19 11:31:26Z rdm $ | | | |
| // Author: Jan Conrad 9/2/2004 | | | |
| | | | |
|
| /************************************************************************* | | /////////////////////////////////////////////////////////////////////////// | |
| * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | | /// | |
| * All rights reserved. * | | // | |
| * * | | // TRolke | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | // | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | // This class computes confidence intervals for the rate of a Poisson | |
| *************************************************************************/ | | // in the presence of background and efficiency with a fully frequentist | |
| | | // treatment of the uncertainties in the efficiency and background estimat | |
| | | e | |
| | | // using the profile likelihood method. | |
| | | // | |
| | | // Author: Jan Conrad (CERN) 2004 | |
| | | // Updated: Johan Lundberg (CERN) 2009 | |
| | | // | |
| | | // Copyright CERN 2004,2009 Jan.Conrad@cern.ch, | |
| | | // Johan.Lundberg@cern.ch | |
| | | // | |
| | | // This file lists the methods and their syntax. For information about | |
| | | // the statistical meaning of the parameters, consult TRolke.cxx. | |
| | | // ------------------- | |
| | | // Examples are found in the file Rolke.C | |
| | | // -------------------------------------- | |
| | | // | |
| | | /////////////////////////////////////////////////////////////////////////// | |
| | | /// | |
| | | | |
| #ifndef ROOT_TRolke | | #ifndef ROOT_TRolke | |
| #define ROOT_TRolke | | #define ROOT_TRolke | |
| | | | |
|
| #ifndef ROOT_TObject | | | |
| #include "TObject.h" | | #include "TObject.h" | |
|
| #endif | | #include "TMath.h" | |
| | | | |
|
| class TRolke : public TObject { | | // Class definition. This class is not intended to be used as a base class. | |
| | | class TRolke : public TObject | |
| | | { | |
| | | | |
|
| protected: | | private: | |
| Double_t fCL; // confidence level as a fraction [e.g. 90% = 0.9] | | Double_t fCL; // confidence level as a fraction [0.9 for 90% ] | |
| Double_t fUpperLimit; // the calculated upper limit | | Double_t fUpperLimit; // the calculated upper limit | |
| Double_t fLowerLimit; // the calculated lower limit | | Double_t fLowerLimit; // the calculated lower limit | |
|
| Int_t fSwitch; // 0: for unbounded likelihood | | bool fBounding; // false for unbounded likelihood | |
| // 1: for bounded likelihood | | // true for bounded likelihood | |
| | | Int_t fNumWarningsDeprecated1; | |
| | | Int_t fNumWarningsDeprecated2; | |
| | | | |
| | | /* ----------------------------------------------------------------- */ | |
| | | /* These variables are set by the Set methods for the various models */ | |
| | | Int_t f_x; | |
| | | Int_t f_y; | |
| | | Int_t f_z; | |
| | | Double_t f_bm; | |
| | | Double_t f_em; | |
| | | Double_t f_e; | |
| | | Int_t f_mid; | |
| | | Double_t f_sde; | |
| | | Double_t f_sdb; | |
| | | Double_t f_tau; | |
| | | Double_t f_b; | |
| | | Int_t f_m; | |
| | | | |
|
| | | /* ----------------------------------------------------------------- */ | |
| | | /* Internal helper functions and methods */ | |
| // The Calculator | | // The Calculator | |
|
| | | Double_t Interval(Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, D | |
| Double_t Interval(Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, D | | ouble_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, | |
| ouble_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, | | Int_t m); | |
| Int_t m); | | | |
| | | | |
| // LIKELIHOOD ROUTINE | | // LIKELIHOOD ROUTINE | |
|
| | | | |
| Double_t Likelihood(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t bm,
Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t t
au, Double_t b, Int_t m, Int_t what); | | Double_t Likelihood(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t bm,
Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t t
au, Double_t b, Int_t m, Int_t what); | |
| | | | |
| //MODEL 1 | | //MODEL 1 | |
|
| Double_t EvalLikeMod1(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t e | | Double_t EvalLikeMod1(Double_t mu, Int_t x, Int_t y, Int_t z, Double_t t | |
| , Double_t tau, Double_t b, Int_t m, Int_t what); | | au, Int_t m, Int_t what); | |
| Double_t LikeMod1(Double_t mu,Double_t b, Double_t e, Int_t x, Int_t y, | | Double_t LikeMod1(Double_t mu, Double_t b, Double_t e, Int_t x, Int_t y, | |
| Int_t z, Double_t tau, Int_t m); | | Int_t z, Double_t tau, Int_t m); | |
| void ProfLikeMod1(Double_t mu,Double_t &b, Double_t &e,Int_t x,Int_t | | void ProfLikeMod1(Double_t mu, Double_t &b, Double_t &e, Int_t x, In | |
| y, Int_t z,Double_t tau,Int_t m); | | t_t y, Int_t z, Double_t tau, Int_t m); | |
| Double_t LikeGradMod1(Double_t e, Double_t mu, Int_t x,Int_t y,Int_t z,D | | Double_t LikeGradMod1(Double_t e, Double_t mu, Int_t x, Int_t y, Int_t z | |
| ouble_t tau,Int_t m); | | , Double_t tau, Int_t m); | |
| | | | |
| //MODEL 2 | | //MODEL 2 | |
|
| Double_t EvalLikeMod2(Double_t mu, Int_t x, Int_t y, Double_t em, Double
_t e,Double_t sde, Double_t tau, Double_t b, Int_t what); | | Double_t EvalLikeMod2(Double_t mu, Int_t x, Int_t y, Double_t em, Double
_t sde, Double_t tau, Int_t what); | |
| | | | |
|
| Double_t LikeMod2(Double_t mu, Double_t b, Double_t e,Int_t x,Int_t y,Do
uble_t em,Double_t tau, Double_t v); | | Double_t LikeMod2(Double_t mu, Double_t b, Double_t e, Int_t x, Int_t y,
Double_t em, Double_t tau, Double_t v); | |
| | | | |
| //MODEL 3 | | //MODEL 3 | |
|
| Double_t EvalLikeMod3(Double_t mu, Int_t x, Double_t bm, Double_t em, Do | | Double_t EvalLikeMod3(Double_t mu, Int_t x, Double_t bm, Double_t em, Do | |
| uble_t e, Double_t sde, Double_t sdb, Double_t b, Int_t what); | | uble_t sde, Double_t sdb, Int_t what); | |
| Double_t LikeMod3(Double_t mu,Double_t b,Double_t e,Int_t x,Double_t bm, | | Double_t LikeMod3(Double_t mu, Double_t b, Double_t e, Int_t x, Double_t | |
| Double_t em,Double_t u,Double_t v); | | bm, Double_t em, Double_t u, Double_t v); | |
| | | | |
| //MODEL 4 | | //MODEL 4 | |
|
| Double_t EvalLikeMod4(Double_t mu, Int_t x, Int_t y, Double_t tau, Doubl | | Double_t EvalLikeMod4(Double_t mu, Int_t x, Int_t y, Double_t tau, Int_t | |
| e_t b, Int_t what); | | what); | |
| Double_t LikeMod4(Double_t mu,Double_t b,Int_t x,Int_t y,Double_t tau); | | Double_t LikeMod4(Double_t mu, Double_t b, Int_t x, Int_t y, Double_t ta | |
| | | u); | |
| | | | |
| //MODEL 5 | | //MODEL 5 | |
|
| Double_t EvalLikeMod5(Double_t mu, Int_t x, Double_t bm, Double_t sdb, D | | Double_t EvalLikeMod5(Double_t mu, Int_t x, Double_t bm, Double_t sdb, I | |
| ouble_t b, Int_t what); | | nt_t what); | |
| Double_t LikeMod5(Double_t mu,Double_t b,Int_t x,Double_t bm,Double_t u) | | Double_t LikeMod5(Double_t mu, Double_t b, Int_t x, Double_t bm, Double_ | |
| ; | | t u); | |
| | | | |
| //MODEL 6 | | //MODEL 6 | |
|
| Double_t EvalLikeMod6(Double_t mu, Int_t x, Int_t z, Double_t e, Double_ | | Double_t EvalLikeMod6(Double_t mu, Int_t x, Int_t z, Double_t b, Int_t m | |
| t b, Int_t m, Int_t what); | | , Int_t what); | |
| Double_t LikeMod6(Double_t mu,Double_t b,Double_t e,Int_t x,Int_t z,Int_ | | Double_t LikeMod6(Double_t mu, Double_t b, Double_t e, Int_t x, Int_t z, | |
| t m); | | Int_t m); | |
| | | | |
| //MODEL 7 | | //MODEL 7 | |
|
| Double_t EvalLikeMod7(Double_t mu, Int_t x, Double_t em, Double_t e, Dou | | Double_t EvalLikeMod7(Double_t mu, Int_t x, Double_t em, Double_t sde, D | |
| ble_t sde, Double_t b, Int_t what); | | ouble_t b, Int_t what); | |
| Double_t LikeMod7(Double_t mu,Double_t b,Double_t e,Int_t x,Double_t em, | | Double_t LikeMod7(Double_t mu, Double_t b, Double_t e, Int_t x, Double_t | |
| Double_t v); | | em, Double_t v); | |
| | | | |
| //MISC | | //MISC | |
| static Double_t EvalPolynomial(Double_t x, const Int_t coef[], Int_t N); | | static Double_t EvalPolynomial(Double_t x, const Int_t coef[], Int_t N); | |
|
| static Double_t EvalMonomial (Double_t x, const Int_t coef[], Int_t N); | | static Double_t EvalMonomial(Double_t x, const Int_t coef[], Int_t N); | |
| Double_t LogFactorial(Int_t n); | | Double_t LogFactorial(Int_t n); | |
| | | | |
|
| | | Double_t ComputeInterval(Int_t x, Int_t y, Int_t z, Double_t bm, Double_ | |
| | | t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Doub | |
| | | le_t b, Int_t m); | |
| | | | |
| | | void SetModelParameters(Int_t x, Int_t y, Int_t z, Double_t bm, Double_t | |
| | | em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Doubl | |
| | | e_t b, Int_t m); | |
| | | | |
| | | void SetModelParameters(); | |
| | | | |
| | | Double_t GetBackground(); | |
| | | | |
| public: | | public: | |
| | | | |
|
| TRolke(Double_t CL=0.9, Option_t *option = ""); | | /* Constructor with optional Confidence Level argument. | |
| | | 'option' is not used. */ | |
| | | TRolke(Double_t CL = 0.9, Option_t *option = ""); | |
| | | | |
|
| | | /* Destructor */ | |
| virtual ~TRolke(); | | virtual ~TRolke(); | |
| | | | |
|
| Double_t CalculateInterval(Int_t x, Int_t y, Int_t z, Double_t bm, Doubl | | /* Get and set the Confidence Level */ | |
| e_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Do | | Double_t GetCL() const { | |
| uble_t b,Int_t m); | | return fCL; | |
| Double_t GetUpperLimit(void) const { return fUpperLimit;} | | } | |
| Double_t GetLowerLimit(void) const { return fLowerLimit;} | | void SetCL(Double_t CL) { | |
| Int_t GetSwitch(void) const { return fSwitch;} | | fCL = CL; | |
| void SetSwitch(Int_t sw) { fSwitch = sw; } | | } | |
| Double_t GetCL(void) const { return fCL;} | | | |
| void SetCL(Double_t CL) { fCL = CL; } | | /* Set the Confidence Level in terms of Sigmas. */ | |
| | | void SetCLSigmas(Double_t CLsigmas) { | |
| | | fCL = TMath::Erf(CLsigmas / TMath::Sqrt(2.0)) ; | |
| | | } | |
| | | | |
| | | // The Set methods for the different models are described in Rolke.cxx | |
| | | // model 1 | |
| | | void SetPoissonBkgBinomEff(Int_t x, Int_t y, Int_t z, Double_t tau, Int_ | |
| | | t m); | |
| | | | |
| | | // model 2 | |
| | | void SetPoissonBkgGaussEff(Int_t x, Int_t y, Double_t em, Double_t tau, | |
| | | Double_t sde); | |
| | | | |
| | | // model 3 | |
| | | void SetGaussBkgGaussEff(Int_t x, Double_t bm, Double_t em, Double_t sde | |
| | | , Double_t sdb); | |
| | | | |
| | | // model 4 | |
| | | void SetPoissonBkgKnownEff(Int_t x, Int_t y, Double_t tau, Double_t e); | |
| | | | |
| | | // model 5 | |
| | | void SetGaussBkgKnownEff(Int_t x, Double_t bm, Double_t sdb, Double_t e) | |
| | | ; | |
| | | | |
| | | // model 6 | |
| | | void SetKnownBkgBinomEff(Int_t x, Int_t z, Int_t m, Double_t b); | |
| | | | |
| | | // model 7 | |
| | | void SetKnownBkgGaussEff(Int_t x, Double_t em, Double_t sde, Double_t b) | |
| | | ; | |
| | | | |
| | | /* Deprecated interface method (read Rolke.cxx). May be removed from fut | |
| | | ure releases */ | |
| | | Double_t CalculateInterval(Int_t x, Int_t y, Int_t z, Double_t bm, Doubl | |
| | | e_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Do | |
| | | uble_t b, Int_t m); | |
| | | | |
| | | // get the upper and lower limits based on the specified model | |
| | | bool GetLimits(Double_t& low, Double_t& high); | |
| | | Double_t GetUpperLimit(); | |
| | | Double_t GetLowerLimit(); | |
| | | | |
| | | /* get the upper and lower average limits based on the specified model. | |
| | | No uncertainties are considered for the Poisson weights in the averag | |
| | | ing sum */ | |
| | | bool GetSensitivity(Double_t& low, Double_t& high, Double_t pPrecision = | |
| | | 0.00001); | |
| | | | |
| | | /* get the upper and lower limits for the outcome corresponding to | |
| | | a given quantile. For integral=0.5 this gives the median limits | |
| | | in repeated experiments. The returned out_x is the corresponding | |
| | | (e.g. median) value of x. | |
| | | No uncertainties are considered for the Poisson weights when calculat | |
| | | ing | |
| | | the Poisson integral */ | |
| | | bool GetLimitsQuantile(Double_t& low, Double_t& high, Int_t& out_x, Doub | |
| | | le_t integral = 0.5); | |
| | | | |
| | | /* get the upper and lower limits for the most likely outcome. | |
| | | The returned out_x is the corresponding value of x | |
| | | No uncertainties are considered for the Poisson weights when finding | |
| | | ML */ | |
| | | bool GetLimitsML(Double_t& low, Double_t& high, Int_t& out_x); | |
| | | | |
| | | /* get the value of x corresponding to rejection of the null hypothesis. | |
| | | This means a lower limit >0 with the pre-specified Confidence Level. | |
| | | maxtry is the maximum value of x to try. maxtry<0 gives automatic mod | |
| | | e. */ | |
| | | bool GetCriticalNumber(Int_t& ncrit,Int_t maxtry=-1); | |
| | | | |
| | | /* Set the bounding mode flag. Read TRolke.cxx for details. */ | |
| | | bool GetBounding() const { | |
| | | return fBounding; | |
| | | } | |
| | | void SetBounding(const bool bnd) { | |
| | | fBounding = bnd; | |
| | | } | |
| | | | |
| | | /* Deprecated name for SetBounding. */ | |
| | | void SetSwitch(bool bnd) ; | |
| | | | |
|
| ClassDef(TRolke,1) //calculate confidence limits using the Rolke method | | /* Dump internals. Option is not used */ | |
| | | void Print(Option_t*) const; | |
| | | | |
| | | ClassDef(TRolke, 2) | |
| }; | | }; | |
|
| | | | |
| | | //calculate confidence limits using the Rolke method | |
| #endif | | #endif | |
| | | | |
End of changes. 25 change blocks. |
| 62 lines changed or deleted | | 197 lines changed or added | |
|
| TTable.h | | TTable.h | |
|
| // @(#)root/table:$Id: TTable.h 23631 2008-05-01 10:50:11Z rdm $ | | // @(#)root/table:$Id: TTable.h 27157 2009-01-15 14:05:12Z brun $ | |
| // Author: Valery Fine(fine@mail.cern.ch) 03/07/98 | | // Author: Valery Fine(fine@mail.cern.ch) 03/07/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 75 | | skipping to change at line 75 | |
| Bool_t OutOfBoundsError(const char *where, Int_t i) const; | | Bool_t OutOfBoundsError(const char *where, Int_t i) const; | |
| | | | |
| void CopyStruct(Char_t *dest, const Char_t *src); | | void CopyStruct(Char_t *dest, const Char_t *src); | |
| Char_t *Create(); | | Char_t *Create(); | |
| virtual void Clear(Option_t *opt=""); | | virtual void Clear(Option_t *opt=""); | |
| virtual void Delete(Option_t *opt=""); | | virtual void Delete(Option_t *opt=""); | |
| virtual Bool_t EntryLoop(const Char_t *exprFileName,Int_t &action, TObj
ect *obj, Int_t nentries=1000000000, Int_t firstentry=0, Option_t *option="
"); | | virtual Bool_t EntryLoop(const Char_t *exprFileName,Int_t &action, TObj
ect *obj, Int_t nentries=1000000000, Int_t firstentry=0, Option_t *option="
"); | |
| Int_t SetfN(Long_t len); | | Int_t SetfN(Long_t len); | |
| void SetTablePointer(void *table); | | void SetTablePointer(void *table); | |
| void SetUsedRows(Int_t n); | | void SetUsedRows(Int_t n); | |
|
| virtual void SetType(const Text_t *const type); | | virtual void SetType(const char *const type); | |
| void StreamerHeader(TBuffer &b,Version_t version=3); | | void StreamerHeader(TBuffer &b,Version_t version=3); | |
| void StreamerTable(TBuffer &b,Version_t version=3); | | void StreamerTable(TBuffer &b,Version_t version=3); | |
| virtual TTableDescriptor *GetDescriptorPointer() const; | | virtual TTableDescriptor *GetDescriptorPointer() const; | |
| virtual void SetDescriptorPointer(TTableDescriptor *list); | | virtual void SetDescriptorPointer(TTableDescriptor *list); | |
| | | | |
| void ReAlloc(Int_t newsize); | | void ReAlloc(Int_t newsize); | |
| static const char *TableDictionary(const char *className,const char *str
uctName,TTableDescriptor *&ColDescriptors); | | static const char *TableDictionary(const char *className,const char *str
uctName,TTableDescriptor *&ColDescriptors); | |
| | | | |
| public: | | public: | |
| | | | |
| enum EColumnType {kNAN, kFloat, kInt, kLong, kShort, kDouble, kUInt | | enum EColumnType {kNAN, kFloat, kInt, kLong, kShort, kDouble, kUInt | |
| ,kULong, kUShort, kUChar, kChar, kPtr, kBool | | ,kULong, kUShort, kUChar, kChar, kPtr, kBool | |
| ,kEndColumnType }; | | ,kEndColumnType }; | |
| enum ETableBits { | | enum ETableBits { | |
| kIsNotOwn = BIT(23) // if the TTable wrapper doesn't own the S
TAF table | | kIsNotOwn = BIT(23) // if the TTable wrapper doesn't own the S
TAF table | |
| // As result of the Update() method for ex
ample | | // As result of the Update() method for ex
ample | |
| }; | | }; | |
| static const char *fgTypeName[kEndColumnType]; | | static const char *fgTypeName[kEndColumnType]; | |
|
| TTable(const Text_t *name=0, Int_t size=0); | | TTable(const char *name=0, Int_t size=0); | |
| TTable(const Text_t *name, Int_t n,Int_t size); | | TTable(const char *name, Int_t n,Int_t size); | |
| TTable(const Text_t *name, Int_t n, Char_t *array,Int_t size); | | TTable(const char *name, Int_t n, Char_t *array,Int_t size); | |
| TTable(const Text_t *name, const Text_t *type, Int_t n, Char_t *array, I | | TTable(const char *name, const char *type, Int_t n, Char_t *array, Int_t | |
| nt_t size); | | size); | |
| TTable(const TTable &table); | | TTable(const TTable &table); | |
| TTable &operator=(const TTable &rhs); | | TTable &operator=(const TTable &rhs); | |
| virtual ~TTable(); | | virtual ~TTable(); | |
| | | | |
| virtual void Adopt(Int_t n, void *array); | | virtual void Adopt(Int_t n, void *array); | |
| virtual Int_t AddAt(const void *c); | | virtual Int_t AddAt(const void *c); | |
| virtual void AddAt(const void *c, Int_t i); | | virtual void AddAt(const void *c, Int_t i); | |
| virtual void AddAt(TDataSet *dataset,Int_t idx=0); | | virtual void AddAt(TDataSet *dataset,Int_t idx=0); | |
| virtual Long_t AppendRows(const void *row, UInt_t nRows); | | virtual Long_t AppendRows(const void *row, UInt_t nRows); | |
| virtual void AsString(void *buf, EColumnType type, Int_t width
, ostream &out) const; | | virtual void AsString(void *buf, EColumnType type, Int_t width
, ostream &out) const; | |
| const void *At(Int_t i) const; | | const void *At(Int_t i) const; | |
| virtual void Browse(TBrowser *b); | | virtual void Browse(TBrowser *b); | |
| virtual void CopySet(TTable &array); | | virtual void CopySet(TTable &array); | |
| Int_t CopyRows(const TTable *srcTable,Long_t srcRow=0,
Long_t dstRow=0, Long_t nRows=0, Bool_t expand=kFALSE); | | Int_t CopyRows(const TTable *srcTable,Long_t srcRow=0,
Long_t dstRow=0, Long_t nRows=0, Bool_t expand=kFALSE); | |
| virtual void DeleteRows(Long_t indx,UInt_t nRows=1); | | virtual void DeleteRows(Long_t indx,UInt_t nRows=1); | |
| virtual void Draw(Option_t *opt); | | virtual void Draw(Option_t *opt); | |
| virtual TH1 *Draw(TCut varexp, TCut selection, Option_t *optio
n="" | | virtual TH1 *Draw(TCut varexp, TCut selection, Option_t *optio
n="" | |
| ,Int_t nentries=1000000000, Int_t firstentry=0); | | ,Int_t nentries=1000000000, Int_t firstentry=0); | |
|
| virtual TH1 *Draw(const Text_t *varexp, const Text_t *selectio
n, Option_t *option="" | | virtual TH1 *Draw(const char *varexp, const char *selection, O
ption_t *option="" | |
| ,Int_t nentries=1000000000, Int_t firstentry=
0); // *MENU* | | ,Int_t nentries=1000000000, Int_t firstentry=
0); // *MENU* | |
| void *GetArray() const ; | | void *GetArray() const ; | |
| virtual TClass *GetRowClass() const ; | | virtual TClass *GetRowClass() const ; | |
| Int_t GetSize() const { return fN; } | | Int_t GetSize() const { return fN; } | |
| virtual Long_t GetNRows() const; | | virtual Long_t GetNRows() const; | |
| virtual Long_t GetRowSize() const; | | virtual Long_t GetRowSize() const; | |
| virtual Long_t GetTableSize() const; | | virtual Long_t GetTableSize() const; | |
| virtual TTableDescriptor *GetTableDescriptors() const; | | virtual TTableDescriptor *GetTableDescriptors() const; | |
| virtual TTableDescriptor *GetRowDescriptors() const; | | virtual TTableDescriptor *GetRowDescriptors() const; | |
| virtual const Char_t *GetType() const; | | virtual const Char_t *GetType() const; | |
|
| virtual void Fit(const Text_t *formula ,const Text_t *varexp,
const Text_t *selection="",Option_t *option="" ,Option_t *goption="" | | virtual void Fit(const char *formula ,const char *varexp, cons
t char *selection="",Option_t *option="" ,Option_t *goption="" | |
| ,Int_t nentries=1000000000, Int_t firstentry=
0); // *MENU* | | ,Int_t nentries=1000000000, Int_t firstentry=
0); // *MENU* | |
| | | | |
| virtual Long_t HasData() const { return 1; } | | virtual Long_t HasData() const { return 1; } | |
| virtual Long_t InsertRows(const void *rows, Long_t indx, UInt_t
nRows=1); | | virtual Long_t InsertRows(const void *rows, Long_t indx, UInt_t
nRows=1); | |
| virtual Bool_t IsFolder() const; | | virtual Bool_t IsFolder() const; | |
| Int_t NaN(); | | Int_t NaN(); | |
| static TTable *New(const Char_t *name, const Char_t *type, void
*array, UInt_t size); | | static TTable *New(const Char_t *name, const Char_t *type, void
*array, UInt_t size); | |
| virtual Char_t *MakeExpression(const Char_t *expressions[],Int_t
nExpressions); | | virtual Char_t *MakeExpression(const Char_t *expressions[],Int_t
nExpressions); | |
| virtual Char_t *Print(Char_t *buf,Int_t n) const ; | | virtual Char_t *Print(Char_t *buf,Int_t n) const ; | |
| virtual void Print(Option_t *opt="") const; | | virtual void Print(Option_t *opt="") const; | |
| virtual const Char_t *Print(Int_t row, Int_t rownumber=10, | | virtual const Char_t *Print(Int_t row, Int_t rownumber=10, | |
| const Char_t *colfirst="", const Char_t *co
llast="") const; // *MENU* | | const Char_t *colfirst="", const Char_t *co
llast="") const; // *MENU* | |
| virtual void PrintContents(Option_t *opt="") const; | | virtual void PrintContents(Option_t *opt="") const; | |
| virtual const Char_t *PrintHeader() const; // *MENU* | | virtual const Char_t *PrintHeader() const; // *MENU* | |
|
| virtual void Project(const Text_t *hname, const Text_t *varexp
, const Text_t *selection="", Option_t *option="" | | virtual void Project(const char *hname, const char *varexp, co
nst char *selection="", Option_t *option="" | |
| ,Int_t nentries=1000000000, Int_t firstent
ry=0); | | ,Int_t nentries=1000000000, Int_t firstent
ry=0); | |
| | | | |
| virtual Int_t Purge(Option_t *opt=""); | | virtual Int_t Purge(Option_t *opt=""); | |
| | | | |
| void *ReAllocate(Int_t newsize); | | void *ReAllocate(Int_t newsize); | |
| void *ReAllocate(); | | void *ReAllocate(); | |
| virtual void SavePrimitive(ostream &out, Option_t *option = ""
); | | virtual void SavePrimitive(ostream &out, Option_t *option = ""
); | |
| virtual void Set(Int_t n); | | virtual void Set(Int_t n); | |
| virtual void Set(Int_t n, Char_t *array); | | virtual void Set(Int_t n, Char_t *array); | |
| virtual void SetNRows(Int_t n); | | virtual void SetNRows(Int_t n); | |
| | | | |
End of changes. 6 change blocks. |
| 10 lines changed or deleted | | 10 lines changed or added | |
|
| TUnfold.h | | TUnfold.h | |
| // Author: Stefan Schmitt | | // Author: Stefan Schmitt | |
| // DESY, 13/10/08 | | // DESY, 13/10/08 | |
| | | | |
|
| // Version 6, completely remove definition of class XY | | // Version 13, new methods for derived classes | |
| // | | // | |
| // History: | | // History: | |
|
| | | // Version 12, with support for preconditioned matrix inversion | |
| | | // Version 11, regularisation methods have return values | |
| | | // Version 10, with bug-fix in TUnfold.cxx | |
| | | // Version 9, implements method for optimized inversion of sparse matrix | |
| | | // Version 8, replace all TMatrixSparse matrix operations by private cod | |
| | | e | |
| | | // Version 7, fix problem with TMatrixDSparse,TMatrixD multiplication | |
| | | // Version 6, completely remove definition of class XY | |
| // Version 5, move definition of class XY from TUnfold.C to this file | | // Version 5, move definition of class XY from TUnfold.C to this file | |
| // Version 4, with bug-fix in TUnfold.C | | // Version 4, with bug-fix in TUnfold.C | |
| // Version 3, with bug-fix in TUnfold.C | | // Version 3, with bug-fix in TUnfold.C | |
| // Version 2, with changed ScanLcurve() arguments | | // Version 2, with changed ScanLcurve() arguments | |
| // Version 1, added ScanLcurve() method | | // Version 1, added ScanLcurve() method | |
| // Version 0, stable version of basic unfolding algorithm | | // Version 0, stable version of basic unfolding algorithm | |
| | | | |
| #ifndef ROOT_TUnfold | | #ifndef ROOT_TUnfold | |
| #define ROOT_TUnfold | | #define ROOT_TUnfold | |
| | | | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 61 | |
| // // | | // // | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
| #include <TH1D.h> | | #include <TH1D.h> | |
| #include <TH2D.h> | | #include <TH2D.h> | |
| #include <TObject.h> | | #include <TObject.h> | |
| #include <TArrayI.h> | | #include <TArrayI.h> | |
| #include <TSpline.h> | | #include <TSpline.h> | |
| #include <TMatrixDSparse.h> | | #include <TMatrixDSparse.h> | |
| #include <TMatrixD.h> | | #include <TMatrixD.h> | |
|
| | | #include <TObjArray.h> | |
| | | | |
| class TUnfold:public TObject { | | class TUnfold:public TObject { | |
| private: | | private: | |
|
| void ClearTUnfold(void); // initialize all data members | | void InitTUnfold(void); // initialize all data members | |
| protected: | | protected: | |
| TMatrixDSparse * fA; // Input: matrix | | TMatrixDSparse * fA; // Input: matrix | |
| TMatrixDSparse *fLsquared; // Input: regularisation conditions squared | | TMatrixDSparse *fLsquared; // Input: regularisation conditions squared | |
| TMatrixDSparse *fV; // Input: covariance matrix for y | | TMatrixDSparse *fV; // Input: covariance matrix for y | |
| TMatrixD *fY; // Input: y | | TMatrixD *fY; // Input: y | |
| TMatrixD *fX0; // Input: x0 | | TMatrixD *fX0; // Input: x0 | |
| Double_t fTau; // Input: regularisation parameter | | Double_t fTau; // Input: regularisation parameter | |
| Double_t fBiasScale; // Input: scale factor for the bias | | Double_t fBiasScale; // Input: scale factor for the bias | |
| TArrayI fXToHist; // Input: matrix indices -> histogram bins | | TArrayI fXToHist; // Input: matrix indices -> histogram bins | |
| TArrayI fHistToX; // Input: histogram bins -> matrix indices | | TArrayI fHistToX; // Input: histogram bins -> matrix indices | |
|
| | | TArrayD fSumOverY; // Input: sum of all columns | |
| TMatrixDSparse *fEinv; // Result: inverse error matrix | | TMatrixDSparse *fEinv; // Result: inverse error matrix | |
|
| | | TMatrixDSparse *fAtV; // Result: fA# times fV | |
| TMatrixD *fE; // Result: error matrix | | TMatrixD *fE; // Result: error matrix | |
| TMatrixD *fX; // Result: x | | TMatrixD *fX; // Result: x | |
| TMatrixDSparse *fAx; // Result: Ax | | TMatrixDSparse *fAx; // Result: Ax | |
| Double_t fChi2A; // Result: chi**2 contribution from (y-Ax)V
(y-Ax) | | Double_t fChi2A; // Result: chi**2 contribution from (y-Ax)V
(y-Ax) | |
| Double_t fChi2L; // Result: chi**2 contribution from tau(x-s
*x0)Lsquared(x-s*x0) | | Double_t fChi2L; // Result: chi**2 contribution from tau(x-s
*x0)Lsquared(x-s*x0) | |
| Double_t fRhoMax; // Result: maximum global correlation | | Double_t fRhoMax; // Result: maximum global correlation | |
| Double_t fRhoAvg; // Result: average global correlation | | Double_t fRhoAvg; // Result: average global correlation | |
|
| | | Int_t fNdf; // Result: number of degrees of freedom | |
| protected: | | protected: | |
| TUnfold(void); // for derived classes | | TUnfold(void); // for derived classes | |
| virtual Double_t DoUnfold(void); // the unfolding algorithm | | virtual Double_t DoUnfold(void); // the unfolding algorithm | |
| virtual void CalculateChi2Rho(void); // supplementory calculations | | virtual void CalculateChi2Rho(void); // supplementory calculations | |
|
| static TMatrixDSparse *CreateSparseMatrix(Int_t nr, Int_t nc, Int_t * ro | | virtual void ClearResults(void); // clear all results | |
| w, Int_t * col, Double_t const *data); // create matrices | | | |
| | | static TMatrixDSparse *MultiplyMSparseM(TMatrixDSparse const &a,TMatrixD | |
| | | const &b); // multiply sparse and non-sparse matrix | |
| | | static TMatrixDSparse *MultiplyMSparseMSparse(TMatrixDSparse const &a,TM | |
| | | atrixDSparse const &b); // multiply sparse and sparse matrix | |
| | | static TMatrixDSparse *MultiplyMSparseTranspMSparse(TMatrixDSparse const | |
| | | &a,TMatrixDSparse const &b); // multiply transposed sparse and sparse matr | |
| | | ix | |
| | | static Double_t MultiplyVecMSparseVec(TMatrixDSparse const &a,TMatrixD c | |
| | | onst &v); // scalar product of v and Av | |
| | | static TMatrixD *InvertMSparse(TMatrixDSparse const &A); // invert spars | |
| | | e matrix | |
| | | static Bool_t InvertMConditioned(TMatrixD &A); // invert matrix includin | |
| | | g preconditioning | |
| | | static void AddMSparse(TMatrixDSparse &dest,Double_t const &f,TMatrixDSp | |
| | | arse const &src); // replacement for dest += f*src | |
| inline Int_t GetNx(void) const { | | inline Int_t GetNx(void) const { | |
| return fA->GetNcols(); | | return fA->GetNcols(); | |
| } // number of non-zero output bins | | } // number of non-zero output bins | |
| inline Int_t GetNy(void) const { | | inline Int_t GetNy(void) const { | |
| return fA->GetNrows(); | | return fA->GetNrows(); | |
| } // number of input bins | | } // number of input bins | |
|
| | | void ErrorMatrixToHist(TH2 *ematrix,TMatrixD const *emat,Int_t const *bi | |
| | | nMap, | |
| | | Bool_t doClear) const; // return an error matrix | |
| | | as histogram | |
| 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(TMatrixDSparse **m); // delete and invalidate p | |
| | | ointer | |
| void SetBias(TH1 const *bias); // set alternative bias | | void SetBias(TH1 const *bias); // set alternative bias | |
|
| void RegularizeSize(int bin, Double_t const &scale = 1.0); // regulari | | Int_t RegularizeSize(int bin, Double_t const &scale = 1.0); // regular | |
| se the size of one output bin | | ise the size of one output bin | |
| void RegularizeDerivative(int left_bin, int right_bin, Double_t const &s | | Int_t RegularizeDerivative(int left_bin, int right_bin, Double_t const & | |
| cale = 1.0); // regularize difference of two output bins (1st derivative) | | scale = 1.0); // regularize difference of two output bins (1st derivative) | |
| void RegularizeCurvature(int left_bin, int center_bin, int right_bin, Do | | Int_t RegularizeCurvature(int left_bin, int center_bin, int right_bin, D | |
| uble_t const &scale_left = 1.0, Double_t const &scale_right = 1.0); // reg | | ouble_t const &scale_left = 1.0, Double_t const &scale_right = 1.0); // re | |
| ularize curvature of three output bins (2nd derivative) | | gularize curvature of three output bins (2nd derivative) | |
| void RegularizeBins(int start, int step, int nbin, ERegMode regmode); | | Int_t RegularizeBins(int start, int step, int nbin, ERegMode regmode); | |
| // regularize a 1-dimensional curve | | // regularize a 1-dimensional curve | |
| void RegularizeBins2D(int start_bin, int step1, int nbin1, int step2, in | | Int_t RegularizeBins2D(int start_bin, int step1, int nbin1, int step2, i | |
| t nbin2, ERegMode regmode); // regularize a 2-dimensional grid | | nt nbin2, ERegMode regmode); // regularize a 2-dimensional grid | |
| Double_t DoUnfold(Double_t const &tau, | | Double_t DoUnfold(Double_t const &tau, | |
| TH1 const *hist_y, Double_t const &scaleBias=0.0); //
do the unfolding | | TH1 const *hist_y, Double_t const &scaleBias=0.0); //
do the unfolding | |
|
| void SetInput(TH1 const *hist_y, Double_t const &scaleBias=0.0); // defi
ne input distribution for ScanLCurve | | Int_t SetInput(TH1 const *hist_y, Double_t const &scaleBias=0.0,Double_t
oneOverZeroError=0.0); // define input distribution for ScanLCurve | |
| virtual Double_t DoUnfold(Double_t const &tau); // Unfold with given cho
ice of tau | | virtual Double_t DoUnfold(Double_t const &tau); // Unfold with given cho
ice of tau | |
| virtual Int_t ScanLcurve(Int_t nPoint,Double_t const &tauMin, | | virtual Int_t ScanLcurve(Int_t nPoint,Double_t const &tauMin, | |
| Double_t const &tauMax,TGraph **lCurve, | | Double_t const &tauMax,TGraph **lCurve, | |
| TSpline **logTauX=0,TSpline **logTauY=0); // sca
n the L curve using successive calls to DoUnfold(Double_t) | | TSpline **logTauX=0,TSpline **logTauY=0); // sca
n the L curve using successive calls to DoUnfold(Double_t) | |
| TH1D *GetOutput(char const *name, char const *title, Double_t x0 = 0.0,
Double_t x1 = 0.0) const; // get unfolding result | | TH1D *GetOutput(char const *name, char const *title, Double_t x0 = 0.0,
Double_t x1 = 0.0) const; // get unfolding result | |
| TH1D *GetBias(char const *name, char const *title, Double_t x0 = 0.0, Do
uble_t x1 = 0.0) const; // get bias | | TH1D *GetBias(char const *name, char const *title, Double_t x0 = 0.0, Do
uble_t x1 = 0.0) const; // get bias | |
| TH1D *GetFoldedOutput(char const *name, char const *title, Double_t y0 =
0.0, Double_t y1 = 0.0) const; // get folded unfolding result | | TH1D *GetFoldedOutput(char const *name, char const *title, Double_t y0 =
0.0, Double_t y1 = 0.0) const; // get folded unfolding result | |
| TH1D *GetInput(char const *name, char const *title, Double_t y0 = 0.0, D
ouble_t y1 = 0.0) const; // get unfolding input | | TH1D *GetInput(char const *name, char const *title, Double_t y0 = 0.0, D
ouble_t y1 = 0.0) const; // get unfolding input | |
| TH2D *GetRhoIJ(char const *name, char const *title, Double_t x0 = 0.0, D
ouble_t x1 = 0.0) const; // get correlation coefficients | | TH2D *GetRhoIJ(char const *name, char const *title, Double_t x0 = 0.0, D
ouble_t x1 = 0.0) const; // get correlation coefficients | |
| TH2D *GetEmatrix(char const *name, char const *title, Double_t x0 = 0.0,
Double_t x1 = 0.0) const; // get error matrix | | TH2D *GetEmatrix(char const *name, char const *title, Double_t x0 = 0.0,
Double_t x1 = 0.0) const; // get error matrix | |
| TH1D *GetRhoI(char const *name, char const *title, Double_t x0 = 0.0, Do
uble_t x1 = 0.0) const; // get global correlation coefficients | | TH1D *GetRhoI(char const *name, char const *title, Double_t x0 = 0.0, Do
uble_t x1 = 0.0) const; // get global correlation coefficients | |
| TH2D *GetLsquared(char const *name, char const *title, Double_t x0 = 0.0
, Double_t x1 = 0.0) const; // get regularisation conditions squared | | TH2D *GetLsquared(char const *name, char const *title, Double_t x0 = 0.0
, Double_t x1 = 0.0) const; // get regularisation conditions squared | |
| | | | |
| void GetOutput(TH1 *output,Int_t const *binMap=0) const; // get output d
istribution, averaged over bins | | void GetOutput(TH1 *output,Int_t const *binMap=0) const; // get output d
istribution, averaged over bins | |
| void GetEmatrix(TH2 *ematrix,Int_t const *binMap=0) const; // get error
matrix, averaged over bins | | void GetEmatrix(TH2 *ematrix,Int_t const *binMap=0) const; // get error
matrix, averaged over bins | |
| Double_t GetRhoI(TH1 *rhoi,TH2 *ematrixinv=0,Int_t const *binMap=0) cons
t; // get global correlation coefficients and inverse of error matrix, aver
aged over bins | | Double_t GetRhoI(TH1 *rhoi,TH2 *ematrixinv=0,Int_t const *binMap=0) cons
t; // get global correlation coefficients and inverse of error matrix, aver
aged over bins | |
| void GetRhoIJ(TH2 *rhoij,Int_t const *binMap=0) const; // get correlatio
n coefficients, averaged over bins | | void GetRhoIJ(TH2 *rhoij,Int_t const *binMap=0) const; // get correlatio
n coefficients, averaged over bins | |
|
| | | | |
| Double_t const &GetTau(void) const; // regularisation parameter | | Double_t const &GetTau(void) const; // regularisation parameter | |
| Double_t const &GetRhoMax(void) const; // maximum global correlati
on | | Double_t const &GetRhoMax(void) const; // maximum global correlati
on | |
| Double_t const &GetRhoAvg(void) const; // average global correlati
on | | Double_t const &GetRhoAvg(void) const; // average global correlati
on | |
| Double_t const &GetChi2A(void) const; // chi**2 contribution from
A | | Double_t const &GetChi2A(void) const; // chi**2 contribution from
A | |
| Double_t const &GetChi2L(void) const; // chi**2 contribution from
L | | Double_t const &GetChi2L(void) const; // chi**2 contribution from
L | |
| Double_t GetLcurveX(void) const; // x axis of L curve | | Double_t GetLcurveX(void) const; // x axis of L curve | |
| Double_t GetLcurveY(void) const; // y axis of L curve | | Double_t GetLcurveY(void) const; // y axis of L curve | |
|
| | | Int_t GetNdf(void) const; // number of degrees of freedom | |
| | | Int_t GetNpar(void) const; // number of parameters | |
| | | | |
|
| ClassDef(TUnfold, 0) | | ClassDef(TUnfold, 0) //Unfolding with support for L-curve analysis | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 16 change blocks. |
| 19 lines changed or deleted | | 54 lines changed or added | |
|
| TVirtualMC.h | | TVirtualMC.h | |
|
| // @(#)root/vmc:$Name: $:$Id: TVirtualMC.h 21565 2007-12-28 12:28:46Z brun
$ | | // @(#)root/vmc:$Name: $:$Id: TVirtualMC.h 27260 2009-01-27 16:26:34Z ivan
a $ | |
| // Authors: Ivana Hrivnacova, Rene Brun, Federico Carminati 13/04/2002 | | // Authors: Ivana Hrivnacova, Rene Brun, Federico Carminati 13/04/2002 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 2006, Rene Brun and Fons Rademakers. * | |
| * Copyright (C) 2002, ALICE Experiment at CERN. * | | * Copyright (C) 2002, ALICE Experiment at CERN. * | |
| * 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 | |
| //
// | | //
// | |
| //
// | | //
// | |
| ///////////////////////////////////////////////////////////////////////////
//// | | ///////////////////////////////////////////////////////////////////////////
//// | |
| | | | |
| #include "TMCProcess.h" | | #include "TMCProcess.h" | |
| #include "TMCParticleType.h" | | #include "TMCParticleType.h" | |
| #include "TMCOptical.h" | | #include "TMCOptical.h" | |
| #include "TVirtualMCApplication.h" | | #include "TVirtualMCApplication.h" | |
| #include "TVirtualMCStack.h" | | #include "TVirtualMCStack.h" | |
| #include "TVirtualMCDecayer.h" | | #include "TVirtualMCDecayer.h" | |
|
| | | #include "TVirtualMagField.h" | |
| #include "TRandom.h" | | #include "TRandom.h" | |
| #include "TString.h" | | #include "TString.h" | |
| #include "TError.h" | | #include "TError.h" | |
| | | | |
| class TLorentzVector; | | class TLorentzVector; | |
| class TGeoHMatrix; | | class TGeoHMatrix; | |
| class TArrayI; | | class TArrayI; | |
| class TArrayD; | | class TArrayD; | |
| | | | |
| class TVirtualMC : public TNamed { | | class TVirtualMC : public TNamed { | |
| | | | |
| skipping to change at line 429 | | skipping to change at line 430 | |
| | | | |
| // Set geometry from Root (built via TGeo) | | // Set geometry from Root (built via TGeo) | |
| virtual void SetRootGeometry() = 0; | | virtual void SetRootGeometry() = 0; | |
| | | | |
| // | | // | |
| // get methods | | // get methods | |
| // ------------------------------------------------ | | // ------------------------------------------------ | |
| // | | // | |
| | | | |
| // Return the unique numeric identifier for volume name volName | | // Return the unique numeric identifier for volume name volName | |
|
| virtual Int_t VolId(const Text_t* volName) const = 0; | | virtual Int_t VolId(const char* volName) const = 0; | |
| | | | |
| // Return the volume name for a given volume identifier id | | // Return the volume name for a given volume identifier id | |
| virtual const char* VolName(Int_t id) const = 0; | | virtual const char* VolName(Int_t id) const = 0; | |
| | | | |
| // Return the unique numeric identifier for medium name mediumName | | // Return the unique numeric identifier for medium name mediumName | |
|
| virtual Int_t MediumId(const Text_t* mediumName) const; | | virtual Int_t MediumId(const char* mediumName) const = 0; | |
| | | | |
| // Return total number of volumes in the geometry | | // Return total number of volumes in the geometry | |
| virtual Int_t NofVolumes() const = 0; | | virtual Int_t NofVolumes() const = 0; | |
| | | | |
| // Return material number for a given volume id | | // Return material number for a given volume id | |
| virtual Int_t VolId2Mate(Int_t id) const = 0; | | virtual Int_t VolId2Mate(Int_t id) const = 0; | |
| | | | |
| // Return number of daughters of the volume specified by volName | | // Return number of daughters of the volume specified by volName | |
| virtual Int_t NofVolDaughters(const char* volName) const = 0; | | virtual Int_t NofVolDaughters(const char* volName) const = 0; | |
| | | | |
| | | | |
| skipping to change at line 496 | | skipping to change at line 497 | |
| // lepton lepton number | | // lepton lepton number | |
| // baryon baryon number | | // baryon baryon number | |
| // stable stability | | // stable stability | |
| // shortlived is shorlived? | | // shortlived is shorlived? | |
| // subType particle subType as in Geant4 | | // subType particle subType as in Geant4 | |
| // antiEncoding anti encoding | | // antiEncoding anti encoding | |
| // magMoment magnetic moment | | // magMoment magnetic moment | |
| // excitation excitation energy [GeV] | | // excitation excitation energy [GeV] | |
| virtual Bool_t DefineParticle(Int_t pdg, const char* name, | | virtual Bool_t DefineParticle(Int_t pdg, const char* name, | |
| TMCParticleType mcType, | | TMCParticleType mcType, | |
|
| Double_t mass, Double_t charge, Double_t lifetime); | | Double_t mass, Double_t charge, Double_t lifetime)
= 0; | |
| | | | |
| // Set a user defined particle | | // Set a user defined particle | |
| // Function is ignored if particle with specified pdg | | // Function is ignored if particle with specified pdg | |
| // already exists and error report is printed. | | // already exists and error report is printed. | |
| // pdg PDG encoding | | // pdg PDG encoding | |
| // name particle name | | // name particle name | |
| // mcType VMC Particle type | | // mcType VMC Particle type | |
| // mass mass [GeV] | | // mass mass [GeV] | |
| // charge charge [eplus] | | // charge charge [eplus] | |
| // lifetime time of life [s] | | // lifetime time of life [s] | |
| | | | |
| skipping to change at line 533 | | skipping to change at line 534 | |
| virtual Bool_t DefineParticle(Int_t pdg, const char* name, | | virtual Bool_t DefineParticle(Int_t pdg, const char* name, | |
| TMCParticleType mcType, | | TMCParticleType mcType, | |
| Double_t mass, Double_t charge, Double_t lifetime, | | Double_t mass, Double_t charge, Double_t lifetime, | |
| const TString& pType, Double_t width, | | const TString& pType, Double_t width, | |
| Int_t iSpin, Int_t iParity, Int_t iConjugation, | | Int_t iSpin, Int_t iParity, Int_t iConjugation, | |
| Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, | | Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, | |
| Int_t lepton, Int_t baryon, | | Int_t lepton, Int_t baryon, | |
| Bool_t stable, Bool_t shortlived = kFALSE, | | Bool_t stable, Bool_t shortlived = kFALSE, | |
| const TString& subType = "", | | const TString& subType = "", | |
| Int_t antiEncoding = 0, Double_t magMoment = 0.0, | | Int_t antiEncoding = 0, Double_t magMoment = 0.0, | |
|
| Double_t excitation = 0.0); | | Double_t excitation = 0.0) = 0; | |
| | | | |
| // Set a user defined ion. | | // Set a user defined ion. | |
| // name ion name | | // name ion name | |
| // Z atomic number | | // Z atomic number | |
| // A atomic mass | | // A atomic mass | |
| // Q charge [eplus} | | // Q charge [eplus} | |
| // excitation excitation energy [GeV] | | // excitation excitation energy [GeV] | |
| // mass mass [GeV] (if not specified by user, approximative | | // mass mass [GeV] (if not specified by user, approximative | |
| // mass is calculated) | | // mass is calculated) | |
| virtual Bool_t DefineIon(const char* name, Int_t Z, Int_t A, | | virtual Bool_t DefineIon(const char* name, Int_t Z, Int_t A, | |
| Int_t Q, Double_t excEnergy, Double_t mass = 0.) =
0; | | Int_t Q, Double_t excEnergy, Double_t mass = 0.) =
0; | |
| | | | |
| // Set a user phase space decay for a particle | | // Set a user phase space decay for a particle | |
| // pdg particle PDG encoding | | // pdg particle PDG encoding | |
| // bratios the array with branching ratios (in %) | | // bratios the array with branching ratios (in %) | |
| // mode[6][3] the array with daughters particles PDG codes for eac
h | | // mode[6][3] the array with daughters particles PDG codes for eac
h | |
| // decay channel | | // decay channel | |
|
| virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6
][3]); | | virtual Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6
][3]) = 0; | |
| | | | |
| // Calculate X-sections | | // Calculate X-sections | |
| // (Geant3 only) | | // (Geant3 only) | |
| virtual Double_t Xsec(char*, Double_t, Int_t, Int_t) = 0; | | virtual Double_t Xsec(char*, Double_t, Int_t, Int_t) = 0; | |
| | | | |
| // | | // | |
| // particle table usage | | // particle table usage | |
| // ------------------------------------------------ | | // ------------------------------------------------ | |
| // | | // | |
| | | | |
| | | | |
| skipping to change at line 863 | | skipping to change at line 864 | |
| | | | |
| // Set the particle stack | | // Set the particle stack | |
| virtual void SetStack(TVirtualMCStack* stack); | | virtual void SetStack(TVirtualMCStack* stack); | |
| | | | |
| // Set the external decayer | | // Set the external decayer | |
| virtual void SetExternalDecayer(TVirtualMCDecayer* decayer); | | virtual void SetExternalDecayer(TVirtualMCDecayer* decayer); | |
| | | | |
| // Set the random number generator | | // Set the random number generator | |
| virtual void SetRandom(TRandom* random); | | virtual void SetRandom(TRandom* random); | |
| | | | |
|
| | | // Set the magnetic field | |
| | | virtual void SetMagField(TVirtualMagField* field); | |
| | | | |
| // | | // | |
| // ------------------------------------------------ | | // ------------------------------------------------ | |
| // Get methods | | // Get methods | |
| // ------------------------------------------------ | | // ------------------------------------------------ | |
| // | | // | |
| | | | |
| // Return the particle stack | | // Return the particle stack | |
| virtual TVirtualMCStack* GetStack() const { return fStack; } | | virtual TVirtualMCStack* GetStack() const { return fStack; } | |
| | | | |
| // Return the external decayer | | // Return the external decayer | |
| virtual TVirtualMCDecayer* GetDecayer() const { return fDecayer; } | | virtual TVirtualMCDecayer* GetDecayer() const { return fDecayer; } | |
| | | | |
| // Return the random number generator | | // Return the random number generator | |
| virtual TRandom* GetRandom() const { return fRandom; } | | virtual TRandom* GetRandom() const { return fRandom; } | |
| | | | |
|
| | | // Return the magnetic field | |
| | | virtual TVirtualMagField* GetMagField() const { return fMagField; } | |
| | | | |
| protected: | | protected: | |
| TVirtualMCApplication* fApplication; //! User MC application | | TVirtualMCApplication* fApplication; //! User MC application | |
| | | | |
| private: | | private: | |
| TVirtualMC(const TVirtualMC &mc); | | TVirtualMC(const TVirtualMC &mc); | |
| TVirtualMC & operator=(const TVirtualMC &); | | TVirtualMC & operator=(const TVirtualMC &); | |
| | | | |
| static TVirtualMC* fgMC; // Monte Carlo singleton instance | | static TVirtualMC* fgMC; // Monte Carlo singleton instance | |
| | | | |
| TVirtualMCStack* fStack; //! Particles stack | | TVirtualMCStack* fStack; //! Particles stack | |
| TVirtualMCDecayer* fDecayer; //! External decayer | | TVirtualMCDecayer* fDecayer; //! External decayer | |
| TRandom* fRandom; //! Random number generator | | TRandom* fRandom; //! Random number generator | |
|
| | | TVirtualMagField* fMagField;//! Magnetic field | |
| | | | |
| ClassDef(TVirtualMC,1) //Interface to Monte Carlo | | ClassDef(TVirtualMC,1) //Interface to Monte Carlo | |
| }; | | }; | |
| | | | |
|
| // new functions | | | |
| | | | |
| inline Int_t TVirtualMC::MediumId(const Text_t* /*mediumName*/) const { | | | |
| Warning("MediumId", "New function - not yet implemented."); | | | |
| return 0; | | | |
| } | | | |
| | | | |
| inline Bool_t TVirtualMC::DefineParticle(Int_t /*pdg*/, const char* /*name* | | | |
| /, | | | |
| TMCParticleType /*mcType*/, | | | |
| Double_t /*mass*/, Double_t /*charge*/, Double_ | | | |
| t /*lifetime*/) { | | | |
| Warning("DefineParticle", | | | |
| "Deprecated function - a new function with more arguments should | | | |
| be used."); | | | |
| return false; | | | |
| } | | | |
| | | | |
| inline Bool_t TVirtualMC::DefineParticle(Int_t /*pdg*/, const char* /*name* | | | |
| /, | | | |
| TMCParticleType /*mcType*/, | | | |
| Double_t /*mass*/, Double_t /*charge*/, Double_ | | | |
| t /*lifetime*/, | | | |
| const TString& /*pType*/, Double_t /*width*/, | | | |
| Int_t /*iSpin*/, Int_t /*iParity*/, Int_t /*iCo | | | |
| njugation*/, | | | |
| Int_t /*iIsospin*/, Int_t /*iIsospinZ*/, Int_t | | | |
| /*gParity*/, | | | |
| Int_t /*lepton*/, Int_t /*baryon*/, | | | |
| Bool_t /*stable*/, Bool_t /*shortlived*/, | | | |
| const TString& /*subType*/, | | | |
| Int_t /*antiEncoding*/, Double_t /*magMoment*/, | | | |
| Double_t /*excitation*/) { | | | |
| Warning("DefineParticle", "New function - not yet implemented."); | | | |
| return false; | | | |
| } | | | |
| | | | |
| inline Bool_t TVirtualMC::SetDecayMode(Int_t /*pdg*/, | | | |
| Float_t /*bratio*/[6], Int_t /*mode*/[6][3]) { | | | |
| Warning("SetDecayMode", "New function - not yet implemented."); | | | |
| return false; | | | |
| } | | | |
| | | | |
| R__EXTERN TVirtualMC *gMC; | | R__EXTERN TVirtualMC *gMC; | |
| | | | |
| #endif //ROOT_TVirtualMC | | #endif //ROOT_TVirtualMC | |
| | | | |
End of changes. 11 change blocks. |
| 49 lines changed or deleted | | 14 lines changed or added | |
|
| TVolume.h | | TVolume.h | |
|
| // @(#)root/table:$Id: TVolume.h 20882 2007-11-19 11:31:26Z rdm $ | | // @(#)root/table:$Id: TVolume.h 27157 2009-01-15 14:05:12Z brun $ | |
| // Author: Valery Fine 10/12/98 | | // Author: Valery Fine 10/12/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 66 | | skipping to change at line 66 | |
| | | | |
| virtual void Add(TDataSet *dataset); | | virtual void Add(TDataSet *dataset); | |
| virtual void Add(TVolumePosition *position); | | virtual void Add(TVolumePosition *position); | |
| virtual TVolumePosition *Add(TVolume *node, TVolumePosition *nodePositio
n); | | virtual TVolumePosition *Add(TVolume *node, TVolumePosition *nodePositio
n); | |
| virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py,TVol
umePosition *position=0); | | virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py,TVol
umePosition *position=0); | |
| void SetPositionsList(TList *list=0){AddObject((TObject *)li
st);} | | void SetPositionsList(TList *list=0){AddObject((TObject *)li
st);} | |
| virtual void PaintNodePosition(Option_t *option="",TVolumePo
sition *postion=0); | | virtual void PaintNodePosition(Option_t *option="",TVolumePo
sition *postion=0); | |
| friend class TPolyLineShape; | | friend class TPolyLineShape; | |
| public: | | public: | |
| TVolume(); | | TVolume(); | |
|
| TVolume(const Text_t *name, const Text_t *title, const Text_t *shapename | | TVolume(const char *name, const char *title, const char *shapename, Opti | |
| , Option_t *option=""); | | on_t *option=""); | |
| TVolume(const Text_t *name, const Text_t *title, TShape *shape, Option_t | | TVolume(const char *name, const char *title, TShape *shape, Option_t *op | |
| *option=""); | | tion=""); | |
| TVolume(TNode &node); | | TVolume(TNode &node); | |
| virtual ~TVolume(); | | virtual ~TVolume(); | |
| virtual TVolumePosition *Add(TVolume *node, Double_t x=0, Double_t y=0,
Double_t z=0, TRotMatrix *matrix=0, UInt_t id=0, Option_t *option=""); | | virtual TVolumePosition *Add(TVolume *node, Double_t x=0, Double_t y=0,
Double_t z=0, TRotMatrix *matrix=0, UInt_t id=0, Option_t *option=""); | |
|
| virtual TVolumePosition *Add(TVolume *node, Double_t x, Double_t y, Doub
le_t z, const Text_t *matrixname, UInt_t id=0, Option_t *option=""); | | virtual TVolumePosition *Add(TVolume *node, Double_t x, Double_t y, Doub
le_t z, const char *matrixname, UInt_t id=0, Option_t *option=""); | |
| static Int_t MapStNode2GEANTVis(ENodeSEEN vis); | | static Int_t MapStNode2GEANTVis(ENodeSEEN vis); | |
| static Int_t MapGEANT2StNodeVis(Int_t vis); | | static Int_t MapGEANT2StNodeVis(Int_t vis); | |
| virtual void Add(TShape *shape, Bool_t IsMaster=kFALSE); | | virtual void Add(TShape *shape, Bool_t IsMaster=kFALSE); | |
| virtual void Browse(TBrowser *b); | | virtual void Browse(TBrowser *b); | |
| virtual TNode *CreateTNode(const TVolumePosition *position=0); | | virtual TNode *CreateTNode(const TVolumePosition *position=0); | |
| virtual void DeletePosition(TVolumePosition *position); | | virtual void DeletePosition(TVolumePosition *position); | |
| 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 *depth="3"); // *MENU* | | virtual void Draw(Option_t *depth="3"); // *MENU* | |
| virtual void DrawOnly(Option_t *option=""); | | virtual void DrawOnly(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); | |
| static TRotMatrix *GetIdentity(); | | static TRotMatrix *GetIdentity(); | |
|
| virtual Text_t *GetObjectInfo(Int_t px, Int_t py) const; | | virtual char *GetObjectInfo(Int_t px, Int_t py) const; | |
| const Option_t *GetOption() const { return fOption.Data();} | | const Option_t *GetOption() const { return fOption.Data();} | |
| TShape *GetShape() const {return fShape;} | | TShape *GetShape() const {return fShape;} | |
| TList *GetListOfShapes() const {return fListOfShapes;} | | TList *GetListOfShapes() const {return fListOfShapes;} | |
| virtual void GetLocalRange(Float_t *min, Float_t *max); | | virtual void GetLocalRange(Float_t *min, Float_t *max); | |
| virtual ENodeSEEN GetVisibility() const {return fVisibility;} | | virtual ENodeSEEN GetVisibility() const {return fVisibility;} | |
| virtual TList *GetListOfPositions() { return (TList *)(GetObject()
);} | | virtual TList *GetListOfPositions() { return (TList *)(GetObject()
);} | |
| virtual ULong_t Hash() const { return TObject::Hash();} | | virtual ULong_t Hash() const { return TObject::Hash();} | |
| virtual void ImportShapeAttributes(); | | virtual void ImportShapeAttributes(); | |
| virtual Bool_t IsMarked() const; | | virtual Bool_t IsMarked() const; | |
| virtual Bool_t Is3D() const {return kTRUE;} | | virtual Bool_t Is3D() const {return kTRUE;} | |
| | | | |
End of changes. 4 change blocks. |
| 7 lines changed or deleted | | 7 lines changed or added | |
|
| TVolumePosition.h | | TVolumePosition.h | |
|
| // @(#)root/table:$Id: TVolumePosition.h 20882 2007-11-19 11:31:26Z rdm $ | | // @(#)root/table:$Id: TVolumePosition.h 27157 2009-01-15 14:05:12Z brun $ | |
| // Author: Valery Fine(fine@bnl.gov) 25/12/98 | | // Author: Valery Fine(fine@bnl.gov) 25/12/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 | |
| UInt_t fId; // Unique ID of this position | | UInt_t fId; // Unique ID of this position | |
| | | | |
| protected: | | protected: | |
| void DeleteOwnMatrix(); | | void DeleteOwnMatrix(); | |
| | | | |
| public: | | public: | |
| enum EPositionBits { | | enum EPositionBits { | |
| kIsOwn = BIT(23) // if the TVolumePoistion doesn't own the TR
otMatrix object | | kIsOwn = BIT(23) // if the TVolumePoistion doesn't own the TR
otMatrix object | |
| }; | | }; | |
| TVolumePosition(TVolume *node=0,Double_t x=0, Double_t y=0, Double_t z=0
, TRotMatrix *matrix=0); | | TVolumePosition(TVolume *node=0,Double_t x=0, Double_t y=0, Double_t z=0
, TRotMatrix *matrix=0); | |
|
| TVolumePosition(TVolume *node,Double_t x, Double_t y, Double_t z, const
Text_t *matrixname); | | TVolumePosition(TVolume *node,Double_t x, Double_t y, Double_t z, const
char *matrixname); | |
| TVolumePosition(const TVolumePosition* oldPosition, const TVolumePositio
n* curPosition); | | TVolumePosition(const TVolumePosition* oldPosition, const TVolumePositio
n* curPosition); | |
| TVolumePosition(const TVolumePosition&pos); | | TVolumePosition(const TVolumePosition&pos); | |
| virtual ~TVolumePosition(); | | virtual ~TVolumePosition(); | |
| virtual void Browse(TBrowser *b); | | virtual void Browse(TBrowser *b); | |
| virtual Float_t *Errmx2Local (const Float_t *masterError, Float_t *lo
calError ) const; | | virtual Float_t *Errmx2Local (const Float_t *masterError, Float_t *lo
calError ) const; | |
| virtual Double_t *Errmx2Local (const Double_t *masterError, Double_t *
localError) const; | | virtual Double_t *Errmx2Local (const Double_t *masterError, Double_t *
localError) const; | |
| virtual Float_t *Errmx2Master(const Float_t *localError, Float_t *mas
terError ) const; | | virtual Float_t *Errmx2Master(const Float_t *localError, Float_t *mas
terError ) const; | |
| virtual Double_t *Errmx2Master(const Double_t *localError, Double_t *m
asterError) const; | | virtual Double_t *Errmx2Master(const Double_t *localError, Double_t *m
asterError) const; | |
| virtual Double_t *Cormx2Local (const Double_t *masterCorr, Double_t *l
ocalCorr ) const; | | virtual Double_t *Cormx2Local (const Double_t *masterCorr, Double_t *l
ocalCorr ) const; | |
| virtual Float_t *Cormx2Local (const Float_t *masterCorr, Float_t *loc
alCorr ) const; | | virtual Float_t *Cormx2Local (const Float_t *masterCorr, Float_t *loc
alCorr ) const; | |
| virtual Double_t *Cormx2Master(const Double_t *localCorr, Double_t *ma
sterCorr ) const; | | virtual Double_t *Cormx2Master(const Double_t *localCorr, Double_t *ma
sterCorr ) const; | |
| virtual Float_t *Cormx2Master(const Float_t *localCorr, Float_t *mast
erCorr ) const; | | virtual Float_t *Cormx2Master(const Float_t *localCorr, Float_t *mast
erCorr ) const; | |
| virtual Double_t *Master2Local(const Double_t *master, Double_t *local
,Int_t nPoints=1) const; | | virtual Double_t *Master2Local(const Double_t *master, Double_t *local
,Int_t nPoints=1) const; | |
| virtual Float_t *Master2Local(const Float_t *master, Float_t *local,I
nt_t nPoints=1) const; | | virtual Float_t *Master2Local(const Float_t *master, Float_t *local,I
nt_t nPoints=1) const; | |
| | | | |
| virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |
| virtual TDataSet *DefineSet(); | | virtual TDataSet *DefineSet(); | |
| virtual void Draw(Option_t *depth="3"); // *MENU* | | virtual void Draw(Option_t *depth="3"); // *MENU* | |
| 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 TVolume *GetNode() const {return fNode;} | | virtual TVolume *GetNode() const {return fNode;} | |
|
| virtual Text_t *GetObjectInfo(Int_t px, Int_t py) const; | | virtual char *GetObjectInfo(Int_t px, Int_t py) const; | |
| const Option_t *GetOption() const { return GetNode()?GetNode()->Get
Option():0;} | | const Option_t *GetOption() const { return GetNode()?GetNode()->Get
Option():0;} | |
| virtual const Char_t *GetName() const; | | virtual const Char_t *GetName() const; | |
| const TRotMatrix *GetMatrix() const; | | const TRotMatrix *GetMatrix() const; | |
| TRotMatrix *GetMatrix(); | | TRotMatrix *GetMatrix(); | |
| | | | |
| Int_t GetVisibility() const {return GetNode()?GetNode()->G
etVisibility():0;} | | Int_t GetVisibility() const {return GetNode()?GetNode()->G
etVisibility():0;} | |
| virtual Double_t GetX(Int_t indx=0) const {return fX[indx];} | | virtual Double_t GetX(Int_t indx=0) const {return fX[indx];} | |
| virtual const Double_t *GetXYZ() const {return fX;} | | virtual const Double_t *GetXYZ() const {return fX;} | |
| virtual Double_t GetY() const {return fX[1];} | | virtual Double_t GetY() const {return fX[1];} | |
| virtual Double_t GetZ() const {return fX[2];} | | virtual Double_t GetZ() const {return fX[2];} | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| TypeBase.h | | TypeBase.h | |
|
| // @(#)root/reflex:$Id: TypeBase.h 25669 2008-10-02 21:37:03Z pcanal $ | | // @(#)root/reflex:$Id: TypeBase.h 27579 2009-02-23 15:15:06Z pcanal $ | |
| // 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 58 | | skipping to change at line 58 | |
| */ | | */ | |
| class RFLX_API TypeBase { | | class RFLX_API TypeBase { | |
| | | | |
| public: | | public: | |
| | | | |
| /** default constructor */ | | /** default constructor */ | |
| TypeBase( const char * nam, | | TypeBase( const char * nam, | |
| size_t size, | | size_t size, | |
| TYPE typeTyp, | | TYPE typeTyp, | |
| const std::type_info & ti, | | const std::type_info & ti, | |
|
| const Type & finalType = Dummy::Type()); | | const Type & finalType = Dummy::Type(), | |
| | | REPRESTYPE represType = REPRES_NOTYPE); | |
| | | | |
| /** destructor */ | | /** destructor */ | |
| virtual ~TypeBase(); | | virtual ~TypeBase(); | |
| | | | |
| /** | | /** | |
| * operator Scope will return the corresponding scope of this type if | | * 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
m) | | * applicable (i.e. if the Type is also a Scope e.g. Class, Union, Enu
m) | |
| */ | | */ | |
| operator Scope () const; | | operator Scope () const; | |
| | | | |
| | | | |
| skipping to change at line 567 | | skipping to change at line 568 | |
| * MemberAt of BaseAt classes currently availabe in the system | | * MemberAt of BaseAt classes currently availabe in the system | |
| */ | | */ | |
| virtual void UpdateMembers() const; | | virtual void UpdateMembers() const; | |
| | | | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * AddDataMember will add the information about a data MemberAt | | * AddDataMember will add the information about a data MemberAt | |
| * @param dm pointer to data MemberAt | | * @param dm pointer to data MemberAt | |
| */ | | */ | |
|
| virtual void AddDataMember( const Member & dm ) const; | | virtual void AddDataMember(const Member& dm) const; | |
| virtual void AddDataMember( const char * nam, | | virtual void AddDataMember(const char* nam, const Type& typ, size_t o | |
| const Type & typ, | | ffs, unsigned int modifiers = 0) const; | |
| size_t offs, | | virtual void AddDataMember(Member& output, const char* nam, const Typ | |
| unsigned int modifiers = 0 ) const; | | e& typ, size_t offs, unsigned int modifiers = 0, char* interpreterOffset = | |
| | | 0) const; | |
| | | | |
| /** | | /** | |
| * AddFunctionMember will add the information about a function MemberA
t | | * AddFunctionMember will add the information about a function MemberA
t | |
| * @param fm pointer to function MemberAt | | * @param fm pointer to function MemberAt | |
| */ | | */ | |
| virtual void AddFunctionMember( const Member & fm ) const; | | virtual void AddFunctionMember( const Member & fm ) const; | |
| virtual void AddFunctionMember( const char * nam, | | virtual void AddFunctionMember( const char * nam, | |
| const Type & typ, | | const Type & typ, | |
| StubFunction stubFP, | | StubFunction stubFP, | |
| void * stubCtx = 0, | | void * stubCtx = 0, | |
| | | | |
| skipping to change at line 652 | | skipping to change at line 651 | |
| /** | | /** | |
| * Hide this type from any lookup by appending the string " @HIDDEN@"
to its name. | | * Hide this type from any lookup by appending the string " @HIDDEN@"
to its name. | |
| */ | | */ | |
| virtual void HideName() const; | | virtual void HideName() const; | |
| | | | |
| /** | | /** | |
| * Un-Hide this type from any lookup by removing the string " @HIDDEN
@" to its name. | | * Un-Hide this type from any lookup by removing the string " @HIDDEN
@" to its name. | |
| */ | | */ | |
| virtual void UnhideName() const; | | virtual void UnhideName() const; | |
| | | | |
|
| | | REPRESTYPE RepresType() const { return fRepresType; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| /** | | /** | |
| * DetermineFinalType will return the t without typedefs | | * DetermineFinalType will return the t without typedefs | |
| * @return type with all typedef info removed | | * @return type with all typedef info removed | |
| */ | | */ | |
| Type DetermineFinalType(const Type& t) const; | | Type DetermineFinalType(const Type& t) const; | |
| | | | |
| /** | | /** | |
|
| | | * Calculate the size for types based on other types, | |
| | | * if the other type was not yet available to calculate the | |
| | | * size at construction time. | |
| | | * @return The calculated size, 0 if the underlying size is unknown. | |
| | | */ | |
| | | virtual size_t CalculateSize() const; | |
| | | | |
| | | /** | |
| * Pointer to the TypeName | | * Pointer to the TypeName | |
| * @label At Name | | * @label At Name | |
| * @ling aggregation | | * @ling aggregation | |
| * @link aggregation | | * @link aggregation | |
| * @supplierCardinality 1 | | * @supplierCardinality 1 | |
| * @clientCardinality 1 | | * @clientCardinality 1 | |
| */ | | */ | |
| TypeName * fTypeName; | | TypeName * fTypeName; | |
| | | | |
| /** C++ type_info object */ | | /** C++ type_info object */ | |
| mutable | | mutable | |
| const std::type_info * fTypeInfo; | | const std::type_info * fTypeInfo; | |
| | | | |
| private: | | private: | |
| | | | |
|
| | | REPRESTYPE fRepresType; | |
| | | | |
| /** | | /** | |
| * The Scope of the Type | | * The Scope of the Type | |
| * @label type scope | | * @label type scope | |
| * @link aggregation | | * @link aggregation | |
| * @clientCardinality 1 | | * @clientCardinality 1 | |
| * @supplierCardinality 1 | | * @supplierCardinality 1 | |
| */ | | */ | |
| Scope fScope; | | Scope fScope; | |
| | | | |
| /** size of the type in int */ | | /** size of the type in int */ | |
| | | | |
| skipping to change at line 762 | | skipping to change at line 773 | |
| return Dummy::BaseCont().rbegin(); | | return Dummy::BaseCont().rbegin(); | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline Reflex::Reverse_Base_Iterator Reflex::TypeBase::Base_REnd() const { | | inline Reflex::Reverse_Base_Iterator Reflex::TypeBase::Base_REnd() const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return Dummy::BaseCont().rend(); | | return Dummy::BaseCont().rend(); | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
|
| | | inline size_t Reflex::TypeBase::CalculateSize() const { | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| | | return fSize; | |
| | | } | |
| | | | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| inline size_t Reflex::TypeBase::DataMemberSize() const { | | inline size_t Reflex::TypeBase::DataMemberSize() const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return 0; | | return 0; | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline Reflex::Member_Iterator Reflex::TypeBase::DataMember_Begin() const { | | inline Reflex::Member_Iterator Reflex::TypeBase::DataMember_Begin() const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return Dummy::MemberCont().begin(); | | return Dummy::MemberCont().begin(); | |
| } | | } | |
| | | | |
| skipping to change at line 1013 | | skipping to change at line 1030 | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::FunctionParameter_RE
nd() const { | | inline Reflex::Reverse_Type_Iterator Reflex::TypeBase::FunctionParameter_RE
nd() 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(); | |
| return fSize; | | return fSize; | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline size_t Reflex::TypeBase::SubScopeSize() const { | | inline size_t Reflex::TypeBase::SubScopeSize() const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| return 0; | | return 0; | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| | | | |
| skipping to change at line 1170 | | skipping to change at line 1188 | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline void Reflex::TypeBase::AddDataMember( const char * /* nam */, | | inline void Reflex::TypeBase::AddDataMember( const char * /* nam */, | |
| const Type & /* typ */, | | const Type & /* typ */, | |
| size_t /* offs */, | | size_t /* offs */, | |
| unsigned int /* modifier
s */ ) const { | | unsigned int /* modifier
s */ ) const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| throw RuntimeError("Function AddDataMember not callable on this object"
); | | throw RuntimeError("Function AddDataMember not callable on this object"
); | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
|
| | | inline void Reflex::TypeBase::AddDataMember(Member& /*output*/, const char* | |
| | | /*nam*/, const Type& /*typ*/, size_t /*offs*/, unsigned int /*modifiers*/, | |
| | | char* /*interpreterOffset*/) const { | |
| | | //---------------------------------------------------------------------- | |
| | | --------- | |
| | | throw RuntimeError("Function AddDataMember not callable on this object" | |
| | | ); | |
| | | } | |
| | | | |
| | | //------------------------------------------------------------------------- | |
| | | ------ | |
| inline void Reflex::TypeBase::AddFunctionMember( const Member & /* fm */ )
const { | | inline void Reflex::TypeBase::AddFunctionMember( const Member & /* fm */ )
const { | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| throw RuntimeError("Function AddFunctionMember not callable on this obje
ct"); | | throw RuntimeError("Function AddFunctionMember not callable on this obje
ct"); | |
| } | | } | |
| | | | |
| //-------------------------------------------------------------------------
------ | | //-------------------------------------------------------------------------
------ | |
| inline void Reflex::TypeBase::AddFunctionMember( const char * /* nam */, | | inline void Reflex::TypeBase::AddFunctionMember( const char * /* nam */, | |
| const Type & /* typ
*/, | | const Type & /* typ
*/, | |
| StubFunction /* stub
FP */, | | StubFunction /* stub
FP */, | |
| void * /* stubCtx */
, | | void * /* stubCtx */
, | |
| | | | |
End of changes. 9 change blocks. |
| 7 lines changed or deleted | | 41 lines changed or added | |
|
| UnBinData.h | | UnBinData.h | |
|
| // @(#)root/mathcore:$Id: UnBinData.h 24477 2008-06-23 12:58:47Z moneta $ | | // @(#)root/mathcore:$Id: UnBinData.h 27169 2009-01-16 09:46:05Z 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 UnBinData | | // Header file for class UnBinData | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| @ingroup FitData | | @ingroup FitData | |
| */ | | */ | |
| class UnBinData : public FitData { | | class UnBinData : public FitData { | |
| | | | |
| public : | | public : | |
| | | | |
| /** | | /** | |
| constructor from dimension of point and max number of points (to pre
-allocate vector) | | constructor from dimension of point and max number of points (to pre
-allocate vector) | |
| */ | | */ | |
| | | | |
|
| explicit UnBinData(unsigned int maxpoints = 0, unsigned int dim = 1 ) : | | explicit UnBinData(unsigned int maxpoints = 0, unsigned int dim = 1 ); | |
| // DataVector( dim*maxpoints ), | | | |
| FitData(), | | | |
| fDim(dim), | | | |
| fNPoints(0), | | | |
| fDataVector(0), | | | |
| fDataWrapper(0) | | | |
| { | | | |
| if (maxpoints > 0) fDataVector = new DataVector( dim * maxpoints); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor from option and default range | | constructor from option and default range | |
| */ | | */ | |
|
| explicit UnBinData (const DataOptions & opt, unsigned int maxpoints = 0 | | explicit UnBinData (const DataOptions & opt, unsigned int maxpoints = 0 | |
| , unsigned int dim = 1) : | | , unsigned int dim = 1); | |
| FitData( opt), | | | |
| fDim(dim), | | | |
| fNPoints(0), | | | |
| fDataVector(0), | | | |
| fDataWrapper(0) | | | |
| { | | | |
| if (maxpoints > 0) fDataVector = new DataVector( dim * maxpoints); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor from options and range | | constructor from options and range | |
| */ | | */ | |
|
| UnBinData (const DataOptions & opt, const DataRange & range, unsigned i | | UnBinData (const DataOptions & opt, const DataRange & range, unsigned i | |
| nt maxpoints = 0, unsigned int dim = 1 ) : | | nt maxpoints = 0, unsigned int dim = 1 ); | |
| FitData( opt, range), | | | |
| fDim(dim), | | | |
| fNPoints(0), | | | |
| fDataVector(0), | | | |
| fDataWrapper(0) | | | |
| { | | | |
| if (maxpoints > 0) fDataVector = new DataVector( dim * maxpoints); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor for 1D external data | | constructor for 1D external data | |
| */ | | */ | |
|
| UnBinData(unsigned int n, const double * dataX ) : | | UnBinData(unsigned int n, const double * dataX ); | |
| FitData( ), | | | |
| fDim(1), | | | |
| fNPoints(n), | | | |
| fDataVector(0) | | | |
| { | | | |
| fDataWrapper = new DataWrapper(dataX); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor for 2D external data | | constructor for 2D external data | |
| */ | | */ | |
|
| UnBinData(unsigned int n, const double * dataX, const double * dataY ) : | | UnBinData(unsigned int n, const double * dataX, const double * dataY ); | |
| FitData( ), | | | |
| fDim(2), | | | |
| fNPoints(n), | | | |
| fDataVector(0) | | | |
| { | | | |
| fDataWrapper = new DataWrapper(dataX, dataY, 0, 0, 0, 0); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor for 3D external data | | constructor for 3D external data | |
| */ | | */ | |
|
| UnBinData(unsigned int n, const double * dataX, const double * dataY, co | | UnBinData(unsigned int n, const double * dataX, const double * dataY, co | |
| nst double * dataZ ) : | | nst double * dataZ ); | |
| FitData( ), | | | |
| fDim(3), | | | |
| fNPoints(n), | | | |
| fDataVector(0) | | | |
| { | | | |
| fDataWrapper = new DataWrapper(dataX, dataY, dataZ, 0, 0, 0, 0, 0); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| constructor for multi-dim external data | | constructor for multi-dim external data | |
| Uses as argument an iterator of a list (or vector) containing the con
st double * of the data | | Uses as argument an iterator of a list (or vector) containing the con
st double * of the data | |
| An example could be the std::vector<const double *>::begin | | An example could be the std::vector<const double *>::begin | |
| */ | | */ | |
| template<class Iterator> | | template<class Iterator> | |
| UnBinData(unsigned int n, unsigned int dim, Iterator dataItr ) : | | UnBinData(unsigned int n, unsigned int dim, Iterator dataItr ) : | |
| FitData( ), | | FitData( ), | |
| fDim(dim), | | fDim(dim), | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 123 | |
| /** | | /** | |
| destructor, delete pointer to internal data or external data wrapper | | destructor, delete pointer to internal data or external data wrapper | |
| */ | | */ | |
| virtual ~UnBinData() { | | virtual ~UnBinData() { | |
| if (fDataVector) delete fDataVector; | | if (fDataVector) delete fDataVector; | |
| if (fDataWrapper) delete fDataWrapper; | | if (fDataWrapper) delete fDataWrapper; | |
| } | | } | |
| | | | |
| /** | | /** | |
| preallocate a data set given size and dimension | | preallocate a data set given size and dimension | |
|
| | | if a vector already exists with correct fimension (point size) extend | |
| | | the existing one | |
| | | keep the previous one | |
| */ | | */ | |
|
| void Initialize(unsigned int maxpoints, unsigned int dim = 1) { | | void Initialize(unsigned int maxpoints, unsigned int dim = 1); | |
| fDim = dim; | | | |
| assert(maxpoints > 0); | | | |
| if (fDataVector) | | | |
| (fDataVector->Data()).resize( maxpoints * PointSize() ); | | | |
| else | | | |
| fDataVector = new DataVector( dim * maxpoints); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| return fit point size (for unbin data is equivalent to coordinate dim
ension) | | return fit point size (for unbin data is equivalent to coordinate dim
ension) | |
| */ | | */ | |
| unsigned int PointSize() const { | | unsigned int PointSize() const { | |
| return fDim; | | return fDim; | |
| } | | } | |
| | | | |
| /** | | /** | |
| return size of internal data vector (is 0 for external data) | | return size of internal data vector (is 0 for external data) | |
| | | | |
| skipping to change at line 236 | | skipping to change at line 185 | |
| const double * Coords(unsigned int ipoint) const { | | const double * Coords(unsigned int ipoint) const { | |
| if (fDataVector) | | if (fDataVector) | |
| return &( (fDataVector->Data()) [ ipoint*PointSize() ] ); | | return &( (fDataVector->Data()) [ ipoint*PointSize() ] ); | |
| else | | else | |
| return fDataWrapper->Coords(ipoint); | | return fDataWrapper->Coords(ipoint); | |
| } | | } | |
| | | | |
| /** | | /** | |
| resize the vector to the given npoints | | resize the vector to the given npoints | |
| */ | | */ | |
|
| void Resize (unsigned int npoints) { | | void Resize (unsigned int npoints); | |
| if (fDataVector) { | | | |
| fNPoints = npoints; | | | |
| (fDataVector->Data()).resize(PointSize() *npoints); | | | |
| } | | | |
| } | | | |
| | | | |
| /** | | /** | |
| return number of contained points | | return number of contained points | |
| */ | | */ | |
| unsigned int NPoints() const { return fNPoints; } | | unsigned int NPoints() const { return fNPoints; } | |
| | | | |
| /** | | /** | |
| return number of contained points | | return number of contained points | |
| */ | | */ | |
| unsigned int Size() const { return fNPoints; } | | unsigned int Size() const { return fNPoints; } | |
| | | | |
End of changes. 10 change blocks. |
| 70 lines changed or deleted | | 15 lines changed or added | |
|
| WrappedTF1.h | | WrappedTF1.h | |
|
| // @(#)root/mathmore:$Id: WrappedTF1.h 26946 2008-12-16 10:47:01Z moneta $ | | // @(#)root/mathmore:$Id: WrappedTF1.h 27273 2009-01-28 09:07:01Z 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 WrappedTFunction | | // Header file for class WrappedTFunction | |
| | | | |
| skipping to change at line 122 | | skipping to change at line 122 | |
| Clone the wrapper but not the original function | | Clone the wrapper but not the original function | |
| */ | | */ | |
| ROOT::Math::IGenFunction * Clone() const { | | ROOT::Math::IGenFunction * Clone() const { | |
| return new WrappedTF1(*this); | | return new WrappedTF1(*this); | |
| } | | } | |
| | | | |
| /** @name interface inherited from IParamFunction */ | | /** @name interface inherited from IParamFunction */ | |
| | | | |
| /// get the parameter values (return values cachen inside, those inside
TF1 might be different) | | /// get the parameter values (return values cachen inside, those inside
TF1 might be different) | |
| const double * Parameters() const { | | const double * Parameters() const { | |
|
| return &fParams.front(); | | return (fParams.size() > 0) ? &fParams.front() : 0; | |
| } | | } | |
| | | | |
| /// set parameter values (only the cached one in this class,leave unchan
ges those of TF1) | | /// set parameter values (only the cached one in this class,leave unchan
ges those of TF1) | |
| void SetParameters(const double * p) { | | void SetParameters(const double * p) { | |
| std::copy(p,p+fParams.size(),fParams.begin()); | | std::copy(p,p+fParams.size(),fParams.begin()); | |
| } | | } | |
| | | | |
| /// return number of parameters | | /// return number of parameters | |
| unsigned int NPar() const { | | unsigned int NPar() const { | |
| return fParams.size(); | | return fParams.size(); | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 148 | |
| } | | } | |
| | | | |
| 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 { | |
| if (!fLinear) { | | if (!fLinear) { | |
| // need to set parameter values | | // need to set parameter values | |
| fFunc->SetParameters( par ); | | fFunc->SetParameters( par ); | |
| static const double kEps = 0.001; | | static const double kEps = 0.001; | |
|
| | | // no need to call InitArgs (it is called in TF1::GradientPar) | |
| fFunc->GradientPar(&x,grad,kEps); | | fFunc->GradientPar(&x,grad,kEps); | |
| } | | } | |
| else { | | else { | |
| unsigned int np = NPar(); | | unsigned int np = NPar(); | |
| for (unsigned int i = 0; i < np; ++i) | | for (unsigned int i = 0; i < np; ++i) | |
| grad[i] = DoParameterDerivative(x, par, i); | | grad[i] = DoParameterDerivative(x, par, i); | |
| } | | } | |
| } | | } | |
| | | | |
|
| | | static void SetDerivStepSize(double eps) { fgEps = eps; } | |
| | | | |
| 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); | |
| } | | } | |
| | | | |
| /// evaluate function using the cached parameter values of this class (n
ot of TF1) | | /// evaluate function using the cached parameter values of this class (n
ot of TF1) | |
| /// re-implement for better efficiency | | /// re-implement for better efficiency | |
| double DoEval (double x) const { | | double DoEval (double x) const { | |
| // no need to call InitArg for interpreted functions (done in ctor) | | // no need to call InitArg for interpreted functions (done in ctor) | |
| // use EvalPar since it is much more efficient than Eval | | // use EvalPar since it is much more efficient than Eval | |
| fX[0] = x; | | fX[0] = x; | |
|
| return fFunc->EvalPar(fX,&fParams.front()); | | const double * p = (fParams.size() > 0) ? &fParams.front() : 0; | |
| | | return fFunc->EvalPar(fX, p ); | |
| } | | } | |
| | | | |
| /// return the function derivatives w.r.t. x | | /// return the function derivatives w.r.t. x | |
| double DoDerivative( double x ) const { | | double DoDerivative( double x ) const { | |
|
| static const double kEps = 0.001; | | | |
| // parameter are passed as non-const in Derivative | | // parameter are passed as non-const in Derivative | |
|
| double * p = const_cast<double *>(&fParams.front() ); | | double * p = (fParams.size() > 0) ? const_cast<double *>( &fParams.f | |
| return fFunc->Derivative(x,p,kEps); | | ront()) : 0; | |
| | | return fFunc->Derivative(x,p,fgEps); | |
| } | | } | |
| | | | |
| /// 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 { | |
| // not very efficient - use ParameterGradient | | // not very efficient - use ParameterGradient | |
| if (! fLinear ) { | | if (! fLinear ) { | |
|
| std::vector<double> grad(NPar()); | | fFunc->SetParameters( p ); | |
| ParameterGradient(x, p, &grad[0] ); | | return fFunc->GradientPar(ipar, &x,fgEps); | |
| return grad[ipar]; | | | |
| } | | } | |
| else if (fPolynomial) { | | else if (fPolynomial) { | |
| // case of polynomial function (no parameter dependency) | | // case of polynomial function (no parameter dependency) | |
| return std::pow(x, static_cast<int>(ipar) ); | | return std::pow(x, static_cast<int>(ipar) ); | |
| } | | } | |
| else { | | else { | |
| // case of general linear function (bbuilt with ++ ) | | // case of general linear function (bbuilt with ++ ) | |
| const TFormula * df = dynamic_cast<const TFormula*>( fFunc->GetLin
earPart(ipar) ); | | const TFormula * df = dynamic_cast<const TFormula*>( fFunc->GetLin
earPart(ipar) ); | |
| assert(df != 0); | | assert(df != 0); | |
| fX[0] = x; | | fX[0] = x; | |
| // hack since TFormula::EvalPar is not const | | // hack since TFormula::EvalPar is not const | |
| return (const_cast<TFormula*> ( df) )->EvalPar( fX ) ; // derivati
ves should not depend on parameters since func is linear | | return (const_cast<TFormula*> ( df) )->EvalPar( fX ) ; // derivati
ves should not depend on parameters since func is linear | |
| } | | } | |
| } | | } | |
| | | | |
| 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 | |
| }; | | }; | |
| | | | |
| } // end namespace Fit | | } // end namespace Fit | |
| | | | |
| } // end namespace ROOT | | } // end namespace ROOT | |
| | | | |
| #endif /* ROOT_Fit_WrappedTF1 */ | | #endif /* ROOT_Fit_WrappedTF1 */ | |
| | | | |
End of changes. 9 change blocks. |
| 9 lines changed or deleted | | 14 lines changed or added | |
|