ATLAS Offline Software
Public Member Functions | List of all members
DataHeaderCnv::placementComp Struct Reference

Cache for new DHForms created when writing, indexed by ref or placement. More...

#include <DataHeaderCnv.h>

Collaboration diagram for DataHeaderCnv::placementComp:

Public Member Functions

bool operator() (const std::string &lhs, const std::string &rhs) const
 

Detailed Description

Cache for new DHForms created when writing, indexed by ref or placement.

Definition at line 74 of file DataHeaderCnv.h.

Member Function Documentation

◆ operator()()

bool DataHeaderCnv::placementComp::operator() ( const std::string &  lhs,
const std::string &  rhs 
) const

Definition at line 185 of file DataHeaderCnv.cxx.

186 {
187  std::string lval = getValForKey(lhs,"[FILE=") + getValForKey(lhs,"[CONT=");
188  std::string rval = getValForKey(rhs,"[FILE=") + getValForKey(rhs,"[CONT=");
189  if( lval != rval ) return lval < rval;
190 
191  lval = getSWNFromStr(lhs);
192  rval = getSWNFromStr(rhs);
193  if( lval.empty() or rval.empty() ) return false;
194  return std::stoul( lval ) < std::stoul( rval );
195 }

The documentation for this struct was generated from the following files:
getSWNFromStr
std::string getSWNFromStr(const std::string &str)
Definition: DataHeaderCnv.cxx:172
getValForKey
std::string getValForKey(const std::string &str, const std::string &key)
Definition: DataHeaderCnv.cxx:161