Definition at line 17 of file checkMetadata.py.
◆ __init__()
def python.checkMetadata.ValidateMetadataAlg.__init__ |
( |
|
self, |
|
|
|
name = "ValidateMetadataAlg" , |
|
|
|
metadata = None |
|
) |
| |
Definition at line 18 of file checkMetadata.py.
18 def __init__(self, name="ValidateMetadataAlg", metadata=None):
19 super(ValidateMetadataAlg, self).
__init__(name=name)
21 self.Event = namedtuple(
"Event", [
"runNumber",
"lumiBlock",
"eventNumber"])
23 self.metadata = metadata
25 self.metadata = defaultdict(list)
◆ execute()
def python.checkMetadata.ValidateMetadataAlg.execute |
( |
|
self | ) |
|
Definition at line 32 of file checkMetadata.py.
34 if self.sg.
contains(
"xAOD::EventInfo",
"EventInfo"):
35 ei = self.sg.
retrieve(
"xAOD::EventInfo",
"EventInfo")
37 runNumber=ei.runNumber(),
38 lumiBlock=ei.lumiBlock(),
39 eventNumber=ei.eventNumber(),
41 if event
in self.events:
42 logging.error(
"Event Data Validation FAILED!")
43 return StatusCode.Failure
45 self.events.
add(event)
47 logging.error(
"Could NOT find xAOD::EventInfo!")
48 return StatusCode.Failure
50 return StatusCode.Success
◆ finalize()
def python.checkMetadata.ValidateMetadataAlg.finalize |
( |
|
self | ) |
|
Definition at line 52 of file checkMetadata.py.
53 if set([event.runNumber
for event
in self.events]) !=
set(
54 self.metadata[
"runNumbers"]
55 )
or set([event.lumiBlock
for event
in self.events]) !=
set(
56 self.metadata[
"lumiBlocks"]
58 return StatusCode.Failure
59 return StatusCode.Success
◆ initialize()
def python.checkMetadata.ValidateMetadataAlg.initialize |
( |
|
self | ) |
|
◆ Event
python.checkMetadata.ValidateMetadataAlg.Event |
◆ events
python.checkMetadata.ValidateMetadataAlg.events |
◆ metadata
python.checkMetadata.ValidateMetadataAlg.metadata |
◆ sg
python.checkMetadata.ValidateMetadataAlg.sg |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.