Skip to content
Snippets Groups Projects
Commit df68d976 authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh
Browse files

Remove TrigFTKHypo

parent 2357f620
No related branches found
No related tags found
No related merge requests found
Trigger/TrigHypothesis/TrigFTKHypo
################################################################################
# Package: TrigFTKHypo
################################################################################
# Declare the package name:
atlas_subdir( TrigFTKHypo )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
GaudiKernel
Trigger/TrigSteer/TrigInterfaces
DetectorDescription/IRegionSelector
Event/xAOD/xAODEventInfo
Trigger/TrigTools/TrigTimeAlgs )
# External dependencies:
find_package( tdaq-common )
# # Component(s) in the package:
atlas_add_component( TrigFTKHypo
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel xAODEventInfo TrigInterfacesLib IRegionSelector TrigTimeAlgsLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigFTKAvailableHypo.h"
#include "eformat/DetectorMask.h"
#include "eformat/SourceIdentifier.h"
#include "xAODEventInfo/EventInfo.h"
#include "TrigTimeAlgs/TrigTimerSvc.h"
//---------------------------------------------------------------------------------
TrigFTKAvailableHypo::TrigFTKAvailableHypo(const std::string& name, ISvcLocator* pSvcLocator)
: HLT::HypoAlgo(name, pSvcLocator),
m_acceptAll(0),
m_ftk_in(false)
{
}
//---------------------------------------------------------------------------------
TrigFTKAvailableHypo::~TrigFTKAvailableHypo() {
}
//---------------------------------------------------------------------------------
HLT::ErrorCode TrigFTKAvailableHypo::hltInitialize() {
return HLT::OK;
}
//---------------------------------------------------------------------------------------------------------------------------------------------
HLT::ErrorCode TrigFTKAvailableHypo::checkDetMask() {
const xAOD::EventInfo* evinfo = nullptr;
if (store()->retrieve(evinfo).isFailure()) {
ATH_MSG_ERROR("Cannot retrieve xAOD::EventInfo");
return HLT::SG_ERROR;
}
else {
ATH_MSG_DEBUG(evinfo->runNumber()
<< " / " << evinfo->eventNumber()
<< " / " << evinfo->lumiBlock()
<< " / 0x" << std::hex << evinfo->detectorMask() << std::dec);
uint64_t mask = evinfo->detectorMask();
eformat::helper::DetectorMask decoder(mask);
if (mask == 0) {
ATH_MSG_DEBUG("DetMask=0");
m_ftk_in=true;
} else {
m_ftk_in = decoder.is_set(eformat::TDAQ_FTK);
ATH_MSG_DEBUG("FTK in DetMask " << m_ftk_in);
}
}
return HLT::OK;
}
HLT::ErrorCode TrigFTKAvailableHypo::hltExecute(const HLT::TriggerElement* /* outputTE*/, bool& pass){
pass = false;
HLT::ErrorCode ec = checkDetMask();
if (ec != HLT::OK) return ec;
if (m_acceptAll || m_ftk_in)
pass = true;
return HLT::OK;
}
//---------------------------------------------------------------------------------------------------------------------------------------------
HLT::ErrorCode TrigFTKAvailableHypo::hltFinalize() {
return HLT::OK;
}
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
<<<<<<< HEAD
=======
*/
/*
>>>>>>> upstream/master
*/
/** @class TrigFTKAvailableHypo
@author Jiri Masik <jiri.masik@manchester.ac.uk>
Test availability of the FTK in the event and
*/
#ifndef TRIG_FTKAvailableHypo_H
#define TRIG_FTKAvailableHypo_H
// general athena stuff
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/IToolSvc.h"
#include "GaudiKernel/StatusCode.h"
// trigger includes
#include "TrigInterfaces/HypoAlgo.h"
class TrigFTKAvailableHypo: public HLT::HypoAlgo {
public:
TrigFTKAvailableHypo(const std::string & name, ISvcLocator* pSvcLocator);
~TrigFTKAvailableHypo();
HLT::ErrorCode hltInitialize();
HLT::ErrorCode hltFinalize();
HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass);
HLT::ErrorCode checkDetMask();
private:
bool m_acceptAll; //!< true will accept all events
bool m_ftk_in; //!< FTK availability in the data / from DetMask
};
#endif
#include "src/TrigFTKAvailableHypo.h"
DECLARE_COMPONENT( TrigFTKAvailableHypo )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment