ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TIDA::Event Class Reference

#include <TIDAEvent.h>

Inheritance diagram for TIDA::Event:
Collaboration diagram for TIDA::Event:

Public Member Functions

 Event ()
 
virtual ~Event ()
 
void run_number (unsigned r)
 accessors More...
 
void event_number (unsigned long long e)
 
void lumi_block (unsigned lb)
 
void time_stamp (unsigned t)
 
void bunch_crossing_id (unsigned b)
 
void mu (double m)
 
unsigned run_number () const
 
unsigned long long event_number () const
 
unsigned lumi_block () const
 
unsigned time_stamp () const
 
unsigned bunch_crossing_id () const
 
double mu () const
 FIXME: what is this ? need a comment describing any not descriptive variable name. More...
 
unsigned size () const
 vertex multiplicity ?
More...
 
void addChain (const std::string &chainname)
 methods to add and access chains More...
 
void addVertex (const TIDA::Vertex &v)
 
const std::vector< TIDA::Chain > & chains () const
 
std::vector< TIDA::Chain > & chains ()
 
const TIDA::Chainchain (const std::string &s) const
 
void clear ()
 clear the event More...
 
TIDA::Chainback ()
 get the last chain from the vector More...
 
std::vector< TIDA::Chain >::iterator begin ()
 
std::vector< TIDA::Chain >::iterator end ()
 
std::vector< TIDA::Chain >::const_iterator begin () const
 
std::vector< TIDA::Chain >::const_iterator end () const
 
TIDA::Chainoperator[] (int i)
 vector operator More...
 
const std::vector< TIDA::Vertex > & vertices () const
 
std::vector< std::string > chainnames () const
 
void erase (const std::string &name)
 

Private Attributes

unsigned m_run_number
 
unsigned long long m_event_number
 
unsigned m_lumi_block
 
unsigned m_time_stamp
 
unsigned m_bunch_crossing_id
 
double m_mu
 
std::vector< TIDA::Chainm_chains
 vertex multiplicity ?
More...
 
std::vector< TIDA::Vertexm_vertices
 

Detailed Description

Definition at line 33 of file TIDAEvent.h.

Constructor & Destructor Documentation

◆ Event()

TIDA::Event::Event ( )

◆ ~Event()

Event::~Event ( )
virtual

Definition at line 25 of file TIDAEvent.cxx.

25 { }

Member Function Documentation

◆ addChain()

void TIDA::Event::addChain ( const std::string &  chainname)
inline

methods to add and access chains

Definition at line 67 of file TIDAEvent.h.

67  {
68  m_chains.push_back(TIDA::Chain(chainname));
69  }

◆ addVertex()

void TIDA::Event::addVertex ( const TIDA::Vertex v)
inline

Definition at line 71 of file TIDAEvent.h.

71  {
72  m_vertices.push_back(v);
73  }

◆ back()

TIDA::Chain& TIDA::Event::back ( )
inline

get the last chain from the vector

Definition at line 89 of file TIDAEvent.h.

89 { return m_chains.back(); }

◆ begin() [1/2]

std::vector<TIDA::Chain>::iterator TIDA::Event::begin ( )
inline

Definition at line 92 of file TIDAEvent.h.

92 { return m_chains.begin(); }

◆ begin() [2/2]

std::vector<TIDA::Chain>::const_iterator TIDA::Event::begin ( ) const
inline

Definition at line 95 of file TIDAEvent.h.

95 { return m_chains.begin(); }

◆ bunch_crossing_id() [1/2]

unsigned TIDA::Event::bunch_crossing_id ( ) const
inline

Definition at line 53 of file TIDAEvent.h.

53 { return m_bunch_crossing_id; }

◆ bunch_crossing_id() [2/2]

void TIDA::Event::bunch_crossing_id ( unsigned  b)
inline

Definition at line 46 of file TIDAEvent.h.

46 { m_bunch_crossing_id = b; }

◆ chain()

const TIDA::Chain * Event::chain ( const std::string &  s) const

could use std::find(), but would need to define an equality operator or lambda

Definition at line 56 of file TIDAEvent.cxx.

56  {
58  for( size_t i=m_chains.size() ; i-- ; ) if ( m_chains[i].name()==s ) return &m_chains[i];
59  return 0;
60 }

◆ chainnames()

std::vector< std::string > Event::chainnames ( ) const

Definition at line 27 of file TIDAEvent.cxx.

27  {
28  std::vector<std::string> names;
29  for ( std::vector<TIDA::Chain>::const_iterator citr=begin() ; citr!=end() ; ++citr ) names.push_back( citr->name() );
30  return names;
31 }

◆ chains() [1/2]

std::vector<TIDA::Chain>& TIDA::Event::chains ( )
inline

Definition at line 77 of file TIDAEvent.h.

77 { return m_chains; };

◆ chains() [2/2]

const std::vector<TIDA::Chain>& TIDA::Event::chains ( ) const
inline

Definition at line 76 of file TIDAEvent.h.

76 { return m_chains; };

◆ clear()

void TIDA::Event::clear ( )
inline

clear the event

Definition at line 86 of file TIDAEvent.h.

86 { m_chains.clear(); m_vertices.clear(); }

◆ end() [1/2]

std::vector<TIDA::Chain>::iterator TIDA::Event::end ( )
inline

Definition at line 93 of file TIDAEvent.h.

93 { return m_chains.end(); }

◆ end() [2/2]

std::vector<TIDA::Chain>::const_iterator TIDA::Event::end ( ) const
inline

Definition at line 96 of file TIDAEvent.h.

96 { return m_chains.end(); }

◆ erase()

void Event::erase ( const std::string &  name)

WHY DOES erase() NOT WORK ON THESE std::vector<TIDA::Chain> Almost certainly because we are using actual TObjects so instead we need to copy all the chains, and then copy them back if we don't want to delete it.!

