ATLAS Offline Software
TIDAChain.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
14 #ifndef TIDA_CHAIN_H
15 #define TIDA_CHAIN_H
16 
17 #include <iostream>
18 #include <vector>
19 #include <string>
20 
22 
23 #include "TObject.h"
24 
25 
26 namespace TIDA {
27 
28 class Chain : public TObject {
29 
30 public:
31 
32  Chain() { }
33  Chain(const std::string& name) : m_name(name) { }
34 
35  virtual ~Chain();
36 
37  // accessors and roi manipulation
38  const std::string& name() const { return m_name; }
39 
40  // all the following could be avoided by simply
41  // inheriting from an std::vector<TIDA::Roi> !!
42 
44  void addRoi(TIDA::Roi& roi) { m_roi.push_back(roi); }
45 
47  void addRoi(const TIDARoiDescriptor& roi) { m_roi.push_back(TIDA::Roi(roi)); }
48 
50  const std::vector<TIDA::Roi>& rois() const { return m_roi; }
51  std::vector<TIDA::Roi>& rois() { return m_roi; }
52 
54  unsigned size() const { return m_roi.size(); }
55 
56  // clear the event
57  void clear() { m_roi.clear(); }
58 
59  // return a refer to the last roi in the chain
60  TIDA::Roi& back() { return m_roi.back(); }
61 
62  TIDA::Roi& operator[](int i) { return m_roi.at(i); }
63  TIDA::Roi& at(int i) { return m_roi.at(i); }
64 
65  const TIDA::Roi& operator[](int i) const { return m_roi.at(i); }
66  const TIDA::Roi& at(int i) const { return m_roi.at(i); }
67 
68 private:
69 
70  std::string m_name;
71  std::vector<TIDA::Roi> m_roi;
72 
73  ClassDef(TIDA::Chain,1)
74 
75 };
76 
77 }
78 
79 inline std::ostream& operator<<( std::ostream& s, const TIDA::Chain& c ) {
80  s << "\tChain " << c.name() << "\trois: " << c.rois().size();
81  for ( unsigned i=0 ; i<c.rois().size() ; i++ ) s << "\n\t" << c.rois()[i];
82  return s;
83 }
84 
85 #endif // TIDA_CHAIN_H
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
TIDA::Chain::name
const std::string & name() const
Definition: TIDAChain.h:38
TIDA
Test for xAOD.
Definition: Filter_AcceptAll.h:22
TIDA::Chain::rois
std::vector< TIDA::Roi > & rois()
Definition: TIDAChain.h:51
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TIDA::Chain::clear
void clear()
Definition: TIDAChain.h:57
TIDA::Chain::size
unsigned size() const
number of rois
Definition: TIDAChain.h:54
TIDARoiDescriptor
Describes the Region of Ineterest geometry It has basically 8 parameters.
Definition: TIDARoiDescriptor.h:42
TIDA::Chain::rois
const std::vector< TIDA::Roi > & rois() const
get back roi vector
Definition: TIDAChain.h:50
TIDA::Chain::m_name
std::string m_name
Definition: TIDAChain.h:70
TIDA::Chain::~Chain
virtual ~Chain()
TIDA::Chain::addRoi
void addRoi(TIDA::Roi &roi)
add and roi by root dictionary class
Definition: TIDAChain.h:44
TIDA::Chain::back
TIDA::Roi & back()
Definition: TIDAChain.h:60
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TIDA::Chain::Chain
Chain(const std::string &name)
Definition: TIDAChain.h:33
TIDA::Chain::operator[]
TIDA::Roi & operator[](int i)
Definition: TIDAChain.h:62
TIDA::Chain::Chain
Chain()
Definition: TIDAChain.h:32
TIDA::Chain::m_roi
std::vector< TIDA::Roi > m_roi
Definition: TIDAChain.h:71
lumiFormat.i
int i
Definition: lumiFormat.py:85
TIDARoi.h
Roi class, contains RoiDescriptor and also a vector of Tracks
TIDA::Chain::at
TIDA::Roi & at(int i)
Definition: TIDAChain.h:63
TIDA::Chain::addRoi
void addRoi(const TIDARoiDescriptor &roi)
add roi from TrigInDetAnalysis class
Definition: TIDAChain.h:47
TIDA::Chain
Definition: TIDAChain.h:28
TIDA::Roi
Definition: TIDARoi.h:31
operator<<
std::ostream & operator<<(std::ostream &s, const TIDA::Chain &c)
Definition: TIDAChain.h:79
TIDA::Chain::at
const TIDA::Roi & at(int i) const
Definition: TIDAChain.h:66
TIDA::Chain::operator[]
const TIDA::Roi & operator[](int i) const
Definition: TIDAChain.h:65
python.compressB64.c
def c
Definition: compressB64.py:93