Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

ArchTestNames.cpp

00001 #include "ArchTestNames.h"
00002 #include <iostream>
00003 #include <stdlib.h>
00004 #include <string>
00005 
00006 using std::string;
00007 
00008 /********************************** ArchScan Methods Definitions ************************/
00009 
00010 
00011 /***********************  Constructor  *************** */
00012 
00013 ArchTestNames::ArchTestNames()  {
00014 
00015   runID ="Run?";
00016   moduleID ="Module?";
00017   testType ="Stand-AloneScans";
00018   
00019 }
00020   
00021   
00022 ArchTestNames::ArchTestNames(const long runNumber, const string Pers_moduleName,const string tType )  {
00023   
00024   char tmp_runID[40];
00025   sprintf(tmp_runID,"Run%i",runNumber);
00026   runID = tmp_runID ;
00027 
00028   int dot = Pers_moduleName.find('.');
00029   moduleID = "Module" + Pers_moduleName.substr(0, dot) ;
00030 
00031   int size = tType.size();
00032   int first_colon = tType.find(':');
00033   string tmp_testType = tType.substr(first_colon+1, size);
00034   int second_colon = tmp_testType.find(':');
00035   size = tmp_testType.size();
00036   tmp_testType = tmp_testType.substr(second_colon+1, size);
00037   string tag("Result");
00038   int start = tmp_testType.find(tag);
00039   //cout <<"start = "<<start<<endl;
00040   testType = tmp_testType.substr(0, start);
00041   //cout <<" TestType = " << testType<<endl;
00042 
00043 }
00044 
00045 
00046 void ArchTestNames::setModuleName(string moduleName)  {
00047     
00048   int dot = moduleName.find('.');
00049   moduleID = "Module" + moduleName.substr(0, dot) ;
00050   
00051   
00052 }
00053 
00054 
00055 void ArchTestNames::setTestType(string tType) {
00056   int size = tType.size();
00057   int first_colon = tType.find(':');
00058   string tmp_testType = tType.substr(first_colon+1, size);
00059   int second_colon = tmp_testType.find(':');
00060   size = tmp_testType.size();
00061   tmp_testType = tmp_testType.substr(second_colon+1, size);
00062   string tag("Result");
00063   int start = tmp_testType.find(tag);
00064   //cout <<"start = "<<start<<endl;
00065   testType = tmp_testType.substr(0, start);
00066   //cout <<" TestType = " << testType<<endl;
00067   
00068 
00069 }
00070 
00071 const string ArchTestNames::getDefectID(unsigned int firstChannel, unsigned int NChannels) {
00072 
00073   string DefectName;
00074   char tmp_DefectName[40];
00075   sprintf(tmp_DefectName,"Defects_First%i_%i",firstChannel,NChannels);
00076   DefectName= tmp_DefectName;
00077   return DefectName;
00078 
00079 }
00080 
00081 const string ArchTestNames::getfilename() {
00082 
00083   string filename;
00084   //filename = runID + "." + testID + ".root";
00085   filename = runID + ".root";
00086   return filename;
00087 
00088 }
00089 
00090 const string ArchTestNames::getIndexFileName() {
00091 
00092   string index;
00093   index = "ArchIndex";
00094   index = index + ".out";
00095   return index;
00096 
00097 }
00098 
00099 const string ArchTestNames::getChipTrimID(int chipN) {
00100 
00101   string ChipTrimID;
00102   char tmp_ChipTrimID[40];
00103   sprintf(tmp_ChipTrimID,"Trim_Chip%i",chipN);
00104   ChipTrimID = tmp_ChipTrimID;
00105   return ChipTrimID;
00106 
00107 }
00108 
00109 
00110 const string ArchTestNames::getChipTrimFitID(int chipN) {
00111 
00112   string ChipTrimFitID;
00113   char tmp_ChipTrimFitID[40];
00114   sprintf(tmp_ChipTrimFitID,"TrimFit_Chip%i",chipN);
00115   ChipTrimFitID = tmp_ChipTrimFitID;
00116   return ChipTrimFitID;
00117 
00118 }
00119 
00120 
00121 const string ArchTestNames::getFBChipN(unsigned int chipN) {
00122 
00123   string ChipN;
00124   char tmp_ChipN[40];
00125   sprintf(tmp_ChipN,"FullBypas_Chip%i",chipN);
00126   ChipN= tmp_ChipN;
00127   return ChipN;
00128 
00129 }
00130 
00131 const string ArchTestNames::getChipFitID(unsigned int chipN) {
00132 
00133   string ChipN;
00134   char tmp_ChipN[40];
00135   sprintf(tmp_ChipN,"ChipFit%i",chipN);
00136   ChipN= tmp_ChipN;
00137   return ChipN;
00138 
00139 }
00140 
00141 const string ArchTestNames::getChipGraphID(unsigned int chipN) {
00142 
00143   string ChipN;
00144   char tmp_ChipN[40];
00145   sprintf(tmp_ChipN,"ChipGraph%i",chipN);
00146   ChipN= tmp_ChipN;
00147   return ChipN;
00148 
00149 }
00150 
00151 const string ArchTestNames::getChannelFitID(unsigned int channelN) {
00152 
00153   string ChannelN;
00154   char tmp_ChannelN[40];
00155   sprintf(tmp_ChannelN,"ChannelFit%i",channelN);
00156   ChannelN= tmp_ChannelN;
00157   return ChannelN;
00158 
00159 }
00160 
00161 const string ArchTestNames::getChannelGraphID(unsigned int channelN) {
00162 
00163   string ChannelN;
00164   char tmp_ChannelN[40];
00165   sprintf(tmp_ChannelN,"ChannelGraph%i",channelN);
00166   ChannelN= tmp_ChannelN;
00167   return ChannelN;
00168 
00169 }
00170 
00171 const string ArchTestNames::getChipNOFitID(unsigned int chipN) {
00172 
00173   string ChipN;
00174   char tmp_ChipN[40];
00175   sprintf(tmp_ChipN,"ChipNOFit%i",chipN);
00176   ChipN= tmp_ChipN;
00177   return ChipN;
00178 
00179 }
00180 
00181 const string ArchTestNames::getChipNOGraphID(unsigned int chipN) {
00182 
00183   string ChipN;
00184   char tmp_ChipN[40];
00185   sprintf(tmp_ChipN,"ChipNOGraph%i",chipN);
00186   ChipN= tmp_ChipN;
00187   return ChipN;
00188 
00189 }
00190 
00191 
00192 const string ArchTestNames::getTimewalkID(unsigned int chipN) {
00193 
00194   string ChipN;
00195   char tmp_ChipN[40];
00196   sprintf(tmp_ChipN,"TimeWalk%i",chipN);
00197   ChipN= tmp_ChipN;
00198   return ChipN;
00199 
00200 }
00201 
00202 
00203 const string ArchTestNames::getCalibrationID(unsigned int chipN) {
00204 
00205   string ChipN;
00206   char tmp_ChipN[40];
00207   sprintf(tmp_ChipN,"Calibration%i",chipN);
00208   ChipN= tmp_ChipN;
00209   return ChipN;
00210 
00211 }

Generated on Thu Jul 15 09:50:43 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5