ATLAS Offline Software
LArTrigStreamMatching.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 std::vector<unsigned> LArMon::trigStreamMatching(const std::vector<std::string>& streamsFromJobO, const std::vector<xAOD::EventInfo::StreamTag>& streamInEvent) {
8 
9  //The return value. Relying on RVO not to copy it when returning to caller
10  std::vector<unsigned> foundStreams;
11  const unsigned nStreamsInJobO=streamsFromJobO.size();
12  for (unsigned i=0;i<nStreamsInJobO;++i) {
13  bool found=false;
14  for (const xAOD::EventInfo::StreamTag& streamTag : streamInEvent) {
15  if (streamsFromJobO[i]==streamTag.name()) {
16  foundStreams.push_back(i);
17  found=true;
18  break; //inner loop
19  }//end-if
20  }//end inner loop (over streamInEvent)
21  //Not-found case:
22  if (!found) foundStreams.push_back(nStreamsInJobO);
23  }//end outer loop (over streamInJobO)
24 
25  return foundStreams;
26 }
27 
LArTrigStreamMatching.h
lumiFormat.i
int i
Definition: lumiFormat.py:92
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
LArMon::trigStreamMatching
std::vector< unsigned > trigStreamMatching(const std::vector< std::string > &streamsFromJobO, const std::vector< xAOD::EventInfo::StreamTag > &streamInEvent)
Definition: LArTrigStreamMatching.cxx:7
xAOD::EventInfo_v1::StreamTag
Class describing a stream tag on the event.
Definition: EventInfo_v1.h:190