Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:44

0001 #ifndef GUARD_cscmap_H
0002 #define GUARD_cscmap_H
0003 
0004 #include <iostream>
0005 #include "OnlineDB/Oracle/interface/Oracle.h"
0006 #include <string>
0007 
0008 class cscmap {
0009 private:
0010   oracle::occi::Environment *env;
0011   oracle::occi::Connection *con;
0012 
0013 public:
0014   /**
0015    * Constructor for cscmap
0016    */
0017   cscmap() noexcept(false);
0018   /**
0019    * Destructor for cscmap
0020    */
0021   ~cscmap() noexcept(false);
0022 
0023   /*  Method 'crate0_chamber' returns for a given logical crate
0024 |   number 'crate0' (values 0-59) and DMB number 'dmb' 
0025 |   (1-5,7-10; for station 4 (no ring 2) DMB No 1-3)
0026 |   chamber identifiers: 'chamber_id' is a string like 'ME+2/2/27'
0027 |   and 'chamber_num' - a corresponding numeric identifier:
0028 |   'ME+2/2/27' => 220122270. Digits from left to right mean:
0029 |   2 - Muon system, 2 - CSC (1=DT,3=RPC), 0 - to separate from further
0030 |   digits, 1 - +Endcap (2 - -Endcap), 2 - station number, 2 - ring number,
0031 |   27 - chamber number, 0 - digit reserved for layer number (=0 for
0032 |   the whole chamber). 'sector' - returns trigger sector number.
0033 |   If 'chamber_num' and 'sector' return -100, it means that 'crate0'
0034 |   is outside the permitted range; -10 means that 'dmb' is outside
0035 |   the permitted range.
0036 */
0037   void crate0_chamber(int crate0,
0038                       int dmb,
0039                       std::string *chamber_id,
0040                       int *chamber_num,
0041                       int *sector,
0042                       int *first_strip_index,
0043                       int *strips_per_layer,
0044                       int *chamber_index);
0045   /* Method 'crate_chamber' returns similar to previous information,
0046 |   but for physical (installed) 'crate' number. By now (2005/11/16)
0047 |   only 2 crates are installed (0 and 1).
0048 |   -1 returned means that infor mation for non-installed crate is requested.
0049 */
0050   void crate_chamber(int crate,
0051                      int dmb,
0052                      std::string *chamber_id,
0053                      int *chamber_num,
0054                      int *sector,
0055                      int *first_strip_index,
0056                      int *strips_per_layer,
0057                      int *chamber_index);
0058   /* Method 'chamber_crate' returns information for a given chamber,
0059 |   'chamber_id', (like 'ME+2/2/27'). 'crate' - physical (installed)
0060 |   crate number (-1 means that crate for the given chamber is not
0061 |   installed), 'dmb' - DMB number (1-5,7-10), 'sector' - trigger sector
0062 |   number, 'chamber_num' - numeric chamber identifier (see above),
0063 |   'crate0' - logical crate number.
0064 |   -100 returned means that 'chamber_id' format is incorrect.
0065 */
0066   void chamber_crate(std::string chamber_id,
0067                      int *crate,
0068                      int *dmb,
0069                      int *sector,
0070                      int *chamber_num,
0071                      int *crate0,
0072                      int *first_strip_index,
0073                      int *strips_per_layer,
0074                      int *chamber_index);
0075 
0076 };  // end of class cscmap
0077 #endif