Commit 6aac096f authored by Attila Krasznahorkay's avatar Attila Krasznahorkay Committed by Rachid Mazini
Browse files

xAOD::EventAuxInfo_v3, 21.0-mc16d branch (2021.12.03.)

parent 5987292e
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
// Local include(s):
#include "xAODEventInfo/versions/EventAuxInfo_v3.h"
namespace xAOD {
EventAuxInfo_v3::EventAuxInfo_v3()
: AuxInfoBase(),
runNumber(0),
eventNumber(0),
lumiBlock(0),
timeStamp(0),
timeStampNSOffset(0),
bcid(0),
detectorMask0(0),
detectorMask1(0),
detectorMask2(0),
detectorMask3(0),
eventTypeBitmask(0),
statusElement(0),
extendedLevel1ID(0),
level1TriggerType(0),
pixelFlags(0),
sctFlags(0),
trtFlags(0),
larFlags(0),
tileFlags(0),
muonFlags(0),
forwardDetFlags(0),
coreFlags(0),
backgroundFlags(0),
lumiFlags(0)
{
// Basic event information:
AUX_VARIABLE( runNumber );
AUX_VARIABLE( eventNumber );
AUX_VARIABLE( lumiBlock );
AUX_VARIABLE( timeStamp );
AUX_VARIABLE( timeStampNSOffset );
AUX_VARIABLE( bcid );
AUX_VARIABLE( detectorMask0 );
AUX_VARIABLE( detectorMask1 );
AUX_VARIABLE( detectorMask2 );
AUX_VARIABLE( detectorMask3 );
// Event type information:
AUX_VARIABLE( detDescrTags );
AUX_VARIABLE( eventTypeBitmask );
// Trigger related information:
AUX_VARIABLE( statusElement );
AUX_VARIABLE( extendedLevel1ID );
AUX_VARIABLE( level1TriggerType );
AUX_VARIABLE( streamTagNames );
AUX_VARIABLE( streamTagTypes );
AUX_VARIABLE( streamTagObeysLumiblock );
// Detector flags:
AUX_VARIABLE( pixelFlags );
AUX_VARIABLE( sctFlags );
AUX_VARIABLE( trtFlags );
AUX_VARIABLE( larFlags );
AUX_VARIABLE( tileFlags );
AUX_VARIABLE( muonFlags );
AUX_VARIABLE( forwardDetFlags );
AUX_VARIABLE( coreFlags );
AUX_VARIABLE( backgroundFlags );
AUX_VARIABLE( lumiFlags );
}
} // namespace xAOD
<!-- Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -->
<!-- Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -->
<lcgdict>
<class name="xAOD::EventInfo_v1"
......@@ -13,6 +13,8 @@
id="2CFD72A2-D3AA-4C18-9B40-E5ACBA20D785" />
<class name="xAOD::EventAuxInfo_v2"
id="FA684B06-EC03-4B0B-9FAE-91423B1ED35D" />
<class name="xAOD::EventAuxInfo_v3"
id="0D6FFB22-1BCB-49B9-BBFB-66B6DF352067" />
<read sourceClass="xAOD::EventInfo_v1" version="[1-]"
targetClass="xAOD::EventInfo_v1" source="" target="" >
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V3_H
#define XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V3_H
// System include(s):
extern "C" {
# include <stdint.h>
}
#include <vector>
#include <string>
// EDM include(s):
#include "xAODCore/AuxInfoBase.h"
namespace xAOD {
/// Auxiliary information about the event
///
/// This object describes the "static" auxiliary information about
/// an event.
///
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
class EventAuxInfo_v3 : public AuxInfoBase {
public:
/// Default constructor
EventAuxInfo_v3();
/// @name Basic event information
/// @{
uint32_t runNumber;
unsigned long long eventNumber;
uint32_t lumiBlock;
uint32_t timeStamp;
uint32_t timeStampNSOffset;
uint32_t bcid;
uint32_t detectorMask0;
uint32_t detectorMask1;
uint32_t detectorMask2;
uint32_t detectorMask3;
/// @}
/// @name Event type information
/// @{
std::vector< std::pair< std::string, std::string > > detDescrTags;
uint32_t eventTypeBitmask;
/// @}
/// @name Trigger related information
/// @{
uint32_t statusElement;
uint32_t extendedLevel1ID;
uint16_t level1TriggerType;
std::vector< std::string > streamTagNames;
std::vector< std::string > streamTagTypes;
std::vector< char > streamTagObeysLumiblock;
/// @}
/// @name Detector flags
/// @{
uint32_t pixelFlags;
uint32_t sctFlags;
uint32_t trtFlags;
uint32_t larFlags;
uint32_t tileFlags;
uint32_t muonFlags;
uint32_t forwardDetFlags;
uint32_t coreFlags;
uint32_t backgroundFlags;
uint32_t lumiFlags;
/// @}
}; // class EventAuxInfo_v3
} // namespace xAOD
// Declare the inheritance of the type:
#include "xAODCore/BaseInfo.h"
SG_BASE( xAOD::EventAuxInfo_v3, xAOD::AuxInfoBase );
#endif // XAODEVENTINFO_VERSIONS_EVENTAUXINFO_V3_H
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef XAODEVENTINFO_XAODEVENTINFODICT_H
#define XAODEVENTINFO_XAODEVENTINFODICT_H
......@@ -19,6 +19,7 @@
#include "xAODEventInfo/versions/EventInfo_v1.h"
#include "xAODEventInfo/versions/EventAuxInfo_v1.h"
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
#include "xAODEventInfo/versions/EventAuxInfo_v3.h"
#include "xAODEventInfo/versions/EventInfoContainer_v1.h"
#include "xAODEventInfo/versions/EventInfoAuxContainer_v1.h"
......
// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
//
// Dear emacs, this is -*- c++ -*-
//
#ifndef XAODEVENTINFOATHENAPOOL_MESSAGEMACROS_H
#define XAODEVENTINFOATHENAPOOL_MESSAGEMACROS_H
// Gaudi include(s).
#include "GaudiKernel/MsgStream.h"
/// Convenience macro for setting the level of output messages
#define MSGLVL MSG::DEBUG
/// Another convenience macro for printing messages in the converter
#define ATH_MSG( MSG ) \
do { \
if( log.level() <= MSGLVL ) { \
log << MSGLVL << MSG << endmsg; \
} \
} while( 0 )
#endif // XAODEVENTINFOATHENAPOOL_MESSAGEMACROS_H
......@@ -2,6 +2,7 @@
// Local include(s).
#include "xAODEventAuxInfoCnv_v2.h"
#include "MessageMacros.h"
// Core EDM include(s):
#include "AthContainers/tools/copyAuxStoreThinned.h"
......@@ -9,17 +10,6 @@
// System include(s).
#include <stdexcept>
/// Convenience macro for setting the level of output messages
#define MSGLVL MSG::DEBUG
/// Another convenience macro for printing messages in the converter
#define ATH_MSG( MSG ) \
do { \
if( log.level() <= MSGLVL ) { \
log << MSGLVL << MSG << endmsg; \
} \
} while( 0 )
void xAODEventAuxInfoCnv_v2::persToTrans( const xAOD::EventAuxInfo_v2* oldObj,
xAOD::EventAuxInfo* newObj,
MsgStream& log ) {
......
// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
// Local include(s).
#include "xAODEventAuxInfoCnv_v3.h"
#include "MessageMacros.h"
// Core EDM include(s):
#include "AthContainers/tools/copyAuxStoreThinned.h"
// System include(s).
#include <stdexcept>
void xAODEventAuxInfoCnv_v3::persToTrans( const xAOD::EventAuxInfo_v3* oldObj,
xAOD::EventAuxInfo* newObj,
MsgStream& log ) {
// Greet the user.
ATH_MSG( "Converting xAOD::EventAuxInfo_v3 to the current version..." );
// Copy the payload of the v3 object into the latest one by misusing
// the thinning code a bit...
SG::copyAuxStoreThinned( *oldObj, *newObj,
static_cast< IThinningSvc* >( nullptr ) );
// Print what happened:
ATH_MSG( "Converting xAOD::EventAuxInfo_v3 to the current version... "
"[OK]" );
return;
}
void xAODEventAuxInfoCnv_v3::transToPers( const xAOD::EventAuxInfo*,
xAOD::EventAuxInfo_v3*,
MsgStream& log ) {
log << MSG::ERROR
<< "Somebody called xAODEventAuxInfoCnv_v3::transToPers"
<< endmsg;
throw std::runtime_error( "Somebody called xAODEventAuxInfoCnv_v3::"
"transToPers" );
return;
}
// Dear emacs, this is -*- c++ -*-
//
// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
//
#ifndef XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V3_H
#define XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V3_H
// Gaudi/Athena include(s).
#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
// EDM include(s).
#include "xAODEventInfo/versions/EventAuxInfo_v3.h"
#include "xAODEventInfo/EventAuxInfo.h"
/// Converter for reading @c xAOD::EventAuxInfo_v3
///
/// This converter takes care of reading @c xAOD::EventAuxInfo_v3 into
/// the "current" version of @c xAOD::EventAuxInfo. (Which is
/// @c xAOD::EventAuxInfo_v1 in this branch.)
///
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
class xAODEventAuxInfoCnv_v3 :
public T_AthenaPoolTPCnvBase< xAOD::EventAuxInfo,
xAOD::EventAuxInfo_v3 > {
public:
/// Default constructor
xAODEventAuxInfoCnv_v3() = default;
/// Function converting from the old type to the current one
virtual void persToTrans( const xAOD::EventAuxInfo_v3* oldObj,
xAOD::EventAuxInfo* newObj,
MsgStream& log ) override;
/// Dummy function inherited from the base class
virtual void transToPers( const xAOD::EventAuxInfo*,
xAOD::EventAuxInfo_v3*,
MsgStream& log ) override;
}; // class xAODEventAuxInfoCnv_v3
#endif // XAODEVENTINFOATHENAPOOL_XAODEVENAUXINFOCNV_V3_H
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
// Gaudi/Athena include(s).
#include "AthenaKernel/TPCnvFactory.h"
......@@ -6,12 +6,19 @@
// EDM include(s).
#include "xAODEventInfo/EventAuxInfo.h"
#include "xAODEventInfo/versions/EventAuxInfo_v2.h"
#include "xAODEventInfo/versions/EventAuxInfo_v3.h"
// Local include(s).
#include "xAODEventAuxInfoCnv_v2.h"
#include "xAODEventAuxInfoCnv_v3.h"
// Declare the T/P converter(s).
DECLARE_TPCNV_FACTORY( xAODEventAuxInfoCnv_v2,
xAOD::EventAuxInfo,
xAOD::EventAuxInfo_v2,
Athena::TPCnvVers::Old )
DECLARE_TPCNV_FACTORY( xAODEventAuxInfoCnv_v3,
xAOD::EventAuxInfo,
xAOD::EventAuxInfo_v3,
Athena::TPCnvVers::Old )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment