ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
Athena::RootNtupleEventContext Class Reference
Inheritance diagram for Athena::RootNtupleEventContext:
Collaboration diagram for Athena::RootNtupleEventContext:

Public Types

typedef std::vector< std::string > FileNames_t
 definition of the file container More...
 

Public Member Functions

 RootNtupleEventContext (const RootNtupleEventSelector *sel)
 standard c-tor with initialization More...
 
virtual ~RootNtupleEventContext ()
 standard d-tor More...
 
const FileNames_tfiles () const
 
virtual void * identifier () const
 context identifier More...
 
std::size_t fileIndex () const
 access to the file iterator More...
 
void setFileIndex (std::size_t idx)
 set file iterator More...
 
std::size_t tupleIndex () const
 
void setTupleIndex (std::size_t idx)
 
int64_t entry () const
 access to the current event entry number More...
 
void setFID (const std::string &fid)
 set connection FID More...
 
const std::string & fid () const
 access to the connection FID More...
 
TTree * tree () const
 access to the tree used to iterate More...
 
void setTree (TTree *tree)
 set the tree used to iterate More...
 

Private Attributes

const RootNtupleEventSelectorm_evtsel
 reference to the hosting event selector instance More...
 
long m_collIdx
 current collection index (into m_inputCollectionsName) More...
 
long m_tupleIdx
 current tuple index (into ‘m_tupleNames’) More...
 
std::string m_fid
 connection FID More...
 

Detailed Description

ROOT specific event selector context

Definition at line 129 of file RootNtupleEventSelector.cxx.

Member Typedef Documentation

◆ FileNames_t

typedef std::vector<std::string> Athena::RootNtupleEventContext::FileNames_t

definition of the file container

Definition at line 134 of file RootNtupleEventSelector.cxx.

Constructor & Destructor Documentation

◆ RootNtupleEventContext()

Athena::RootNtupleEventContext::RootNtupleEventContext ( const RootNtupleEventSelector sel)
inline

standard c-tor with initialization

Definition at line 152 of file RootNtupleEventSelector.cxx.

152  :
153  m_evtsel(sel),
154  m_collIdx(0),
155  m_tupleIdx(0),
156  m_fid("")
157  {}

◆ ~RootNtupleEventContext()

virtual Athena::RootNtupleEventContext::~RootNtupleEventContext ( )
inlinevirtual

standard d-tor

Definition at line 160 of file RootNtupleEventSelector.cxx.

160 {}

Member Function Documentation

◆ entry()

int64_t Athena::RootNtupleEventContext::entry ( ) const
inline

access to the current event entry number

Definition at line 185 of file RootNtupleEventSelector.cxx.

185 { return m_evtsel->m_curEvt; }

◆ fid()

const std::string& Athena::RootNtupleEventContext::fid ( ) const
inline

access to the connection FID

Definition at line 191 of file RootNtupleEventSelector.cxx.

191 { return m_fid; }

◆ fileIndex()

std::size_t Athena::RootNtupleEventContext::fileIndex ( ) const
inline

access to the file iterator

Definition at line 171 of file RootNtupleEventSelector.cxx.

172  { return m_collIdx; }

◆ files()

const FileNames_t& Athena::RootNtupleEventContext::files ( ) const
inline

Definition at line 163 of file RootNtupleEventSelector.cxx.

164  { return m_evtsel->m_inputCollectionsName.value(); }

◆ identifier()

virtual void* Athena::RootNtupleEventContext::identifier ( ) const
inlinevirtual

context identifier

Definition at line 167 of file RootNtupleEventSelector.cxx.

168  { return (void*)(m_evtsel); }

◆ setFID()

void Athena::RootNtupleEventContext::setFID ( const std::string &  fid)
inline

set connection FID

Definition at line 188 of file RootNtupleEventSelector.cxx.

188 { m_fid = fid; }

◆ setFileIndex()

void Athena::RootNtupleEventContext::setFileIndex ( std::size_t  idx)
inline

