ATLAS Offline Software
Loading...
Searching...
No Matches
DataHeader Class Reference

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

#include <DataHeader.h>

Inheritance diagram for DataHeader:
Collaboration diagram for DataHeader:

Public Types

enum  statusFlag { Output , Input , Other }

Public Member Functions

 DataHeader ()
 Default Constructor.
 DataHeader (const DataHeader &rhs)
 Copy Constructor.
virtual ~DataHeader ()
 Destructor.
DataHeaderoperator= (const DataHeader &rhs)
 Assignment Operator.
void setStatus (statusFlag status)
 Set StatusFlag enum for DataHeader.
bool isInput () const
 Check whether StatusFlag is "Input".
void setProcessTag (const std::string &processTag)
 Set ProcessTag for DataHeader.
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.
void insert (const SG::DataProxy *proxy, IOpaqueAddress *tokAddress=0, const std::string &pTag="")
 Insert a new element into the "DataObject" vector.
void insert (const DataHeaderElement &dhe)
 Insert a new element into the "DataObject" vector.
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.
void addHash (IStringPool *pool)
 Add new entry to hash map.
const std::string & dhFormToken () const
 Form token, to be able to tell when the form changes.
void setDhFormToken (const std::string &formToken)
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

Protected Member Functions

virtual void recycle ()
 Called before this object is recycled.

Private Attributes

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

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 121 of file DataHeader.h.

Member Enumeration Documentation

◆ statusFlag

Enumerator
Output 
Input 
Other 

Definition at line 125 of file DataHeader.h.

Constructor & Destructor Documentation

◆ DataHeader() [1/2]

DataHeader::DataHeader ( )

Default Constructor.

Definition at line 197 of file DataHeader.cxx.

197 : m_dataHeader(),
200 m_processTag(),
201 m_attrList(0),
203}
statusFlag m_status
StatusFlag (i.e.: Output, Primary, Input, Manual, Other).
Definition DataHeader.h:213
std::string m_processTag
ProcessTag (e.g.: "StreamESD", "StreamAOD" ...).
Definition DataHeader.h:215
std::vector< DataHeaderElement > m_inputDataHeader
vector with DataHeaderElement to upstream DataHeader ("Provenance").
Definition DataHeader.h:211
std::vector< DataHeaderElement > m_dataHeader
vector with DataHeaderElement to "DataObject".
Definition DataHeader.h:209
const coral::AttributeList * m_attrList
Optional pointer to AttributeList to enable writing of TAG Attributes to Payload files.
Definition DataHeader.h:217
std::string m_evtRefTokenStr
Optional Token String for Event Reference to enable writing of TAG to Payload files.
Definition DataHeader.h:219

◆ DataHeader() [2/2]

DataHeader::DataHeader ( const DataHeader & rhs)

Copy Constructor.

Definition at line 205 of file DataHeader.cxx.

205 :
206 DataObject (rhs),
209 m_status(rhs.m_status),
213}

◆ ~DataHeader()

DataHeader::~DataHeader ( )
virtual

Destructor.

Definition at line 215 of file DataHeader.cxx.

215 {
216}

Member Function Documentation

◆ addHash()

void DataHeader::addHash ( IStringPool * pool)

Add new entry to hash map.

Definition at line 291 of file DataHeader.cxx.

291 {
292 for (std::vector<DataHeaderElement>::iterator iter = m_dataHeader.begin(),
293 last = m_dataHeader.end(); iter != last; ++iter) {
294 iter->addHash(pool);
295 }
296 for (std::vector<DataHeaderElement>::iterator iter = m_inputDataHeader.begin(),
297 last = m_inputDataHeader.end(); iter != last; ++iter) {
298 iter->addHash(pool);
299 }
300}

◆ begin()

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

Definition at line 249 of file DataHeader.cxx.

249 {
250 return(m_dataHeader.begin());
251}

◆ beginProvenance()

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

Definition at line 279 of file DataHeader.cxx.

279 {
280 return(m_inputDataHeader.begin());
281}

◆ dhFormToken()

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

Form token, to be able to tell when the form changes.

Definition at line 302 of file DataHeader.cxx.

303{
304 return m_dhFormToken;
305}
std::string m_dhFormToken
Token to the DH format object.
Definition DataHeader.h:221

◆ dump()

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

Definition at line 331 of file DataHeader.cxx.

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

◆ elements()

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

Definition at line 257 of file DataHeader.cxx.

257 {
258 return m_dataHeader;
259}

