Main Page | Class List | File List | Class Members | File Members | Related Pages

CalServer.h

Go to the documentation of this file.
00001 
00007 #include "CSCChamber.h"
00008  
00009 #ifndef TRUE
00010 #define TRUE 1
00011 #endif
00012  
00013 #ifndef FALSE
00014 #define FALSE 0
00015 #endif
00016  
00017 
00021 typedef struct CalRecord { // stores calibration results per channel
00022   unsigned int id;      // channel ID
00023   double ped;
00024   double pedErr;
00025   double noise;
00026   double noiseErr;
00027   // gain constants to follow...
00028 } TCalRecord;
00029 
00044 class CalServer{ 
00045 
00046   private:
00047   TCalRecord cal[32][5][192]; // chamber, spu, channel
00048   int numChambers;
00049   int chamberIndex, spuIndex, channelIndex; // returned by FindIndex
00050   int FindIndex(CSCStrip* strip);
00051 
00052  public:
00057   CalServer(); 
00058 
00059 
00061   ~CalServer(); 
00062   
00070   int Read (char* filename);
00071 
00072 
00074   void Print();
00075 
00076 
00082   double GetPedestal (CSCStrip* strip);
00083 
00084 
00085 
00090   void Calibrate (CSCStrip* strip); 
00091 
00092 
00093 
00094 
00099   void Calibrate (CSCCluster* cluster); // stores the pedestal in the strips
00100 
00101 
00102 
00103 
00108   void Calibrate (CSCChamber* csc); // stores the pedestal in the strips
00109 
00110 
00111 
00112   //double GetAmplitude (CSCStrip* strip);
00113  
00114 }; 
00115 

Generated on Wed Oct 29 10:35:18 2008 for CSCRead by  doxygen 1.3.9.1