ATLAS Offline Software
Loading...
Searching...
No Matches
SerializeCommon.cxx
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7
14
15
16#include <string>
17
18namespace TrigSerializeResult {
19 namespace {
20 bool isxAOD(const std::string& containerName) {
21 return containerName.find("xAOD::") == 0 and containerName.find("AuxContainer") == std::string::npos; // the name should start from the xAOD
22 }
23 std::string xAODContainedClass(const std::string& containerName) {
24 auto containerBegin = containerName.find("Container");
25 std::string objname = std::string(containerName, 0, containerBegin) // front of the name
26 + containerName.substr(containerName.size()-3,3); // version
27 return objname;
28 }
29 }
30
31 std::string remapToDictName(const std::string &nameOfClass){
32 std::string noc = nameOfClass;
33 if ( isxAOD(nameOfClass) ) {
34 noc="DataVector<"+xAODContainedClass(nameOfClass)+">";
35 } // overwrites
36 else if (nameOfClass=="Analysis :: TauJetContainer")
37 noc="Analysis::TauJetContainer";
38 else if (nameOfClass=="Analysis :: TauDetailsContainer")
39 noc="Analysis::TauDetailsContainer";
40 return noc;
41 }
42
43}
44
std::string remapToDictName(const std::string &s)