00001 #ifndef QUICK_ANA__ANA_TOOL_WEIGHT_H
00002 #define QUICK_ANA__ANA_TOOL_WEIGHT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "AthContainers/AuxElement.h"
00016
00017 #include <QuickAna/Global.h>
00018
00019 #include <QuickAna/AnaTool.h>
00020
00021 namespace ana
00022 {
00025 template<class XAODContainer>
00026 class AnaToolWeight : virtual public IAnaTool, public AnaTool
00027 {
00028
00029
00030
00031
00032 ASG_TOOL_CLASS (AnaToolWeight, ana::IAnaTool)
00033
00034
00035
00036 public:
00037 typedef XAODContainer ContainerType;
00038
00039
00041 public:
00042 typedef typename XAODContainer::base_value_type XAODObject;
00043
00044
00050 public:
00051 AnaToolWeight (const std::string& name);
00052
00053
00055 public:
00056 virtual StatusCode
00057 setObjectType (ObjectType type, const std::string& workingPoint) override;
00058
00059
00061 public:
00062 virtual AnalysisStep step () const override;
00063
00064
00066 public:
00067 virtual unsigned inputTypes () const override;
00068
00069
00071 public:
00072 virtual unsigned outputTypes () const override;
00073
00074
00076 public:
00077 virtual StatusCode execute (IEventObjects& objects) override;
00078
00079
00088 public:
00089 virtual StatusCode objectWeight (const XAODObject& object, float& weight) = 0;
00090
00091
00092
00093
00094
00095
00097 private:
00098 ObjectType m_type;
00099
00101 private:
00102 SG::AuxElement::ConstAccessor<SelectType> m_select;
00103
00105 private:
00106 SG::AuxElement::Accessor<float> m_weight;
00107 };
00108 }
00109
00110 #include <QuickAna/AnaToolWeight.icc>
00111
00112 #endif