ATLAS Offline Software
Functions
LArMon Namespace Reference

Functions

std::vector< unsigned > trigStreamMatching (const std::vector< std::string > &streamsFromJobO, const std::vector< xAOD::EventInfo::StreamTag > &streamInEvent)
 

Function Documentation

◆ trigStreamMatching()

std::vector< unsigned > LArMon::trigStreamMatching ( const std::vector< std::string > &  streamsFromJobO,
const std::vector< xAOD::EventInfo::StreamTag > &  streamInEvent 
)

Definition at line 7 of file LArTrigStreamMatching.cxx.

7  {
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 }
lumiFormat.i
int i
Definition: lumiFormat.py:92
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
xAOD::EventInfo_v1::StreamTag
Class describing a stream tag on the event.
Definition: EventInfo_v1.h:190