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
6
7#ifndef EVENT_LOOP_ALGS__ALG_SELECT_H
8#define EVENT_LOOP_ALGS__ALG_SELECT_H
9
11
12
13
14//protect
16
17#include <EventLoop/Algorithm.h>
18#include <MultiDraw/Global.h>
19
20class TH1;
21
22namespace EL
23{
24 class AlgSelect : public Algorithm
25 {
26 //
27 // public interface
28 //
29
32 public:
33 void testInvariant () const;
34
35
41 public:
42 AlgSelect (const std::string& val_outputStream,
43 const std::string& cut = "");
44
45
49 public:
50 const std::string& outputStream () const;
51
52
56 public:
57 const std::string& histName () const;
58 void histName (const std::string& val_histName);
59
60
65 public:
66 void addCut (const std::string& cut);
67
68
69
70 //
71 // semi-public interface
72 //
73
78 public:
80
81
82
83 //
84 // interface inherited from Algorithm
85 //
86
95 private:
96 virtual StatusCode setupJob (Job& job);
97
98
109 private:
111
112
117 private:
118 virtual StatusCode execute ();
119
120
121
122 //
123 // private interface
124 //
125
127 private:
128 std::string m_outputStream;
129
131 private:
132 std::vector<std::string> m_cuts;
133
135 private:
136 std::string m_histName;
137
139 private:
140 std::vector<const MD::Formula*> m_index;
141
143 private:
144 TH1 *m_hist;
145
147 private:
149
151 private:
153
155 };
156}
157
158#endif
std::string m_histName
description: the name of the cut-flow histogram
Definition AlgSelect.h:136
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:148
NTupleSvc * m_skim
description: the skimming service we are using
Definition AlgSelect.h:152
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:128
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:132
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:144
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:140
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.