diff --git a/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h new file mode 100644 index 0000000000000000000000000000000000000000..ba354e37ce48b81612a6acfbbc9f02bab76436e0 --- /dev/null +++ b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h @@ -0,0 +1,17 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef BYTESTREAMEVENTPTCNV_BYTESTREAMEVENTPTCNVDICT_H +#define BYTESTREAMEVENTPTCNV_BYTESTREAMEVENTPTCNVDICT_H +/** + * @file ByteStreamEventPTCnvDict.h + * + * @brief Header file for dictionary generation + * + * @author <vaniachine@anl.gov> + */ + +#include "ByteStreamEventPTCnv/ByteStreamMetadataPTCnv_p1.h" + +#endif // BYTESTREAMEVENTPTCNV_BYTESTREAMEVENTPTCNVDICT_H diff --git a/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamMetadataPTCnv_p1.h b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamMetadataPTCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..3b822cce7b049dd9a8a590d2903d28e1973a4f7a --- /dev/null +++ b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ByteStreamMetadataPTCnv_p1.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef BYTESTREAMEVENTPTCNV_BYTESTREAMMETADATAPTCNV_P1_H +#define BYTESTREAMEVENTPTCNV_BYTESTREAMMETADATAPTCNV_P1_H +/** + * @file ByteStreamMetadataPTCnv_p1.h + * + * @brief Header file for in-file metadata getters (file peeking without Athena) + * + * @author <vaniachine@anl.gov> + */ + +#define private public +#include "ByteStreamEventTPCnv/ByteStreamMetadata_p1.h" +#undef private + +class ByteStreamMetadataPTCnv_p1 : ByteStreamMetadata_p1 { +public: + static unsigned int getRunNumber (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_runNumber; }; + static unsigned int getNumEvents (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_numEvents; }; + static unsigned int getMaxEvents (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_maxEvents; }; + static unsigned int getRecEnable (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_recEnable; }; + static unsigned int getTriggerType (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_triggerType; }; + static uint64_t getDetectorMask (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_detectorMask; }; + static uint64_t getDetectorMask2 (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_detectorMask2; }; + static unsigned int getBeamType (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_beamType; }; + static unsigned int getBeamEnergy (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_beamEnergy; }; + static std::string getGuid (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_guid; }; + static std::string getStream (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_stream; }; + static std::string getProject (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_project; }; + static unsigned int getLumiBlock (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_lumiBlock; }; + static std::vector<std::string> getFreeMetaDataStrings (const ::ByteStreamMetadata_p1& bsmdp) { return bsmdp.m_freeMetaDataStrings; }; +}; + +#endif // BYTESTREAMEVENTPTCNV_BYTESTREAMMETADATAPTCNV_P1_H diff --git a/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/selection.xml b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..24163f05a2f686bf7ed6508d9bed9bf40010094a --- /dev/null +++ b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/selection.xml @@ -0,0 +1,4 @@ +<lcgdict> + <class name="ByteStreamMetadataPTCnv_p1" /> + +</lcgdict> diff --git a/Event/ByteStreamEventPTCnv/CMakeLists.txt b/Event/ByteStreamEventPTCnv/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4c1839c2daa6ffa27b292b5142caed98a03a94fe --- /dev/null +++ b/Event/ByteStreamEventPTCnv/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################################################ +# Package: ByteStreamEventPTCnv +################################################################################ + +# Declare the package name: +atlas_subdir( ByteStreamEventPTCnv ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Event/ByteStreamEventTPCnv ) + +# External dependencies: +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_tpcnv_library( ByteStreamEventPTCnv + src/*.cxx + PUBLIC_HEADERS ByteStreamEventPTCnv + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ByteStreamEventTPCnv ) + +atlas_add_dictionary( ByteStreamEventPTCnvDict + ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h + ByteStreamEventPTCnv/selection.xml + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ByteStreamEventTPCnv ByteStreamEventPTCnv ) + diff --git a/Event/ByteStreamEventPTCnv/cmt/requirements b/Event/ByteStreamEventPTCnv/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..1be845dc606e832c0abfbd9cf2913cdb7b587e17 --- /dev/null +++ b/Event/ByteStreamEventPTCnv/cmt/requirements @@ -0,0 +1,18 @@ +package ByteStreamEventPTCnv + + +author Alexandre Vaniachine <vaniachine@anl.gov> + +use AtlasPolicy AtlasPolicy-* +use ByteStreamEventTPCnv ByteStreamEventTPCnv-* Event + +library ByteStreamEventPTCnv *.cxx +apply_pattern tpcnv_library + +private +use AtlasReflex AtlasReflex-* External + +apply_pattern lcgdict dict=ByteStreamEventPTCnv selectionfile=selection.xml headerfiles="../ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h" + +end_private + diff --git a/Event/ByteStreamEventPTCnv/src/ByteStreamMetadataPTCnv_p1.cxx b/Event/ByteStreamEventPTCnv/src/ByteStreamMetadataPTCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..81eaf7fdccdec8d68706d9483c30222d9442eafb --- /dev/null +++ b/Event/ByteStreamEventPTCnv/src/ByteStreamMetadataPTCnv_p1.cxx @@ -0,0 +1,12 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ByteStreamMetadataPTCnv_p1.cxx + * + * @author Alexandre Vaniachine <vaniachine@anl.gov> + * + */ + +#include "ByteStreamEventPTCnv/ByteStreamMetadataPTCnv_p1.h"