21 def execute(self):
22 if self.sg.
contains(
'DataHeader',
'EventSelector'):
23 dh = self.sg.retrieve('DataHeader', 'EventSelector')
24 sz = dh.size()
25 self.nevt += 1
26 if self.nevt % 100 == 0:
27 logging.info(f'DataHeader Size {sz} in event #{self.nevt}')
28 if sz > 0:
29 it = dh.begin()
30 for idx in range(sz):
31 logging.debug(f' >> Key {it.getKey()} : Token {it.getToken().toString()}')
32 it+=1
33 else:
34 logging.debug(' >> Successfully read through the DataHeader')
35 else:
36 logging.error(f' >> Negative DataHeader size ({sz})!')
37 return StatusCode.Failure
38 else:
39 logging.error('Could NOT find the DataHeader!')
40 return StatusCode.Failure
41
42 return StatusCode.Success
43
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring