ATLAS Offline Software
Loading...
Searching...
No Matches
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
7std::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
Class describing a stream tag on the event.
std::vector< unsigned > trigStreamMatching(const std::vector< std::string > &streamsFromJobO, const std::vector< xAOD::EventInfo::StreamTag > &streamInEvent)