ATLAS Offline Software
Toggle main menu visibility
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>
16
#include "
CxxUtils/checker_macros.h
"
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
29
class
ATLAS_NOT_THREAD_SAFE
EventData
{
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
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
operator=
ElementLink & operator=(const ElementLink &)=default
ClusterComm::EventData
@ EventData
Definition
IMPIClusterSvc.h:18
checker_macros.h
Define macros for attributes used to control the static checker.
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
LArSamples::EventData::lumiBlock
unsigned int lumiBlock() const
Definition
EventData.h:47
LArSamples::EventData::setRunIndex
void setRunIndex(int idx)
Definition
EventData.h:91
LArSamples::EventData::setRunData
void setRunData(const RunData *runData)
Definition
EventData.h:75
LArSamples::EventData::m_rois
std::vector< RoIPosition > m_rois
Definition
EventData.h:94
LArSamples::EventData::l1Word
unsigned int l1Word(unsigned int i) const
Definition
EventData.h:61
LArSamples::EventData::EventData
EventData()
Constructor.
Definition
EventData.cxx:21
LArSamples::EventData::roI
RoIPosition roI(unsigned int i) const
Definition
EventData.h:64
LArSamples::EventData::footprint
double footprint() const
Definition
EventData.h:70
LArSamples::EventData::m_eventData
std::vector< unsigned int > m_eventData
Definition
EventData.h:93
LArSamples::EventData::event
int event() const
Definition
EventData.h:44
LArSamples::EventData::nRoIs
unsigned int nRoIs() const
Definition
EventData.h:63
LArSamples::EventData::runIndex
int runIndex() const
Definition
EventData.h:53
LArSamples::EventData::m_runData
const RunData * m_runData
Definition
EventData.h:96
LArSamples::EventData::triggerWord
unsigned int triggerWord(unsigned int i) const
Definition
EventData.cxx:81
LArSamples::EventData::nTriggerWords
unsigned int nTriggerWords() const
Definition
EventData.h:59
LArSamples::EventData::runData
const RunData * runData() const
Definition
EventData.h:76
LArSamples::EventData::bunchId
unsigned int bunchId() const
Definition
EventData.h:50
LArSamples::EventData::addRoI
void addRoI(float eta, float phi, const char *name="", const char *label="")
Definition
EventData.h:73
LArSamples::EventData::removeRoIs
void removeRoIs()
Definition
EventData.h:85
LArSamples::RunData
Definition
RunData.h:21
description
std::string description
glabal timer - how long have I taken so far?
Definition
hcg.cxx:93
label
std::string label(const std::string &format, int i)
Definition
label.h:19
LArSamples
Definition
AbsShape.h:24
LArSamples::RoIPosition
Definition
EventData.h:22
LArSamples::RoIPosition::phi
double phi
Definition
EventData.h:25
LArSamples::RoIPosition::eta
double eta
Definition
EventData.h:25
LArSamples::RoIPosition::RoIPosition
RoIPosition(float e=-999, float p=-999, const char *n="", const char *l="")
Definition
EventData.h:23
LArSamples::RoIPosition::label
TString label
Definition
EventData.h:26
LArSamples::RoIPosition::name
TString name
Definition
EventData.h:26
run
int run(int argc, char *argv[])
Definition
ttree2hdf5.cxx:28
Generated on
for ATLAS Offline Software by
1.17.0