 |
ATLAS Offline Software
|
#include <L1CorrelationAlg.h>
|
| 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, V, H > &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 |
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
ServiceHandle< IROBDataProviderSvc > | m_robDataProviderSvc {this, "ROBDataProviderSvc", "ROBDataProviderSvc", "Name of the ROB data provider"} |
|
SG::WriteHandleKey< xAOD::TrigCompositeContainer > | m_trigCompositeKey {this, "TrigCompositeWriteHandleKey", "L1CorrelationTrigComposite", "Name of TrigComposite write handle"} |
|
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > | m_l1AKey {this, "l1AKey", "L1CorrelationTrigComposite.l1a_type", "L1 accept type"} |
|
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > | m_otherTypeKey {this, "otherTypeKey", "L1CorrelationTrigComposite.other_type", "Other type"} |
|
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > | m_beforeAfterKey {this, "beforeAfterKey", "L1CorrelationTrigComposite.beforeafterflag", "flag if BC is before or after nominal"} |
|
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > | m_passKey {this, "trigCompPassKey", "L1CorrelationTrigComposite.pass", "Key to indicate TrigComp is passed"} |
|
SG::ReadHandleKey< TrigConf::L1Menu > | m_l1MenuKey {this, "L1MenuKey", "DetectorStore+L1TriggerMenu", "L1 Menu"} |
|
ToolHandle< GenericMonitoringTool > | m_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 |
|
Definition at line 15 of file L1CorrelationAlg.h.
◆ StoreGateSvc_t
◆ L1CorrelationAlg()
L1CorrelationAlg::L1CorrelationAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ cardinality()
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 75 of file AthCommonReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode L1CorrelationAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 133 of file L1CorrelationAlg.cxx.
138 ATH_CHECK(wh_trigComposite.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()));
139 auto trigCompCont = wh_trigComposite.ptr();
147 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFragments;
148 std::vector<uint32_t> roblist;
150 roblist.push_back(0x770000);
154 std::ostringstream
os;
155 for(
auto rob : roblist){
159 <<
" ROBs requested/retrieved:" <<
os.str());
161 if (robFragments.size()<1){
163 return StatusCode::SUCCESS;
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};
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++ ) {
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);
203 int beforeafterflag=0;
206 if ((firedbc[0] && firedbc[1]) || (firedbc[1] && firedbc[2])){
208 ATH_MSG_DEBUG(
"Event fired bc[0]: "<<firedbc[0]<<
", bc[1]: "<<firedbc[1]<<
", bc[2]: "<<firedbc[2]);
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;
219 if((firedbc[0] && firedbc[1])){
220 beforeafterflag = -1;
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;
231 else if((firedbc[1] && firedbc[2])){
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;
242 if ((firedbc[0] && firedbc[1]) && (firedbc[1] && firedbc[2])){
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;
262 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ initialize()
StatusCode L1CorrelationAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
◆ start()
StatusCode L1CorrelationAlg::start |
( |
| ) |
|
|
overridevirtual |
Definition at line 29 of file L1CorrelationAlg.cxx.
34 std::vector<int> ctpids_ele;
35 std::vector<int> ctpids_mu;
36 std::vector<int> ctpids_jets;
37 std::vector<int> ctpids;
41 ATH_MSG_DEBUG(
"L1CorrAlgInit: Configured to use item:" <<
item.name().c_str()<<
" CTPID:"<<
item.ctpId());
42 ctpids.push_back(
item.ctpId() );
44 ctpids_ele.push_back(
item.ctpId() );
47 ctpids_mu.push_back(
item.ctpId() );
50 ctpids_jets.push_back(
item.ctpId() );
61 for(
int n=0;
n<16 ;
n++){
70 for(
unsigned int n=0;
n<ctpids.size() ;
n++){
72 int cycle = ctpids[
n] / 32;
73 int pos = ctpids[
n] % 32;
78 tmpmask = tmpmask << (
pos);
85 for(
unsigned int n=0;
n<ctpids_ele.size() ;
n++){
87 int cycle = ctpids_ele[
n] / 32;
88 int pos = ctpids_ele[
n] % 32;
93 tmpmask = tmpmask << (
pos);
100 for(
unsigned int n=0;
n<ctpids_mu.size() ;
n++){
102 int cycle = ctpids_mu[
n] / 32;
103 int pos = ctpids_mu[
n] % 32;
108 tmpmask = tmpmask << (
pos);
115 for(
unsigned int n=0;
n<ctpids_jets.size() ;
n++){
117 int cycle = ctpids_jets[
n] / 32;
118 int pos = ctpids_jets[
n] % 32;
123 tmpmask = tmpmask << (
pos);
129 return StatusCode::SUCCESS;
◆ sysExecute()
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 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
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 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_beforeAfterKey
◆ m_bitmasks
std::vector<uint32_t> L1CorrelationAlg::m_bitmasks |
|
private |
◆ m_bitmasks_ele
std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_ele |
|
private |
◆ m_bitmasks_jets
std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_jets |
|
private |
◆ m_bitmasks_mu
std::vector<uint32_t> L1CorrelationAlg::m_bitmasks_mu |
|
private |
◆ m_currentBCincl
Gaudi::Property<bool> L1CorrelationAlg::m_currentBCincl {this, "currentBCinclusive", true} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_l1AKey
◆ 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 |
◆ m_l1MenuKey
◆ m_monTool
◆ m_otherTypeKey
◆ m_passKey
◆ m_robDataProviderSvc
◆ m_trigCompositeKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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,...
Group
Properties of a chain group.
std::string find(const std::string &s)
return a remapped string
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
std::vector< uint32_t > m_bitmasks_mu
double cycle(double a, double b)
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_l1AKey
std::vector< uint32_t > m_bitmasks
Gaudi::Property< bool > m_currentBCincl
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_beforeAfterKey
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
std::vector< uint32_t > m_bitmasks_jets
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ToolHandle< GenericMonitoringTool > m_monTool
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_passKey
Handle class for adding a decoration to an object.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
L1 threshold configuration.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< uint32_t > m_bitmasks_ele
virtual void renounce()=0
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_otherTypeKey
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< std::vector< std::string > > m_l1itemlist
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
Declare a monitored scalar variable.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_trigCompositeKey