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 (list of strings) to unify into a "
15 "final decision (internally: selection_1 || selection_2 || ...). "
16 "The default is [] (empty list).")
17 self.addOption('noFilter', False, type=bool,
18 info="do not apply an event filter. The default is False, i.e. "
19 "remove events not passing the full list of selection cuts.")
20

Member Function Documentation

◆ instanceName()

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

Definition at line 21 of file EventSelectionConfig.py.

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

◆ makeAlgs()

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

Definition at line 25 of file EventSelectionConfig.py.

25 def makeAlgs(self, config):
26 if not ( isinstance(self.selections, list) and self.selections and all(isinstance(item, str) for item in self.selections) ):
27 print('EventSelectionMerger: selections = ', self.selections)
28 raise ValueError('EventSelectionMerger requires a non-empty list of selection strings to be '
29 'passed as `selections`!')
30 alg = config.createAlgorithm('CP::SaveFilterAlg', 'EventSelectionMerger' + self.selections[0].split("_%SYS%")[0])
31 alg.FilterDescription = 'events passing at least one EventSelection algorithm'
32 alg.eventDecisionOutputDecoration = 'ignore_anySelection_%SYS%'
33 alg.selection = '||'.join([sel+',as_char' for sel in self.selections if sel])
34 alg.noFilter = self.noFilter
35 alg.selectionName = 'pass_anySelection_%SYS%'
36 alg.decorationName = 'ntuplepass_anySelection_%SYS%'
37
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 26 of file EventSelectionConfig.py.


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