ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
11#ifndef LArSamples_EventData_H
12#define LArSamples_EventData_H
13
14#include "TString.h"
15#include <vector>
17
18namespace 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
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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
EventData()
Constructor.
Definition EventData.cxx:21
unsigned int triggerWord(unsigned int i) const
Definition EventData.cxx:81
void addRoI(float eta, float phi, const char *name="", const char *label="")
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91
std::string label(const std::string &format, int i)
Definition label.h:19
Definition run.py:1
RoIPosition(float e=-999, float p=-999, const char *n="", const char *l="")