Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondCore
DBCommon
src
IOVInfo.cc
Go to the documentation of this file.
1
#include "
CondCore/DBCommon/interface/IOVInfo.h
"
2
3
#include <unistd.h>
4
#include <cstdlib>
5
#include <sstream>
6
#include <vector>
7
namespace
cond {
8
9
std::string
userInfo
() {
10
// this are really static stuff
11
std::ostringstream
user_info
;
12
char
*
user
= ::getenv(
"USER"
);
13
std::vector<char> hname(1024,
'\0'
);
14
char
* hostname = &hname.front();
15
::gethostname(hostname, 1024);
16
char
*
pwd
= ::getenv(
"PWD"
);
17
if
(user) { user_info<<
"USER="
<< user <<
";"
;}
else
{ user_info<<
"USER="
<<
"??;"
;}
18
if
(hostname[0] !=
'\0'
) {user_info<<
"HOSTNAME="
<< hostname <<
";"
;}
19
else
{ user_info<<
"HOSTNAME="
<<
"??;"
;}
20
if
(pwd) {user_info<<
"PWD="
<< pwd <<
";"
;}
else
{user_info<<
"PWD="
<<
"??;"
;}
21
return
user_info.str();
22
}
23
24
}
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
alignCSCRings.pwd
tuple pwd
Definition:
alignCSCRings.py:56
utils.user_info
def user_info
Definition:
utils.py:96
IOVInfo.h
hcal_dqm_sourceclient-file_cfg.user
tuple user
Definition:
hcal_dqm_sourceclient-file_cfg.py:22
cond::userInfo
std::string userInfo()
Definition:
IOVInfo.cc:9
Generated for CMSSW Reference Manual by
1.8.5