◆ end()

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

Definition at line 253 of file DataHeader.cxx.

253 {
254 return(m_dataHeader.end());
255}

◆ endProvenance()

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

Definition at line 283 of file DataHeader.cxx.

283 {
284 return(m_inputDataHeader.end());
285}

◆ getAttributeList()

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

Definition at line 316 of file DataHeader.cxx.

316 {
317 return(m_attrList);
318}

◆ getEvtRefTokenStr()

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

Definition at line 324 of file DataHeader.cxx.

324 {
325 return(m_evtRefTokenStr);
326}

◆ getProcessTag()

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

Definition at line 241 of file DataHeader.cxx.

241 {
242 return(m_processTag);
243}

◆ 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 271 of file DataHeader.cxx.

271 {
272 m_dataHeader.push_back(dhe);
273}

◆ 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 267 of file DataHeader.cxx.

267 {
268 m_dataHeader.emplace_back(proxy, tokAddress, pTag);
269}

◆ 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 261 of file DataHeader.cxx.

261 {
262 if (sgAddress != 0) {
263 m_dataHeader.emplace_back(sgAddress, tokAddress, pTag);
264 }
265}

◆ 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 287 of file DataHeader.cxx.

287 {
288 m_inputDataHeader.push_back(dhe);
289}

◆ isInput()

bool DataHeader::isInput ( ) const

Check whether StatusFlag is "Input".

Definition at line 233 of file DataHeader.cxx.

233 {
234 return(m_status == statusFlag(Input));
235}

◆ operator=()

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

Assignment Operator.

Definition at line 218 of file DataHeader.cxx.

218 {
219 if (this != &rhs) {
222 m_status = rhs.m_status;
225 }
226 return(*this);
227}

◆ recycle()

void DataHeader::recycle ( )
protectedvirtual

Called before this object is recycled.

Definition at line 349 of file DataHeader.cxx.

350{
351}

◆ setAttributeList()

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

Definition at line 312 of file DataHeader.cxx.

312 {
313 m_attrList = attrList;
314}

◆ setDhFormToken()

void DataHeader::setDhFormToken ( const std::string & formToken)

Definition at line 307 of file DataHeader.cxx.

308{
309 m_dhFormToken = formToken;
310}

◆ setEvtRefTokenStr()

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

Definition at line 320 of file DataHeader.cxx.

320 {
321 m_evtRefTokenStr = tokenStr;
322}

◆ setProcessTag()

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

Set ProcessTag for DataHeader.

Parameters
processTag[IN] string containing ProcessTag.

Definition at line 237 of file DataHeader.cxx.

237 {
238 m_processTag = processTag;
239}

◆ setStatus()

void DataHeader::setStatus ( statusFlag status)

Set StatusFlag enum for DataHeader.

Definition at line 229 of file DataHeader.cxx.

229 {
231}
status
Definition merge.py:16

◆ size()

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

Definition at line 245 of file DataHeader.cxx.

245 {
246 return(m_dataHeader.size());
247}

◆ sizeProvenance()

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

Definition at line 275 of file DataHeader.cxx.

275 {
276 return(m_inputDataHeader.size());
277}

◆ DataHeaderCnv

friend class DataHeaderCnv
friend

Definition at line 206 of file DataHeader.h.

◆ DataHeaderCnv_p3

friend class DataHeaderCnv_p3
friend

Definition at line 202 of file DataHeader.h.

◆ DataHeaderCnv_p4

friend class DataHeaderCnv_p4
friend

Definition at line 203 of file DataHeader.h.

◆ DataHeaderCnv_p5

friend class DataHeaderCnv_p5
friend

Definition at line 204 of file DataHeader.h.

◆ DataHeaderCnv_p6

friend class DataHeaderCnv_p6
friend

Definition at line 205 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 217 of file DataHeader.h.

◆ m_dataHeader

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

vector with DataHeaderElement to "DataObject".

Definition at line 209 of file DataHeader.h.

◆ m_dhFormToken

std::string DataHeader::m_dhFormToken
private

Token to the DH format object.

Definition at line 221 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 219 of file DataHeader.h.

◆ m_inputDataHeader

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

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

Definition at line 211 of file DataHeader.h.

◆ m_processTag

std::string DataHeader::m_processTag
private

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

Definition at line 215 of file DataHeader.h.

◆ m_status

statusFlag DataHeader::m_status
private

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

Definition at line 213 of file DataHeader.h.


The documentation for this class was generated from the following files: