ATLAS Offline Software
LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
11 #ifndef LArSamples_EventData_H
12 #define LArSamples_EventData_H
13 
14 #include "TString.h"
15 #include <vector>
17 
18 namespace LArSamples {
19 
20  class RunData;
21 
22  struct RoIPosition {
23  RoIPosition(float e = -999, float p = -999, const char* n = "", const char* l = "")
24  : eta(e), phi(p), name(n), label(l) { }
25  double eta, phi;
26  TString name, label;
27  };
28 
30 
31  public:
32 
34  EventData();
35 
36  EventData(int event, int runIndex, int lumiBlock, int bunchId);
37 
38  EventData(const EventData& other, int newRunIndex = -1);
39 
41  virtual ~EventData();
42 
44  int event() const { return m_eventData[0]; }
45 
47  unsigned int lumiBlock() const { return m_eventData[2]; }
48 
50  unsigned int bunchId() const { return m_eventData[3]; }
51 
53  int runIndex() const { return m_eventData[1]; }
54 
56  int run() const;
57 
59  unsigned int nTriggerWords() const { return m_eventData.size() - 4; }
60  unsigned int triggerWord(unsigned int i) const;
61  unsigned int l1Word(unsigned int i) const { return triggerWord(i); }
62 
63  unsigned int nRoIs() const { return m_rois.size(); }
64  RoIPosition roI(unsigned int i) const { if (i < nRoIs()) return m_rois[i]; return RoIPosition(); }
65 
66  std::vector<unsigned int> triggerData() const;
67 
68  bool isPassed(const TString& bitName) const;
69 
70  double footprint() const { return sizeof(*this) + m_eventData.size()*sizeof(unsigned int); }
71 
72  void setTriggerData(const std::vector<unsigned int>& words);
73  void addRoI(float eta, float phi, const char* name = "", const char* label = "") { m_rois.push_back(RoIPosition(eta, phi, name, label)); }
74 
75  void setRunData(const RunData* runData) { m_runData = runData; }
76  const RunData* runData() const { return m_runData; }
77 
78  bool bit(unsigned int pos) const;
79  TString triggers() const;
80  TString roIs() const;
81  TString description(unsigned int verbosity) const;
82 
83  void drawDRRoIs(double roISize = 0.1) const;
84  void drawBoxRoIs(double etaSize = 0.2, double phiSize = 0.2) const;
85  void removeRoIs() { m_rois.clear(); }
86 
87  static void drawBoxRoI(double eta, double phi, double etaSize = 0.2, double phiSize = 0.2);
88 
89  private:
90 
91  void setRunIndex(int idx) { m_eventData[1] = idx; }
92 
93  std::vector<unsigned int> m_eventData;
94  std::vector<RoIPosition> m_rois;
95 
96  mutable const RunData* m_runData;
97 
98  EventData& operator= (const EventData&);
99  };
100 }
101 #endif
102 
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
LArSamples::EventData::nTriggerWords
unsigned int nTriggerWords() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:59
LArSamples::RoIPosition::name
TString name
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:26
LArSamples::EventData::l1Word
unsigned int l1Word(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:61
LArSamples::EventData::setRunData
void setRunData(const RunData *runData)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:75
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArSamples::EventData::event
int event() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:44
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
LArSamples::EventData::m_runData
const RunData * m_runData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:96
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
LArSamples
Definition: AbsShape.h:24
LArSamples::EventData::runIndex
int runIndex() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:53
LArSamples::EventData::addRoI
void addRoI(float eta, float phi, const char *name="", const char *label="")
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:73
LArSamples::EventData::roI
RoIPosition roI(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:64
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
LArSamples::EventData::nRoIs
unsigned int nRoIs() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:63
LArSamples::RunData
Definition: RunData.h:21
LArSamples::EventData::bunchId
unsigned int bunchId() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:50
LArSamples::EventData::m_eventData
std::vector< unsigned int > m_eventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:93
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
LArSamples::EventData::setRunIndex
void setRunIndex(int idx)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:91
LArSamples::EventData::footprint
double footprint() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:70
ITk::EventData
InDet::SiSpacePointsSeedMakerEventData EventData
Definition: ITkSiSpacePointsSeedMaker.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
covarianceTool.verbosity
verbosity
Definition: covarianceTool.py:513
LArSamples::RoIPosition::phi
double phi
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:25
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArSamples::EventData::removeRoIs
void removeRoIs()
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:85
LArSamples::EventData::m_rois
std::vector< RoIPosition > m_rois
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:94
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArSamples::RoIPosition::eta
double eta
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:25
LArSamples::RoIPosition
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:22
LArSamples::EventData::lumiBlock
unsigned int lumiBlock() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:47
LArSamples::RoIPosition::RoIPosition
RoIPosition(float e=-999, float p=-999, const char *n="", const char *l="")
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:23
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
checker_macros.h
Define macros for attributes used to control the static checker.
checkFileSG.words
words
Definition: checkFileSG.py:76
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
LArSamples::RoIPosition::label
TString label
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
LArSamples::EventData::runData
const RunData * runData() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:76