ATLAS Offline Software
VertexAnalysis.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
12 #ifndef VERTEXANALYSIS_H
13 #define VERTEXANALYSIS_H
14 
15 #include <iostream>
16 
17 
18 #include "TH1.h"
19 #include "TProfile.h"
20 
23 
24 
26 
27 public:
28 
29  VertexAnalysis( const std::string& n ) : m_name(n) { }
30 
31  virtual ~VertexAnalysis() { }
32 
33  std::string name() const { return m_name; }
34 
35  virtual void initialise() = 0;
36 
37  virtual void execute( const std::vector<TIDA::Vertex*>& vtx0,
38  const std::vector<TIDA::Vertex*>& vtx1,
39  const TIDA::Event* te=0 ) = 0;
40 
41  virtual void finalise() = 0;
42 
43  void addHistogram( TH1* h ) { m_histos.push_back( h ); }
44 
45  void addHistogram( TProfile* h ) { m_profs.push_back( h ); }
46 
47  std::vector<TH1*> objects() { return m_histos; }
48  std::vector<TProfile*> profs() { return m_profs; }
49 
50 protected:
51 
52  std::vector<TH1*> m_histos;
53  std::vector<TProfile*> m_profs;
54 
55 private:
56 
57  std::string m_name;
58 
59 };
60 
61 inline std::ostream& operator<<( std::ostream& s, const VertexAnalysis& v ) {
62  return s << v.name();
63 }
64 
65 
66 #endif // VERTEXANALYSIS_H
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VertexAnalysis::addHistogram
void addHistogram(TProfile *h)
Definition: VertexAnalysis.h:45
VertexAnalysis::name
std::string name() const
Definition: VertexAnalysis.h:33
VertexAnalysis::m_profs
std::vector< TProfile * > m_profs
Definition: VertexAnalysis.h:53
TIDAEvent.h
Basic event class to contain a vector of chains for trigger analysis
VertexAnalysis::addHistogram
void addHistogram(TH1 *h)
Definition: VertexAnalysis.h:43
TIDAVertex.h
VertexAnalysis::VertexAnalysis
VertexAnalysis(const std::string &n)
Definition: VertexAnalysis.h:29
TIDA::Event
Definition: TIDAEvent.h:33
VertexAnalysis::profs
std::vector< TProfile * > profs()
Definition: VertexAnalysis.h:48
beamspotman.n
n
Definition: beamspotman.py:731
VertexAnalysis::m_histos
std::vector< TH1 * > m_histos
Definition: VertexAnalysis.h:52
VertexAnalysis::initialise
virtual void initialise()=0
VertexAnalysis::finalise
virtual void finalise()=0
TProfile
Definition: rootspy.cxx:515
VertexAnalysis::m_name
std::string m_name
Definition: VertexAnalysis.h:57
VertexAnalysis::objects
std::vector< TH1 * > objects()
Definition: VertexAnalysis.h:47
python.PyAthena.v
v
Definition: PyAthena.py:157
h
VertexAnalysis::~VertexAnalysis
virtual ~VertexAnalysis()
Definition: VertexAnalysis.h:31
TH1
Definition: rootspy.cxx:268
VertexAnalysis
Definition: VertexAnalysis.h:25
VertexAnalysis::execute
virtual void execute(const std::vector< TIDA::Vertex * > &vtx0, const std::vector< TIDA::Vertex * > &vtx1, const TIDA::Event *te=0)=0
operator<<
std::ostream & operator<<(std::ostream &s, const VertexAnalysis &v)
Definition: VertexAnalysis.h:61