ATLAS Offline Software
Loading...
Searching...
No Matches
Trig::TrigConfBunchCrossingTool Class Reference

The trigger config implementation of IBunchCrossingTool. More...

#include <TrigConfBunchCrossingTool.h>

Inheritance diagram for Trig::TrigConfBunchCrossingTool:
Collaboration diagram for Trig::TrigConfBunchCrossingTool:

Public Types

enum  BeamType { Beam1 = 0 , Beam2 = 1 , Crossing = 2 }
 Types of the return values of the bcIntensity function. More...
enum  BunchCrossingType {
  Empty = 0 , FirstEmpty = 1 , MiddleEmpty = 2 , Single = 100 ,
  Front = 200 , Middle = 201 , Tail = 202 , Unpaired = 300
}
 Simplified type for a given bunch crossing. More...
enum  BunchDistanceType { NanoSec , BunchCrossings , FilledBunches }
 Enumeration specifying the units in which to expect the bunch distance type. More...
enum  BunchFillType {
  CollidingBunch = 0 , UnpairedBunch = 1 , EmptyBunch = 2 , UnpairedBeam1 = 3 ,
  UnpairedBeam2 = 4
}
 Enumeration specifying what kind of bunch to use in the gap functions. More...
typedef unsigned int bcid_type
 Declare the interface that this class provides.
typedef unsigned int configid_type
 Declare the interface that this class provides.
Definition of the StoreGate-like object's definition
typedef ServiceHandle< StoreGateSvcMetaStore_t
 Type of the metadata store object in Athena.
typedef const ServiceHandle< StoreGateSvc > & MetaStorePtr_t
 Type of the metadata store pointer in standalone mode.

Public Member Functions

virtual void print () const
 Print the state of the tool.
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
virtual std::vector< int > configuredBCIDs () const
 Function providing the BCIDs of the configured colliding bunches.
virtual std::vector< int > configuredUnpairedBCIDsBeam1 () const
 Function providing the BCIDs of the configured unpaired bunches.
virtual std::vector< int > configuredUnpairedBCIDsBeam2 () const
 Function providing the BCIDs of the configured unpaired bunches.
Functions implementing the IBunchCrossingTool interface
virtual bool isFilled (bcid_type bcid) const
 The simplest query: Is the bunch crossing filled or not?
virtual bool isInTrain (bcid_type bcid) const
 Function deciding if a given bunch crossing is in a filled train.
virtual bool isUnpaired (bcid_type bcid) const
 Function deciding if a given bunch crossing has an unpaired bunch.
virtual bool isBeam1 (bcid_type bcid) const
 Function deciding if there was a bunch from "beam 1" in this bunch crossing.
virtual bool isBeam2 (bcid_type bcid) const
 Function deciding if there was a bunch from "beam 2" in this bunch crossing.
virtual float bcIntensity (bcid_type bcid, BeamType type=Crossing) const
 Function returning the "intensity" of a given bunch crossing.
virtual BunchCrossingType bcType (bcid_type bcid) const
 Get the type of the specific bunch crossing.
virtual int distanceFromFront (bcid_type bcid, BunchDistanceType type=NanoSec) const
 The distance of the specific bunch crossing from the front of the train.
virtual int distanceFromTail (bcid_type bcid, BunchDistanceType type=NanoSec) const
 The distance of the specific bunch crossing from the tail of the train.
virtual int gapBeforeTrain (bcid_type bcid, BunchDistanceType type=NanoSec) const
 Gap before the train this BCID is in.
virtual int gapAfterTrain (bcid_type bcid, BunchDistanceType type=NanoSec) const
 Gap after the train this BCID is in.
