ATLAS Offline Software
Loading...
Searching...
No Matches
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 193 of file DataHeaderCnv.cxx.

194{
195 std::string lval = getValForKey(lhs,"[FILE=") + getValForKey(lhs,"[CONT=");
196 std::string rval = getValForKey(rhs,"[FILE=") + getValForKey(rhs,"[CONT=");
197 if( lval != rval ) return lval < rval;
198
199 lval = getSWNFromStr(lhs);
200 rval = getSWNFromStr(rhs);
201 if( lval.empty() or rval.empty() ) return false;
202 return std::stoul( lval ) < std::stoul( rval );
203}
std::string getValForKey(const std::string &str, const std::string &key)
std::string getSWNFromStr(const std::string &str)

The documentation for this struct was generated from the following files: