ATLAS Offline Software
Classes | Enumerations | Functions | Variables
Crest Namespace Reference

Classes

class  ColumnExistException
 
class  CommonCrestException
 
class  CrestApiBase
 
class  CrestBaseException
 
class  CrestClient
 
class  CrestClientExt
 
class  CrestConflictException
 
class  CrestContainer
 
class  CrestException
 
class  CrestFsClient
 
class  CrestRequest
 
class  FinStructureException
 
class  urlParameters
 

Enumerations

enum  TypeId {
  TypeId::Bool, TypeId::UChar, TypeId::Int16, TypeId::UInt16,
  TypeId::Int32, TypeId::UInt32, TypeId::UInt63, TypeId::Int64,
  TypeId::Float, TypeId::Double, TypeId::String255, TypeId::String4k,
  TypeId::String64k, TypeId::String16M, TypeId::String128M, TypeId::Blob64k,
  TypeId::Blob16M, TypeId::Blob128M, TypeId::TypeIdCount
}
 
enum  ModeId { ModeId::Standard, ModeId::DCS, ModeId::DCS_FULL }
 
enum  Action { Action::GET = 0, Action::POST = 1, Action::PUT = 2, Action::DELETE = 3 }
 

Functions

size_t WriteCallback (void *contents, size_t size, size_t nmemb, std::vector< char > *output)
 
size_t curlWrite_CallbackFunc_StdString (void *contents, size_t size, size_t nmemb, std::string *s)
 
size_t ReadCallback (void *contents, size_t size, size_t nmemb, std::string *input)
 

Variables

const unsigned int UNKNOWN_TYPE = -1
 
const unsigned int COMMON_TYPE = 0
 
const unsigned int FINALIZE_STRUCTURE_TYPE = 1
 
const unsigned int EXISTS_TYPE = 2
 

Enumeration Type Documentation

◆ Action

enum Crest::Action
strong
Enumerator
GET 
POST 
PUT 
DELETE 

Definition at line 20 of file CrestRequest.h.

21  {
22  GET = 0,
23  POST = 1,
24  PUT = 2,
25  DELETE = 3
26  };

◆ ModeId

enum Crest::ModeId
strong
Enumerator
Standard 
DCS 
DCS_FULL 

Definition at line 51 of file CrestContainer.h.

51  {
53  };

◆ TypeId

enum Crest::TypeId
strong
Enumerator
Bool 
UChar 
Int16 
UInt16 
Int32 
UInt32 
UInt63 
Int64 
Float 
Double 
String255 
String4k 
String64k 
String16M 
String128M 
Blob64k 
Blob16M 
Blob128M 
TypeIdCount 

Definition at line 24 of file CrestContainer.h.

Function Documentation

◆ curlWrite_CallbackFunc_StdString()

size_t Crest::curlWrite_CallbackFunc_StdString ( void *  contents,
size_t  size,
size_t  nmemb,
std::string *  s 
)

Definition at line 65 of file CrestRequest.cxx.

66  {
67  size_t newLength = size * nmemb;
68 
69  try
70  {
71  s->append((char *)contents, newLength);
72  }
73  catch (std::bad_alloc &e)
74  {
75  std::cout << "Not enough memory to allocate "<<newLength<<" bytes "<< std::endl;
76  return 0;
77  }
78  return newLength;
79  }

◆ ReadCallback()

size_t Crest::ReadCallback ( void *  contents,
size_t  size,
size_t  nmemb,
std::string *  input 
)

Definition at line 82 of file CrestRequest.cxx.

83  {
84  size_t totalSize = size * nmemb;
85  if (!input->empty())
86  {
87  // Copy data from the input string to the buffer
88  size_t toCopy = std::min(totalSize, input->size());
89  std::memcpy(contents, input->c_str(), toCopy);
90  input->erase(0, toCopy);
91  return toCopy;
92  }
93  return 0;
94  }

◆ WriteCallback()

size_t Crest::WriteCallback ( void *  contents,
size_t  size,
size_t  nmemb,
std::vector< char > *  output 
)

Definition at line 58 of file CrestRequest.cxx.

59  {
60  size_t total_size = size * nmemb;
61  output->insert(output->end(), reinterpret_cast<char *>(contents), reinterpret_cast<char *>(contents) + total_size);
62  return total_size;
63  }

Variable Documentation

◆ COMMON_TYPE

const unsigned int Crest::COMMON_TYPE = 0

Definition at line 12 of file CrestCondException.h.

◆ EXISTS_TYPE

const unsigned int Crest::EXISTS_TYPE = 2

Definition at line 14 of file CrestCondException.h.

◆ FINALIZE_STRUCTURE_TYPE

const unsigned int Crest::FINALIZE_STRUCTURE_TYPE = 1

Definition at line 13 of file CrestCondException.h.

◆ UNKNOWN_TYPE

const unsigned int Crest::UNKNOWN_TYPE = -1

Definition at line 11 of file CrestCondException.h.

AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Crest::Action::POST
@ POST
Crest::TypeId::UInt16
@ UInt16
Crest::TypeId::Blob128M
@ Blob128M
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
Crest::Action::DELETE
@ DELETE
Crest::TypeId::UInt63
@ UInt63
Crest::ModeId::DCS_FULL
@ DCS_FULL
Crest::TypeId::String16M
@ String16M
Crest::TypeId::String255
@ String255
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Crest::TypeId::Blob64k
@ Blob64k
Crest::TypeId::Float
@ Float
Crest::TypeId::Bool
@ Bool
Crest::TypeId::Blob16M
@ Blob16M
Crest::TypeId::UChar
@ UChar
GET
#define GET(n)
Definition: MD5.cxx:153
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Crest::TypeId::UInt32
@ UInt32
Crest::TypeId::Int32
@ Int32
contents
void contents(std::vector< std::string > &keys, TDirectory *td, const std::string &directory, const std::string &pattern, const std::string &path)
Definition: computils.cxx:320
Crest::TypeId::String128M
@ String128M
merge.output
output
Definition: merge.py:17
Crest::Action::PUT
@ PUT
Crest::ModeId::Standard
@ Standard
Crest::TypeId::Int64
@ Int64
Crest::TypeId::String64k
@ String64k
Crest::TypeId::TypeIdCount
@ TypeIdCount
Crest::ModeId::DCS
@ DCS
Crest::TypeId::String4k
@ String4k
Crest::TypeId::Int16
@ Int16
python.copyTCTOutput.totalSize
totalSize
Definition: copyTCTOutput.py:93
Crest::TypeId::Double
@ Double