virtual int gapBeforeBunch (bcid_type bcid, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const
 Gap before a particular bunch.
virtual int gapAfterBunch (bcid_type bcid, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const
 Gap after a particular bunch.
virtual std::vector< bool > bunchesInFront (bcid_type bcid, int bunches=10) const
 Function returning whether the previous bunches were filled, and how.
virtual std::vector< bool > bunchesAfter (bcid_type bcid=0, int bunches=10) const
 Function returning whether the following bunches were filled, and how.
virtual std::vector< float > bunchIntInFront (bcid_type bcid, int bunches=10, BeamType type=Crossing) const
 Function returning the intensities of the bunch crossings before the reference.
virtual std::vector< float > bunchIntAfter (bcid_type bcid, int bunches=10, BeamType type=Crossing) const
 Function returning the intensities of the bunch crossings after the reference.
virtual unsigned int numberOfFilledBunches () const
 Get the number of filled bunches in the current configuration.
virtual unsigned int numberOfUnpairedBunches () const
 Get the number of unpaired bunches in the current configuration.
virtual unsigned int numberOfBunchTrains () const
 Get the number of the bunch trains in the current configuration.
virtual int bunchTrainSpacing (BunchDistanceType type=NanoSec) const
 Get the bunch spacing in the trains.
Functions providing access to the input/output metadata
MetaStorePtr_t inputMetaStore () const
 Accessor for the input metadata store.
MetaStorePtr_t outputMetaStore () const
 Accessor for the output metadata store.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

virtual StatusCode beginEvent ()
 Function called when a new event is loaded.
StatusCode loadSingleBunches (const std::vector< int > &bunches, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
 Interpret the configuration for single bunches.
StatusCode loadBunchTrains (const std::vector< int > &bunches, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
 Interpret the configuration for bunch trains.
StatusCode loadUnpairedBunches (const std::vector< int > &beam1, const std::vector< int > &beam2, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
 Interpret the configuration for unpaired bunches.
void printConfig () const
 Function printing the configuration of the tool.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.
Callback functions helping in metadata reading/writing
void setUseIncidents (const bool flag)
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/Event.
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened.
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata.

Protected Attributes

Variables holding the decoded bunch structure
std::set< Trig::BunchCrossingm_filledBunches
 List of colliding bunches.
std::set< Trig::BunchCrossingm_singleBunches
 Internal list of single bunches.
std::set< Trig::BunchCrossingm_unpairedBunches
 Internal list of unpaired bunches.
std::set< Trig::BunchTrainm_bunchTrains
 Internal list of bunch trains.
Configurable tool properties
int m_maxBunchSpacing
 The maximum bunch spacing that the tool should consider.
int m_frontLength
 Length of the "front" of a bunch train.
int m_tailLength
 Length of the "tail" of a bunch train.

Static Protected Attributes

static const std::string BUNCH_CONFIG_INCIDENT_NAME = "BunchConfig"
 Type name for the incident that such tools should emit.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

virtual ASG_TOOL_CLASS2(TrigConfBunchCrossingTool, Trig::IBunchCrossingTool, Trig::IBunchCrossingConfProvider) public StatusCode initialize ()
 Create a proper constructor for Athena.
virtual configid_type configID () const
 Unique identifier for the current configuration.
virtual std::vector< float > configuredIntensitiesBeam1 () const
 Override the default implementation because this tool doesn't provide this info.
virtual std::vector< float > configuredIntensitiesBeam2 () const
 Override the default implementation because this tool doesn't provide this info.
virtual std::vector< float > configuredUnpairedIntensitiesBeam1 () const
 Override the default implementation because this tool doesn't provide this info.
virtual std::vector< float > configuredUnpairedIntensitiesBeam2 () const
 Override the default implementation because this tool doesn't provide this info.
StatusCode loadConfig ()
 Make sure that the latest/correct configuration is loaded.
void printBunchGroups (const TrigConf::IILVL1ConfigSvc *svc) const
 Print the "raw" configuration for debugging.
int bunchSpacing (const std::vector< int > &bunches) const
 Get the apparent bunch spacing in the current configuration.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

unsigned int m_bgId {0}
 DB ID of the BunchGroups settings which was loaded last.
ServiceHandle< TrigConf::ILVL1ConfigSvcm_configSvc
 The config service handle.
ToolHandle< TrigConf::ITrigConfigToolm_configTool
 The config tool handle.
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store.
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store.
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file.
bool m_useIncidents
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The trigger config implementation of IBunchCrossingTool.

This implementation should be used primarily to get information about the bunch pattern for data files. It retrieves the bunch pattern configuration using the trigger configuration service. So in principle it can itself get the configuration from a few different places. (Currently TrigConf::LVL1ConfigSvc and TrigConf::DSConfigSvc provide this information.)

It also acts as a bunch crossing configuration provider, implementing the Trig::IBunchCrossingConfProvider interface.

Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 44 of file TrigConfBunchCrossingTool.h.

Member Typedef Documentation

◆ bcid_type

typedef unsigned int Trig::IBunchCrossingTool::bcid_type
inherited

Declare the interface that this class provides.

Convenience type definition

Definition at line 47 of file IBunchCrossingTool.h.

◆ configid_type

typedef unsigned int Trig::IBunchCrossingConfProvider::configid_type
inherited

Declare the interface that this class provides.

Type for the unique identifier

Definition at line 60 of file IBunchCrossingConfProvider.h.

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ BeamType

Types of the return values of the bcIntensity function.

The different information sources provide the "bunch intensity" information in quite different ways, and the information can mean different things actually. This enumeration is used to specify what exact type of information the user is looking for.

Enumerator
Beam1 

The returned intensity should be for "beam 1".

Beam2 

The returned intensity should be for "beam 2".

Crossing 

The returned intensity should describe the BC.

Definition at line 118 of file IBunchCrossingTool.h.

118 {
119 Beam1 = 0,
120 Beam2 = 1,
121 Crossing = 2
122 };
@ Beam1
The returned intensity should be for "beam 1".
@ Beam2
The returned intensity should be for "beam 2".
@ Crossing
The returned intensity should describe the BC.

◆ BunchCrossingType

Simplified type for a given bunch crossing.

This enumeration can specify what kind of bunch crossing one BCID belongs to. The types could easily be extended later on.

Enumerator
Empty 

An empty bunch far away from filled bunches.

FirstEmpty 

The first empty bunch after a train.

MiddleEmpty 

An empty BCID in the middle of a train.

Single 

This is a filled, single bunch (not in a train).

Front 

The BCID belongs to the first few bunches in a train.

Middle 

The BCID belongs to the middle bunches in a train.

Tail 

The BCID belongs to the last few bunces in a train.

Unpaired 

This is an unpaired bunch (either beam1 or beam2).

Definition at line 145 of file IBunchCrossingTool.h.

145 {
146 Empty = 0,
147 FirstEmpty = 1,
148 MiddleEmpty = 2,
149 Single = 100,
150 Front = 200,
151 Middle = 201,
152 Tail = 202,
153 Unpaired = 300
154 };
@ Unpaired
This is an unpaired bunch (either beam1 or beam2).
@ FirstEmpty
The first empty bunch after a train.
@ Tail
The BCID belongs to the last few bunces in a train.
@ Empty
An empty bunch far away from filled bunches.
@ Front
The BCID belongs to the first few bunches in a train.
@ Middle
The BCID belongs to the middle bunches in a train.
@ Single
This is a filled, single bunch (not in a train).
@ MiddleEmpty
An empty BCID in the middle of a train.

◆ BunchDistanceType

Enumeration specifying the units in which to expect the bunch distance type.

To make it clear for the following functions what units to interpret their return values in, it is possible to request their return values in different units.

Enumerator
NanoSec 

Distance in nanoseconds.

BunchCrossings 

Distance in units of 25 nanoseconds.

FilledBunches 

Distance in units of filled bunches (depends on filling scheme).

Definition at line 174 of file IBunchCrossingTool.h.

174 {
175 NanoSec,
179 };
@ BunchCrossings
Distance in units of 25 nanoseconds.
@ NanoSec
Distance in nanoseconds.
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme).

◆ BunchFillType

Enumeration specifying what kind of bunch to use in the gap functions.

The following functions can be used to calculate the gap before and after a specific BCID to some other bunch type. The gap can actually be wrt. two different types of bunches. The user may be interested between the space of two filled bunches, the space between an unpaired bunch and the previous filled bunch, the space between two unpaired bunches, or the space between a filled bunch and the previous unpaired bunch.

The empty type is just put here for completeness. Maybe once we'll be using 25 ns spacing in the bunch trains, this will be a useful parameter as well.

This enumeration helps in answeing all of these questions.

Enumerator
CollidingBunch 

The gap should be calculated wrt. the closest colling bunch.

UnpairedBunch 

The gap should be calculated wrt. the closest unpaired bunch.

EmptyBunch 

The gap should be calculated wrt. the closest empty bunch.

UnpairedBeam1 

The gap should be calculated wrt.

the closest unpaired bunch from beam 1

UnpairedBeam2 

The gap should be calculated wrt.

the closest unpaired bunch from beam 2

Definition at line 274 of file IBunchCrossingTool.h.

274 {
276 CollidingBunch = 0,
278 UnpairedBunch = 1,
280 EmptyBunch = 2,
283 UnpairedBeam1 = 3,
286 UnpairedBeam2 = 4
287 };
@ CollidingBunch
The gap should be calculated wrt. the closest colling bunch.
@ UnpairedBunch
The gap should be calculated wrt. the closest unpaired bunch.
@ EmptyBunch
The gap should be calculated wrt. the closest empty bunch.
@ UnpairedBeam1
The gap should be calculated wrt.
@ UnpairedBeam2
The gap should be calculated wrt.

Member Function Documentation

◆ bcIntensity()

float Trig::BunchCrossingToolBase::bcIntensity ( bcid_type bcid,
BeamType type = Crossing ) const
virtualinherited

Function returning the "intensity" of a given bunch crossing.

Implements Trig::IBunchCrossingTool.

Definition at line 108 of file BunchCrossingToolBase.cxx.

109 {
110
111 // Check if this is a colliding bunch:
112 std::set< BunchCrossing >::const_iterator itr;
113 if( ( itr = m_filledBunches.find( bcid ) ) != m_filledBunches.end() ) {
114 switch( type ) {
115 case Crossing:
116 if( itr->intensityBeam2() > 0.001 ) {
117 ATH_MSG_WARNING( "Crossing intensity not available, ask for "
118 << "separate beam intensities instead" );
119 return 0.0;
120 } else {
121 return itr->intensityBeam1();
122 }
123 case Beam1:
124 if( std::abs( itr->intensityBeam2() ) < 0.001 ) {
125 ATH_MSG_WARNING( "Separate beam intensities not available, ask "
126 << "for the crossing intensity instead" );
127 return 0.0;
128 } else {
129 return itr->intensityBeam1();
130 }
131 break;
132 case Beam2:
133 return itr->intensityBeam2();
134 break;
135 default:
136 ATH_MSG_ERROR( "Unknown intensity type requested (" << type
137 << ")" );
138 return -1.0;
139 }
140 }
141
142 // Check if this is an unpaired bunch:
143 if( ( itr = m_unpairedBunches.find( bcid ) ) !=
144 m_unpairedBunches.end() ) {
145 switch( type ) {
146 case Beam1:
147 return itr->intensityBeam1();
148 break;
149 case Beam2:
150 return itr->intensityBeam2();
151 break;
152 case Crossing:
153 ATH_MSG_WARNING( "Crossing intensity requested for unpaired bunch ("
154 << "bcid=" << bcid << ")" );
155 return 0.0;
156 default:
157 ATH_MSG_ERROR( "Unknown intensity type requested (" << type
158 << ")" );
159 return -1.0;
160 }
161 }
162
163 // If neither, then its intensity is 0.0 by definition:
164 return 0.0;
165 }
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
std::set< Trig::BunchCrossing > m_unpairedBunches
Internal list of unpaired bunches.
std::set< Trig::BunchCrossing > m_filledBunches
List of colliding bunches.

◆ bcType()

IBunchCrossingTool::BunchCrossingType Trig::BunchCrossingToolBase::bcType ( bcid_type bcid) const
virtualinherited

Get the type of the specific bunch crossing.

Implements Trig::IBunchCrossingTool.

Definition at line 168 of file BunchCrossingToolBase.cxx.

168 {
169
170 // First the obvious check:
171 if( ! isFilled( bcid ) ) {
172 // Check if it's an unpaired bunch:
173 if( isUnpaired( bcid ) ) {
174 return Unpaired;
175 }
176 // If the previous bunch crossing is the tail of a bunch train:
177 if( ! distanceFromTail( bcid - 1, BunchCrossings ) ) {
178 return FirstEmpty;
179 }
180 // Check if it's in the middle of a bunch train:
181 std::set< BunchTrain >::const_iterator itr = m_bunchTrains.begin();
182 std::set< BunchTrain >::const_iterator end = m_bunchTrains.end();
183 for( ; itr != end; ++itr ) {
184 if( itr->isInside( bcid ) ) {
185 return MiddleEmpty;
186 }
187 }
188 // If none of the above are true, it has to be a "simple" empty bunch:
189 return Empty;
190 }
191
192 // Now we know that the bunch has to be a filled one...
193
194 // If it's not in a train, it has to be a single filled bunch:
195 if( ! isInTrain( bcid ) ) return Single;
196
197 // Let's check if it is close to the front of a bunch train:
198 int distance = distanceFromFront( bcid, NanoSec );
199 if( ( distance >= 0 ) && ( distance <= m_frontLength ) ) {
200 return Front;
201 }
202 // Now let's check if it's close to the tail of a bunch train:
204 if( ( distance >= 0 ) && ( distance <= m_tailLength ) ) {
205 return Tail;
206 }
207
208 // If none of the above are true, it has to be in the middle of a train:
209 return Middle;
210 }
virtual bool isFilled(bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
virtual int distanceFromFront(bcid_type bcid, BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
virtual bool isUnpaired(bcid_type bcid) const
Function deciding if a given bunch crossing has an unpaired bunch.
virtual int distanceFromTail(bcid_type bcid, BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the tail of the train.
int m_frontLength
Length of the "front" of a bunch train.
std::set< Trig::BunchTrain > m_bunchTrains
Internal list of bunch trains.
virtual bool isInTrain(bcid_type bcid) const
Function deciding if a given bunch crossing is in a filled train.
int m_tailLength
Length of the "tail" of a bunch train.
int distance(const BunchCrossing bc1, const BunchCrossing bc2)
I need this function only for technical reasons.

◆ beginEvent()

StatusCode Trig::TrigConfBunchCrossingTool::beginEvent ( )
protectedvirtual

Function called when a new event is loaded.

Reimplemented from asg::AsgMetadataTool.

Definition at line 83 of file TrigConfBunchCrossingTool.cxx.

83 {
84
85 // Simply call the function doing the heavy lifting:
87
88 // Return gracefully:
89 return StatusCode::SUCCESS;
90 }
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode loadConfig()
Make sure that the latest/correct configuration is loaded.

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, BookkeeperDumperTool, BookkeeperTool, PMGTools::PMGTruthWeightTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, Trig::TrigDecisionTool, Trig::xAODBunchCrossingTool, TrigConf::xAODConfigTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 185 of file AsgMetadataTool.cxx.

185 {
186
187 // Return gracefully:
188 return StatusCode::SUCCESS;
189 }

◆ bunchesAfter()

std::vector< bool > Trig::BunchCrossingToolBase::bunchesAfter ( bcid_type bcid = 0,
int bunches = 10 ) const
virtualinherited

Function returning whether the following bunches were filled, and how.

Implements Trig::IBunchCrossingTool.

Definition at line 701 of file BunchCrossingToolBase.cxx.

702 {
703
704 // The only thing we have to be careful about is the bunches near the
705 // "turnover" region of the BCIDs. That's why I use the BunchCrossing
706 // class here:
707 std::vector< bool > result;
708 for( int i = 0; i < bunches; ++i ) {
709 result.push_back( isFilled( BunchCrossing( bcid ) +
710 BunchCrossing( i ) ) );
711 }
712
713 return result;
714 }

◆ bunchesInFront()

std::vector< bool > Trig::BunchCrossingToolBase::bunchesInFront ( bcid_type bcid,
int bunches = 10 ) const
virtualinherited

Function returning whether the previous bunches were filled, and how.

Implements Trig::IBunchCrossingTool.

Definition at line 685 of file BunchCrossingToolBase.cxx.

686 {
687
688 // The only thing we have to be careful about is the bunches near the
689 // "turnover" region of the BCIDs. That's why I use the BunchCrossing
690 // class here:
691 std::vector< bool > result;
692 for( int i = 0; i < bunches; ++i ) {
693 result.push_back( isFilled( BunchCrossing( bcid ) -
694 BunchCrossing( i ) ) );
695 }
696
697 return result;
698 }

◆ bunchIntAfter()

std::vector< float > Trig::BunchCrossingToolBase::bunchIntAfter ( bcid_type bcid,
int bunches = 10,
BeamType type = Crossing ) const
virtualinherited

Function returning the intensities of the bunch crossings after the reference.

Implements Trig::IBunchCrossingTool.

Definition at line 748 of file BunchCrossingToolBase.cxx.

750 {
751
752 std::vector< float > result;
753 for( int i = 0; i < bunches; ++i ) {
754 std::set< BunchCrossing >::const_iterator itr =
755 m_filledBunches.find( BunchCrossing( bcid ) + BunchCrossing( i ) );
756 if( itr != m_filledBunches.end() ) {
757 switch( type ) {
758 case Beam1:
759 case Crossing:
760 result.push_back( itr->intensityBeam1() );
761 break;
762 case Beam2:
763 result.push_back( itr->intensityBeam2() );
764 break;
765 default:
766 ATH_MSG_ERROR( "Unknown intensity type requested ("
767 << type << ")" );
768 return result;
769 }
770 } else {
771 result.push_back( 0.0 );
772 }
773 }
774
775 return result;
776 }

◆ bunchIntInFront()

std::vector< float > Trig::BunchCrossingToolBase::bunchIntInFront ( bcid_type bcid,
int bunches = 10,
BeamType type = Crossing ) const
virtualinherited

Function returning the intensities of the bunch crossings before the reference.

Implements Trig::IBunchCrossingTool.

Definition at line 717 of file BunchCrossingToolBase.cxx.

719 {
720
721 std::vector< float > result;
722 for( int i = 0; i < bunches; ++i ) {
723 std::set< BunchCrossing >::const_iterator itr =
724 m_filledBunches.find( BunchCrossing( bcid ) - BunchCrossing( i ) );
725 if( itr != m_filledBunches.end() ) {
726 switch( type ) {
727 case Beam1:
728 case Crossing:
729 result.push_back( itr->intensityBeam1() );
730 break;
731 case Beam2:
732 result.push_back( itr->intensityBeam2() );
733 break;
734 default:
735 ATH_MSG_ERROR( "Unknown intensity type requested ("
736 << type << ")" );
737 return result;
738 }
739 } else {
740 result.push_back( 0.0 );
741 }
742 }
743
744 return result;
745 }

◆ bunchSpacing()

int Trig::BunchCrossingToolBase::bunchSpacing ( const std::vector< int > & bunches) const
privateinherited

Get the apparent bunch spacing in the current configuration.

This function tries to figure out what's the right bunch spacing for the current configuration, before the code would try to properly interpret the configuration.

This allows us to set a "MaxBunchSpacing" property of a relatively large number, but still be able to interpret configurations with very small gaps between bunch trains. (Like the 8b4e 2017 configurations.)

Parameters
bunchesThe filled bunches in the current configuration
Returns
The apparent bunch spacing of the configuration in bunch crossings

Definition at line 1192 of file BunchCrossingToolBase.cxx.

1193 {
1194
1195 // The maximum BC spacing to start from.
1196 const int maxSpacing = m_maxBunchSpacing / BunchCrossing::BUNCH_SPACING;
1197
1198 // Iterate downwards from the maximum spacing, searching for the minimum
1199 // spacing with which bunches exist.
1200 int result = maxSpacing;
1201 for( ; result > 0; --result ) {
1202
1203 // Test how many bunches have neighbors inside of the current window.
1204 const int nbunches =
1205 std::count_if( bunches.begin(), bunches.end(),
1206 count_bunch_neighbors( bunches, result ) );
1207 ATH_MSG_VERBOSE( "Number of bunches with " << result
1208 << " BC neighbors: " << nbunches );
1209
1210 // If none of them do, then we're finished.
1211 if( ! nbunches ) {
1212 // If we're not at the max spacing anymore, then it means that in
1213 // the previous step there were still bunches with neighbors in this
1214 // window. That's the spacing we need then.
1215 //
1216 // But if we're still at the maximum spacing, then let's just keep
1217 // that as the final answer.
1218 if( result != maxSpacing ) {
1219 ++result;
1220 }
1221 break;
1222 }
1223 }
1224 // If we went down to 0, then the right answer is 1. This is just how this
1225 // algorithm works...
1226 if( result == 0 ) {
1227 result = 1;
1228 }
1229 ATH_MSG_DEBUG( "Bunch spacing: " << result << " BCs" );
1230
1231 // Return the smallest spacing found:
1232 return result;
1233 }
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
int m_maxBunchSpacing
The maximum bunch spacing that the tool should consider.
static const int BUNCH_SPACING
Minimum spacing between the bunches, in nanoseconds.

◆ bunchTrainSpacing()

int Trig::BunchCrossingToolBase::bunchTrainSpacing ( BunchDistanceType type = NanoSec) const
virtualinherited

Get the bunch spacing in the trains.

Implements Trig::IBunchCrossingTool.

Definition at line 794 of file BunchCrossingToolBase.cxx.

794 {
795
796 // Check if there are bunch trains in the current configurations:
797 if( m_bunchTrains.size() ) {
798 switch( type ) {
799 case NanoSec:
800 return m_bunchTrains.begin()->spacing();
801 break;
802 case BunchCrossings:
803 return ( m_bunchTrains.begin()->spacing() /
805 break;
806 case FilledBunches:
807 ATH_MSG_ERROR( "Function should not be called with argument: "
808 "FilledBunches" );
809 return -1;
810 break;
811 default:
812 ATH_MSG_ERROR( "Function called with unknown argument: " << type );
813 return -1;
814 }
815 } else {
816 // Return -1 if there are no bunch trains in the configuration:
817 return -1;
818 }
819
820 ATH_MSG_FATAL( "The code should never reach this line. Check the code!" );
821 return -1;
822 }
#define ATH_MSG_FATAL(x)

◆ configID()

IBunchCrossingConfProvider::configid_type Trig::TrigConfBunchCrossingTool::configID ( ) const
privatevirtual

Unique identifier for the current configuration.

This specialization of the function just returns the BGKey of the currently loaded configuration.

This is the simplest implementation for this function...

Implements Trig::IBunchCrossingConfProvider.

Definition at line 97 of file TrigConfBunchCrossingTool.cxx.

97 {
98
99 return static_cast< configid_type >( m_bgId );
100 }
unsigned int configid_type
Declare the interface that this class provides.
unsigned int m_bgId
DB ID of the BunchGroups settings which was loaded last.

◆ configuredBCIDs()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredBCIDs ( ) const
virtualinherited

Function providing the BCIDs of the configured colliding bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be filled, into the output vector.

See also
BunchCrossingConfProviderBase::configuredIntensitiesBeam1()
BunchCrossingConfProviderBase::configuredIntensitiesBeam2()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 28 of file BunchCrossingConfProviderBase.cxx.

28 {
29
30 std::vector< int > bunches;
31 for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
32 if( isFilled( i ) ) {
33 bunches.push_back( i );
34 }
35 }
36
37 return bunches;
38 }
static const int MAX_BCID
The maximum number of bunches that can be in the LHC.
virtual bool isFilled(bcid_type bcid=0) const =0
The simplest query: Is the bunch crossing filled or not?

◆ configuredIntensitiesBeam1()

std::vector< float > Trig::TrigConfBunchCrossingTool::configuredIntensitiesBeam1 ( ) const
privatevirtual

Override the default implementation because this tool doesn't provide this info.

This function will always return an empty vector, because this tool doesn't provide this sort of information.

While saving the default 1.0 values for all the filled bunches would have the same result right now, the tools may handle the absence of the intensity information in different ways in the future.

Returns
An empty vector

Reimplemented from Trig::BunchCrossingConfProviderBase.

Definition at line 112 of file TrigConfBunchCrossingTool.cxx.

112 {
113
114 return std::vector< float >();
115 }

◆ configuredIntensitiesBeam2()

std::vector< float > Trig::TrigConfBunchCrossingTool::configuredIntensitiesBeam2 ( ) const
privatevirtual

Override the default implementation because this tool doesn't provide this info.

This function will always return an empty vector, because this tool doesn't provide this sort of information.

While saving the default 1.0 values for all the filled bunches would have the same result right now, the tools may handle the absence of the intensity information in different ways in the future.

Returns
An empty vector

Reimplemented from Trig::BunchCrossingConfProviderBase.

Definition at line 127 of file TrigConfBunchCrossingTool.cxx.

127 {
128
129 return std::vector< float >();
130 }

◆ configuredUnpairedBCIDsBeam1()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam1 ( ) const
virtualinherited

Function providing the BCIDs of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be unpaired, into the output vector.

See also
BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam1()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 88 of file BunchCrossingConfProviderBase.cxx.

88 {
89
90 std::vector< int > bunches;
91 for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
92 if( isUnpaired( i ) && isBeam1( i ) ) {
93 bunches.push_back( i );
94 }
95 }
96
97 return bunches;
98 }
virtual bool isUnpaired(bcid_type bcid=0) const =0
Function deciding if a given bunch crossing has an unpaired bunch.
virtual bool isBeam1(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 1" in this bunch crossing.

◆ configuredUnpairedBCIDsBeam2()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam2 ( ) const
virtualinherited

Function providing the BCIDs of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be unpaired, into the output vector.

See also
BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam2()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 108 of file BunchCrossingConfProviderBase.cxx.

108 {
109
110 std::vector< int > bunches;
111 for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
112 if( isUnpaired( i ) && isBeam2( i ) ) {
113 bunches.push_back( i );
114 }
115 }
116
117 return bunches;
118 }
virtual bool isBeam2(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 2" in this bunch crossing.

◆ configuredUnpairedIntensitiesBeam1()

std::vector< float > Trig::TrigConfBunchCrossingTool::configuredUnpairedIntensitiesBeam1 ( ) const
privatevirtual

Override the default implementation because this tool doesn't provide this info.

This function will always return an empty vector, because this tool doesn't provide this sort of information.

While saving the default 1.0 values for all the unpaired bunches would have the same result right now, the tools may handle the absence of the intensity information in different ways in the future.

Returns
An empty vector

Reimplemented from Trig::BunchCrossingConfProviderBase.

Definition at line 142 of file TrigConfBunchCrossingTool.cxx.

142 {
143
144 return std::vector< float >();
145 }

◆ configuredUnpairedIntensitiesBeam2()

std::vector< float > Trig::TrigConfBunchCrossingTool::configuredUnpairedIntensitiesBeam2 ( ) const
privatevirtual

Override the default implementation because this tool doesn't provide this info.

This function will always return an empty vector, because this tool doesn't provide this sort of information.

While saving the default 1.0 values for all the unpaired bunches would have the same result right now, the tools may handle the absence of the intensity information in different ways in the future.

Returns
An empty vector

Reimplemented from Trig::BunchCrossingConfProviderBase.

Definition at line 157 of file TrigConfBunchCrossingTool.cxx.

157 {
158
159 return std::vector< float >();
160 }

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ distanceFromFront()

int Trig::BunchCrossingToolBase::distanceFromFront ( bcid_type bcid,
BunchDistanceType type = NanoSec ) const
virtualinherited

The distance of the specific bunch crossing from the front of the train.

This is one of the most tricky functions of this class.

When the user wants to ask the distance of a bunch crossing from the front of its train in units of nano seconds or bunch crossings, the main part of the logic is propagated to the algebra defined for the BunchCrossing class.

But when the user wants to know the distance in terms of filled bunches, the code has to treat 3 different bunch train configurations:

  • First is when the bunch train doesn't spread across the "BCID turnover". The code in this case just has to see how many steps it is from bunchtrain->begin().
  • If the bunch train spreads across the "BCID turnover", and the bcid is after BCID==0, the code has to count the filled bunches from bunchtrain->train_front() to bunchtrain->end(), plus the filled bunches from bunchtrain->begin() to the bcid in question.
  • If the bunch train spreads across the "BCID turnover", and the bcid is "before" BCID==0, the code has to count the filled bunches from bunchtrain->train_front() to the bcid in question.
Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
The distance of the bcid in question from the front of its bunch train

Implements Trig::IBunchCrossingTool.

Definition at line 241 of file BunchCrossingToolBase.cxx.

242 {
243
244 // Look for this BCID in the list of bunch trains:
245 std::set< BunchTrain >::const_iterator itr = m_bunchTrains.begin();
246 std::set< BunchTrain >::const_iterator end = m_bunchTrains.end();
247 for( ; itr != end; ++itr ) {
248 BunchTrain::const_iterator element;
249 if( ( element = itr->find( bcid ) ) != itr->end() ) {
250 switch( type ) {
251
252 case NanoSec:
253 return BunchCrossing::BUNCH_SPACING * ( BunchCrossing( bcid ) -
254 *( itr->train_front() ) );
255 break;
256 case BunchCrossings:
257 return ( BunchCrossing( bcid ) - *( itr->train_front() ) );
258 break;
259 case FilledBunches:
260 if( *( itr->train_front() ) > *( itr->train_back() ) ) {
261 if( BunchCrossing( bcid ) <= *( itr->train_back() ) ) {
262 return ( std::count_if( itr->begin(), element,
263 std::bind( std::not_equal_to< BunchCrossing >(),
264 *element, std::placeholders::_1 ) ) +
265 std::count_if( itr->train_front(), itr->end(),
266 std::bind( std::not_equal_to< BunchCrossing >(),
267 *element, std::placeholders::_1 ) ) );
268 } else {
269 return std::count_if( itr->train_front(), element,
270 std::bind( std::not_equal_to< BunchCrossing >(),
271 *element, std::placeholders::_1 ) );
272 }
273 } else {
274 return std::count_if( itr->begin(), element,
275 std::bind( std::not_equal_to< BunchCrossing >(),
276 *element, std::placeholders::_1 ) );
277 }
278 break;
279 default:
280 ATH_MSG_ERROR( "BunchDistanceType not understood!" );
281 return -1;
282 }
283 }
284 }
285
286 // If the bunch crossing is not part of a train:
287 return -1;
288 }

◆ distanceFromTail()

int Trig::BunchCrossingToolBase::distanceFromTail ( bcid_type bcid,
BunchDistanceType type = NanoSec ) const
virtualinherited

The distance of the specific bunch crossing from the tail of the train.

This is one of the most tricky functions of this class.

When the user wants to ask the distance of a bunch crossing from the tail of its train in units of nano seconds or bunch crossings, the main part of the logic is propagated to the algebra defined for the BunchCrossing class.

But when the user wants to know the distance in terms of filled bunches, the code has to treat 3 different bunch train configurations:

  • First is when the bunch train doesn't spread across the "BCID turnover". The code in this case just has to see how many steps it is from bunchtrain->end().
  • If the bunch train spreads across the "BCID turnover", and the bcid is "before" BCID==0, the code has to count the filled bunches from the bcid in question to bunchtrain->end(), plus the filled bunches from bunchtrain->begin() to bunchtrain->train_back().
  • If the bunch train spreads across the "BCID turnover", and the bcid is after BCID==0, the code has to count the filled bunches from the bcid in question to bunchtrain->train_back().
Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
The distance of the bcid in question from the tail of its bunch train

Implements Trig::IBunchCrossingTool.

Definition at line 318 of file BunchCrossingToolBase.cxx.

319 {
320
321 // Look for this BCID in the list of bunch trains:
322 std::set< BunchTrain >::const_iterator itr = m_bunchTrains.begin();
323 std::set< BunchTrain >::const_iterator end = m_bunchTrains.end();
324 for( ; itr != end; ++itr ) {
325 BunchTrain::const_iterator element;
326 if( ( element = itr->find( bcid ) ) != itr->end() ) {
327 switch( type ) {
328
329 case NanoSec:
330 return BunchCrossing::BUNCH_SPACING * ( *( itr->train_back() ) -
331 BunchCrossing( bcid ) );
332 break;
333 case BunchCrossings:
334 return ( *( itr->train_back() ) - BunchCrossing( bcid ) );
335 break;
336 case FilledBunches:
337 if( *( itr->train_front() ) > *( itr->train_back() ) ) {
338 if( BunchCrossing( bcid ) > *( itr->train_back() ) ) {
339 return ( std::count_if( element, itr->end(),
340 std::bind( std::not_equal_to< BunchCrossing >(),
341 *element, std::placeholders::_1 ) ) +
342 std::count_if( itr->begin(), ++( itr->train_back() ),
343 std::bind( std::not_equal_to< BunchCrossing >(),
344 *element, std::placeholders::_1 ) ) );
345 } else {
346 return std::count_if( element, ++( itr->train_back() ),
347 std::bind( std::not_equal_to< BunchCrossing >(),
348 *element, std::placeholders::_1 ) );
349 }
350 } else {
351 return std::count_if( element, itr->end(),
352 std::bind( std::not_equal_to< BunchCrossing >(),
353 *element, std::placeholders::_1 ) );
354 }
355 break;
356 default:
357 ATH_MSG_ERROR( "BunchDistanceType not understood!" );
358 return -1;
359 }
360 }
361 }
362
363 // If the bunch crossing is not part of a train:
364 return -1;
365 }

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193 {
194
195 // Return gracefully:
196 return StatusCode::SUCCESS;
197 }

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ gapAfterBunch()

int Trig::BunchCrossingToolBase::gapAfterBunch ( bcid_type bcid,
BunchDistanceType dtype = NanoSec,
BunchFillType ftype = CollidingBunch ) const
virtualinherited

Gap after a particular bunch.

The function creates a smart BunchCrossing out of the BCID provided, then it goes looking for the next bunch crossing of the specified type.

Finally it just calculates the distance between the two bunch crossings in the requested units. It can return the size of the gap either in nanoseconds or in BCIDs (25 ns steps).

Parameters
bcidThe bcid that should be investigated
dtypeThe type of the requested return value
ftypeThe type of the previous bunch to consider
Returns
The gap after the specified bcid

Implements Trig::IBunchCrossingTool.

Definition at line 575 of file BunchCrossingToolBase.cxx.

577 {
578
579 // Construct this "smart" BCID:
580 const BunchCrossing bunch( bcid );
581
582 // Search for the first next bunch that fulfills the requirement:
583 BunchCrossing next_bunch( bunch );
584 ++next_bunch;
585 int loop_counter = 0;
586 switch( ftype ) {
587
588 case CollidingBunch:
589 // There should always be filled bunches in the configuration, but
590 // let's make sure that we don't get into an endless loop:
591 while( ( ! isFilled( next_bunch ) ) &&
592 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
593 ++next_bunch;
594 ++loop_counter;
595 }
596 if( loop_counter == BunchCrossing::MAX_BCID ) {
597 ATH_MSG_ERROR( "Failed to calculate gap after BCID "
598 << bcid << " to a filled bunch! This shouldn't have "
599 << "happened!" );
600 return -1;
601 }
602 break;
603 case UnpairedBunch:
604 // There are no unpaired bunches in every configuration, so make sure
605 // we don't get into an endless loop:
606 while( ( ! isUnpaired( next_bunch ) ) &&
607 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
608 ++next_bunch;
609 ++loop_counter;
610 }
611 // Return "-1" if there are no unpaired bunches in the configuration:
612 if( loop_counter == BunchCrossing::MAX_BCID ) {
613 return -1;
614 }
615 break;
616 case UnpairedBeam1:
617 // There are no unpaired bunches from beam 1 in every configuration, so
618 // make sure we don't get into an endless loop:
619 while( ( ! ( isUnpaired( next_bunch ) && isBeam1( next_bunch ) ) ) &&
620 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
621 ++next_bunch;
622 ++loop_counter;
623 }
624 // Return "-1" if there are no unpaired bunches from beam 1 in the
625 // configuration:
626 if( loop_counter == BunchCrossing::MAX_BCID ) {
627 return -1;
628 }
629 break;
630 case UnpairedBeam2:
631 // There are no unpaired bunches from beam 2 in every configuration, so
632 // make sure we don't get into an endless loop:
633 while( ( ! ( isUnpaired( next_bunch ) && isBeam2( next_bunch ) ) ) &&
634 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
635 ++next_bunch;
636 ++loop_counter;
637 }
638 // Return "-1" if there are no unpaired bunches from beam 2 in the
639 // configuration:
640 if( loop_counter == BunchCrossing::MAX_BCID ) {
641 return -1;
642 }
643 break;
644 case EmptyBunch:
645 // There should always be empty bunches in the configuration, but let's
646 // make sure that we don't get into an endless loop:
647 while( ( isFilled( next_bunch ) || isUnpaired( next_bunch ) ) &&
648 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
649 ++next_bunch;
650 ++loop_counter;
651 }
652 if( loop_counter == BunchCrossing::MAX_BCID ) {
653 ATH_MSG_ERROR( "Failed to calculate gap after BCID "
654 << bcid << " to an empty bunch! This shouldn't have "
655 << "happened!" );
656 return -1;
657 }
658 break;
659 default:
660 ATH_MSG_ERROR( "Unknown bunch fill type specified: "
661 << ftype );
662 return -1;
663 }
664
665 // Now return the results:
666 switch( dtype ) {
667
668 case NanoSec:
669 return BunchCrossing::BUNCH_SPACING * bunch.gapTo( next_bunch );
670 break;
671 case BunchCrossings:
672 return bunch.gapTo( next_bunch );
673 break;
674 default:
675 ATH_MSG_ERROR( "You can only use NanoSec or BunchCrossings for type "
676 "for gapBeforeBunch" );
677 return -1;
678 }
679
680 // This should actually never be reached:
681 return -1;
682 }
virtual bool isBeam1(bcid_type bcid) const
Function deciding if there was a bunch from "beam 1" in this bunch crossing.
virtual bool isBeam2(bcid_type bcid) const
Function deciding if there was a bunch from "beam 2" in this bunch crossing.

◆ gapAfterTrain()

int Trig::BunchCrossingToolBase::gapAfterTrain ( bcid_type bcid,
BunchDistanceType type = NanoSec ) const
virtualinherited

Gap after the train this BCID is in.

The function first finds the train that the specified BCID is in.

Then it calculates the size of the gap after this train. It can return the size of the gap either in nanoseconds or in BCIDs (25 ns steps).

Parameters
bcidThe bcid whose train should be investigated
typeThe type of the requested return value
Returns
The gap after the train of the specified bcid

Implements Trig::IBunchCrossingTool.

Definition at line 414 of file BunchCrossingToolBase.cxx.

414 {
415 const auto train = std::ranges::find_if(m_bunchTrains,
416 [bcid](const BunchTrain& bunchTrain) {
417 return bunchTrain.contains(bcid);
418 });
419 // If we didn't find this BCID in a train, let's return right away:
420 if( train == m_bunchTrains.end() ) {
421 return -1;
422 }
423 // Search for the first filled bunch after the back of this train:
424 BunchCrossing train_front = *( train->train_back() );
425 do {++train_front; } while (!isFilled(train_front));
426 const auto dist = train_front.distance(*train->train_back());
427 // Now return the results:
428 switch( type ) {
429 case NanoSec:
430 return BunchCrossing::BUNCH_SPACING * dist;
431 break;
432 case BunchCrossings:
433 return dist;
434 break;
435 default:
436 ATH_MSG_ERROR( "You can only use NanoSec or BunchCrossings for type "
437 "for gapAfterTrain" );
438 return -1;
439 }
440 }

◆ gapBeforeBunch()

int Trig::BunchCrossingToolBase::gapBeforeBunch ( bcid_type bcid,
BunchDistanceType dtype = NanoSec,
BunchFillType ftype = CollidingBunch ) const
virtualinherited

Gap before a particular bunch.

The function creates a smart BunchCrossing out of the BCID provided, then it goes looking for the previous bunch crossing of the specified type.

Finally it just calculates the distance between the two bunch crossings in the requested units. It can return the size of the gap either in nanoseconds or in BCIDs (25 ns steps).

Parameters
bcidThe bcid that should be investigated
dtypeThe type of the requested return value
ftypeThe type of the previous bunch to consider
Returns
The gap before the specified bcid

Implements Trig::IBunchCrossingTool.

Definition at line 454 of file BunchCrossingToolBase.cxx.

456 {
457
458 // Construct this "smart" BCID:
459 const BunchCrossing bunch( bcid );
460
461 // Search for the first previous bunch that fulfills the requirement:
462 BunchCrossing prev_bunch( bunch );
463 --prev_bunch;
464 int loop_counter = 0;
465 switch( ftype ) {
466
467 case CollidingBunch:
468 // There should always be filled bunches in the configuration, but
469 // let's make sure that we don't get into an endless loop:
470 while( ( ! isFilled( prev_bunch ) ) &&
471 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
472 --prev_bunch;
473 ++loop_counter;
474 }
475 if( loop_counter == BunchCrossing::MAX_BCID ) {
476 ATH_MSG_ERROR( "Failed to calculate gap before BCID "
477 << bcid << " to a filled bunch! This shouldn't have "
478 << "happened!" );
479 return -1;
480 }
481 break;
482 case UnpairedBunch:
483 // There are no unpaired bunches in every configuration, so make sure
484 // we don't get into an endless loop:
485 while( ( ! isUnpaired( prev_bunch ) ) &&
486 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
487 --prev_bunch;
488 ++loop_counter;
489 }
490 // Return "-1" if there are no unpaired bunches in the configuration:
491 if( loop_counter == BunchCrossing::MAX_BCID ) {
492 return -1;
493 }
494 break;
495 case UnpairedBeam1:
496 // There are no unpaired bunches from beam 1 in every configuration, so
497 // make sure we don't get into an endless loop:
498 while( ( ! ( isUnpaired( prev_bunch ) && isBeam1( prev_bunch ) ) ) &&
499 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
500 --prev_bunch;
501 ++loop_counter;
502 }
503 // Return "-1" if there are no unpaired bunches from beam 1 in the
504 // configuration:
505 if( loop_counter == BunchCrossing::MAX_BCID ) {
506 return -1;
507 }
508 break;
509 case UnpairedBeam2:
510 // There are no unpaired bunches from beam 2 in every configuration, so
511 // make sure we don't get into an endless loop:
512 while( ( ! ( isUnpaired( prev_bunch ) && isBeam2( prev_bunch ) ) ) &&
513 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
514 --prev_bunch;
515 ++loop_counter;
516 }
517 // Return "-1" if there are no unpaired bunches from beam 2 in the
518 // configuration:
519 if( loop_counter == BunchCrossing::MAX_BCID ) {
520 return -1;
521 }
522 break;
523 case EmptyBunch:
524 // There should always be empty bunches in the configuration, but let's
525 // make sure that we don't get into an endless loop:
526 while( ( isFilled( prev_bunch ) || isUnpaired( prev_bunch ) ) &&
527 ( loop_counter < BunchCrossing::MAX_BCID ) ) {
528 --prev_bunch;
529 ++loop_counter;
530 }
531 if( loop_counter == BunchCrossing::MAX_BCID ) {
532 ATH_MSG_ERROR( "Failed to calculate gap before BCID "
533 << bcid << " to an empty bunch! This shouldn't have "
534 << "happened!" );
535 return -1;
536 }
537 break;
538 default:
539 ATH_MSG_ERROR( "Unknown bunch fill type specified: "
540 << ftype );
541 return -1;
542 }
543
544 // Now return the results:
545 switch( dtype ) {
546
547 case NanoSec:
548 return BunchCrossing::BUNCH_SPACING * bunch.gapFrom( prev_bunch );
549 break;
550 case BunchCrossings:
551 return bunch.gapFrom( prev_bunch );
552 break;
553 default:
554 ATH_MSG_ERROR( "You can only use NanoSec or BunchCrossings for type "
555 "for gapBeforeBunch" );
556 return -1;
557 }
558
559 // This should actually never be reached:
560 return -1;
561 }

◆ gapBeforeTrain()

int Trig::BunchCrossingToolBase::gapBeforeTrain ( bcid_type bcid,
BunchDistanceType type = NanoSec ) const
virtualinherited

Gap before the train this BCID is in.

The function first finds the train that the specified BCID is in.

Then it calculates the size of the gap before this train. It can return the size of the gap either in nanoseconds or in BCIDs (25 ns steps).

Parameters
bcidThe bcid whose train should be investigated
typeThe type of the requested return value
Returns
The gap before the train of the specified bcid

Implements Trig::IBunchCrossingTool.

Definition at line 376 of file BunchCrossingToolBase.cxx.

376 {
377 const auto train = std::ranges::find_if(m_bunchTrains,
378 [bcid](const BunchTrain& bunchTrain) {
379 return bunchTrain.contains(bcid);
380 });
381 // If we didn't find this BCID in a train, let's return right away:
382 if( train == m_bunchTrains.end() ) {
383 return -1;
384 }
385 // Search for the first filled bunch before the front of this train:
386 BunchCrossing trainFront = *train->train_front();
387 BunchCrossing prevFilled = trainFront;
388 while (!isFilled(--prevFilled));
389 auto dist = train->train_front()->distance( prevFilled );
390 // Now return the results:
391 switch( type ) {
392 case NanoSec:
393 return BunchCrossing::BUNCH_SPACING * dist;
394 break;
395 case BunchCrossings:
396 return dist;
397 break;
398 default:
399 ATH_MSG_ERROR( "You can only use NanoSec or BunchCrossings for type "
400 "for gapBeforeTrain" );
401 return -1;
402 }
403 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident & inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/Event.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135 {
136
137 // Tell the user what's happening:
138 ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139
140 // Call the appropriate member function:
141 if( inc.type() == IncidentType::BeginInputFile ) {
143 if( beginInputFile().isFailure() ) {
144 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145 throw std::runtime_error( "Couldn't call beginInputFile()" );
146 }
147 } else if( inc.type() == IncidentType::EndInputFile ) {
148 if( endInputFile().isFailure() ) {
149 ATH_MSG_FATAL( "Failed to call endInputFile()" );
150 throw std::runtime_error( "Couldn't call endInputFile()" );
151 }
152 } else if( inc.type() == IncidentType::BeginEvent ) {
153 // If the tool didn't catch the begin input file incident for the
154 // first input file of the job, then call the appropriate function
155 // now.
156 if( ! m_beginInputFileCalled ) {
158 if( beginInputFile().isFailure() ) {
159 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160 throw std::runtime_error( "Couldn't call beginInputFile()" );
161 }
162 }
163 if( beginEvent().isFailure() ) {
164 ATH_MSG_FATAL( "Failed to call beginEvent()" );
165 throw std::runtime_error( "Couldn't call beginEvent()" );
166 }
167
168 #ifdef XAOD_STANDALONE
169 } else if( inc.type() == IncidentType::MetaDataStop ) {
170 if( metaDataStop().isFailure() ) {
171 ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172 throw std::runtime_error( "Couldn't call metaDataStop()" );
173 }
174
175 #endif // XAOD_STANDALONE
176 } else {
177 ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178 }
179
180 return;
181 }
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.

◆ initialize()

StatusCode Trig::TrigConfBunchCrossingTool::initialize ( void )
privatevirtual

Create a proper constructor for Athena.

Regular AlgTool initialization function

Reimplemented from asg::AsgTool.

Definition at line 50 of file TrigConfBunchCrossingTool.cxx.

50 {
51
52 // Reset he bunch group ID, so at the next update we definitely
53 // load a new configuration:
54 m_bgId = -1;
55
56 // Report about the initialization:
57 ATH_MSG_INFO( "Initializing TrigConfBunchCrossingTool" );
58 ATH_MSG_INFO( " Maximal bunch spacing: " << m_maxBunchSpacing << " ns" );
59 ATH_MSG_INFO( " Length of train front: " << m_frontLength << " ns" );
60 ATH_MSG_INFO( " Length of train tail : " << m_tailLength << " ns" );
61#ifndef XAOD_STANDALONE
62 ATH_MSG_DEBUG( " LVL1 config service : " << m_configSvc );
63#endif // XAOD_STANDALONE
64 ATH_MSG_DEBUG( " Trig config tool : " << m_configTool );
65
66 // Retrieve the trigger configuration service/tool:
67#ifndef XAOD_STANDALONE
68 if (!m_configTool.empty()) {
69 ATH_MSG_DEBUG( " xAODConfigTool is set - will read from xAOD metadata" );
70 ATH_CHECK( m_configTool.retrieve() );
71 } else {
72 ATH_MSG_DEBUG( " xAODConfigTool is not set - will read from xAODConfigSvc" );
73 ATH_CHECK( m_configSvc.retrieve() );
74 }
75#else
76 ATH_CHECK( m_configTool.retrieve() );
77#endif // not XAOD_STANDALONE
78
79 // Return gracefully:
80 return StatusCode::SUCCESS;
81 }
#define ATH_MSG_INFO(x)
ToolHandle< TrigConf::ITrigConfigTool > m_configTool
The config tool handle.
ServiceHandle< TrigConf::ILVL1ConfigSvc > m_configSvc
The config service handle.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93 {
94
95#ifdef XAOD_STANDALONE
96 return &m_inputMetaStore;
97#else // XAOD_STANDALONE
98 return m_inputMetaStore;
99#endif // XAOD_STANDALONE
100 }
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.

◆ isBeam1()

bool Trig::BunchCrossingToolBase::isBeam1 ( bcid_type bcid) const
virtualinherited

Function deciding if there was a bunch from "beam 1" in this bunch crossing.

Implements Trig::IBunchCrossingTool.

Definition at line 68 of file BunchCrossingToolBase.cxx.

68 {
69
70 // Check if this is a filled bunch:
71 std::set< BunchCrossing >::const_iterator itr_fill =
72 m_filledBunches.find( bcid );
73 if( itr_fill != m_filledBunches.end() ) {
74 return true;
75 }
76
77 // Check if this is an unpaired bunch with the bunch in beam 1:
78 std::set< BunchCrossing >::const_iterator itr_unp =
79 m_unpairedBunches.find( bcid );
80 if( ( itr_unp != m_unpairedBunches.end() ) &&
81 ( itr_unp->intensityBeam1() > 0.001 ) ) {
82 return true;
83 } else {
84 return false;
85 }
86 }

◆ isBeam2()

bool Trig::BunchCrossingToolBase::isBeam2 ( bcid_type bcid) const
virtualinherited

Function deciding if there was a bunch from "beam 2" in this bunch crossing.

Implements Trig::IBunchCrossingTool.

Definition at line 88 of file BunchCrossingToolBase.cxx.

88 {
89
90 // Check if this is a filled bunch:
91 std::set< BunchCrossing >::const_iterator itr_fill =
92 m_filledBunches.find( bcid );
93 if( itr_fill != m_filledBunches.end() ) {
94 return true;
95 }
96
97 // Check if this is an unpaired bunch with the bunch in beam 1:
98 std::set< BunchCrossing >::const_iterator itr_unp =
99 m_unpairedBunches.find( bcid );
100 if( ( itr_unp != m_unpairedBunches.end() ) &&
101 ( itr_unp->intensityBeam2() > 0.001 ) ) {
102 return true;
103 } else {
104 return false;
105 }
106 }

◆ isFilled()

bool Trig::BunchCrossingToolBase::isFilled ( bcid_type bcid) const
virtualinherited

The simplest query: Is the bunch crossing filled or not?

Implements Trig::IBunchCrossingTool.

Definition at line 34 of file BunchCrossingToolBase.cxx.

34 {
35
36 // Check if this is a filled bunch crossing:
37 if( m_filledBunches.find( bcid ) != m_filledBunches.end() ) {
38 return true;
39 } else {
40 return false;
41 }
42 }

◆ isInTrain()

bool Trig::BunchCrossingToolBase::isInTrain ( bcid_type bcid) const
virtualinherited

Function deciding if a given bunch crossing is in a filled train.

Implements Trig::IBunchCrossingTool.

Definition at line 44 of file BunchCrossingToolBase.cxx.

44 {
45
46 // Look for this BCID in the list of bunch trains:
47 std::set< BunchTrain >::const_iterator itr = m_bunchTrains.begin();
48 std::set< BunchTrain >::const_iterator end = m_bunchTrains.end();
49 for( ; itr != end; ++itr ) {
50 if( itr->find( bcid ) != itr->end() ) {
51 return true;
52 }
53 }
54
55 return false;
56 }

◆ isUnpaired()

bool Trig::BunchCrossingToolBase::isUnpaired ( bcid_type bcid) const
virtualinherited

Function deciding if a given bunch crossing has an unpaired bunch.

Implements Trig::IBunchCrossingTool.

Definition at line 58 of file BunchCrossingToolBase.cxx.

58 {
59
60 // Check if this is an unpaired bunch crossing:
61 if( m_unpairedBunches.find( bcid ) != m_unpairedBunches.end() ) {
62 return true;
63 } else {
64 return false;
65 }
66 }

◆ loadBunchTrains()

StatusCode Trig::BunchCrossingToolBase::loadBunchTrains ( const std::vector< int > & bunches,
const std::vector< float > & bunch_int1 = std::vector< float >(),
const std::vector< float > & bunch_int2 = std::vector< float >() )
protectedinherited

Interpret the configuration for bunch trains.

This function takes care of identifying the bunch trains in the configuration.

The algorithm is quite simple. It starts off with all the filled bunches that have not been identified as single bunches by the loadSingleBunches(...) function. It takes the first available bunch crossing, then loops over the rest of them. When it finds a BC that's "close enough" to the current bunch train, then the bunch train is extended. From there on the algorithm continues with this extended bunch train. When the loop reaches the end of the available bunches, the created bunch train is added to the cache, and the algorithms starts again with the first still available bunch crossing.

The bunch intensity parameter is optional. If it's not specified, the code will assign an intensity of "1.0" to all the bunch crossings.

Parameters
bunchesThe filled bunch crossings
bunch_intThe "intensities" of the paired bunches
Returns
StatusCode::SUCCESS if the interpretation was successful, StatusCode::FAILURE otherwise

Definition at line 953 of file BunchCrossingToolBase.cxx.

956 {
957
958 // Do a small sanity check:
959 if( ( ( bunches.size() != bunch_int1.size() ) && bunch_int1.size() ) ||
960 ( ( bunches.size() != bunch_int2.size() ) && bunch_int2.size() ) ) {
961 ATH_MSG_ERROR( "Received vectors of different sizes for the bunch "
962 "IDs and bunch intensities\n"
963 "Function can not work like this..." );
964 return StatusCode::FAILURE;
965 }
966 if( ! bunch_int1.size() ) {
967 ATH_MSG_DEBUG( "Not using bunch intensity for the calculation" );
968 }
969 if( ( ! bunch_int2.size() ) && bunch_int1.size() ) {
970 ATH_MSG_DEBUG( "Using 'bunch crossing intensity' for the "
971 "calculation" );
972 }
973
974 //
975 // Calculate the allowed maximum BCID separation between single bunches:
976 //
977 const int maxBCSpacing = bunchSpacing( bunches );
978
979 // Reset the cache:
980 m_bunchTrains.clear();
981
982 //
983 // Create a cache of the bunches which have not been identified as a
984 // single bunch:
985 //
986 std::set< BunchCrossing > cache;
987 std::vector< int >::const_iterator b_itr = bunches.begin();
988 std::vector< int >::const_iterator b_end = bunches.end();
989 std::vector< float >::const_iterator i1_itr = bunch_int1.begin();
990 std::vector< float >::const_iterator i2_itr = bunch_int2.begin();
991 for( ; b_itr != b_end; ++b_itr ) {
992 if( std::find( m_singleBunches.begin(), m_singleBunches.end(),
993 BunchCrossing( *b_itr ) ) == m_singleBunches.end() ) {
994 cache.insert( BunchCrossing( *b_itr,
995 ( float )( bunch_int1.size() ? *i1_itr :
996 1.0 ),
997 ( float )( bunch_int2.size() ? *i2_itr :
998 0.0 ) ) );
999 }
1000 if( bunch_int1.size() ) ++i1_itr;
1001 if( bunch_int2.size() ) ++i2_itr;
1002 }
1003
1004 ATH_MSG_VERBOSE( "Bunches considered for trains: " << cache );
1005
1006 //
1007 // Continue the loop until we have unassigned bunches:
1008 //
1009 while( cache.size() ) {
1010
1011 // Create a new bunch train object:
1012 BunchTrain bt;
1013 bt.insert( *cache.begin() );
1014
1015 // Try finding attachable bunches until no other attachable bunch can
1016 // be found:
1017 size_t prev_size = 0;
1018 while( prev_size != cache.size() ) {
1019
1020 // Let's remember the size of the cache:
1021 prev_size = cache.size();
1022
1023 // Find all the bunches that should be a part of this train:
1024 std::set< BunchCrossing >::const_iterator c_itr = cache.begin();
1025 std::set< BunchCrossing >::const_iterator c_end = cache.end();
1026 for( ; c_itr != c_end; ++c_itr ) {
1027 if( bt.distance( *c_itr ) <= maxBCSpacing ) {
1028 ATH_MSG_VERBOSE( "Adding BunchCrossing " << *c_itr
1029 << " to Bunch Train " << bt );
1030 bt.insert( *c_itr );
1031 }
1032 }
1033
1034 // Now remove the selected bunches from the cache:
1035 BunchTrain::const_iterator itr = bt.begin();
1036 BunchTrain::const_iterator end = bt.end();
1037 for( ; itr != end; ++itr ) {
1038 cache.erase( *itr );
1039 }
1040 }
1041
1042 // Finally, remember this train:
1043 if( ! bt.validate() ) {
1044 ATH_MSG_ERROR( "Found a strange bunch train: " << bt );
1045 ATH_MSG_ERROR( "Keeping in it the list of trains!" );
1046 }
1047 m_bunchTrains.insert( bt );
1048 }
1049
1050 //
1051 // Check if the spacing in the bunch trains is the same. (It should be for
1052 // all real configurations.)
1053 //
1054 std::set< BunchTrain >::const_iterator train_itr = m_bunchTrains.begin();
1055 std::set< BunchTrain >::const_iterator train_end = m_bunchTrains.end();
1056 int spacing = -1;
1057 for( ; train_itr != train_end; ++train_itr ) {
1058 if( spacing < 0 ) {
1059 spacing = train_itr->spacing();
1060 continue;
1061 }
1062 if( train_itr->spacing() != spacing ) {
1063 ATH_MSG_WARNING( "The spacing seems to be different between the "
1064 "trains" );
1065 ATH_MSG_WARNING( "This should probably not happen" );
1066 }
1067 }
1068
1069 ATH_MSG_DEBUG( "Bunch trains found: " << m_bunchTrains );
1070
1071 return StatusCode::SUCCESS;
1072 }
std::set< Trig::BunchCrossing > m_singleBunches
Internal list of single bunches.
int bunchSpacing(const std::vector< int > &bunches) const
Get the apparent bunch spacing in the current configuration.
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.

◆ loadConfig()

StatusCode Trig::TrigConfBunchCrossingTool::loadConfig ( )
private

Make sure that the latest/correct configuration is loaded.

This function makes sure that the latest configuration from the TriggerDB is loaded.

It has to be called using some mechanism, which is the incident mechanism at the moment.

The function checks if the currently loaded configuration is the same as the most recent configuration available from the trigger configuration service. If it's not, then it loads the current configuration from the trigger config service.

Returns
StatusCode::SUCCESS if the operation wa successful, or StatusCode::FAILURE if it wasn't.

Definition at line 175 of file TrigConfBunchCrossingTool.cxx.

175 {
176
177 // Decide where to take the configuration from:
178 TrigConf::IILVL1ConfigSvc* configSvc = 0;
179#ifndef XAOD_STANDALONE
180 if (m_configTool.isSet()) {
181 configSvc = m_configTool.operator->();
182 } else {
183 configSvc = m_configSvc.operator->();
184 }
185#else
186 configSvc = m_configTool.operator->();
187#endif // not XAOD_STANDALONE
188
189 // Check if the needed info is even there:
190 if( ! configSvc->bunchGroupSet() ) {
191 ATH_MSG_FATAL( "Trigger configuration service doesn't provide "
192 "BunchGroupSet information" );
193 return StatusCode::FAILURE;
194 }
195
196 // Check if we already have the correct configuration:
197 if( configSvc->bunchGroupSet()->id() == m_bgId ) {
198 return StatusCode::SUCCESS;
199 }
200
201 // Report to the user what we're doing:
202 ATH_MSG_INFO( "Updating tool configuration to BGKey #"
203 << configSvc->bunchGroupSet()->id() );
204
205 // Print the configuration for debugging purposes, and remember which one
206 // we're processing:
207 m_bgId = configSvc->bunchGroupSet()->id();
208 printBunchGroups( configSvc );
209
210 //
211 // Select the collision bunch group:
212 //
213 const std::vector< TrigConf::BunchGroup >& bgs =
214 configSvc->bunchGroupSet()->bunchGroups();
215 std::vector< TrigConf::BunchGroup >::const_iterator filled_bg =
216 bgs.begin();
217 ++filled_bg;
218 ATH_MSG_INFO( "Taking the second bunch group as the colliding bunch "
219 "group" );
220
221 //
222 // Now interpret the information:
223 //
224 ATH_CHECK( loadSingleBunches( filled_bg->bunches() ) );
225 ATH_CHECK( loadBunchTrains( filled_bg->bunches() ) );
226
227 //
228 // Select the unpaired bunches. The overlaps are taken care of by the
229 // base tool.
230 //
231 std::vector< int > unpaired;
232 // These are the "unpaired isolated" bunches:
233 if( bgs.size() > 4 ) {
234 unpaired.insert( unpaired.end(), bgs[ 4 ].bunches().begin(),
235 bgs[ 4 ].bunches().end() );
236 }
237 // These are the "unpaired non-isolated" bunches:
238 if( bgs.size() > 5 ) {
239 unpaired.insert( unpaired.end(), bgs[ 5 ].bunches().begin(),
240 bgs[ 5 ].bunches().end() );
241 }
242
243 //
244 // Now interpret the information:
245 //
246 ATH_CHECK( loadUnpairedBunches( unpaired, unpaired ) );
247
248 // Print the configuration to give some feedback to the user:
249 printConfig();
250
251#ifndef XAOD_STANDALONE
252 // Let everybody know that the configuration of the tool has changed:
253 ServiceHandle< IIncidentSvc > incidentSvc( "IncidentSvc", name() );
254 ATH_CHECK( incidentSvc.retrieve() );
255 incidentSvc->fireIncident( Incident( "BunchConfiguration update",
257#endif // not XAOD_STANDALONE
258
259 // Return gracefully:
260 return StatusCode::SUCCESS;
261 }
const std::vector< BunchGroup > & bunchGroups() const
virtual const BunchGroupSet * bunchGroupSet() const =0
Provides the LVL1 bunch group set.
unsigned int id() const
static const std::string BUNCH_CONFIG_INCIDENT_NAME
Type name for the incident that such tools should emit.
StatusCode loadBunchTrains(const std::vector< int > &bunches, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
Interpret the configuration for bunch trains.
StatusCode loadSingleBunches(const std::vector< int > &bunches, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
Interpret the configuration for single bunches.
void printConfig() const
Function printing the configuration of the tool.
StatusCode loadUnpairedBunches(const std::vector< int > &beam1, const std::vector< int > &beam2, const std::vector< float > &bunch_int1=std::vector< float >(), const std::vector< float > &bunch_int2=std::vector< float >())
Interpret the configuration for unpaired bunches.
void printBunchGroups(const TrigConf::IILVL1ConfigSvc *svc) const
Print the "raw" configuration for debugging.

◆ loadSingleBunches()

StatusCode Trig::BunchCrossingToolBase::loadSingleBunches ( const std::vector< int > & bunches,
const std::vector< float > & bunch_int1 = std::vector< float >(),
const std::vector< float > & bunch_int2 = std::vector< float >() )
protectedinherited

Interpret the configuration for single bunches.

This function takes care of selecting the single bunches from the paired bunches.

These will then not be taken into account in the train finding algorithm.

The bunch intensity parameter is optional. If it's not specified, the code will assign an intensity of "1.0" to all the bunch crossings.

Parameters
bunchesThe paired bunches
bunch_intThe "intensities" of the paired bunches
Returns
StatusCode::SUCCESS if the interpretation was successful, StatusCode::FAILURE otherwise

Definition at line 837 of file BunchCrossingToolBase.cxx.

840 {
841
842 // Do a small sanity check:
843 if( ( ( bunches.size() != bunch_int1.size() ) && bunch_int1.size() ) ||
844 ( ( bunches.size() != bunch_int2.size() ) && bunch_int2.size() ) ) {
845 ATH_MSG_ERROR( "Received vectors of different sizes for the bunch "
846 "IDs and bunch intensities\n"
847 "Function can not work like this..." );
848 return StatusCode::FAILURE;
849 }
850 if( ! bunch_int1.size() ) {
851 ATH_MSG_DEBUG( "Not using bunch intensity for the calculation" );
852 }
853 if( ( ! bunch_int2.size() ) && bunch_int1.size() ) {
854 ATH_MSG_DEBUG( "Using 'bunch crossing intensity' for the "
855 "calculation" );
856 }
857
858 //
859 // Calculate the allowed maximum BCID separation between single bunches:
860 //
861 const int maxBCSpacing = bunchSpacing( bunches );
862
863 // Reset the cache:
864 m_filledBunches.clear();
865 m_singleBunches.clear();
866
867 //
868 // Loop over the paired bunch crossings:
869 //
870 std::vector< int >::const_iterator b_itr = bunches.begin();
871 std::vector< int >::const_iterator b_end = bunches.end();
872 std::vector< float >::const_iterator i1_itr = bunch_int1.begin();
873 std::vector< float >::const_iterator i2_itr = bunch_int2.begin();
874 for( ; b_itr != b_end; ++b_itr ) {
875
876 // Evaluate the intensity of this paired bunch:
877 const float intensity1 = bunch_int1.size() ? *i1_itr : 1.0;
878 const float intensity2 = bunch_int2.size() ? *i2_itr : 0.0;
879
880 // It's definitely a filled bunch, so let's remember it as such:
881 m_filledBunches.insert( BunchCrossing( *b_itr, intensity1,
882 intensity2 ) );
883
884 ATH_MSG_VERBOSE( "Evaluating bunch crossing: " << *b_itr );
885
886 //
887 // This expression counts how many of the paired bunches fulfill:
888 //
889 // distance( ref_bcid, bcid ) <= maxBCSpacing
890 //
891 // Since the calculation takes the reference bcid into account as well,
892 // the count is always >= 1. I have to use the specialised
893 // distance(...) function, because a regular
894 //
895 // bcid - maxBCSpacing <= ref_bcid <= bcid + maxBCSpacing
896 //
897 // expression wouldn't give the correct answer at the "turnover" of the
898 // bcid numbering. (When evaluating bcid 1 and
899 // BunchCrossing::MAX_BCID.)
900 //
901 const int neighbours =
902 std::count_if( bunches.begin(), bunches.end(),
903 [ maxBCSpacing, &b_itr ]( int bunch ) {
904 return ( Trig::distance( bunch, *b_itr ) <=
905 maxBCSpacing );
906 } );
907
908 //
909 // Now decide if we want to consider this bunch crossing as a single
910 // bunch or not:
911 //
912 ATH_MSG_VERBOSE( " Bunch neighbours: " << neighbours );
913 if( neighbours == 1 ) {
914 ATH_MSG_VERBOSE( " Bunch crossing " << *b_itr
915 << " seems to be a single bunch" );
916 m_singleBunches.insert( BunchCrossing( *b_itr, intensity1,
917 intensity2 ) );
918 }
919
920 // Only step through the intensity vector(s) if it has some elements:
921 if( bunch_int1.size() ) ++i1_itr;
922 if( bunch_int2.size() ) ++i2_itr;
923 }
924
925 //
926 // Finally some debugging message for the end:
927 //
928 ATH_MSG_DEBUG( "Single bunches found: " << m_singleBunches );
929
930 return StatusCode::SUCCESS;
931 }

◆ loadUnpairedBunches()

StatusCode Trig::BunchCrossingToolBase::loadUnpairedBunches ( const std::vector< int > & beam1,
const std::vector< int > & beam2,
const std::vector< float > & bunch_int1 = std::vector< float >(),
const std::vector< float > & bunch_int2 = std::vector< float >() )
protectedinherited

Interpret the configuration for unpaired bunches.

This function just caches the unpaired bunches internally.

It doesn't have to do anything as fancy as the other two load functions, it just takes the BCIDs as they are.

Parameters
bunchesThe unpaired bunch crossings
bunch_intThe "intensities" of the unpaired bunches
Returns
StatusCode::SUCCESS if the caching was successful, StatusCode::FAILURE otherwise

Definition at line 1084 of file BunchCrossingToolBase.cxx.

1088 {
1089
1090 // Do a small sanity check:
1091 if( ( ( beam1.size() != bunch_int1.size() ) && bunch_int1.size() ) ||
1092 ( ( beam2.size() != bunch_int2.size() ) && bunch_int2.size() ) ) {
1093 ATH_MSG_ERROR( "Received vectors of different sizes for the bunch "
1094 "IDs and bunch intensities\n"
1095 "Function can not work like this..." );
1096 return StatusCode::FAILURE;
1097 }
1098 if( ( ! bunch_int1.size() ) && ( ! bunch_int2.size() ) ) {
1099 ATH_MSG_DEBUG( "Not using bunch intensity for the calculation" );
1100 }
1101
1102 // Reset the cache:
1103 m_unpairedBunches.clear();
1104
1105 //
1106 // Add the unpaired bunches from beam 1:
1107 //
1108 std::vector< int >::const_iterator b_itr = beam1.begin();
1109 std::vector< int >::const_iterator b_end = beam1.end();
1110 std::vector< float >::const_iterator i_itr = bunch_int1.begin();
1111 for( ; b_itr != b_end; ++b_itr ) {
1112
1113 // Evaluate the intensity of this unpaired bunch:
1114 const float intensity = bunch_int1.size() ? *i_itr : 1.0;
1115
1116 // Nothing fancy to do, just put it in the cache:
1117 m_unpairedBunches.insert( BunchCrossing( *b_itr, intensity, 0.0 ) );
1118
1119 // Only step through the intensity vector if it has some elements:
1120 if( bunch_int1.size() ) ++i_itr;
1121 }
1122
1123 //
1124 // Add the unpaired bunches from beam 2:
1125 //
1126 b_itr = beam2.begin();
1127 b_end = beam2.end();
1128 i_itr = bunch_int2.begin();
1129 for( ; b_itr != b_end; ++b_itr ) {
1130
1131 // Evaluate the intensity of this unpaired bunch:
1132 const float intensity = bunch_int2.size() ? *i_itr : 1.0;
1133
1134 // Check if this BCID is already known as an unpaired BCID:
1135 std::set< BunchCrossing >::iterator itr =
1136 m_unpairedBunches.find( *b_itr );
1137 if( itr != m_unpairedBunches.end() ) {
1138 // Modify the BCID not to correspond to a particular beam. Most
1139 // implementations don't treat beam 1 and beam 2 separately.
1140 BunchCrossing bc( *itr );
1141 bc.setIntensityBeam2( intensity );
1142 m_unpairedBunches.erase( itr );
1143 m_unpairedBunches.insert( bc );
1144 } else {
1145 // Nothing fancy to do, just put it in the cache:
1146 m_unpairedBunches.insert( BunchCrossing( *b_itr, 0.0, intensity ) );
1147 }
1148
1149 // Only step through the intensity vector if it has some elements:
1150 if( bunch_int2.size() ) ++i_itr;
1151 }
1152
1153 //
1154 // Finally some debugging message for the end:
1155 //
1156 ATH_MSG_DEBUG( "Unpaired bunches found: " << m_unpairedBunches );
1157
1158 return StatusCode::SUCCESS;
1159 }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209 {
210
211 // Return gracefully:
212 return StatusCode::SUCCESS;
213 }

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ numberOfBunchTrains()

unsigned int Trig::BunchCrossingToolBase::numberOfBunchTrains ( ) const
virtualinherited

Get the number of the bunch trains in the current configuration.

Implements Trig::IBunchCrossingTool.

Definition at line 788 of file BunchCrossingToolBase.cxx.

788 {
789
790 return m_bunchTrains.size();
791 }

◆ numberOfFilledBunches()

unsigned int Trig::BunchCrossingToolBase::numberOfFilledBunches ( ) const
virtualinherited

Get the number of filled bunches in the current configuration.

Implements Trig::IBunchCrossingTool.

Definition at line 778 of file BunchCrossingToolBase.cxx.

778 {
779
780 return m_filledBunches.size();
781 }

◆ numberOfUnpairedBunches()

unsigned int Trig::BunchCrossingToolBase::numberOfUnpairedBunches ( ) const
virtualinherited

Get the number of unpaired bunches in the current configuration.

Implements Trig::IBunchCrossingTool.

Definition at line 783 of file BunchCrossingToolBase.cxx.

783 {
784
785 return m_unpairedBunches.size();
786 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102 {
103
104#ifdef XAOD_STANDALONE
105 return &m_outputMetaStore;
106#else // XAOD_STANDALONE
107 return m_outputMetaStore;
108#endif // XAOD_STANDALONE
109 }
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ printBunchGroups()

void Trig::TrigConfBunchCrossingTool::printBunchGroups ( const TrigConf::IILVL1ConfigSvc * svc) const
private

Print the "raw" configuration for debugging.

This function is only here for debugging.

It prints practically the full configuration information that the tool has to work with.

Definition at line 267 of file TrigConfBunchCrossingTool.cxx.

268 {
269
270 // Skip the rest if nothing will be printed anyway:
271 if( ! msgLvl( MSG::VERBOSE ) ) return;
272
273 // Print the information:
274 ATH_MSG_VERBOSE( "Printing BunchGroup configuration:" );
275 for( const auto& bg : svc->bunchGroupSet()->bunchGroups() ) {
276 ATH_MSG_VERBOSE( " BG \"" << bg.name() << "\": " << bg.bunches() );
277 }
278
279 // Return gracefully:
280 return;
281 }
bool msgLvl(const MSG::Level lvl) const
AthROOTErrorHandlerSvc * svc

◆ printConfig()

void Trig::BunchCrossingToolBase::printConfig ( ) const
protectedinherited

Function printing the configuration of the tool.

This function is used to print the overall configuration in a format very similar to how atlas-runqery.cern.ch started showing this information recently.

Definition at line 1166 of file BunchCrossingToolBase.cxx.

1166 {
1167
1168 ATH_MSG_INFO( "No. of coll. bunches : " << m_filledBunches.size() );
1169 ATH_MSG_INFO( "No. of unpaired bunches: " << m_unpairedBunches.size() );
1170 ATH_MSG_INFO( "No. of bunch trains : " << m_bunchTrains.size() );
1171 if( m_bunchTrains.size() ) {
1172 ATH_MSG_INFO( "Bunch spacing in trains: "
1173 << m_bunchTrains.begin()->spacing()
1174 << " ns" );
1175 }
1176
1177 return;
1178 }

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133 {
135 }
bool flag
Definition master.py:29

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115 {
116
117#ifndef XAOD_STANDALONE
118 if (m_useIncidents) {
119 // Connect to the IncidentSvc:
120 ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121 ATH_CHECK( incSvc.retrieve() );
122
123 // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124 incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125 }
126 // Let the base class do its thing:
127 ATH_CHECK( AlgTool::sysInitialize() );
128
129#endif // not XAOD_STANDALONE
130
131 // Return gracefully:
132 return StatusCode::SUCCESS;
133 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ BUNCH_CONFIG_INCIDENT_NAME

const std::string Trig::BunchCrossingConfProviderBase::BUNCH_CONFIG_INCIDENT_NAME = "BunchConfig"
staticprotectedinherited

Type name for the incident that such tools should emit.

Definition at line 52 of file BunchCrossingConfProviderBase.h.

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_bgId

unsigned int Trig::TrigConfBunchCrossingTool::m_bgId {0}
private

DB ID of the BunchGroups settings which was loaded last.

Definition at line 82 of file TrigConfBunchCrossingTool.h.

82{0};

◆ m_bunchTrains

std::set< Trig::BunchTrain > Trig::BunchCrossingToolBase::m_bunchTrains
protectedinherited

Internal list of bunch trains.

Definition at line 156 of file BunchCrossingToolBase.h.

◆ m_configSvc

ServiceHandle<TrigConf::ILVL1ConfigSvc> Trig::TrigConfBunchCrossingTool::m_configSvc
private
Initial value:
{
this, "ConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc"}

The config service handle.

Definition at line 86 of file TrigConfBunchCrossingTool.h.

86 {
87 this, "ConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc"};

◆ m_configTool

ToolHandle<TrigConf::ITrigConfigTool> Trig::TrigConfBunchCrossingTool::m_configTool
private
Initial value:
{
this, "ConfigTool", "TrigConf::xAODConfigTool"}

The config tool handle.

Definition at line 91 of file TrigConfBunchCrossingTool.h.

91 {
92 this, "ConfigTool", "TrigConf::xAODConfigTool"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filledBunches

std::set< Trig::BunchCrossing > Trig::BunchCrossingToolBase::m_filledBunches
protectedinherited

List of colliding bunches.

Definition at line 150 of file BunchCrossingToolBase.h.

◆ m_frontLength

int Trig::BunchCrossingToolBase::m_frontLength
protectedinherited

Length of the "front" of a bunch train.

Definition at line 166 of file BunchCrossingToolBase.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_maxBunchSpacing

int Trig::BunchCrossingToolBase::m_maxBunchSpacing
protectedinherited

The maximum bunch spacing that the tool should consider.

Definition at line 164 of file BunchCrossingToolBase.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_singleBunches

std::set< Trig::BunchCrossing > Trig::BunchCrossingToolBase::m_singleBunches
protectedinherited

Internal list of single bunches.

Definition at line 152 of file BunchCrossingToolBase.h.

◆ m_tailLength

int Trig::BunchCrossingToolBase::m_tailLength
protectedinherited

Length of the "tail" of a bunch train.

Definition at line 168 of file BunchCrossingToolBase.h.

◆ m_unpairedBunches

std::set< Trig::BunchCrossing > Trig::BunchCrossingToolBase::m_unpairedBunches
protectedinherited

Internal list of unpaired bunches.

Definition at line 154 of file BunchCrossingToolBase.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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