ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
DataHeader Class Reference

This class provides the layout for summary information stored for data written to POOL. More...

#include <DataHeader.h>

Collaboration diagram for DataHeader:

Public Types

enum  statusFlag { Output, Input, Other }
 

Public Member Functions

 DataHeader ()
 Default Constructor. More...
 
 DataHeader (const DataHeader &rhs)
 Copy Constructor. More...
 
virtual ~DataHeader ()
 Destructor. More...
 
DataHeaderoperator= (const DataHeader &rhs)
 Assignment Operator. More...
 
void setStatus (statusFlag status)
 Set StatusFlag enum for DataHeader. More...
 
bool isInput () const
 Check whether StatusFlag is "Input". More...
 
void setProcessTag (const std::string &processTag)
 Set ProcessTag for DataHeader. More...
 
const std::string & getProcessTag () const
 
int size () const
 
std::vector< DataHeaderElement >::const_iterator begin () const
 
std::vector< DataHeaderElement >::const_iterator end () const
 
const std::vector< DataHeaderElement > & elements () const
 
void insert (const SG::TransientAddress *sgAddress, IOpaqueAddress *tokAddress=0, const std::string &pTag="")
 Insert a new element into the "DataObject" vector. More...
 
void insert (const SG::DataProxy *proxy, IOpaqueAddress *tokAddress=0, const std::string &pTag="")
 Insert a new element into the "DataObject" vector. More...
 
void insert (const DataHeaderElement &dhe)
 Insert a new element into the "DataObject" vector. More...
 
int sizeProvenance () const
 
std::vector< DataHeaderElement >::const_iterator beginProvenance () const
 
std::vector< DataHeaderElement >::const_iterator endProvenance () const
 
void insertProvenance (const DataHeaderElement &dhe)
 Insert a new element into the "Provenance" vector. More...
 
void addHash (IStringPool *pool)
 Add new entry to hash map. More...
 
void setAttributeList (const coral::AttributeList *attrList)
 
const coral::AttributeList * getAttributeList ()
 
void setEvtRefTokenStr (const std::string &tokenStr)
 
const std::string & getEvtRefTokenStr ()
 
void dump (std::ostream &ostr) const
 

Private Attributes

std::vector< DataHeaderElementm_dataHeader
 vector with DataHeaderElement to "DataObject". More...
 
std::vector< DataHeaderElementm_inputDataHeader
 vector with DataHeaderElement to upstream DataHeader ("Provenance"). More...
 
statusFlag m_status
 StatusFlag (i.e.: Output, Primary, Input, Manual, Other). More...
 
std::string m_processTag
 ProcessTag (e.g.: "StreamESD", "StreamAOD" ...). More...
 
const coral::AttributeList * m_attrList
 Optional pointer to AttributeList to enable writing of TAG Attributes to Payload files. More...
 
std::string m_evtRefTokenStr
 Optional Token String for Event Reference to enable writing of TAG to Payload files. More...
 

Friends

class DataHeaderCnv_p3
 
class DataHeaderCnv_p4
 
class DataHeaderCnv_p5
 
class DataHeaderCnv_p6
 
class DataHeaderCnv
 

Detailed Description

This class provides the layout for summary information stored for data written to POOL.

Definition at line 124 of file DataHeader.h.

Member Enumeration Documentation

◆ statusFlag

Enumerator
Output 
Input 
Other 

Definition at line 126 of file DataHeader.h.

126 { Output, Input, Other };

Constructor & Destructor Documentation

◆ DataHeader() [1/2]

DataHeader::DataHeader ( )

Default Constructor.

Definition at line 205 of file DataHeader.cxx.

205  : m_dataHeader(),
208  m_processTag(),
209  m_attrList(0),
210  m_evtRefTokenStr() {
211 }

◆ DataHeader() [2/2]

DataHeader::DataHeader ( const DataHeader rhs)

Copy Constructor.

Definition at line 213 of file DataHeader.cxx.

213  : m_dataHeader(rhs.m_dataHeader),
215  m_status(rhs.m_status),
217  m_attrList(rhs.m_attrList),
218  m_evtRefTokenStr() {
219 }

◆ ~DataHeader()

DataHeader::~DataHeader ( )
virtual

Destructor.

Definition at line 221 of file DataHeader.cxx.

221  {
222 }

Member Function Documentation

◆ addHash()

void DataHeader::addHash ( IStringPool pool)

Add new entry to hash map.

Definition at line 297 of file DataHeader.cxx.

297  {
299  last = m_dataHeader.end(); iter != last; ++iter) {
300  iter->addHash(pool);
301  }
303  last = m_inputDataHeader.end(); iter != last; ++iter) {
304  iter->addHash(pool);
305  }
306 }

◆ begin()

std::vector< DataHeaderElement >::const_iterator DataHeader::begin ( ) const
Returns
a const_iterator at the begin() of the "DataObject" vector.

Definition at line 255 of file DataHeader.cxx.

255  {
256  return(m_dataHeader.begin());
257 }

