ATLAS Offline Software
AlgSelect.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 EVENT_LOOP_ALGS__ALG_SELECT_H
6 #define EVENT_LOOP_ALGS__ALG_SELECT_H
7 
8 // - 2012.
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 <EventLoopAlgs/Global.h>
25 
26 #include <EventLoop/Algorithm.h>
27 #include <MultiDraw/Global.h>
28 
29 class TH1;
30 
31 namespace EL
32 {
33  class AlgSelect : public Algorithm
34  {
35  //
36  // public interface
37  //
38 
41  public:
42  void testInvariant () const;
43 
44 
50  public:
51  AlgSelect (const std::string& val_outputStream,
52  const std::string& cut = "");
53 
54 
58  public:
59  const std::string& outputStream () const;
60 
61 
65  public:
66  const std::string& histName () const;
67  void histName (const std::string& val_histName);
68 
69 
74  public:
75  void addCut (const std::string& cut);
76 
77 
78 
79  //
80  // semi-public interface
81  //
82 
87  public:
89 
90 
91 
92  //
93  // interface inherited from Algorithm
94  //
95 
104  private:
106 
107 
118  private:
119  virtual StatusCode initialize ();
120 
121 
126  private:
127  virtual StatusCode execute ();
128 
129 
130 
131  //
132  // private interface
133  //
134 
136  private:
137  std::string m_outputStream;
138 
140  private:
141  std::vector<std::string> m_cuts;
142 
144  private:
145  std::string m_histName;
146 
148  private:
149  std::vector<const MD::Formula*> m_index;
150 
152  private:
153  TH1 *m_hist;
154 
156  private:
158 
160  private:
162 
164  };
165 }
166 
167 #endif
EL::AlgSelect::AlgSelect
AlgSelect(const std::string &val_outputStream, const std::string &cut="")
effects: create a new selector for the given output.
EL::AlgSelect::initialize
virtual StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
EL::AlgSelect::addCut
void addCut(const std::string &cut)
effects: add another cut guarantee: strong failures: out of memory II requires: !cut....
Global.h
EL::AlgSelect::ClassDef
ClassDef(AlgSelect, 1)
EL::AlgSelect::m_cuts
std::vector< std::string > m_cuts
description: the list of formulas used
Definition: AlgSelect.h:141
EL::AlgSelect::setupJob
virtual StatusCode setupJob(Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
EL::AlgSelect::m_skim
NTupleSvc * m_skim
description: the skimming service we are using
Definition: AlgSelect.h:161
Global.h
EL::AlgSelect::m_histName
std::string m_histName
description: the name of the cut-flow histogram
Definition: AlgSelect.h:145
EL::AlgSelect::outputStream
const std::string & outputStream() const
description: the name of the output stream guarantee: no-fail invariant: !outputStream....
EL::AlgSelect
Definition: AlgSelect.h:34
EL::NTupleSvc
Definition: NTupleSvc.h:49
EL::AlgSelect::testInvariant
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
EL::Algorithm
Definition: Algorithm.h:22
EL::AlgSelect::m_formSvc
MD::FormulaSvc * m_formSvc
description: the formula service we are using
Definition: AlgSelect.h:157
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Algorithm.h
EL::AlgSelect::m_outputStream
std::string m_outputStream
description: members directly corresponding to accessors
Definition: AlgSelect.h:137
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::AlgSelect::histName
void histName(const std::string &val_histName)
EL::AlgSelect::histName
const std::string & histName() const
description: the histogram name guarantee: no-fail / strong failures: out of memory II
EL::AlgSelect::execute
virtual StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
MD::FormulaSvc
Definition: FormulaSvc.h:54
EL::AlgSelect::AlgSelect
AlgSelect()
effects: standard default constructor guarantee: strong failures: out of memory II rationale: this sh...
EL::AlgSelect::m_index
std::vector< const MD::Formula * > m_index
description: the indices to the formulas
Definition: AlgSelect.h:149
EL::Job
Definition: Job.h:51
test_interactive_athena.job
job
Definition: test_interactive_athena.py:6
EL::AlgSelect::m_hist
TH1 * m_hist
description: the histogram we are filling
Definition: AlgSelect.h:153