ATLAS Offline Software
AlgHist.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MULTI_DRAW_ALG_HIST_H
6 #define MULTI_DRAW_ALG_HIST_H
7 
8 //
9 // Distributed under the Boost Software License, Version 1.0.
10 // (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 // Please feel free to contact me (krumnack@iastate.edu) for bug
14 // reports, feature suggestions, praise and complaints.
15 
16 
20 
21 
22 
23 //protect
24 #include <MultiDraw/Global.h>
25 
26 #include <EventLoop/Algorithm.h>
27 
28 class TH1;
29 
30 namespace MD
31 {
32  class AlgHist : public EL::Algorithm
33  {
34  //
35  // public interface
36  //
37 
40  public:
41  void testInvariant () const;
42 
43 
47  public:
48  AlgHist ();
49 
50 
57  public:
58  AlgHist (TH1 *val_hist_swallow,
59  const std::string& val_value0,
60  const std::string& val_value1 = "",
61  const std::string& val_value2 = "",
62  const std::string& val_value3 = "");
63 
64 
68  public:
70 
71 
72  //
73  // interface inherited from EL::Algorithm
74  //
75 
84  private:
86 
87 
98  private:
100 
101 
106  private:
108 
109 
110 
111  //
112  // private interface
113  //
114 
116  private:
117  TH1 *m_hist;
118 
120  private:
121  int m_type;
122 
124  private:
125  std::vector<std::string> m_formulas;
126 
128  private:
129  std::vector<Double_t> m_values;
130 
132  private:
133  std::size_t m_valnum;
134 
136  private:
137  bool m_cut;
138 
140  private:
141  std::vector<const Formula*> m_index;
142 
144  private:
145  TH1 *m_hist2;
146 
148  private:
150 
152  };
153 }
154 
155 #endif
MD::AlgHist::m_index
std::vector< const Formula * > m_index
description: the indices to the formulas
Definition: AlgHist.h:141
MD::AlgHist
Definition: AlgHist.h:33
MD::AlgHist::m_cut
bool m_cut
description: whether we use a cut
Definition: AlgHist.h:137
MD::AlgHist::testInvariant
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
Global.h
MD
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: AlgCFlow.h:31
MD::AlgHist::execute
virtual EL::StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
MD::AlgHist::m_formSvc
FormulaSvc * m_formSvc
description: the formula service we are using
Definition: AlgHist.h:149
MD::AlgHist::ClassDef
ClassDef(AlgHist, 1)
MD::AlgHist::m_values
std::vector< Double_t > m_values
description: the value of the formulas
Definition: AlgHist.h:129
EL::Algorithm
Definition: Algorithm.h:22
MD::AlgHist::AlgHist
AlgHist()
effects: default constructor guarantee: no-fail rationale: this should only be called by serializatio...
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MD::AlgHist::setupJob
virtual EL::StatusCode setupJob(EL::Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
Algorithm.h
MD::AlgHist::m_valnum
std::size_t m_valnum
description: the number of values without the weight/cut
Definition: AlgHist.h:133
MD::AlgHist::m_hist2
TH1 * m_hist2
description: the histogram we are filling
Definition: AlgHist.h:145
MD::AlgHist::initialize
virtual EL::StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
MD::AlgHist::m_hist
TH1 * m_hist
description: the histogram we use as a template
Definition: AlgHist.h:117
MD::FormulaSvc
Definition: FormulaSvc.h:54
MD::AlgHist::m_type
int m_type
description: the type of histogram used
Definition: AlgHist.h:121
EL::Job
Definition: Job.h:51
test_interactive_athena.job
job
Definition: test_interactive_athena.py:6
MD::AlgHist::m_formulas
std::vector< std::string > m_formulas
description: the list of formulas used
Definition: AlgHist.h:125
MD::AlgHist::~AlgHist
~AlgHist()
effects: destructor guarantee: no-fail rationale: this is needed to delete the template histogram
MD::AlgHist::AlgHist
AlgHist(TH1 *val_hist_swallow, const std::string &val_value0, const std::string &val_value1="", const std::string &val_value2="", const std::string &val_value3="")
effects: constructor for the given histogram spec, value, and weight guarantee: strong failures: out ...