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 {
00022 unsigned int id;
00023 double ped;
00024 double pedErr;
00025 double noise;
00026 double noiseErr;
00027
00028 } TCalRecord;
00029
00044 class CalServer{
00045
00046 private:
00047 TCalRecord cal[32][5][192];
00048 int numChambers;
00049 int chamberIndex, spuIndex, channelIndex;
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);
00100
00101
00102
00103
00108 void Calibrate (CSCChamber* csc);
00109
00110
00111
00112
00113
00114 };
00115