CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 #ifndef HH_CHIPSTATUS
002 #define HH_CHIPSTATUS
003 #include <iostream>
004 #include <sstream>
005 #include <fstream>
006 #include <cstdio>
007 #include <cstdlib>
008 #include <string>
009 #include <ctime>
010 #include <iomanip>
011 #include <map>
012 #include "DBObjects/TimeStamp.hh"
013 #include "DBManager/Result.hh"
014 #include "CalibDB/ROKey.hh"
015 #include "DBViews/SVX_Configurations.hh"
016 #include "DBViews/SVX_Configurations.Defs.hh"
017 #include "DBViews/SVX_Rundate_View.hh"
018 #include "DBViews/SVX_Rundate_View.Defs.hh"
019 #include "TrackingObjects/SiData/SiChipKey.hh"
020 #include "TrackingObjects/SiData/Chipstream.hh"
021 #include "SiliconGeometry/SiDigiCode.hh"
022 
023 /**************************************************************
024     Class creating and maintaining a map of active chip bit 
025     settings  in a given run
026                                     V.Nagaslaev,  May 2001
027 ***************************************************************/
028 
029 class ChipStatus{
030 public:
031 
032   // copy constructor
033   ChipStatus(const ChipStatus &);
034 
035   // constructor creating chip configurations map for a given run
036   // online production database is ONLY accessible from B0 nodes!
037   ChipStatus(std::string dbid, int runnumber);
038 
039   // destructor
040   ~ChipStatus();
041 
042   int  allDPS();   // DPS global status key, 0-all off, 1-all on, 2-mixed
043 
044 /* laddersOn(key) prints out ladder status:  
045 key=0- lists active ladders, key=1- more details,  key=2-full info. 
046 ISL naming still needs fixing. Ladder legend corresponds to the last 
047 readout chip in the hdi.
048 Returns total number of hdi's in the configuration   */
049 
050   int laddersOn(int key) const; 
051 
052 // getMyron()=  0-no Myron, 1- normal Myron mode, 3- Early Myron
053   int getMyron() const; 
054   int getModeL00() const;  
055   int getModeSVX() const;  
056   int getModeISL() const;  
057 
058 // Global mode, currently==allDPS()
059   int getModeGlobal() const;  
060 
061   /* findJobset() looks for a jobset relevant for this run.
062  The text file with name filename and jobset definitions should be
063  accessible  */
064   int findJobset(std::string filename) const; 
065 
066   // run date, runtype and Nevents  accessors
067   time_t getRunDate();
068   long getRunType();
069   long getNevents();
070   long getExtra0();
071 
072 // string="onotl_prd_read" for online, offline- "ofotl_prd_read"
073   void setDB(std::string );  
074 
075   bool valid() const;   // test if configuration evaluation is done
076 
077 // getChipInfo returns constant pointer to the object map
078 const std::map<SiChipKey, Chipstream>* getChipInfo() const;
079 
080 private:
081 
082 Result::Code makeMap(int);
083 int  getBit(const char *, const int);
084 void putBit(char *, const int, const int);
085 void putABit(char *, const int, const int);
086 int  sortBitString(const int, const int, char []);
087 
088   int  _runnumber;
089   long  _runtype, _nevents, _extra0;
090   std::string _dbname;
091   int _myronMode;
092   int _modeGlobal, _modeL00, _modeSVX, _modeISL;
093   bool _valid;
094   time_t _rundate;
095   bool _runIncludesSilicon;
096 
097 std::map<SiChipKey, Chipstream> *chipInfo;
098 std::map<SiChipKey, Chipstream>::iterator chip_iter;
099 
100 };
101 
102 #endif
103 

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov