ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
BunchDataUtil Class Reference

Utility class to to decode data from FILLPARAMS COOL folder
More...

#include <BunchDataUtil.h>

Collaboration diagram for BunchDataUtil:

Public Member Functions

 BunchDataUtil ()
 
int nx1Storage (const cool::Record &rec)
 
int ny1Storage (const cool::Record &rec)
 
int nx1Storage (const coral::AttributeList &attrList1) const
 
int ny1Storage (const coral::AttributeList &attrList1) const
 
int nx2Storage (const cool::Record &rec)
 
int ny2Storage (const cool::Record &rec)
 
int nx2Storage (const coral::AttributeList &attrList1) const
 
int ny2Storage (const coral::AttributeList &attrList1) const
 
unsigned int nBunch1Data () const
 
unsigned int nBunch2Data () const
 
const std::vector< unsigned int > & bunch1Data () const
 
const std::vector< unsigned int > & bunch2Data () const
 
void clear ()
 
bool setValue (const coral::AttributeList &attrList1)
 
bool setValue (const cool::Record &rec)
 
bool setCollidingBCID1s (std::vector< unsigned int > &)
 
bool setCollidingBCID2s (std::vector< unsigned int > &)
 

Public Attributes

std::string error
 

Private Attributes

std::vector< unsigned int > m_collidingBCID1s
 
std::vector< unsigned int > m_collidingBCID2s
 
std::vector< unsigned int > m_bunch1Data
 
std::vector< unsigned int > m_bunch2Data
 
class LumiBlobUtil m_blobUtil
 

Detailed Description

Utility class to to decode data from FILLPARAMS COOL folder


Can be used with FillParamsTool or python FillParamsData

Author
E.Torrence

Definition at line 22 of file BunchDataUtil.h.

Constructor & Destructor Documentation

◆ BunchDataUtil()

BunchDataUtil::BunchDataUtil ( )

Definition at line 14 of file BunchDataUtil.cxx.

14  {
15  // Clear vectors
16  this->clear();
17  error.clear();
18 }

Member Function Documentation

◆ bunch1Data()

const std::vector< unsigned int > & BunchDataUtil::bunch1Data ( ) const

Definition at line 35 of file BunchDataUtil.cxx.

35  {
36  return m_bunch1Data;
37 }

◆ bunch2Data()

const std::vector< unsigned int > & BunchDataUtil::bunch2Data ( ) const

Definition at line 39 of file BunchDataUtil.cxx.

39  {
40  return m_bunch2Data;
41 }

◆ clear()

void BunchDataUtil::clear ( )

Definition at line 21 of file BunchDataUtil.cxx.

21  {
22  m_bunch1Data.clear();
23  m_bunch2Data.clear();
24 }

◆ nBunch1Data()

unsigned int BunchDataUtil::nBunch1Data ( ) const

Definition at line 27 of file BunchDataUtil.cxx.

27  {
28  return m_bunch1Data.size();
29 }

◆ nBunch2Data()

unsigned int BunchDataUtil::nBunch2Data ( ) const

Definition at line 31 of file BunchDataUtil.cxx.

31  {
32  return m_bunch2Data.size();
33 }

◆ nx1Storage() [1/2]

int BunchDataUtil::nx1Storage ( const cool::Record &  rec)

Definition at line 44 of file BunchDataUtil.cxx.

44  {
45  return nx1Storage(rec.attributeList());
46 }

◆ nx1Storage() [2/2]

int BunchDataUtil::nx1Storage ( const coral::AttributeList &  attrList1) const

Definition at line 64 of file BunchDataUtil.cxx.

64  {
65 
66  const coral::Blob &blobBC = attrList1["B1BunchIntensities"].data<coral::Blob>();
67  const uint8_t *k=static_cast<const uint8_t*>(blobBC.startingAddress());
68  int x = 1;
69  if (blobBC.size() == 0) {
70  return -1;
71  }
72  unsigned int tmk = *k;
73  x=tmk/10;
74  return x;
75 
76 }

◆ nx2Storage() [1/2]

int BunchDataUtil::nx2Storage ( const cool::Record &  rec)

Definition at line 54 of file BunchDataUtil.cxx.

54  {
55  return nx2Storage(rec.attributeList());
56 }

◆ nx2Storage() [2/2]

int BunchDataUtil::nx2Storage ( const coral::AttributeList &  attrList1) const

Definition at line 94 of file BunchDataUtil.cxx.

94  {
95  const coral::Blob &blobBC = attrList1["B2BunchIntensities"].data<coral::Blob>();
96  const uint8_t *k=static_cast<const uint8_t*>(blobBC.startingAddress());
97  int x = 1;
98  if (blobBC.size() == 0) {
99  return -1;
100  }
101  unsigned int tmk = *k;
102  x=tmk/10;
103  return x;
104 }

◆ ny1Storage() [1/2]

int BunchDataUtil::ny1Storage ( const cool::Record &  rec)

Definition at line 49 of file BunchDataUtil.cxx.

49  {
50  return ny1Storage(rec.attributeList());
51 }

◆ ny1Storage() [2/2]

int BunchDataUtil::ny1Storage ( const coral::AttributeList &  attrList1) const

Definition at line 79 of file BunchDataUtil.cxx.

79  {
80  const coral::Blob &blobBC = attrList1["B1BunchIntensities"].data<coral::Blob>();
81  const uint8_t *k=static_cast<const uint8_t*>(blobBC.startingAddress());
82  int x = 1;
83  int y = 1;
84  if (blobBC.size() == 0) {
85  return -1;
86  }
87  unsigned int tmk = *k;
88  x=tmk/10;
89  y=tmk-10*x;
90  return y;
91 }

