ATLAS Offline Software
DataAccess.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: DataAccess.h 339267 2011-01-07 16:30:10Z krasznaa $
8 #ifndef TRIGGERD3PDMAKER_DATAACCESS_H
9 #define TRIGGERD3PDMAKER_DATAACCESS_H
10 
11 // STL include(s):
12 #include <vector>
13 
14 // ROOT include(s):
15 #include <TNamed.h>
16 #include <TString.h>
17 
18 // Local include(s):
19 #include "IDataAccess.h"
20 
21 // Forward declaration(s):
22 class TTree;
23 class TBranch;
24 
25 namespace D3PD {
26 
38  namespace Trig {
39 
53  class DataAccess : public virtual TNamed,
54  public virtual IDataAccess {
55 
56  public:
58  DataAccess( TTree* eventTree = 0, const TString& prefix = "trig_" );
61 
63  TTree* GetEventTree() const;
65  Bool_t SetEventTree( TTree* eventTree );
66 
68  Int_t GetEntry( Long64_t entry, Int_t getall = 0 );
69 
71  virtual Int_t GetDetailLevel() const;
72 
73  protected:
75  virtual Int_t GetSMK() const;
77  virtual Int_t GetL1PSK() const;
79  virtual Int_t GetHLTPSK() const;
80 
82  virtual const std::vector< unsigned int >* GetL1Result( L1ResultType type ) const;
84  virtual const std::vector< short >* GetL2Result( HLTResultType type ) const;
86  virtual const std::vector< short >* GetEFResult( HLTResultType type ) const;
87 
88  private:
90  Bool_t Initialize();
92  void Reset();
93 
94  TTree* m_tree;
95  const TString m_prefix;
96  Bool_t m_initialized;
97  Int_t m_detailLevel;
98 
99  //
100  // Variables for accessing the event-wise information:
101  //
102  UInt_t m_smk;
103  UInt_t m_l1psk;
104  UInt_t m_hltpsk;
105 
106  TBranch* m_b_smk;
107  TBranch* m_b_l1psk;
108  TBranch* m_b_hltpsk;
109 
110  std::vector< unsigned int >* m_l1_tav;
111  std::vector< short >* m_l2_physics;
112  std::vector< short >* m_ef_physics;
113 
114  TBranch* m_b_l1_tav;
115  TBranch* m_b_l2_physics;
116  TBranch* m_b_ef_physics;
117 
118  std::vector< unsigned int >* m_l1_tbp;
119  std::vector< unsigned int >* m_l1_tap;
120  std::vector< short >* m_l2_raw;
121  std::vector< short >* m_ef_raw;
122 
123  TBranch* m_b_l1_tbp;
124  TBranch* m_b_l1_tap;
125  TBranch* m_b_l2_raw;
126  TBranch* m_b_ef_raw;
127 
128  std::vector< short >* m_l2_resurrected;
129  std::vector< short >* m_ef_resurrected;
130 
133 
134  std::vector< short >* m_l2_passedThrough;
135  std::vector< short >* m_ef_passedThrough;
136 
139 
140  ClassDef( DataAccess, 0 )
141 
142  }; // class DataAccess
143 
144  } // namespace Trig
145 
146 } // namespace D3PD
147 
148 #endif // TRIGGERD3PDMAKER_DATAACCESS_H
D3PD::Trig::DataAccess::m_l2_resurrected
std::vector< short > * m_l2_resurrected
Definition: DataAccess.h:128
D3PD::Trig::DataAccess::GetSMK
virtual Int_t GetSMK() const
Get the Super Master Key of the current event.
D3PD::Trig::DataAccess::m_initialized
Bool_t m_initialized
Flag for knowing if the branches have been connected.
Definition: DataAccess.h:96
D3PD::Trig::DataAccess::m_b_l2_raw
TBranch * m_b_l2_raw
Definition: DataAccess.h:125
D3PD::Trig::DataAccess::m_b_l2_physics
TBranch * m_b_l2_physics
Definition: DataAccess.h:115
D3PD::Trig::DataAccess::m_b_hltpsk
TBranch * m_b_hltpsk
Definition: DataAccess.h:108
D3PD::Trig::DataAccess::m_detailLevel
Int_t m_detailLevel
The detail level guessed from the available branches.
Definition: DataAccess.h:97
D3PD::Trig::DataAccess::m_tree
TTree * m_tree
The event-wise TTree.
Definition: DataAccess.h:94
IDataAccess.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
D3PD::Trig::DataAccess::Initialize
Bool_t Initialize()
Initialize the object from the specified TTree.
D3PD::Trig::DataAccess::m_l2_passedThrough
std::vector< short > * m_l2_passedThrough
Definition: DataAccess.h:134
D3PD::Trig::DataAccess::m_l1_tbp
std::vector< unsigned int > * m_l1_tbp
Definition: DataAccess.h:118
D3PD::Trig::DataAccess::m_l1_tav
std::vector< unsigned int > * m_l1_tav
Definition: DataAccess.h:110
D3PD::Trig::DataAccess::m_b_l1psk
TBranch * m_b_l1psk
Definition: DataAccess.h:107
D3PD::Trig::DataAccess::m_smk
UInt_t m_smk
Definition: DataAccess.h:102
D3PD::Trig::DataAccess::Reset
void Reset()
Reset the object.
D3PD::Trig::DataAccess::m_b_l1_tbp
TBranch * m_b_l1_tbp
Definition: DataAccess.h:123
D3PD::Trig::DataAccess::m_b_l1_tap
TBranch * m_b_l1_tap
Definition: DataAccess.h:124
D3PD::Trig::IDataAccess
Interface providing access to the event-wise trigger data.
Definition: IDataAccess.h:37
D3PD::Trig::DataAccess::GetL1PSK
virtual Int_t GetL1PSK() const
Get the LVL1 prescale key of the current event.
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::Trig::DataAccess::GetDetailLevel
virtual Int_t GetDetailLevel() const
Get the detail level that the D3PD was produced with.
D3PD::Trig::DataAccess::m_b_l2_passedThrough
TBranch * m_b_l2_passedThrough
Definition: DataAccess.h:137
D3PD::Trig::DataAccess::m_l1_tap
std::vector< unsigned int > * m_l1_tap
Definition: DataAccess.h:119
D3PD::Trig::IDataAccess::L1ResultType
L1ResultType
Types of LVL1 result bits.
Definition: IDataAccess.h:51
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
D3PD::Trig::DataAccess::m_b_smk
TBranch * m_b_smk
Definition: DataAccess.h:106
D3PD::Trig::DataAccess::m_l2_raw
std::vector< short > * m_l2_raw
Definition: DataAccess.h:120
D3PD::Trig::DataAccess::~DataAccess
~DataAccess()
Destructor.
D3PD::Trig::DataAccess::GetHLTPSK
virtual Int_t GetHLTPSK() const
Get the HLT prescale key of the current event.
D3PD::Trig::DataAccess::m_ef_passedThrough
std::vector< short > * m_ef_passedThrough
Definition: DataAccess.h:135
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
D3PD::Trig::DataAccess::m_l2_physics
std::vector< short > * m_l2_physics
Definition: DataAccess.h:111
D3PD::Trig::DataAccess::m_b_l2_resurrected
TBranch * m_b_l2_resurrected
Definition: DataAccess.h:131
D3PD::Trig::DataAccess::m_l1psk
UInt_t m_l1psk
Definition: DataAccess.h:103
D3PD::Trig::DataAccess::GetL2Result
virtual const std::vector< short > * GetL2Result(HLTResultType type) const
Function for retrieving the encoded LVL2 result.
D3PD::Trig::DataAccess::m_b_ef_passedThrough
TBranch * m_b_ef_passedThrough
Definition: DataAccess.h:138
D3PD::Trig::DataAccess::GetEventTree
TTree * GetEventTree() const
Get the pointer to the event-wise treee currently being used.
D3PD::Trig::DataAccess::m_b_ef_resurrected
TBranch * m_b_ef_resurrected
Definition: DataAccess.h:132
D3PD::Trig::DataAccess::GetEntry
Int_t GetEntry(Long64_t entry, Int_t getall=0)
Load a new entry (new event)
D3PD::Trig::DataAccess::m_ef_physics
std::vector< short > * m_ef_physics
Definition: DataAccess.h:112
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::Trig::DataAccess::GetL1Result
virtual const std::vector< unsigned int > * GetL1Result(L1ResultType type) const
Function for retrieving the encoded LVL1 result.
D3PD::Trig::DataAccess::m_b_ef_physics
TBranch * m_b_ef_physics
Definition: DataAccess.h:116
D3PD::Trig::DataAccess::SetEventTree
Bool_t SetEventTree(TTree *eventTree)
Set the pointer to the event-wise treee.
D3PD::Trig::DataAccess::GetEFResult
virtual const std::vector< short > * GetEFResult(HLTResultType type) const
Function for retrieving the encoded EF result.
D3PD::Trig::DataAccess::m_b_l1_tav
TBranch * m_b_l1_tav
Definition: DataAccess.h:114
D3PD::Trig::DataAccess::m_ef_raw
std::vector< short > * m_ef_raw
Definition: DataAccess.h:121
D3PD::Trig::DataAccess::m_b_ef_raw
TBranch * m_b_ef_raw
Definition: DataAccess.h:126
D3PD::Trig::IDataAccess::HLTResultType
HLTResultType
Types of HLT results.
Definition: IDataAccess.h:57
D3PD::Trig::DataAccess::m_hltpsk
UInt_t m_hltpsk
Definition: DataAccess.h:104
D3PD::Trig::DataAccess::m_prefix
const TString m_prefix
Prefix for the trigger branch names.
Definition: DataAccess.h:95
D3PD::Trig::DataAccess::DataAccess
DataAccess(TTree *eventTree=0, const TString &prefix="trig_")
Constructor specifying the event-wise tree.
D3PD::Trig::DataAccess::m_ef_resurrected
std::vector< short > * m_ef_resurrected
Definition: DataAccess.h:129
D3PD::Trig::DataAccess
Class handling the access to the trigger data in the events.
Definition: DataAccess.h:54