ATLAS Offline Software
Loading...
Searching...
No Matches
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
25
26#include <EventLoop/Algorithm.h>
27#include <MultiDraw/Global.h>
28
29class TH1;
30
31namespace 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:
105 virtual StatusCode setupJob (Job& job);
106
107
118 private:
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
std::string m_histName
description: the name of the cut-flow histogram
Definition AlgSelect.h:145
const std::string & outputStream() const
description: the name of the output stream guarantee: no-fail invariant: !outputStream....
ClassDef(AlgSelect, 1)
MD::FormulaSvc * m_formSvc
description: the formula service we are using
Definition AlgSelect.h:157
NTupleSvc * m_skim
description: the skimming service we are using
Definition AlgSelect.h:161
AlgSelect()
effects: standard default constructor guarantee: strong failures: out of memory II rationale: this sh...
const std::string & histName() const
description: the histogram name guarantee: no-fail / strong failures: out of memory II
virtual StatusCode setupJob(Job &job)
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
std::string m_outputStream
description: members directly corresponding to accessors
Definition AlgSelect.h:137
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
std::vector< std::string > m_cuts
description: the list of formulas used
Definition AlgSelect.h:141
virtual StatusCode initialize()
effects: do everything that needs to be done before running the algorithm, e.g.
TH1 * m_hist
description: the histogram we are filling
Definition AlgSelect.h:153
virtual StatusCode execute()
effects: process the next event guarantee: basic failures: algorithm dependent rationale: the virtual...
std::vector< const MD::Formula * > m_index
description: the indices to the formulas
Definition AlgSelect.h:149
void histName(const std::string &val_histName)
void addCut(const std::string &cut)
effects: add another cut guarantee: strong failures: out of memory II requires: !cut....
AlgSelect(const std::string &val_outputStream, const std::string &cut="")
effects: create a new selector for the given output.
friend class Job
Definition Algorithm.h:292
Algorithm()
effects: standard default constructor guarantee: strong failures: low level errors I
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.