◆ ny2Storage() [1/2]

int BunchDataUtil::ny2Storage ( const cool::Record &  rec)

Definition at line 59 of file BunchDataUtil.cxx.

59  {
60  return ny2Storage(rec.attributeList());
61 }

◆ ny2Storage() [2/2]

int BunchDataUtil::ny2Storage ( const coral::AttributeList &  attrList1) const

Definition at line 107 of file BunchDataUtil.cxx.

107  {
108  const coral::Blob &blobBC = attrList1["B2BunchIntensities"].data<coral::Blob>();
109  const uint8_t *k=static_cast<const uint8_t*>(blobBC.startingAddress());
110  int x = 1;
111  int y = 1;
112  if (blobBC.size() == 0) {
113  return -1;
114  }
115  unsigned int tmk = *k;
116  x=tmk/10;
117  y=tmk-10*x;
118  return y;
119 }

◆ setCollidingBCID1s()

bool BunchDataUtil::setCollidingBCID1s ( std::vector< unsigned int > &  p)

Definition at line 128 of file BunchDataUtil.cxx.

128  {
130  return true;
131 }

◆ setCollidingBCID2s()

bool BunchDataUtil::setCollidingBCID2s ( std::vector< unsigned int > &  pp)

Definition at line 134 of file BunchDataUtil.cxx.

134  {
135  m_collidingBCID2s = pp;
136  return true;
137 }

◆ setValue() [1/2]

bool BunchDataUtil::setValue ( const cool::Record &  rec)

Definition at line 123 of file BunchDataUtil.cxx.

123  {
124  return setValue(rec.attributeList());
125 }

◆ setValue() [2/2]

bool BunchDataUtil::setValue ( const coral::AttributeList &  attrList1)

Definition at line 142 of file BunchDataUtil.cxx.

142  {
143  // First, clear old values
144  this->clear();
145  error.clear();
146 
147  // Check if there is any data
148  if (attrList1["B1BunchIntensities"].isNull()) {
149  error = "BunchCode is NULL!";
150  return false;
151  }
152 
153  cool::Float AI1 = attrList1["B1BunchAverage"].data<cool::Float>();
154  cool::Float AI2 = attrList1["B2BunchAverage"].data<cool::Float>();
155 
156  const coral::Blob &blobBC1 = attrList1["B1BunchIntensities"].data<coral::Blob>();
157  const coral::Blob &blobBC2 = attrList1["B2BunchIntensities"].data<coral::Blob>();
158 
159 
160  std::cout << "Dette skulle vaere beam1 " << std::endl;
161  m_blobUtil.unpack(AI1,blobBC1,m_collidingBCID1s);
162 
163  std::cout << "This should be beam 2 " << std::endl;
164  m_blobUtil.unpack(AI2,blobBC2,m_collidingBCID2s);
165 
166  return true;
167 }

Member Data Documentation

◆ error

std::string BunchDataUtil::error

Definition at line 57 of file BunchDataUtil.h.

◆ m_blobUtil

class LumiBlobUtil BunchDataUtil::m_blobUtil
private

Definition at line 66 of file BunchDataUtil.h.

◆ m_bunch1Data

std::vector<unsigned int> BunchDataUtil::m_bunch1Data
private

Definition at line 65 of file BunchDataUtil.h.

◆ m_bunch2Data

std::vector<unsigned int> BunchDataUtil::m_bunch2Data
private

Definition at line 66 of file BunchDataUtil.h.

◆ m_collidingBCID1s

std::vector<unsigned int> BunchDataUtil::m_collidingBCID1s
private

Definition at line 62 of file BunchDataUtil.h.

◆ m_collidingBCID2s

std::vector<unsigned int> BunchDataUtil::m_collidingBCID2s
private

Definition at line 63 of file BunchDataUtil.h.


The documentation for this class was generated from the following files:
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
BunchDataUtil::setValue
bool setValue(const coral::AttributeList &attrList1)
Definition: BunchDataUtil.cxx:142
BunchDataUtil::ny2Storage
int ny2Storage(const cool::Record &rec)
Definition: BunchDataUtil.cxx:59
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
x
#define x
BunchDataUtil::m_blobUtil
class LumiBlobUtil m_blobUtil
Definition: BunchDataUtil.h:67
BunchDataUtil::m_bunch1Data
std::vector< unsigned int > m_bunch1Data
Definition: BunchDataUtil.h:65
BunchDataUtil::ny1Storage
int ny1Storage(const cool::Record &rec)
Definition: BunchDataUtil.cxx:49
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
BunchDataUtil::clear
void clear()
Definition: BunchDataUtil.cxx:21
BunchDataUtil::m_bunch2Data
std::vector< unsigned int > m_bunch2Data
Definition: BunchDataUtil.h:66
BunchDataUtil::m_collidingBCID1s
std::vector< unsigned int > m_collidingBCID1s
Definition: BunchDataUtil.h:62
y
#define y
BunchDataUtil::m_collidingBCID2s
std::vector< unsigned int > m_collidingBCID2s
Definition: BunchDataUtil.h:63
BunchDataUtil::nx1Storage
int nx1Storage(const cool::Record &rec)
Definition: BunchDataUtil.cxx:44
LumiBlobUtil::unpack
bool unpack(const cool::Float &ARI, const coral::Blob &blobBC, const std::vector< unsigned int > &PV)
Definition: LumiBlobUtil.cxx:90
BunchDataUtil::nx2Storage
int nx2Storage(const cool::Record &rec)
Definition: BunchDataUtil.cxx:54
error
Definition: IImpactPoint3dEstimator.h:70
fitman.k
k
Definition: fitman.py:528