1 #ifndef __JDB_JDBTOOLKIT__
2 #define __JDB_JDBTOOLKIT__
22 namespace JDATABASE {};
23 namespace JPP {
using namespace JDATABASE; }
46 det2id[parameters.OID] = parameters.SERIALNUMBER;
47 id2det[parameters.SERIALNUMBER] = parameters.OID;
121 upi2id[parameters.CLBUPI] = parameters.CLBID;
122 id2upi[parameters.CLBID] = parameters.CLBUPI;
199 const JUPI_t upi(parameters.PBS,
202 parameters.SERIALNUMBER);
204 number2upi[pbs][parameters.SERIALNUMBER] = upi;
235 if (q != p->second.end()) {
269 template<
class JHelper_t,
class ...Args>
270 static void initialise(JHelper_t& helper,
const Args& ...args)
272 helper.initialise(args...);
static JCLBIDHelper & getCLBUPI
Function object for mapping module identifier to UPI of central-logic board.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Universal product identifier (UPI).
Auxiliary class for specifying selection of database data.
Auxiliary class for mapping UPI of central-logic board to module identifier.
JDetectorsHelper getDetector
Function object for mapping serial number to object identifier of detector and vice versa...
std::map< std::string, int > det2id
std::map< JUPI_t, int > upi2id
int operator()(const JUPI_t &upi)
Get module identifier.
void initialise(const JPBS_t &pbs)
Initialise.
Auxiliary class for mapping UPI of product to serial number.
std::map< int, JUPI_t > id2upi
JUPI_t operator()(const int id)
Get UPI.
std::map< JPBS_t, std::map< int, JUPI_t > > number2upi
Auxiliary class for mapping serial number and object identifier of detectors.
void initialise()
Initialise.
void initialise()
Initialise.
Product breakdown structure (PBS).
std::string operator()(const int id)
Get detector identifier.
JUPI_t operator()(const JPBS_t &pbs, const int number)
Get UPI.
JUPIHelper getUPI
Function object for mapping PBS and serial number to UPI.
JCLBIDHelper getCLBID
Function object for mapping UPI of central-logic board to module identifier.
Exception for accessing a value in a collection that is outside of its range.
int operator()(const std::string &detid)
Get detector serial number.
std::map< int, std::string > id2det
Template definition for getting table specific selector.
static JDB & get()
Get connection to database.