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.
DataHeader & operator= (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< DataHeaderElement > m_dataHeader
 vector with DataHeaderElement to "DataObject".
std::vector< DataHeaderElement > m_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 198 of file DataHeader.cxx.

198 : m_dataHeader(),
201 m_processTag(),
202 m_attrList(0),
204}
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 206 of file DataHeader.cxx.

206 :
207 DataObject (rhs),
210 m_status(rhs.m_status),
214}

◆ ~DataHeader()

DataHeader::~DataHeader ( )
virtual

Destructor.

Definition at line 216 of file DataHeader.cxx.

216 {
217}

Member Function Documentation

◆ addHash()

void DataHeader::addHash ( IStringPool * pool)

Add new entry to hash map.

Definition at line 292 of file DataHeader.cxx.

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

◆ begin()

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

Definition at line 250 of file DataHeader.cxx.

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

◆ beginProvenance()

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

Definition at line 280 of file DataHeader.cxx.

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

◆ dhFormToken()

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

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

Definition at line 303 of file DataHeader.cxx.

304{
305 return m_dhFormToken;
306}
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 332 of file DataHeader.cxx.

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

◆ elements()

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

Definition at line 258 of file DataHeader.cxx.

258 {
259 return m_dataHeader;
260}

◆ end()

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

Definition at line 254 of file DataHeader.cxx.

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

◆ endProvenance()

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

Definition at line 284 of file DataHeader.cxx.

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

◆ getAttributeList()

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

Definition at line 317 of file DataHeader.cxx.

317 {
318 return(m_attrList);
319}

◆ getEvtRefTokenStr()

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

Definition at line 325 of file DataHeader.cxx.

325 {
326 return(m_evtRefTokenStr);
327}

◆ getProcessTag()

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

Definition at line 242 of file DataHeader.cxx.

242 {
243 return(m_processTag);
244}

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

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

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

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

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

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

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

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

◆ isInput()

bool DataHeader::isInput ( ) const

Check whether StatusFlag is "Input".

Definition at line 234 of file DataHeader.cxx.

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

◆ operator=()

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

Assignment Operator.

Definition at line 219 of file DataHeader.cxx.

219 {
220 if (this != &rhs) {
223 m_status = rhs.m_status;
226 }
227 return(*this);
228}

◆ recycle()

void DataHeader::recycle ( )
protectedvirtual

Called before this object is recycled.

Definition at line 350 of file DataHeader.cxx.

351{
352}

◆ setAttributeList()

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

Definition at line 313 of file DataHeader.cxx.

313 {
314 m_attrList = attrList;
315}

◆ setDhFormToken()

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

Definition at line 308 of file DataHeader.cxx.

309{
310 m_dhFormToken = formToken;
311}

◆ setEvtRefTokenStr()

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

Definition at line 321 of file DataHeader.cxx.

321 {
322 m_evtRefTokenStr = tokenStr;
323}

◆ setProcessTag()

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

Set ProcessTag for DataHeader.

Parameters
processTag[IN] string containing ProcessTag.

Definition at line 238 of file DataHeader.cxx.

238 {
239 m_processTag = processTag;
240}

◆ setStatus()

void DataHeader::setStatus ( statusFlag status)

Set StatusFlag enum for DataHeader.

Definition at line 230 of file DataHeader.cxx.

230 {
232}
status
Definition merge.py:16

◆ size()

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

Definition at line 246 of file DataHeader.cxx.

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

◆ sizeProvenance()

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

Definition at line 276 of file DataHeader.cxx.

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

◆ 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: