Commit 72bf2dcc authored by Lukas Alexander Heinrich's avatar Lukas Alexander Heinrich Committed by Graeme Stewart
Browse files

SG_BASE for menu aux container (xAODTrigger-00-00-34)

	* SG_BASE macro for TriggerMenuAuxContainer
	* tag as xAODTrigger-00-00-34

2014-12-q0 Alan Watson <Alan.Watson@CERN.CH>
        * _v2 versions of EmTauRoI, JetRoI
	* Bugfix in EmTauRoI RoIword format checking.
	* Separate ET scales for Run 2 RoIs
	* Tag as xAODTrigger-00-00-33

2014-12-09  scott snyder  <snyder@bnl.gov>
	* Tagging xAODTrigger-00-00-32.
	* Root/JetEtRoIAuxInfo_v1.cxx: Fix uninitialized variable.

2014-12-05 Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
	* Declared ByteStreamAuxContainer_v1::m_tick as transient. This
	  variable was forgotten about by mistake...
	* Tagging as xAODTrigger-00-00-31

2014-12-01 Joerg Stelzer <stelzer@cern.ch>
	* Add CLID to JetRoI, EmTauRoI, MuonRoI
...
(Long ChangeLog diff - truncated)
parent 5326ad44
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: ByteStreamAuxContainer_v1.cxx 611309 2014-08-11 16:51:58Z ssnyder $
// $Id: ByteStreamAuxContainer_v1.cxx 611308 2014-08-11 16:51:49Z ssnyder $
// System include(s):
#include <iostream>
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EmTauRoIAuxContainer_v2.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// Local include(s):
#include "xAODTrigger/versions/EmTauRoIAuxContainer_v2.h"
namespace xAOD {
EmTauRoIAuxContainer_v2::EmTauRoIAuxContainer_v2()
: AuxContainerBase() {
AUX_VARIABLE( eta);
AUX_VARIABLE( phi);
AUX_VARIABLE( roiWord);
AUX_VARIABLE( etScale);
AUX_VARIABLE( thrPattern);
AUX_VARIABLE( thrNames);
AUX_VARIABLE( thrValues);
AUX_VARIABLE( core);
AUX_VARIABLE( emClus);
AUX_VARIABLE( tauClus);
AUX_VARIABLE( emIsol);
AUX_VARIABLE( hadIsol);
AUX_VARIABLE( hadCore);
}
} // namespace xAOD
......@@ -2,7 +2,10 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EmTauRoI_v1.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// $Id: EmTauRoI_v1.cxx 625821 2014-11-03 17:03:16Z krasznaa $
// System include(s):
#include <stdexcept>
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
......@@ -26,6 +29,28 @@ namespace xAOD {
return;
}
/// This function must be used by all analysers to check the type of the RoI
/// before doing anything further with it. Since the way to use Run 1 and
/// Run 2 L1Calo RoI words is quite different.
///
/// @returns The "type" of the RoI word in question
///
EmTauRoI_v1::RoIType EmTauRoI_v1::roiType() const {
const uint32_t roi = roiWord();
if( ( roi & 0xc0000000 ) == 0 ) {
return CPRoIWord;
} else if( ( roi & 0xf0000000 ) == 0xa ) {
return EMRoIWord;
} else if( ( roi & 0xf0000000 ) == 0xb ) {
return TauRoIWord;
}
throw std::runtime_error( "xAOD::EmTauRoI_v1::roiType() "
"Unknown RoI word type found" );
return static_cast< RoIType >( -1 );
}
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, eta, setEta )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, phi, setPhi )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, uint32_t, roiWord,
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EmTauRoI_v2.cxx 625821 2014-11-03 17:03:16Z krasznaa $
// System include(s):
#include <stdexcept>
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
// Local include(s):
#include "xAODTrigger/versions/EmTauRoI_v2.h"
namespace xAOD {
EmTauRoI_v2::EmTauRoI_v2()
: SG::AuxElement() {
}
void EmTauRoI_v2::initialize( uint32_t roiword, float eta, float phi ) {
setRoIWord( roiword );
setEta( eta );
setPhi( phi );
return;
}
/// This function must be used by all analysers to check the type of the RoI
/// before doing anything further with it. Since the way to use Run 1 and
/// Run 2 L1Calo RoI words is quite different.
///
/// @returns The "type" of the RoI word in question
///
EmTauRoI_v2::RoIType EmTauRoI_v2::roiType() const {
const uint32_t roi = roiWord();
if( ( roi & 0xc0000000 ) == 0 ) {
return CPRoIWord;
} else if( ( roi & 0xf0000000 ) == 0xa0000000 ) {
return EMRoIWord;
} else if( ( roi & 0xf0000000 ) == 0xb0000000 ) {
return TauRoIWord;
}
throw std::runtime_error( "xAOD::EmTauRoI_v2::roiType() "
"Unknown RoI word type found" );
return static_cast< RoIType >( -1 );
}
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, eta, setEta )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, phi, setPhi )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, uint32_t, roiWord,
setRoIWord )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, etScale, setEtScale )
/// Accessor for threshold pattern (not part of RoI in Run 2)
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, uint32_t, thrPattern,
setThrPattern )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, core, setCore )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, emClus, setEmClus )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, tauClus,
setTauClus )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, emIsol, setEmIsol )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, hadIsol,
setHadIsol )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v2, float, hadCore,
setHadCore )
/// Get cluster ET from the RoI word
float EmTauRoI_v2::eT() const {
if ( roiType() == EMRoIWord || roiType() == TauRoIWord ) {
if (etScale() == 0) return ( roiWord() & 0xff );
return ( (roiWord() & 0xff)*etScale() );
}
return 0;
}
/// Get isolation results from the RoI word
uint8_t EmTauRoI_v2::isol() const {
if ( roiType() == EMRoIWord || roiType() == TauRoIWord )
return ( (roiWord()>>8) & 0x1f );
return 0;
}
/// Accessor for the names of the passed thresholds
static SG::AuxElement::Accessor< std::vector< std::string > >
names( "thrNames" );
/// Accessor for the values (in MeV) of the passed thresholds
static SG::AuxElement::Accessor< std::vector< float > >
values( "thrValues" );
/// @param name The name of the passed threshold
/// @param value The value (in MeV) of the passed threshold
///
void EmTauRoI_v2::addThreshold( const std::string& name, float value ) {
names( *this ).push_back( name );
values( *this ).push_back( value );
return;
}
/// This function can be used to clear the thresholds that are currently
/// held by the object.
///
void EmTauRoI_v2::clearThresholds() {
names( *this ).clear();
values( *this ).clear();
return;
}
AUXSTORE_OBJECT_GETTER( EmTauRoI_v2, std::vector< std::string >, thrNames )
AUXSTORE_OBJECT_GETTER( EmTauRoI_v2, std::vector< float >, thrValues )
} // namespace xAOD
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoI_v1.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// $Id: EnergySumRoI_v1.cxx 615960 2014-09-10 14:03:39Z krasznaa $
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
......@@ -34,8 +34,8 @@ namespace xAOD {
setRoIWord2( roiword2 );
setEnergyX( energyX );
setEnergyX( energyY );
setEnergyX( energyT );
setEnergyY( energyY );
setEnergyT( energyT );
return;
}
......
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: JetEtRoIAuxInfo_v1.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// $Id: JetEtRoIAuxInfo_v1.cxx 634618 2014-12-09 02:37:22Z ssnyder $
// Local include(s):
#include "xAODTrigger/versions/JetEtRoIAuxInfo_v1.h"
......@@ -12,6 +12,7 @@ namespace xAOD {
JetEtRoIAuxInfo_v1::JetEtRoIAuxInfo_v1()
: AuxInfoBase() {
roiWord = 0;
AUX_VARIABLE( roiWord );
AUX_VARIABLE( thrNames );
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: JetRoIAuxContainer_v2.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// Local include(s):
#include "xAODTrigger/versions/JetRoIAuxContainer_v2.h"
namespace xAOD {
JetRoIAuxContainer_v2::JetRoIAuxContainer_v2()
: AuxContainerBase() {
AUX_VARIABLE( eta );
AUX_VARIABLE( phi );
AUX_VARIABLE( roiWord );
AUX_VARIABLE( etScale );
AUX_VARIABLE( thrPattern );
AUX_VARIABLE( thrValues );
AUX_VARIABLE( thrNames );
AUX_VARIABLE( et4x4 );
AUX_VARIABLE( et6x6 );
AUX_VARIABLE( et8x8 );
}
} // namespace xAOD
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: JetRoI_v2.cxx 579914 2014-01-24 10:15:15Z krasznaa $
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
// Local include(s):
#include "xAODTrigger/versions/JetRoI_v2.h"
namespace xAOD {
JetRoI_v2::JetRoI_v2()
: SG::AuxElement() {
}
void JetRoI_v2::initialize( uint32_t roiword, float eta, float phi ) {
setRoIWord( roiword );
setEta( eta );
setPhi( phi );
return;
}
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, eta, setEta )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, phi, setPhi )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, uint32_t, roiWord,
setRoIWord )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, etScale, setEtScale )
/// Functions for accessing the jet ET part
/// of the RoI.
///
float JetRoI_v2::etLarge() const {
if ( (roiWord() & 0xe0000000) == 0 ) {
if (etScale() == 0) return ( roiWord() & 0x3ff );
return ( (roiWord() & 0x3ff)*etScale() );
}
return 0;
}
float JetRoI_v2::etSmall() const {
if ( (roiWord() & 0xe0000000) == 0 ) {
if (etScale() == 0) return ( (roiWord()>>10) & 0x1ff );
return ( ((roiWord()>>10) & 0x1ff)*etScale() );
}
return 0;
}
/// Accessor for threshold pattern (not part of RoI in Run 2)
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, uint32_t, thrPattern,
setThrPattern )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et4x4, setEt4x4 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et6x6, setEt6x6 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et8x8, setEt8x8 )
/// Accessor for the names of the passed thresholds
static SG::AuxElement::Accessor< std::vector< std::string > >
names( "thrNames" );
/// Accessor for the values (in MeV) of the passed thresholds
static SG::AuxElement::Accessor< std::vector< float > >
values( "thrValues" );
/// @param name The name of the passed threshold
/// @param value The value (in MeV) of the passed threshold
///
void JetRoI_v2::addThreshold( const std::string& name, float value ) {
names( *this ).push_back( name );
values( *this ).push_back( value );
return;
}
/// This function can be used to clear the thresholds that are currently
/// held by the object.
///
void JetRoI_v2::clearThresholds() {
names( *this ).clear();
values( *this ).clear();
return;
}
AUXSTORE_OBJECT_GETTER( JetRoI_v2, std::vector< std::string >, thrNames )
AUXSTORE_OBJECT_GETTER( JetRoI_v2, std::vector< float >, thrValues )
} // namespace xAOD
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id$
// $Id: TrigCompositeAuxContainer_v1.cxx 631318 2014-11-26 18:32:04Z krasznaa $
// Local include(s):
#include "xAODTrigger/versions/TrigCompositeAuxContainer_v1.h"
......@@ -14,8 +14,10 @@ namespace xAOD {
AUX_VARIABLE( name );
AUX_VARIABLE( linkColName );
AUX_VARIABLE( linkColIndex );
AUX_VARIABLE( linkColNames );
AUX_VARIABLE( linkColKeys );
AUX_VARIABLE( linkColIndices );
AUX_VARIABLE( linkColClids );
}
} // namespace xAOD
......@@ -2,7 +2,11 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id$
// $Id: TrigComposite_v1.cxx 631318 2014-11-26 18:32:04Z krasznaa $
// System include(s):
#include <algorithm>
#include <stdexcept>
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
......@@ -85,11 +89,9 @@ namespace xAOD {
Accessor< int > acc( name );
// Enable the check once it will work correctly:
/*
if( ! acc.isAvailable( *this ) ) {
return false;
}
*/
// Retrieve this detail:
value = acc( *this );
......@@ -103,11 +105,9 @@ namespace xAOD {
Accessor< float > acc( name );
// Enable the check once it will work correctly:
/*
if( ! acc.isAvailable( *this ) ) {
return false;
}
*/
// Retrieve this detail:
value = acc( *this );
......@@ -121,11 +121,9 @@ namespace xAOD {
Accessor< std::vector< int > > acc( name );
// Enable the check once it will work correctly:
/*
if( ! acc.isAvailable( *this ) ) {
return false;
}
*/
// Retrieve this detail:
value = acc( *this );
......@@ -139,11 +137,9 @@ namespace xAOD {
Accessor< std::vector< float > > acc( name );
// Enable the check once it will work correctly:
/*
if( ! acc.isAvailable( *this ) ) {
return false;
}
*/
// Retrieve this detail:
value = acc( *this );
......@@ -153,4 +149,59 @@ namespace xAOD {
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Implementation for the link accessor functions
//
bool TrigComposite_v1::hasObjectLink( const std::string& name ) const {
// Since this function shouldn't throw exceptions too easily,
// let's be super careful here...
static Accessor< std::vector< std::string > > accNames( "linkColNames" );
if( ! accNames.isAvailable( *this ) ) {
return false;
}
// The check itself is pretty simple:
const std::vector< std::string >& names = accNames( *this );
return ( std::find( names.begin(), names.end(), name ) != names.end() );
}
AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< std::string >,
linkColNames )
AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< uint32_t >,
linkColKeys )
AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< uint16_t >,
linkColIndices )
AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< uint32_t >,
linkColClids )
std::vector< std::string >& TrigComposite_v1::linkColNamesNC() {
static Accessor< std::vector< std::string > > acc( "linkColNames" );
return acc( *this );
}
std::vector< uint32_t >& TrigComposite_v1::linkColKeysNC() {
static Accessor< std::vector< uint32_t > > acc( "linkColKeys" );
return acc( *this );
}
std::vector< uint16_t >& TrigComposite_v1::linkColIndicesNC() {
static Accessor< std::vector< uint16_t > > acc( "linkColIndices" );
return acc( *this );
}
std::vector< uint32_t >& TrigComposite_v1::linkColClidsNC() {
static Accessor< std::vector< uint32_t > > acc( "linkColClids" );
return acc( *this );
}
//
/////////////////////////////////////////////////////////////////////////////
} // namespace xAOD
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigNavigationAuxInfo_v1.cxx 613820 2014-08-28 13:36:36Z krasznaa $
// Local include(s):
#include "xAODTrigger/versions/TrigNavigationAuxInfo_v1.h"
namespace xAOD {
TrigNavigationAuxInfo_v1::TrigNavigationAuxInfo_v1()
: AuxInfoBase() {
AUX_VARIABLE( serialized );
}
} // namespace xAOD
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigNavigation_v1.cxx 613820 2014-08-28 13:36:36Z krasznaa $
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
// Local include(s):
#include "xAODTrigger/versions/TrigNavigation_v1.h"
namespace xAOD {
TrigNavigation_v1::TrigNavigation_v1()
: SG::AuxElement() {
}
AUXSTORE_OBJECT_SETTER_AND_GETTER( TrigNavigation_v1,
std::vector< uint32_t >,
serialized, setSerialized )
} // namespace xAOD
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TriggerMenuAuxContainer_v1.cxx 582798 2014-02-12 15:53:47Z krasznaa $
// $Id: TriggerMenuAuxContainer_v1.cxx 631658 2014-11-27 18:53:39Z lheinric $
// Local include(s):
#include "xAODTrigger/versions/TriggerMenuAuxContainer_v1.h"
......@@ -26,7 +26,15 @@ namespace xAOD {
AUX_VARIABLE( chainPrescales );
AUX_VARIABLE( chainRerunPrescales );
AUX_VARIABLE( chainPassthroughPrescales );
AUX_VARIABLE( chainSignatureCounters );
AUX_VARIABLE( chainSignatureLogics );
AUX_VARIABLE( chainSignatureOutputTEs );
AUX_VARIABLE( chainSignatureLabels );
AUX_VARIABLE( sequenceInputTEs );
AUX_VARIABLE( sequenceOutputTEs );
AUX_VARIABLE( sequenceAlgorithms );
AUX_VARIABLE( bunchGroupBunches );
}
......
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TriggerMenu_v1.cxx 582798 2014-02-12 15:53:47Z krasznaa $
// $Id: TriggerMenu_v1.cxx 631658 2014-11-27 18:53:39Z lheinric $
// System include(s):
#include <iostream>
......@@ -135,9 +135,85 @@ namespace xAOD {
return acc.isAvailable( *this );
}
AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerMenu_v1, std::vector< std::vector< uint32_t> >,
chainSignatureCounters, setChainSignatureCounters )
bool TriggerMenu_v1::chainSignatureCountersAvailable() const {
static Accessor< std::vector< std::vector< uint32_t> > > acc( "chainSignatureCounters" );
return acc.isAvailable( *this );
}