set file iterator

Definition at line 175 of file RootNtupleEventSelector.cxx.

176  { m_collIdx = idx; }

◆ setTree()

void Athena::RootNtupleEventContext::setTree ( TTree *  tree)
inline

set the tree used to iterate

Definition at line 197 of file RootNtupleEventSelector.cxx.

197  {
198  // make sure we clean-up and close the file holding
199  // the previous tree, if any.
200  // dont close if it is the same tree though!
201  TTree *cur = m_evtsel->m_tuple;
202  if (cur && tree != cur) {
203  TFile *old_file = cur->GetCurrentFile();
204  if (old_file) {
205  old_file->Close();
206  }
207  }
208 
209  m_evtsel->m_tuple = tree;
210  }

◆ setTupleIndex()

void Athena::RootNtupleEventContext::setTupleIndex ( std::size_t  idx)
inline

Definition at line 181 of file RootNtupleEventSelector.cxx.

182  { m_tupleIdx = idx; }

◆ tree()

TTree* Athena::RootNtupleEventContext::tree ( ) const
inline

access to the tree used to iterate

Definition at line 194 of file RootNtupleEventSelector.cxx.

194 { return m_evtsel->m_tuple; }

◆ tupleIndex()

std::size_t Athena::RootNtupleEventContext::tupleIndex ( ) const
inline

Definition at line 178 of file RootNtupleEventSelector.cxx.

179  { return m_tupleIdx; }

Member Data Documentation

◆ m_collIdx

long Athena::RootNtupleEventContext::m_collIdx
private

current collection index (into m_inputCollectionsName)

Definition at line 141 of file RootNtupleEventSelector.cxx.

◆ m_evtsel

const RootNtupleEventSelector* Athena::RootNtupleEventContext::m_evtsel
private

reference to the hosting event selector instance

Definition at line 138 of file RootNtupleEventSelector.cxx.

◆ m_fid

std::string Athena::RootNtupleEventContext::m_fid
private

connection FID

Definition at line 147 of file RootNtupleEventSelector.cxx.

◆ m_tupleIdx

long Athena::RootNtupleEventContext::m_tupleIdx
private

current tuple index (into ‘m_tupleNames’)

Definition at line 144 of file RootNtupleEventSelector.cxx.


The documentation for this class was generated from the following file:
beamspotman.cur
def cur
Definition: beamspotman.py:671
Athena::RootNtupleEventSelector::m_inputCollectionsName
StringArrayProperty m_inputCollectionsName
List of input files containing TTree.
Definition: RootNtupleEventSelector.h:208
Athena::RootNtupleEventContext::m_collIdx
long m_collIdx
current collection index (into m_inputCollectionsName)
Definition: RootNtupleEventSelector.cxx:141
create_input.old_file
old_file
Definition: create_input.py:17
Athena::RootNtupleEventSelector::m_tuple
TTree * m_tuple
current tree being read
Definition: RootNtupleEventSelector.h:241
Athena::RootNtupleEventContext::m_evtsel
const RootNtupleEventSelector * m_evtsel
reference to the hosting event selector instance
Definition: RootNtupleEventSelector.cxx:138
Athena::RootNtupleEventContext::fid
const std::string & fid() const
access to the connection FID
Definition: RootNtupleEventSelector.cxx:191
Athena::RootNtupleEventSelector::m_curEvt
long m_curEvt
current event index
Definition: RootNtupleEventSelector.h:226
Athena::RootNtupleEventContext::m_fid
std::string m_fid
connection FID
Definition: RootNtupleEventSelector.cxx:147
sel
sel
Definition: SUSYToolsTester.cxx:97
Athena::RootNtupleEventContext::tree
TTree * tree() const
access to the tree used to iterate
Definition: RootNtupleEventSelector.cxx:194
Athena::RootNtupleEventContext::m_tupleIdx
long m_tupleIdx
current tuple index (into ‘m_tupleNames’)
Definition: RootNtupleEventSelector.cxx:144
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69