ATLAS Offline Software
Loading...
Searching...
No Matches
python.EventSelectionConfig.EventSelectionMergerConfig Class Reference
Inheritance diagram for python.EventSelectionConfig.EventSelectionMergerConfig:
Collaboration diagram for python.EventSelectionConfig.EventSelectionMergerConfig:

Public Member Functions

 __init__ (self)
 instanceName (self)
 makeAlgs (self, config)

Public Attributes

 selections

Detailed Description

ConfigBlock for merging the output of various selection streams

Definition at line 8 of file EventSelectionConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.EventSelectionConfig.EventSelectionMergerConfig.__init__ ( self)

Definition at line 11 of file EventSelectionConfig.py.

11 def __init__(self):
12 super(EventSelectionMergerConfig, self).__init__()
13 self.addOption('selections', [], type=list,
14 info="the selection decisions to unify into a "
15 "final decision (internally: `selection_1 || selection_2 || ...`). ")
16 self.addOption('noFilter', False, type=bool,
17 info="do not apply an event filter, i.e. setting it to `False` "
18 "removes events not passing the full list of selection cuts.")
19

Member Function Documentation

◆ instanceName()

python.EventSelectionConfig.EventSelectionMergerConfig.instanceName ( self)
Return the instance name for this block

Definition at line 20 of file EventSelectionConfig.py.

20 def instanceName (self) :
21 """Return the instance name for this block"""
22 return '' # I think there is only one instance of this block, not sure what the name ought to be
23

◆ makeAlgs()

python.EventSelectionConfig.EventSelectionMergerConfig.makeAlgs ( self,
config )

Definition at line 24 of file EventSelectionConfig.py.

24 def makeAlgs(self, config):
25 if not ( isinstance(self.selections, list) and self.selections and all(isinstance(item, str) for item in self.selections) ):
26 print('EventSelectionMerger: selections = ', self.selections)
27 raise ValueError('EventSelectionMerger requires a non-empty list of selection strings to be '
28 'passed as `selections`!')
29 alg = config.createAlgorithm('CP::SaveFilterAlg', 'EventSelectionMerger' + self.selections[0].split("_%SYS%")[0])
30 alg.FilterDescription = 'events passing at least one EventSelection algorithm'
31 alg.eventDecisionOutputDecoration = 'ignore_anySelection_%SYS%'
32 alg.selection = '||'.join([sel+',as_char' for sel in self.selections if sel])
33 alg.noFilter = self.noFilter
34 alg.selectionName = 'pass_anySelection_%SYS%'
35 alg.decorationName = 'ntuplepass_anySelection_%SYS%'
36
void print(char *figname, TCanvas *c1)
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

Member Data Documentation

◆ selections

python.EventSelectionConfig.EventSelectionMergerConfig.selections

Definition at line 25 of file EventSelectionConfig.py.


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