Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9514775
HandlerGroup.tcc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
HandlerGroup.tcc
View Options
// -*- C++ -*-
//
// HandlerGroup.tcc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2007 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined templated member
// functions of the HandlerGroup class.
//
#include "ThePEG/Utilities/ClassTraits.h"
#include "ThePEG/Handlers/Hint.h"
namespace ThePEG {
template <typename HDLR>
HandlerGroup<HDLR>::HandlerGroup() {}
template <typename HDLR>
HandlerGroup<HDLR>::HandlerGroup(const HandlerGroup<HDLR> & hg)
: HandlerGroupBase(hg), theDefaultHandler(hg.theDefaultHandler),
theHandler(hg.theHandler) {}
template <typename HDLR>
HandlerGroup<HDLR>::~HandlerGroup() {}
template <typename HDLR>
bool HandlerGroup<HDLR>::setHandler(tStepHdlPtr hin,
const HandlerGroupBase & ext) {
tHdlPtr h = dynamic_ptr_cast<HdlPtr>(hin);
if ( !h ) return false;
if ( !theHandler ) refillDefaults(ext);
theHandler = h;
isEmpty = false;
return true;
}
template <typename HDLR>
void HandlerGroup<HDLR>::refillDefaultHandler(tStepHdlPtr h) {
tHdlPtr ext = dynamic_ptr_cast<HdlPtr>(h);
if ( ext ) theHandler = ext;
else theHandler = theDefaultHandler;
if ( theHandler ) {
for ( int i = 0, N = theHints.size(); i < N; ++i )
if ( theHints[i] == Hint::Default() ) return;
theHints.push_front(Hint::Default());
isEmpty = false;
}
}
template <typename HDLR>
void HandlerGroup<HDLR>::clear() {
theHandler = HdlPtr();
HandlerGroupBase::clear();
}
template <typename HDLR>
string HandlerGroup<HDLR>::handlerClass() const {
return ClassTraits<HDLR>::className();
}
template <typename HDLR>
void HandlerGroup<HDLR>::interfaceSetHandler(HdlPtr p) {
theDefaultHandler = p;
}
template <typename HDLR>
typename HandlerGroup<HDLR>::HdlPtr
HandlerGroup<HDLR>::interfaceGetHandler() const {
return theDefaultHandler;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Mon, Feb 24, 6:43 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4494605
Default Alt Text
HandlerGroup.tcc (1 KB)
Attached To
rTHEPEGHG thepeghg
Event Timeline
Log In to Comment