◆ beginProvenance()

std::vector< DataHeaderElement >::const_iterator DataHeader::beginProvenance ( ) const
Returns
a const_iterator at the begin() of the "Provenance" vector.

Definition at line 285 of file DataHeader.cxx.

285  {
286  return(m_inputDataHeader.begin());
287 }

◆ dump()

void DataHeader::dump ( std::ostream &  ostr) const

Definition at line 327 of file DataHeader.cxx.

328 {
329  using namespace std;
330  ostr << "--- DataHeader Dump ---" << endl;
331  for( auto& el : m_dataHeader ) {
332  el.dump(ostr);
333  }
334  for( auto& el : m_inputDataHeader ) {
335  el.dump(ostr);
336  }
337  ostr << "Status: " << m_status << endl;
338  ostr << "Proc tag: " << m_processTag << endl;
339  ostr << "evtRef: " << m_evtRefTokenStr << endl;
340  ostr << "attrListPtr: " << m_attrList << endl;
341  if( m_attrList ) ostr << "attrListSize: " << m_attrList->size() << endl;
342  ostr << "--- DataHeader End ---" << endl;
343 }

◆ elements()

const std::vector< DataHeaderElement > & DataHeader::elements ( ) const
Returns
the "DataObject" vector.

Definition at line 263 of file DataHeader.cxx.

263  {
264  return m_dataHeader;
265 }

◆ end()

std::vector< DataHeaderElement >::const_iterator DataHeader::end ( ) const
Returns
a const_iterator at the end() of the "DataObject" vector.

Definition at line 259 of file DataHeader.cxx.

259  {
260  return(m_dataHeader.end());
261 }

◆ endProvenance()

std::vector< DataHeaderElement >::const_iterator DataHeader::endProvenance ( ) const
Returns
a const_iterator at the end() of the "Provenance" vector.

Definition at line 289 of file DataHeader.cxx.

289  {
290  return(m_inputDataHeader.end());
291 }

◆ getAttributeList()

const coral::AttributeList * DataHeader::getAttributeList ( )

Definition at line 312 of file DataHeader.cxx.

312  {
313  return(m_attrList);
314 }

◆ getEvtRefTokenStr()

const std::string & DataHeader::getEvtRefTokenStr ( )

Definition at line 320 of file DataHeader.cxx.

320  {
321  return(m_evtRefTokenStr);
322 }

◆ getProcessTag()

const std::string & DataHeader::getProcessTag ( ) const
Returns
the string containing ProcessTag for the DataHeader.

Definition at line 247 of file DataHeader.cxx.

247  {
248  return(m_processTag);
249 }

◆ insert() [1/3]

void DataHeader::insert ( const DataHeaderElement dhe)

Insert a new element into the "DataObject" vector.

Parameters
dhe[IN] reference to the DataHeaderElement to be inserted.

Definition at line 277 of file DataHeader.cxx.

277  {
278  m_dataHeader.push_back(dhe);
279 }

◆ insert() [2/3]

void DataHeader::insert ( const SG::DataProxy proxy,
IOpaqueAddress *  tokAddress = 0,
const std::string &  pTag = "" 
)

Insert a new element into the "DataObject" vector.

Parameters
proxy[IN] pointer to the DataProxy for the DataObject.
pTag[IN] string to overwrite key member of the DataHeaderElement

Definition at line 273 of file DataHeader.cxx.

273  {
274  m_dataHeader.emplace_back(proxy, tokAddress, pTag);
275 }

◆ insert() [3/3]

void DataHeader::insert ( const SG::TransientAddress sgAddress,
IOpaqueAddress *  tokAddress = 0,
const std::string &  pTag = "" 
)

Insert a new element into the "DataObject" vector.

Parameters
sgAddress[IN] pointer to the TransientAddress of the DataObject.
pTag[IN] string to overwrite key member of the DataHeaderElement

Definition at line 267 of file DataHeader.cxx.

267  {
268  if (sgAddress != 0) {
269  m_dataHeader.emplace_back(sgAddress, tokAddress, pTag);
270  }
271 }

◆ insertProvenance()

void DataHeader::insertProvenance ( const DataHeaderElement dhe)

Insert a new element into the "Provenance" vector.

Parameters
dhe[IN] reference to the DataHeaderElement to be inserted.

Definition at line 293 of file DataHeader.cxx.

293  {
294  m_inputDataHeader.push_back(dhe);
295 }

◆ isInput()

bool DataHeader::isInput ( ) const

Check whether StatusFlag is "Input".

Definition at line 239 of file DataHeader.cxx.

239  {
240  return(m_status == statusFlag(Input));
241 }

◆ operator=()

DataHeader & DataHeader::operator= ( const DataHeader rhs)

Assignment Operator.

Definition at line 224 of file DataHeader.cxx.

224  {
225  if (this != &rhs) {
228  m_status = rhs.m_status;
230  m_attrList = rhs.m_attrList;
231  }
232  return(*this);
233 }

◆ setAttributeList()