Definition at line 35 of file TIDAEvent.cxx.

35  {
36 
40 
41  std::vector<TIDA::Chain> _chains = m_chains;
42  m_chains.clear();
43 
44  std::vector<TIDA::Chain>::const_iterator _itr = _chains.begin();
45 
46  while ( _itr!=_chains.end() ) {
47  if ( _itr->name()!=name ) m_chains.push_back( *_itr );
48  ++_itr;
49  }
50 
51 }

◆ event_number() [1/2]

unsigned long long TIDA::Event::event_number ( ) const
inline

Definition at line 50 of file TIDAEvent.h.

50 { return m_event_number; }

◆ event_number() [2/2]

void TIDA::Event::event_number ( unsigned long long  e)
inline

Definition at line 43 of file TIDAEvent.h.

43 { m_event_number = e; }

◆ lumi_block() [1/2]

unsigned TIDA::Event::lumi_block ( ) const
inline

Definition at line 51 of file TIDAEvent.h.

51 { return m_lumi_block; }

◆ lumi_block() [2/2]

void TIDA::Event::lumi_block ( unsigned  lb)
inline

Definition at line 44 of file TIDAEvent.h.

44 { m_lumi_block = lb; }

◆ mu() [1/2]

double TIDA::Event::mu ( ) const
inline

FIXME: what is this ? need a comment describing any not descriptive variable name.

Definition at line 57 of file TIDAEvent.h.

57 { return m_mu; }

◆ mu() [2/2]

void TIDA::Event::mu ( double  m)
inline

Definition at line 47 of file TIDAEvent.h.

47 { m_mu = m;}

◆ operator[]()

TIDA::Chain& TIDA::Event::operator[] ( int  i)
inline

vector operator

Definition at line 99 of file TIDAEvent.h.

99 { return m_chains.at(i); }

◆ run_number() [1/2]

unsigned TIDA::Event::run_number ( ) const
inline

Definition at line 49 of file TIDAEvent.h.

49 { return m_run_number; }

◆ run_number() [2/2]

void TIDA::Event::run_number ( unsigned  r)
inline

accessors

Definition at line 42 of file TIDAEvent.h.

42 { m_run_number = r; }

◆ size()

unsigned TIDA::Event::size ( ) const
inline

vertex multiplicity ?

NB all these could be avoided simply be inheriting from and std::vector<TIDA::Chain> rather than a member variable
number of chains added to this event

Definition at line 64 of file TIDAEvent.h.

64 { return m_chains.size(); }

◆ time_stamp() [1/2]

unsigned TIDA::Event::time_stamp ( ) const
inline

Definition at line 52 of file TIDAEvent.h.

52 { return m_time_stamp; }

◆ time_stamp() [2/2]

void TIDA::Event::time_stamp ( unsigned  t)
inline

Definition at line 45 of file TIDAEvent.h.

45 { m_time_stamp = t; }

◆ vertices()

const std::vector<TIDA::Vertex>& TIDA::Event::vertices ( ) const
inline

Definition at line 101 of file TIDAEvent.h.

101 { return m_vertices; }

Member Data Documentation

◆ m_bunch_crossing_id

unsigned TIDA::Event::m_bunch_crossing_id
private

Definition at line 115 of file TIDAEvent.h.

◆ m_chains

std::vector<TIDA::Chain> TIDA::Event::m_chains
private

vertex multiplicity ?

trigger chain information

Definition at line 119 of file TIDAEvent.h.

◆ m_event_number

unsigned long long TIDA::Event::m_event_number
private

Definition at line 111 of file TIDAEvent.h.

◆ m_lumi_block

unsigned TIDA::Event::m_lumi_block
private

Definition at line 112 of file TIDAEvent.h.

◆ m_mu

double TIDA::Event::m_mu
private

Definition at line 116 of file TIDAEvent.h.

◆ m_run_number

unsigned TIDA::Event::m_run_number
private

Definition at line 110 of file TIDAEvent.h.

◆ m_time_stamp

unsigned TIDA::Event::m_time_stamp
private

Definition at line 113 of file TIDAEvent.h.

◆ m_vertices

std::vector<TIDA::Vertex> TIDA::Event::m_vertices
private

Definition at line 121 of file TIDAEvent.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
TIDA::Event::m_chains
std::vector< TIDA::Chain > m_chains
vertex multiplicity ?
Definition: TIDAEvent.h:119
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TIDA::Event::m_bunch_crossing_id
unsigned m_bunch_crossing_id
Definition: TIDAEvent.h:115
python.TIDAChains._chains
_chains
Definition: TIDAChains.py:57
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TIDA::Event::begin
std::vector< TIDA::Chain >::iterator begin()
Definition: TIDAEvent.h:92
TIDA::Event::m_vertices
std::vector< TIDA::Vertex > m_vertices
Definition: TIDAEvent.h:121
TIDA::Event::m_lumi_block
unsigned m_lumi_block
Definition: TIDAEvent.h:112
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.subdetectors.mmg.names
names
Definition: mmg.py:8
TIDA::Event::m_time_stamp
unsigned m_time_stamp
Definition: TIDAEvent.h:113
TIDA::Event::m_event_number
unsigned long long m_event_number
Definition: TIDAEvent.h:111
TIDA::Event::m_mu
double m_mu
Definition: TIDAEvent.h:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TIDA::Chain
Definition: TIDAChain.h:28
TIDA::Event::end
std::vector< TIDA::Chain >::iterator end()
Definition: TIDAEvent.h:93
python.PyAthena.v
v
Definition: PyAthena.py:157
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
TIDA::Event::m_run_number
unsigned m_run_number
Definition: TIDAEvent.h:110