ATLAS Offline Software
IReadCards.cxx
Go to the documentation of this file.
1 
22 #include "ReadCards.h"
23 #include "IReadCards.h"
24 
25 
26 ReadCards* rp = NULL;
27 
28 
29 void initcards_(const char* s) {
30  rp = new ReadCards(s);
31 }
32 
33 void deletecards_(void) {
34  if ( rp ) delete rp;
35 }
36 
37 
38 
39 void getstring_(const char* tag, char* s) {
40  string val = rp->GetString(tag);
41  const char* sp = val.c_str();
42  while ( ( (*s++) = (*sp++) ) );
43  (*(s-1)) = ' ';
44  return;
45 }
46 
47 
48 
49 void isdefined_(const char* tag, int& i) {
50  i = ( rp->isTagDefined(tag) ? 1 : 0 );
51 }
52 
53 
54 void getdvalue_(const char* tag, double& d) {
55  d = rp->GetValue(tag);
56 }
57 
58 void getfvalue_(const char* tag, float& f) {
59  f = rp->GetValue(tag);
60 }
61 
62 
63 void getivalue_(const char* tag, int& i) {
64  i = int(rp->GetValue(tag));
65 }
66 
67 void getbvalue_(const char* tag, bool& b) {
68  b = bool(rp->GetValue(tag));
69 }
70 
71 
72 void getdvector_(const char* tag, double* d) {
74  for ( unsigned i=0 ; i<dv.size() ; i++ ) d[i] = dv[i];
75 }
76 
77 void getivector_(const char* tag, int* d) {
79  for ( unsigned i=0 ; i<dv.size() ; i++ ) d[i] = int(dv[i]);
80 }
81 
82 void printcards_() { rp->print(); }
83 
84 
85 
86 
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PlotCalibFromCool.dv
dv
Definition: PlotCalibFromCool.py:762
getbvalue_
void getbvalue_(const char *tag, bool &b)
Definition: IReadCards.cxx:67
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
getivalue_
void getivalue_(const char *tag, int &i)
Definition: IReadCards.cxx:63
ReadCards::GetVector
const std::vector< double > GetVector(unsigned i) const
Definition: ReadCards.h:68
getfvalue_
void getfvalue_(const char *tag, float &f)
Definition: IReadCards.cxx:58
hist_file_dump.d
d
Definition: hist_file_dump.py:137
printcards_
void printcards_()
Definition: IReadCards.cxx:82
IReadCards.h
getivector_
void getivector_(const char *tag, int *d)
Definition: IReadCards.cxx:77
getdvalue_
void getdvalue_(const char *tag, double &d)
Definition: IReadCards.cxx:54
ReadCards::GetString
std::string GetString(const std::string &tag) const
Definition: ReadCards.h:93
ReadCards
Get tag-value pairs from a file.
Definition: ReadCards.h:50
ReadCards.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
vector< double >
getdvector_
void getdvector_(const char *tag, double *d)
Definition: IReadCards.cxx:72
hist_file_dump.f
f
Definition: hist_file_dump.py:135
isdefined_
void isdefined_(const char *tag, int &i)
Definition: IReadCards.cxx:49
getstring_
void getstring_(const char *tag, char *s)
Definition: IReadCards.cxx:39
initcards_
void initcards_(const char *s)
Definition: IReadCards.cxx:29
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
deletecards_
void deletecards_(void)
Definition: IReadCards.cxx:33
ReadCards::isTagDefined
bool isTagDefined(const string &tag) const
Definition: ReadCards.h:61
ReadCards::print
void print()
Definition: ReadCards.cxx:484
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
ReadCards::GetValue
double GetValue(const string &tag) const
Definition: ReadCards.h:84
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
rp
ReadCards * rp
Definition: IReadCards.cxx:26
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60