ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
L1CorrelationAlg Class Reference

#include <L1CorrelationAlg.h>

Inheritance diagram for L1CorrelationAlg:
Collaboration diagram for L1CorrelationAlg:

Public Member Functions

 L1CorrelationAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode start () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IROBDataProviderSvcm_robDataProviderSvc {this, "ROBDataProviderSvc", "ROBDataProviderSvc", "Name of the ROB data provider"}
 
SG::WriteHandleKey< xAOD::TrigCompositeContainerm_trigCompositeKey {this, "TrigCompositeWriteHandleKey", "L1CorrelationTrigComposite", "Name of TrigComposite write handle"}
 
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_l1AKey {this, "l1AKey", "L1CorrelationTrigComposite.l1a_type", "L1 accept type"}
 
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_otherTypeKey {this, "otherTypeKey", "L1CorrelationTrigComposite.other_type", "Other type"}
 
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_beforeAfterKey {this, "beforeAfterKey", "L1CorrelationTrigComposite.beforeafterflag", "flag if BC is before or after nominal"}
 
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_passKey {this, "trigCompPassKey", "L1CorrelationTrigComposite.pass", "Key to indicate TrigComp is passed"}
 
SG::ReadHandleKey< TrigConf::L1Menum_l1MenuKey {this, "L1MenuKey", "DetectorStore+L1TriggerMenu", "L1 Menu"}
 
ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool"}
 
Gaudi::Property< bool > m_currentBCincl {this, "currentBCinclusive", true}
 
Gaudi::Property< std::vector< std::string > > m_l1itemlist {this, "ItemList", {"L1_EM22VHI", "L1_J400", "L1_MU14FCH"}, "list of l1 items to be used"}
 
std::vector< uint32_t > m_bitmasks
 
std::vector< uint32_t > m_bitmasks_ele
 
std::vector< uint32_t > m_bitmasks_mu
 
std::vector< uint32_t > m_bitmasks_jets
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 15 of file L1CorrelationAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ L1CorrelationAlg()

L1CorrelationAlg::L1CorrelationAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 13 of file L1CorrelationAlg.cxx.

13 : AthReentrantAlgorithm(name, pSvcLocator) {}

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode L1CorrelationAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 133 of file L1CorrelationAlg.cxx.