void DataHeader::setAttributeList ( const coral::AttributeList *  attrList)

Definition at line 308 of file DataHeader.cxx.

308  {
309  m_attrList = attrList;
310 }

◆ setEvtRefTokenStr()

void DataHeader::setEvtRefTokenStr ( const std::string &  tokenStr)

Definition at line 316 of file DataHeader.cxx.

316  {
317  m_evtRefTokenStr = tokenStr;
318 }

◆ setProcessTag()

void DataHeader::setProcessTag ( const std::string &  processTag)

Set ProcessTag for DataHeader.

Parameters
processTag[IN] string containing ProcessTag.

Definition at line 243 of file DataHeader.cxx.

243  {
244  m_processTag = processTag;
245 }

◆ setStatus()

void DataHeader::setStatus ( statusFlag  status)

Set StatusFlag enum for DataHeader.

Definition at line 235 of file DataHeader.cxx.

235  {
236  m_status = status;
237 }

◆ size()

int DataHeader::size ( ) const
Returns
the number of elements in the "DataObject" vector.

Definition at line 251 of file DataHeader.cxx.

251  {
252  return(m_dataHeader.size());
253 }

◆ sizeProvenance()

int DataHeader::sizeProvenance ( ) const
Returns
the number of elements in the "Provenance" vector.

Definition at line 281 of file DataHeader.cxx.

281  {
282  return(m_inputDataHeader.size());
283 }

Friends And Related Function Documentation

◆ DataHeaderCnv

friend class DataHeaderCnv
friend

Definition at line 198 of file DataHeader.h.

◆ DataHeaderCnv_p3

friend class DataHeaderCnv_p3
friend

Definition at line 194 of file DataHeader.h.

◆ DataHeaderCnv_p4

friend class DataHeaderCnv_p4
friend

Definition at line 195 of file DataHeader.h.

◆ DataHeaderCnv_p5

friend class DataHeaderCnv_p5
friend

Definition at line 196 of file DataHeader.h.

◆ DataHeaderCnv_p6

friend class DataHeaderCnv_p6
friend

Definition at line 197 of file DataHeader.h.

Member Data Documentation

◆ m_attrList

const coral::AttributeList* DataHeader::m_attrList
private

Optional pointer to AttributeList to enable writing of TAG Attributes to Payload files.

Definition at line 209 of file DataHeader.h.

◆ m_dataHeader

std::vector<DataHeaderElement> DataHeader::m_dataHeader
private

vector with DataHeaderElement to "DataObject".

Definition at line 201 of file DataHeader.h.

◆ m_evtRefTokenStr

std::string DataHeader::m_evtRefTokenStr
private

Optional Token String for Event Reference to enable writing of TAG to Payload files.

Definition at line 211 of file DataHeader.h.

◆ m_inputDataHeader

std::vector<DataHeaderElement> DataHeader::m_inputDataHeader
private

vector with DataHeaderElement to upstream DataHeader ("Provenance").

Definition at line 203 of file DataHeader.h.

◆ m_processTag

std::string DataHeader::m_processTag
private

ProcessTag (e.g.: "StreamESD", "StreamAOD" ...).

Definition at line 207 of file DataHeader.h.

◆ m_status

statusFlag DataHeader::m_status
private

StatusFlag (i.e.: Output, Primary, Input, Manual, Other).

Definition at line 205 of file DataHeader.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
DataHeader::m_attrList
const coral::AttributeList * m_attrList
Optional pointer to AttributeList to enable writing of TAG Attributes to Payload files.
Definition: DataHeader.h:209
DataHeader::Input
@ Input
Definition: DataHeader.h:126
pool
pool namespace
Definition: libname.h:15
DataHeader::statusFlag
statusFlag
Definition: DataHeader.h:126
DataHeader::Output
@ Output
Definition: DataHeader.h:126
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
jobOptions.pTag
string pTag
Definition: jobOptions.py:28
DataHeader::m_status
statusFlag m_status
StatusFlag (i.e.: Output, Primary, Input, Manual, Other).
Definition: DataHeader.h:205
DataHeader::m_dataHeader
std::vector< DataHeaderElement > m_dataHeader
vector with DataHeaderElement to "DataObject".
Definition: DataHeader.h:201
DataHeader::Other
@ Other
Definition: DataHeader.h:126
DataHeader::m_processTag
std::string m_processTag
ProcessTag (e.g.: "StreamESD", "StreamAOD" ...).
Definition: DataHeader.h:207
merge.status
status
Definition: merge.py:17
NswErrorCalibData::Input
Helper struct to be parsed to the object to derive the specific error of the cluster.
Definition: NswErrorCalibData.h:25
DataHeader::m_inputDataHeader
std::vector< DataHeaderElement > m_inputDataHeader
vector with DataHeaderElement to upstream DataHeader ("Provenance").
Definition: DataHeader.h:203
DataHeader::m_evtRefTokenStr
std::string m_evtRefTokenStr
Optional Token String for Event Reference to enable writing of TAG to Payload files.
Definition: DataHeader.h:211