Skip to content
Snippets Groups Projects

HLT1 filtering in Hlt2Line

Closed Marian Stahl requested to merge mstahl_Hlt2Line_hlt1filter into master
All threads resolved!
@@ -19,7 +19,8 @@ except ImportError:
cache = lambda func: cached(cache={})(func)
from Configurables import LumiCounterMerger
from PyConf.Algorithms import DeterministicPrescaler
from PyConf.Algorithms import (DeterministicPrescaler, LoKi__HDRFilter as
HltDecReportsFilter, HltDecReportsDecoder)
from PyConf.application import make_odin
from PyConf.components import Algorithm
from PyConf.control_flow import CompositeNode, NodeLogic
@@ -30,6 +31,8 @@ from Moore.selreports import (
)
from RecoConf.reconstruction_objects import make_pvs
from PyConf.application import default_raw_event
from .persistence.particle_moving import (
CopyParticles,
dvalgorithm_locations,
@@ -259,16 +262,31 @@ class Hlt2Line(DecisionLine):
`node` attribute) will ensure that the reconstruction algorithms
that produce the reconstruction objects will run when the line
fires
hlt1_filter_code (string): If not empty, the string is used to define a
HLT1 filter that is prepended to the control flow defined by `algs`.
LoKi__HDRFilter-code is used.
"""
_NAME_PREFIX = "Hlt2"
def __init__(self,
name,
algs,
prescale=1.,
extra_outputs=None,
persistreco=False):
def __init__(
self,
name,
algs,
prescale=1.,
extra_outputs=None,
persistreco=False,
hlt1_filter_code="",
):
if hlt1_filter_code:
hlt1_dec_reports = HltDecReportsDecoder(
RawEventLocations=default_raw_event(
bank_types=["HltDecReports"]),
SourceID=1)
hlt1_filter = HltDecReportsFilter(
Location=hlt1_dec_reports.OutputHltDecReportsLocation,
Code=hlt1_filter_code)
algs = [hlt1_filter] + algs
super(Hlt2Line, self).__init__(name, algs, prescale)
if not self.name.startswith(self._NAME_PREFIX):
raise ValueError("name {!r} does not start with {!r}".format(
Loading