133  {
134 
135 
136  //TrigComposite Container to record
138  ATH_CHECK(wh_trigComposite.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()));
139  auto trigCompCont = wh_trigComposite.ptr();
140 
145 
146  //CTP ROB
147  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFragments;
148  std::vector<uint32_t> roblist;
149  // magic number!
150  roblist.push_back(0x770000);
151  m_robDataProviderSvc->addROBData(ctx, roblist);
152  m_robDataProviderSvc->getROBData(ctx, roblist, robFragments);
153  if (msgLvl(MSG::DEBUG)) {
154  std::ostringstream os;
155  for(auto rob : roblist){
156  os << std::hex<<rob;
157  }
158  ATH_MSG_DEBUG(roblist.size() << "/" << robFragments.size()
159  << " ROBs requested/retrieved:" << os.str());
160  }
161  if (robFragments.size()<1){
162  ATH_MSG_DEBUG("Could not retrieve ROB!");
163  return StatusCode::SUCCESS;
164  }
165  const eformat::ROBFragment<const uint32_t*>* rbf = robFragments[0];
166 
167  // this is the l1a accept position
169 
170  std::vector<uint32_t> tbp;
171  bool firedbc[3] = {0,0,0};
172  bool firedbc_ele[3] = {0,0,0};
173  bool firedbc_mu[3] = {0,0,0};
174  bool firedbc_jet[3] = {0,0,0};
175 
176  // if currentBCincl flag is toggled don't ask for any specific trigger in the central BCID
177  if(m_currentBCincl){
178  firedbc[1]=1;
179  firedbc_ele[1]=1;
180  firedbc_mu[1]=1;
181  firedbc_jet[1]=1;
182  }
183 
184  //check BC-1 to BC+1
185  unsigned int ibc=0;
186  for(unsigned int bc=l1a-1; bc<l1a+2; bc++) {
187  tbp = CTPfragment::triggerDecisionBeforePrescales(rbf,bc);
188  unsigned ntbpwords(tbp.size());
189  for(unsigned iw=0; iw<ntbpwords; iw++ ) {
190  uint32_t tmpand = tbp[iw] & m_bitmasks[iw];
191  uint32_t tmpand_ele = tbp[iw] & m_bitmasks_ele[iw];
192  uint32_t tmpand_mu = tbp[iw] & m_bitmasks_mu[iw];
193  uint32_t tmpand_jet = tbp[iw] & m_bitmasks_jets[iw];
194  firedbc[ibc] = firedbc[ibc] || (tmpand > 0);
195  firedbc_ele[ibc] = firedbc_ele[ibc] || (tmpand_ele > 0);
196  firedbc_mu[ibc] = firedbc_mu[ibc] || (tmpand_mu > 0);
197  firedbc_jet[ibc] = firedbc_jet[ibc] || (tmpand_jet > 0);
198  }
199  ibc++;
200  }
201 
202  int l1a_type = 0;
203  int beforeafterflag=0;
204  int other_type=0;
205  int isPassed = 0;
206  if ((firedbc[0] && firedbc[1]) || (firedbc[1] && firedbc[2])){
207 
208  ATH_MSG_DEBUG("Event fired bc[0]: "<<firedbc[0]<<", bc[1]: "<<firedbc[1]<<", bc[2]: "<<firedbc[2]);
209  isPassed = 1;
210 
211  if(firedbc_ele[1]) l1a_type = 1;
212  if(firedbc_mu[1]) l1a_type = 2;
213  if(firedbc_jet[1]) l1a_type = 3;
214  if(firedbc_ele[1] && firedbc_mu[1]) l1a_type = 4;
215  if(firedbc_ele[1] && firedbc_jet[1]) l1a_type = 5;
216  if(firedbc_mu[1] && firedbc_jet[1]) l1a_type = 6;
217  if(firedbc_ele[1] && firedbc_mu[1] && firedbc_jet[1]) l1a_type = 7;
218 
219  if((firedbc[0] && firedbc[1])){
220  beforeafterflag = -1;
221 
222  if(firedbc_ele[0]) other_type = 1;
223  if(firedbc_mu[0]) other_type = 2;
224  if(firedbc_jet[0]) other_type = 3;
225  if(firedbc_ele[0] && firedbc_mu[0]) other_type = 4;
226  if(firedbc_ele[0] && firedbc_jet[0]) other_type = 5;
227  if(firedbc_mu[0] && firedbc_jet[0]) other_type = 6;
228  if(firedbc_ele[0] && firedbc_mu[0] && firedbc_jet[0]) other_type = 7;
229 
230  }
231  else if((firedbc[1] && firedbc[2])){
232  beforeafterflag = 1;
233  if(firedbc_ele[2]) other_type = 1;
234  if(firedbc_mu[2]) other_type = 2;
235  if(firedbc_jet[2]) other_type = 3;
236  if(firedbc_ele[2] && firedbc_mu[2]) other_type = 4;
237  if(firedbc_ele[2] && firedbc_jet[2]) other_type = 5;
238  if(firedbc_mu[2] && firedbc_jet[2]) other_type = 6;
239  if(firedbc_ele[2] && firedbc_mu[2] && firedbc_jet[2]) other_type = 7;
240 
241  }
242  if ((firedbc[0] && firedbc[1]) && (firedbc[1] && firedbc[2])){
243  beforeafterflag = 2;
244 
245  }
246 
247  auto trigComp = new xAOD::TrigComposite();
248  trigCompCont->push_back(trigComp);
249  trigComp->setName("mistimemon_L1Dec");
250  trigCompL1A(*trigComp) = l1a_type;
251  trigCompOther(*trigComp) = other_type;
252  trigCompBeforeAfter(*trigComp) = beforeafterflag;
253  trigCompPass(*trigComp) = isPassed;
254  }
255 
256  //setup monitoring
257  auto mon_l1a = Monitored::Scalar<int>("l1Accept", l1a_type);
258  auto mon_otherType = Monitored::Scalar<int>("otherType", other_type);
259  auto mon_beforeAfter = Monitored::Scalar<int>("BeforeAfterFlag", beforeafterflag);
260  auto monitorIt = Monitored::Group(m_monTool, mon_l1a, mon_otherType, mon_beforeAfter);
261 
262  return StatusCode::SUCCESS;
263 
264 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode L1CorrelationAlg::initialize ( )
overridevirtual

Definition at line 15 of file L1CorrelationAlg.cxx.

