ATLAS Offline Software
Loading...
Searching...
No Matches
ChainNameParser Namespace Reference

Classes

class  HLTChainInfo
 Helper class that provides access to information about individual legs. More...
struct  LegInfo
 Struct containing information on each leg of a chain. More...
class  LegInfoIterator
 Iterate over the legs of a chain. More...

Functions

const std::vector< std::string > & allSignatures ()
 A list of all signature names.
const std::vector< std::string > & allSignaturePostfixQualifiers ()
 A list of all post-fix qualifiers which may come immediately after the "XSigY" pattern, e.g. the noL1 in "2mu10noL1".
const std::set< std::string > & singleLegIdentifiers ()
 A set of identifiers which are actually single leg, even if followed by other identifiers.
std::string legHeadPattern ()
std::vector< int > multiplicities (const std::string &chain)
std::vector< std::string > signatures (const std::string &chain)

Function Documentation

◆ allSignaturePostfixQualifiers()

const std::vector< std::string > & ChainNameParser::allSignaturePostfixQualifiers ( )

A list of all post-fix qualifiers which may come immediately after the "XSigY" pattern, e.g. the noL1 in "2mu10noL1".

Definition at line 203 of file ChainNameParser.cxx.

204 {
205 const static std::vector<std::string> postfixQualifiers{
206 "noL1", "vtx", "c", "C", "f", "a"
207 };
208 return postfixQualifiers;
209 }

◆ allSignatures()

const std::vector< std::string > & ChainNameParser::allSignatures ( )

A list of all signature names.

Definition at line 191 of file ChainNameParser.cxx.

192 {
193 const static std::vector<std::string> signatures{
194 "e", "g", "j", "dispjet", "mu", "tau", "xe", "xs", "te", "ht", "noalg", "mb", "hi", "eb",
195 "l1calocalib", "lar", "zdc", "lumipeb", "alfacalib", "calibAFP", "afp", "distrk",
196 "hitdvjet", "isotrk", "dedxtrk", "l1topoPh1debug", "caloclustermon", "fslrt",
197 "beamspot", "cosmic", "timeburner", "mistimemonj400", "larsupercellmon", "larnoiseburst",
198 "acceptedevts", "larpsall", "larpsallem", "idcalib", "metcalo", "mettrk",
199 };
200 return signatures;
201 }
std::vector< std::string > signatures(const std::string &chain)

◆ legHeadPattern()

std::string ChainNameParser::legHeadPattern ( )

Definition at line 219 of file ChainNameParser.cxx.

220 {
221 // Pattern looks like an expanded version of "(\d*)(e|g|j|mu|tau|xe)(\d*)(noL1|vtx|c|f|a)?";
222 // i.e. between 0-inf digits, followed by a signature, followed by another 0-inf digits, optionally followed by 0-1 a postfix qualifiers
223 return "(\\d*)("+join(allSignatures(), "|")+")(\\d*)"+"("+join(allSignaturePostfixQualifiers(), "|")+")?";
224 }
const std::vector< std::string > & allSignatures()
A list of all signature names.
const std::vector< std::string > & allSignaturePostfixQualifiers()
A list of all post-fix qualifiers which may come immediately after the "XSigY" pattern,...

◆ multiplicities()

std::vector< int > ChainNameParser::multiplicities ( const std::string & chain)

Definition at line 226 of file ChainNameParser.cxx.

227 {
228 std::vector<int> multiplicities;
229 for (auto itr = LegInfoIterator(chain); !itr.exhausted(); ++itr) {
230 multiplicities.push_back(itr->multiplicity);
231 if (singleLegIdentifiers().count(itr->signature) == 1)
232 return multiplicities;
233 }
234 return multiplicities;
235 }
Iterate over the legs of a chain.
bool exhausted() const
Whether the iterator is exhausted.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
const std::set< std::string > & singleLegIdentifiers()
A set of identifiers which are actually single leg, even if followed by other identifiers.
std::vector< int > multiplicities(const std::string &chain)

◆ signatures()

std::vector< std::string > ChainNameParser::signatures ( const std::string & chain)

Definition at line 237 of file ChainNameParser.cxx.

238 {
239 std::vector<std::string> signatures;
240 for (auto itr = LegInfoIterator(chain); !itr.exhausted(); ++itr) {
241 signatures.push_back(itr->signature);
242 if (singleLegIdentifiers().count(itr->signature) == 1)
243 return signatures;
244 }
245 return signatures;
246 }

◆ singleLegIdentifiers()

const std::set< std::string > & ChainNameParser::singleLegIdentifiers ( )

A set of identifiers which are actually single leg, even if followed by other identifiers.

Definition at line 211 of file ChainNameParser.cxx.

212 {
213 const static std::set<std::string> singleLegIDs{
214 "noalg", "acceptedevts"
215 };
216 return singleLegIDs;
217 }