Skip to content
/ cami Public

AMI C++ client

License

Notifications You must be signed in to change notification settings

ami-team/cami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LPSC      IN2P3      UGA      CERN      CERN

CAMI

CAMI is an AMI C++ client. It was originally developed for the A Toroidal LHC ApparatuS (ATLAS) experiment, one of the two general-purpose detectors at the Large Hadron Collider (LHC).

Installing CAMI

  • Requierments:

Make sure that GCC (or Clang) and OpenSSL are installed:

g++ --version
openssl version
  • Compiling, testing and installing:
make
make test
make install

Installed files: /usr/local/include/cami.h and /usr/local/lib/libcami.a.

Example

try
{
	AMIClient client("ami.in2p3.fr", "/AMI/servlet/net.hep.atlas.Database.Bookkeeping.AMI.Servlet.FrontEnd", 443);

	std::map<std::string, std::string> arguments;

	arguments.insert(std::pair<std::string, std::string>(
		"%MY_ARG1_NAME%",
		"%MY_ARG1_VALUE%"
	));

	arguments.insert(std::pair<std::string, std::string>(
		"%MY_ARG2_NAME%",
		"%MY_ARG2_VALUE%"
	));

	arguments.insert(std::pair<std::string, std::string>(
		"AMIUser",
		"%MY_LOGIN%"
	));

	arguments.insert(std::pair<std::string, std::string>(
		"AMIPass",
		"%MY_PASSWORD%"
	));

	std::string result = client.execute(
		"%MY_COMMAND%",
		arguments
	);

	std::cout << result
		  << std::endl
	;
}
catch(std::exception const &e)
{
	std::cerr << e.what()
		  << std::endl
	;
}

Releases

No releases published

Packages

No packages published