15  {
16 
17  ATH_CHECK(m_robDataProviderSvc.retrieve());
18  ATH_CHECK(m_trigCompositeKey.initialize());
20  ATH_CHECK(m_passKey.initialize());
21  ATH_CHECK(m_l1AKey.initialize());
22  ATH_CHECK(m_otherTypeKey.initialize());
23  ATH_CHECK(m_beforeAfterKey.initialize());
24  ATH_CHECK(m_monTool.retrieve());
25 
26  return StatusCode::SUCCESS;
27 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ start()

StatusCode L1CorrelationAlg::start ( )
overridevirtual

Definition at line 29 of file L1CorrelationAlg.cxx.

29  {
30 
31  //get L1 menu and initialise bitMasks based on l1 em/j/mu triggers
33  ATH_CHECK(rh_l1Menu.isValid());
34  std::vector<int> ctpids_ele;
35  std::vector<int> ctpids_mu;
36  std::vector<int> ctpids_jets;
37  std::vector<int> ctpids;
38  for(const TrigConf::L1Item& item : *rh_l1Menu){
39  for(uint nl1=0; nl1<m_l1itemlist.size(); nl1++){
40  if(m_l1itemlist[nl1].compare(item.name()) == 0 ){
41  ATH_MSG_DEBUG("L1CorrAlgInit: Configured to use item:" <<item.name().c_str()<< " CTPID:"<<item.ctpId());
42  ctpids.push_back( item.ctpId() );
43  if( m_l1itemlist[nl1].find( "L1_EM" ) != std::string::npos ){
44  ctpids_ele.push_back( item.ctpId() );
45  }
46  if( m_l1itemlist[nl1].find( "L1_MU" ) != std::string::npos ){
47  ctpids_mu.push_back( item.ctpId() );
48  }
49  if(( m_l1itemlist[nl1].find( "L1_J") != std::string::npos ) || ( m_l1itemlist[nl1].find( "L1_jJ" ) != std::string::npos)){
50  ctpids_jets.push_back( item.ctpId() );
51  }
52  }
53  }
54  }
55 
56  // init with 0
57  m_bitmasks.clear();
58  m_bitmasks_ele.clear();
59  m_bitmasks_mu.clear();
60  m_bitmasks_jets.clear();
61  for(int n=0; n<16 ; n++){
62  uint32_t tmpword=0;
63  m_bitmasks.push_back(tmpword);
64  m_bitmasks_ele.push_back(tmpword);
65  m_bitmasks_mu.push_back(tmpword);
66  m_bitmasks_jets.push_back(tmpword);
67  }
68 
69  //all ctpids
70  for(unsigned int n=0; n<ctpids.size() ; n++){
71  // check in which word it belongs
72  int cycle = ctpids[n] / 32;
73  int pos = ctpids[n] % 32;
74 
75  uint32_t currentmask = m_bitmasks[cycle];
76  uint32_t tmpmask = 1;
77  // shift this pos positions to left
78  tmpmask = tmpmask << (pos);
79 
80  // OR this with the existing mask
81  m_bitmasks[cycle] = tmpmask | currentmask;
82  }
83 
84  //electrons
85  for(unsigned int n=0; n<ctpids_ele.size() ; n++){
86  // check in which word it belongs
87  int cycle = ctpids_ele[n] / 32;
88  int pos = ctpids_ele[n] % 32;
89 
90  uint32_t currentmask = m_bitmasks_ele[cycle];
91  uint32_t tmpmask = 1;
92  // shift this pos positions to left
93  tmpmask = tmpmask << (pos);
94 
95  // OR this with the existing mask
96  m_bitmasks_ele[cycle] = tmpmask | currentmask;
97  }
98 
99  //muons
100  for(unsigned int n=0; n<ctpids_mu.size() ; n++){
101  // check in which word it belongs
102  int cycle = ctpids_mu[n] / 32;
103  int pos = ctpids_mu[n] % 32;
104 
105  uint32_t currentmask = m_bitmasks_mu[cycle];
106  uint32_t tmpmask = 1;
107  // shift this pos positions to left
108  tmpmask = tmpmask << (pos);
109 
110  // OR this with the existing mask
111  m_bitmasks_mu[cycle] = tmpmask | currentmask;
112  }
113 
114  //jets
115  for(unsigned int n=0; n<ctpids_jets.size() ; n++){
116  // check in which word it belongs
117  int cycle = ctpids_jets[n] / 32;
118  int pos = ctpids_jets[n] % 32;
119 
120  uint32_t currentmask = m_bitmasks_jets[cycle];
121  uint32_t tmpmask = 1;
122  // shift this pos positions to left
123  tmpmask = tmpmask << (pos);
124 
125  // OR this with the existing mask
126  m_bitmasks_jets[cycle] = tmpmask | currentmask;
127  }
128 
129  return StatusCode::SUCCESS;
130 }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_beforeAfterKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> L1CorrelationAlg::m_beforeAfterKey {this, "beforeAfterKey", "L1CorrelationTrigComposite.beforeafterflag", "flag if BC is before or after nominal"}
private

Definition at line 28 of file L1CorrelationAlg.h.

◆ m_bitmasks

std::vector<uint32_t> L1CorrelationAlg::m_bitmasks
private

Definition at line 36 of file L1CorrelationAlg.h.

◆ m_bitmasks_ele

std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_ele
private

Definition at line 37 of file L1CorrelationAlg.h.

◆ m_bitmasks_jets

std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_jets
private

Definition at line 39 of file L1CorrelationAlg.h.

◆ m_bitmasks_mu

std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_mu
private

Definition at line 38 of file L1CorrelationAlg.h.

◆ m_currentBCincl

Gaudi::Property<bool> L1CorrelationAlg::m_currentBCincl {this, "currentBCinclusive", true}
private

Definition at line 32 of file L1CorrelationAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_l1AKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> L1CorrelationAlg::m_l1AKey {this, "l1AKey", "L1CorrelationTrigComposite.l1a_type", "L1 accept type"}
private

Definition at line 26 of file L1CorrelationAlg.h.

◆ m_l1itemlist

Gaudi::Property<std::vector<std::string> > L1CorrelationAlg::m_l1itemlist {this, "ItemList", {"L1_EM22VHI", "L1_J400", "L1_MU14FCH"}, "list of l1 items to be used"}
private

Definition at line 33 of file L1CorrelationAlg.h.

◆ m_l1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> L1CorrelationAlg::m_l1MenuKey {this, "L1MenuKey", "DetectorStore+L1TriggerMenu", "L1 Menu"}
private

Definition at line 30 of file L1CorrelationAlg.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> L1CorrelationAlg::m_monTool {this, "MonTool", "", "Monitoring tool"}
private

Definition at line 31 of file L1CorrelationAlg.h.

◆ m_otherTypeKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> L1CorrelationAlg::m_otherTypeKey {this, "otherTypeKey", "L1CorrelationTrigComposite.other_type", "Other type"}
private

Definition at line 27 of file L1CorrelationAlg.h.

◆ m_passKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> L1CorrelationAlg::m_passKey {this, "trigCompPassKey", "L1CorrelationTrigComposite.pass", "Key to indicate TrigComp is passed"}
private

Definition at line 29 of file L1CorrelationAlg.h.

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> L1CorrelationAlg::m_robDataProviderSvc {this, "ROBDataProviderSvc", "ROBDataProviderSvc", "Name of the ROB data provider"}
private

Definition at line 24 of file L1CorrelationAlg.h.

◆ m_trigCompositeKey

SG::WriteHandleKey<xAOD::TrigCompositeContainer> L1CorrelationAlg::m_trigCompositeKey {this, "TrigCompositeWriteHandleKey", "L1CorrelationTrigComposite", "Name of TrigComposite write handle"}
private

Definition at line 25 of file L1CorrelationAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Amg::compare
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
Definition: EventPrimitivesHelpers.h:109
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
xAOD::TrigComposite
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:16
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
L1CorrelationAlg::m_bitmasks_mu
std::vector< uint32_t > m_bitmasks_mu
Definition: L1CorrelationAlg.h:38
cycle
double cycle(double a, double b)
Definition: SiHitCollectionCnv_p2.cxx:38
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
L1CorrelationAlg::m_l1AKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_l1AKey
Definition: L1CorrelationAlg.h:26
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
L1CorrelationAlg::m_bitmasks
std::vector< uint32_t > m_bitmasks
Definition: L1CorrelationAlg.h:36
L1CorrelationAlg::m_currentBCincl
Gaudi::Property< bool > m_currentBCincl
Definition: L1CorrelationAlg.h:32
L1CorrelationAlg::m_beforeAfterKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_beforeAfterKey
Definition: L1CorrelationAlg.h:28
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
L1CorrelationAlg::m_robDataProviderSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Definition: L1CorrelationAlg.h:24
L1CorrelationAlg::m_bitmasks_jets
std::vector< uint32_t > m_bitmasks_jets
Definition: L1CorrelationAlg.h:39
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
eformat::ROBFragment< const uint32_t * >
L1CorrelationAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: L1CorrelationAlg.h:31
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
L1CorrelationAlg::m_passKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_passKey
Definition: L1CorrelationAlg.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
TrigConf::L1Item
L1 threshold configuration.
Definition: L1Item.h:18
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
L1CorrelationAlg::m_bitmasks_ele
std::vector< uint32_t > m_bitmasks_ele
Definition: L1CorrelationAlg.h:37
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
L1CorrelationAlg::m_otherTypeKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_otherTypeKey
Definition: L1CorrelationAlg.h:27
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
L1CorrelationAlg::m_l1itemlist
Gaudi::Property< std::vector< std::string > > m_l1itemlist
Definition: L1CorrelationAlg.h:33
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
item
Definition: ItemListSvc.h:43
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.CTPfragment.lvl1AcceptBunch
def lvl1AcceptBunch(rob)
Definition: CTPfragment.py:150
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
L1CorrelationAlg::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: L1CorrelationAlg.h:30
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
L1CorrelationAlg::m_trigCompositeKey
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_trigCompositeKey
Definition: L1CorrelationAlg.h:25