LIRun Class Reference

#include <LIRun.h>

Inheritance diagram for LIRun:
LILookup

List of all members.

Public Types

enum  ELIRunType {
  kUnknown = 0, kFullCalib = 1, kDriftCalib = 2, kGainCurve = kFullCalib,
  kDriftPoint = kDriftCalib
}
typedef enum LIRun::ELIRunType LIRunType_t

Public Member Functions

 LIRun ()
 LIRun (Int_t pulserBox, Int_t led, LIRunType_t LIRunType, Detector::Detector_t detectorType=Detector::kUnknown)
 ~LIRun ()
void AddPoint (Double_t Ph, Double_t Adc, Double_t Pin=-1, Double_t Pin2=-1, Double_t AdcF=-1, Double_t AdcLow=-1, Double_t AdcHigh=-1, Double_t AdcLowF=-1, Double_t AdcHighF=-1)
void SetLIInfo (Int_t pulserBox, Int_t led, LIRunType_t LIRunType)
void SetHighLowPhPoints (Double_t highestPh, Double_t lowestPh)
void SetHighLowPinPoints (Double_t highestPin, Double_t lowestPin)
std::vector< Double_t > GetAdc ()
Double_t GetAdc (UInt_t i)
std::vector< Double_t > GetAdcF ()
std::vector< Double_t > GetAdcHigh ()
std::vector< Double_t > GetAdcHighF ()
std::vector< Double_t > GetAdcLow ()
std::vector< Double_t > GetAdcLowF ()
Detector::Detector_t GetDetector ()
Int_t GetLed ()
Double_t GetMaxAdc ()
Double_t GetMaxAdcF ()
Double_t GetMaxPin ()
Double_t GetMaxPin (Int_t pin1or2)
Double_t GetMinAdc ()
Double_t GetMinAdcF ()
Int_t GetPb ()
std::vector< Double_t > GetPin (Int_t pin1or2)
Double_t GetPin (Int_t pin1or2, UInt_t i)
std::vector< Double_t > GetPh ()
Double_t GetPh (UInt_t i)
std::string GetRunTypeAsString ()
void PrintAll ()
void PrintConfig (LIRunType_t LIRunType)

Private Member Functions

void InitialiseVariables ()

Private Attributes

std::vector< Double_t > fAdc
std::vector< Double_t > fAdcF
std::vector< Double_t > fAdcHigh
std::vector< Double_t > fAdcHighF
std::vector< Double_t > fAdcLow
std::vector< Double_t > fAdcLowF
std::vector< Double_t > fPin
std::vector< Double_t > fPin2
std::vector< Double_t > fPh
Detector::Detector_t fDetector
Int_t fLed
Double_t fHighestPh
Double_t fHighestPin
LIRunType_t fLIRunType
Double_t fLowestPh
Double_t fLowestPin
Double_t fMaxPin
Double_t fMaxPin2
Double_t fMinAdc
Double_t fMaxAdc
Double_t fMinAdcF
Double_t fMaxAdcF
Int_t fPulserBox
std::string fS

Detailed Description

Definition at line 26 of file LIRun.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kUnknown 
kFullCalib 
kDriftCalib 
kGainCurve 
kDriftPoint 

Definition at line 32 of file LIRun.h.

00032                           {
00033     kUnknown    = 0,
00034     kFullCalib  = 1,
00035     kDriftCalib = 2,
00036     kGainCurve  = kFullCalib,
00037     kDriftPoint = kDriftCalib
00038   } LIRunType_t;


Constructor & Destructor Documentation

LIRun::LIRun (  ) 

Definition at line 27 of file LIRun.cxx.

References Msg::kVerbose, and MSG.

00028 {
00029   MSG("LIRun", Msg::kVerbose) 
00030     <<"Running LIRun default constructor..."<<endl;
00031   
00032   this->InitialiseVariables();  
00033   
00034   MSG("LIRun", Msg::kVerbose) 
00035     <<"Finished LIRun default constructor"<<endl;
00036 }

LIRun::LIRun ( Int_t  pulserBox,
Int_t  led,
LIRunType_t  LIRunType,
Detector::Detector_t  detectorType = Detector::kUnknown 
)

Definition at line 40 of file LIRun.cxx.

References fDetector, fLed, fLIRunType, fPulserBox, InitialiseVariables(), Msg::kVerbose, and MSG.

00042 {
00043   MSG("LIRun", Msg::kVerbose) 
00044     <<"Running LIRun constructor..."<<endl;
00045   
00046   this->InitialiseVariables();
00047 
00048   fLed=led;
00049   fPulserBox=pulserBox;
00050   fDetector=detectorType;
00051   fLIRunType=LIRunType;
00052 
00053   MSG("LIRun", Msg::kVerbose) 
00054     <<"Finished LIRun constructor"<<endl;
00055 }

LIRun::~LIRun (  ) 

Definition at line 59 of file LIRun.cxx.

References Msg::kVerbose, and MSG.

00060 {
00061   MSG("LIRun", Msg::kVerbose) 
00062     <<"Running LIRun destructor..."<<endl;
00063   
00064   
00065   MSG("LIRun", Msg::kVerbose) 
00066     <<"Finished LIRun destructor"<<endl;
00067 }


Member Function Documentation

void LIRun::AddPoint ( Double_t  Ph,
Double_t  Adc,
Double_t  Pin = -1,
Double_t  Pin2 = -1,
Double_t  AdcF = -1,
Double_t  AdcLow = -1,
Double_t  AdcHigh = -1,
Double_t  AdcLowF = -1,
Double_t  AdcHighF = -1 
)

Definition at line 127 of file LIRun.cxx.

References fAdc, fAdcF, fAdcHigh, fAdcHighF, fAdcLow, fAdcLowF, LILookup::FindInsertPoint(), fMaxAdc, fMaxAdcF, fMaxPin, fMaxPin2, fMinAdc, fMinAdcF, fPh, fPin, fPin2, Msg::kDebug, Msg::kVerbose, MSG, and LILookup::SetNewPoint().

00132 {
00133   MSG("LIRun",Msg::kVerbose)
00134     <<"Running AddPoint method..."<<endl;
00135 
00136   UInt_t insertPoint=FindInsertPoint(fPh,newPh);
00137 
00138   //these are the minimum two that should be filled
00139   SetNewPoint(fPh,newPh,insertPoint);
00140   SetNewPoint(fAdc,a,insertPoint);
00141 
00142   //fill the others if a value is given
00143   SetNewPoint(fPin,p,insertPoint);
00144   SetNewPoint(fPin2,p2,insertPoint);
00145   SetNewPoint(fAdcF,aF,insertPoint);
00146   SetNewPoint(fAdcLow,aLow,insertPoint);
00147   SetNewPoint(fAdcHigh,aHigh,insertPoint);
00148   SetNewPoint(fAdcLowF,aLowF,insertPoint);
00149   SetNewPoint(fAdcHighF,aHighF,insertPoint);
00150 
00151   //calcuate fMaxPin
00152   if (p>fMaxPin) fMaxPin=p;
00153   if (p2>fMaxPin2) fMaxPin2=p2;
00154   //calcuate min and max adc
00155   if (a>fMaxAdc) fMaxAdc=a;
00156   if (a<fMinAdc) fMinAdc=a;
00157   //calcuate min and max adc on far side of strip end
00158   if (aF>fMaxAdcF) fMaxAdcF=aF;
00159   if (aF<fMinAdcF) fMinAdcF=aF;
00160 
00161   MSG("LIRun",Msg::kDebug) 
00162     <<"Added point to LIRun object: ph="<<newPh<<", adc="<<a
00163     <<", pin="<<p<<", pin2="<<p2<<endl;
00164 
00165   MSG("LIRun",Msg::kVerbose) 
00166     <<"AddPoint method finished"<<endl;
00167 }

Double_t LIRun::GetAdc ( UInt_t  i  ) 

Definition at line 290 of file LIRun.cxx.

References fAdc, Msg::kVerbose, Msg::kWarning, and MSG.

00291 {
00292   MSG("LIRun",Msg::kVerbose) 
00293     <<"Running GetAdc method..."<<endl;
00294   
00295   if (i<fAdc.size()) return fAdc[i];
00296   else {
00297     MSG("LIRun",Msg::kWarning) 
00298       <<"Only "<<fAdc.size()<<" elements available, returning -1"<<endl;
00299     return -1;
00300   }
00301 
00302   MSG("LIRun",Msg::kVerbose) 
00303     <<"GetAdc method finished"<<endl;
00304 }

vector< Double_t > LIRun::GetAdc (  ) 

Definition at line 278 of file LIRun.cxx.

References fAdc, Msg::kVerbose, and MSG.

00279 {
00280   MSG("LIRun",Msg::kVerbose) 
00281     <<"Running GetAdc method..."<<endl;
00282 
00283   MSG("LIRun",Msg::kVerbose) 
00284     <<"GetAdc method finished"<<endl;
00285   return fAdc;
00286 }

vector< Double_t > LIRun::GetAdcF (  ) 

Definition at line 308 of file LIRun.cxx.

References fAdcF, Msg::kVerbose, and MSG.

00309 {
00310   MSG("LIRun",Msg::kVerbose) 
00311     <<"Running GetAdcF method..."<<endl;
00312 
00313   MSG("LIRun",Msg::kVerbose) 
00314     <<"GetAdcF method finished"<<endl;
00315   return fAdcF;
00316 }

vector< Double_t > LIRun::GetAdcHigh (  ) 

Definition at line 344 of file LIRun.cxx.

References fAdcHigh, Msg::kVerbose, and MSG.

00345 {
00346   MSG("LIRun",Msg::kVerbose) 
00347     <<"Running GetAdcHigh method..."<<endl;
00348 
00349   MSG("LIRun",Msg::kVerbose) 
00350     <<"GetAdcHigh method finished"<<endl;
00351   return fAdcHigh;
00352 }

vector< Double_t > LIRun::GetAdcHighF (  ) 

Definition at line 356 of file LIRun.cxx.

References fAdcHighF, Msg::kVerbose, and MSG.

00357 {
00358   MSG("LIRun",Msg::kVerbose) 
00359     <<"Running GetAdcHighF method..."<<endl;
00360 
00361   MSG("LIRun",Msg::kVerbose) 
00362     <<"GetAdcHighF method finished"<<endl;
00363   return fAdcHighF;
00364 }

vector< Double_t > LIRun::GetAdcLow (  ) 

Definition at line 320 of file LIRun.cxx.

References fAdcLow, Msg::kVerbose, and MSG.

00321 {
00322   MSG("LIRun",Msg::kVerbose) 
00323     <<"Running GetAdcLow method..."<<endl;
00324 
00325   MSG("LIRun",Msg::kVerbose) 
00326     <<"GetAdcLow method finished"<<endl;
00327   return fAdcLow;
00328 }

vector< Double_t > LIRun::GetAdcLowF (  ) 

Definition at line 332 of file LIRun.cxx.

References fAdcLowF, Msg::kVerbose, and MSG.

00333 {
00334   MSG("LIRun",Msg::kVerbose) 
00335     <<"Running GetAdcLowF method..."<<endl;
00336 
00337   MSG("LIRun",Msg::kVerbose) 
00338     <<"GetAdcLowF method finished"<<endl;
00339   return fAdcLowF;
00340 }

Detector::Detector_t LIRun::GetDetector (  ) 

Definition at line 430 of file LIRun.cxx.

References fDetector, Msg::kVerbose, and MSG.

00431 {
00432   MSG("LIRun",Msg::kVerbose) 
00433     <<"Running GetLed method..."<<endl;
00434 
00435   MSG("LIRun",Msg::kVerbose) 
00436     <<"GetLed method finished"<<endl;
00437   return fDetector;
00438 }

Int_t LIRun::GetLed (  ) 

Definition at line 442 of file LIRun.cxx.

References fLed, Msg::kVerbose, and MSG.

00443 {
00444   MSG("LIRun",Msg::kVerbose) 
00445     <<"Running GetLed method..."<<endl;
00446 
00447   MSG("LIRun",Msg::kVerbose) 
00448     <<"GetLed method finished"<<endl;
00449   return fLed;
00450 }

Double_t LIRun::GetMaxAdc (  ) 

Definition at line 171 of file LIRun.cxx.

References fMaxAdc.

00172 {
00173   return fMaxAdc;
00174 }

Double_t LIRun::GetMaxAdcF (  ) 

Definition at line 185 of file LIRun.cxx.

References fMaxAdcF.

00186 {
00187   return fMaxAdcF;
00188 }

Double_t LIRun::GetMaxPin ( Int_t  pin1or2  ) 

Definition at line 224 of file LIRun.cxx.

References fMaxPin, fMaxPin2, Msg::kVerbose, Msg::kWarning, and MSG.

00225 {
00226   MSG("LIRun",Msg::kVerbose) 
00227     <<"Running GetMaxPin method..."<<endl;
00228   
00229   if (pin1or2==1){
00230     return fMaxPin;
00231   }
00232   else if (pin1or2==2){
00233     return fMaxPin2;
00234   }
00235   else {
00236     MSG("LIRun",Msg::kWarning) 
00237       <<"There are only 2 pins, GetMaxPin must have argument"
00238       <<" value of 1 or 2"<<endl;
00239   }
00240 
00241   MSG("LIRun",Msg::kVerbose) 
00242     <<"GetMaxPin method finished"<<endl;
00243   return -1;
00244 }

Double_t LIRun::GetMaxPin (  ) 

Definition at line 199 of file LIRun.cxx.

References fMaxPin, fMaxPin2, Msg::kVerbose, Msg::kWarning, and MSG.

00200 {
00201   MSG("LIRun",Msg::kVerbose) 
00202     <<"Running GetMaxPin method..."<<endl;
00203   
00204   if (fMaxPin==fMaxPin2){
00205     MSG("LIRun",Msg::kWarning) 
00206       <<"The two pins only have one max value, pin1="<<fMaxPin
00207       <<", pin2="<<fMaxPin2
00208       <<endl;
00209   }
00210   else if (fMaxPin>fMaxPin2){
00211     return fMaxPin;
00212   }
00213   else{
00214     return fMaxPin2;
00215   }
00216 
00217   MSG("LIRun",Msg::kVerbose) 
00218     <<"GetMaxPin method finished"<<endl;
00219   return -1;
00220 }

Double_t LIRun::GetMinAdc (  ) 

Definition at line 178 of file LIRun.cxx.

References fMinAdc.

00179 {
00180   return fMinAdc;
00181 }

Double_t LIRun::GetMinAdcF (  ) 

Definition at line 192 of file LIRun.cxx.

References fMinAdcF.

00193 {
00194   return fMinAdcF;
00195 }

Int_t LIRun::GetPb (  ) 

Definition at line 454 of file LIRun.cxx.

References fPulserBox, Msg::kVerbose, and MSG.

00455 {
00456   MSG("LIRun",Msg::kVerbose) 
00457     <<"Running GetPb method..."<<endl;
00458 
00459   MSG("LIRun",Msg::kVerbose) 
00460     <<"GetPb method finished"<<endl;
00461   return fPulserBox;
00462 }

Double_t LIRun::GetPh ( UInt_t  i  ) 

Definition at line 260 of file LIRun.cxx.

References fPh, Msg::kVerbose, Msg::kWarning, and MSG.

00261 {
00262   MSG("LIRun",Msg::kVerbose) 
00263     <<"Running GetPh method..."<<endl;
00264   
00265   if (i<fPh.size()) return fPh[i];
00266   else {
00267     MSG("LIRun",Msg::kWarning) 
00268       <<"Only "<<fPh.size()<<" elements available, returning -1"<<endl;
00269     return -1;
00270   }
00271 
00272   MSG("LIRun",Msg::kVerbose) 
00273     <<"GetPh method finished"<<endl;
00274 }

vector< Double_t > LIRun::GetPh (  ) 

Definition at line 248 of file LIRun.cxx.

References fPh, Msg::kVerbose, and MSG.

Referenced by operator<(), and operator==().

00249 {
00250   MSG("LIRun",Msg::kVerbose) 
00251     <<"Running GetPh method..."<<endl;
00252 
00253   MSG("LIRun",Msg::kVerbose) 
00254     <<"GetPh method finished"<<endl;
00255   return fPh;
00256 }

Double_t LIRun::GetPin ( Int_t  pin1or2,
UInt_t  i 
)

Definition at line 391 of file LIRun.cxx.

References fPin, fPin2, Msg::kVerbose, Msg::kWarning, and MSG.

00392 {
00393   MSG("LIRun",Msg::kVerbose) 
00394     <<"Running GetPin method..."<<endl;
00395 
00396   //pin2
00397   if (pin1or2==2){
00398     if (i<fPin2.size()) return fPin2[i];
00399     else{
00400       MSG("LIRun",Msg::kWarning) 
00401         <<"Only "<<fPin2.size()<<" elements available, returning -1"
00402         <<endl;
00403       return -1;
00404     }
00405   }
00406   //pin1
00407   else{
00408     if (pin1or2!=1){
00409       MSG("LIRun",Msg::kWarning)
00410         <<"LIRun::GetPin(Int_t,UInt_t) must have first argument of 1or2"
00411         <<", returned pin 1 by default"<<endl;
00412     }
00413 
00414     //return element of pin 1
00415     if (i<fPin.size()) return fPin[i];
00416     else{
00417       MSG("LIRun",Msg::kWarning) 
00418         <<"Only "<<fPin.size()<<" elements available, returning -1"
00419         <<endl;
00420       return -1;
00421     }
00422   }
00423 
00424   MSG("LIRun",Msg::kVerbose) 
00425     <<"GetPin method finished"<<endl;
00426 }

vector< Double_t > LIRun::GetPin ( Int_t  pin1or2  ) 

Definition at line 368 of file LIRun.cxx.

References fPin, fPin2, Msg::kVerbose, Msg::kWarning, and MSG.

00369 {
00370   MSG("LIRun",Msg::kVerbose) 
00371     <<"Running GetPin method..."<<endl;
00372 
00373   if (pin1or2==2){
00374     return fPin2;
00375   }
00376   else{
00377     if (pin1or2!=1){
00378       MSG("LIRun",Msg::kWarning)
00379         <<"LIRun::GetPin(Int_t) must have an argument of 1 or 2"
00380         <<", returned pin 1 by default"<<endl;
00381     }
00382     return fPin;
00383   }
00384 
00385   MSG("LIRun",Msg::kVerbose) 
00386     <<"GetPin method finished"<<endl;
00387 }

string LIRun::GetRunTypeAsString (  ) 

Definition at line 466 of file LIRun.cxx.

References fLIRunType, kDriftCalib, kFullCalib, kUnknown, Msg::kVerbose, and MSG.

Referenced by PrintAll().

00467 {
00468   MSG("LIRun",Msg::kVerbose) 
00469     <<"Running GetRunTypeAsString method..."<<endl;
00470 
00471   if (fLIRunType==kUnknown) return "kUnknown";
00472   else if (fLIRunType==kFullCalib) return "kGainCurve";
00473   else if (fLIRunType==kDriftCalib) return "kDriftPoint";
00474   else return "RunType not valid";
00475 
00476   MSG("LIRun",Msg::kVerbose) 
00477     <<"GetRunTypeAsString method finished"<<endl;
00478 }

void LIRun::InitialiseVariables (  )  [private]

Definition at line 84 of file LIRun.cxx.

References fDetector, fHighestPh, fHighestPin, fLed, fLIRunType, fLowestPh, fLowestPin, fMaxAdc, fMaxAdcF, fMaxPin, fMaxPin2, fMinAdc, fMinAdcF, fPulserBox, fS, kUnknown, Detector::kUnknown, Msg::kVerbose, and MSG.

Referenced by LIRun().

00085 {
00086   MSG("LIRun",Msg::kVerbose) 
00087     <<"Running InitialiseVariables method..."<<endl;
00088 
00089   fDetector=Detector::kUnknown;
00090   fLed=-1;
00091   fLIRunType=kUnknown;
00092   fMaxPin=-1;
00093   fMaxPin2=-1;
00094   fMinAdc=1e6;
00095   fMaxAdc=-1;
00096   fMinAdcF=1e6;
00097   fMaxAdcF=-1;
00098   fPulserBox=-1;
00099   fS="";
00100 
00101   fHighestPh=-1;//ph at highest required adc
00102   fHighestPin=-1;//pin adc at highest required adc
00103   fLowestPh=-1;//ph at lowest required adc
00104   fLowestPin=-1;//pin adc at lowest required adc
00105 
00106   MSG("LIRun",Msg::kVerbose) 
00107     <<"InitialiseVariables method finished"<<endl;
00108 }

void LIRun::PrintAll (  ) 

Definition at line 482 of file LIRun.cxx.

References fAdc, fAdcF, fAdcHigh, fAdcHighF, fAdcLow, fAdcLowF, fHighestPh, fHighestPin, fLed, fLowestPh, fLowestPin, fMaxAdc, fMaxPin, fMaxPin2, fMinAdc, Form(), fPh, fPin, fPin2, fPulserBox, GetRunTypeAsString(), LILookup::GetVectorAsString(), Msg::kDebug, Msg::kInfo, and MSG.

00483 {
00484   MSG("LIRun",Msg::kDebug) 
00485     <<"Running PrintAll method..."<<endl;
00486 
00487   //declare string
00488   string sConfig="";
00489 
00490   //decide whether to print out various information
00491   if (fMaxPin!=-1){
00492     sConfig+=", fMaxPin=";
00493     sConfig+=Form("%d",static_cast<Int_t>(fMaxPin));
00494   }
00495   if (fMaxPin2!=-1){
00496     sConfig+=", fMaxPin2=";
00497     sConfig+=Form("%d",static_cast<Int_t>(fMaxPin2));
00498   }
00499   if (fMaxAdc!=-1){
00500     sConfig+=", fMaxAdc=";
00501     sConfig+=Form("%d",static_cast<Int_t>(fMaxAdc));
00502   }
00503   if (fMinAdc!=1e6){
00504     sConfig+=", fMinAdc=";
00505     sConfig+=Form("%d",static_cast<Int_t>(fMinAdc));
00506   }
00507   if (fHighestPh!=-1 && fLowestPh!=-1){
00508     sConfig+=", (";
00509     sConfig+=Form("%d",static_cast<Int_t>(fLowestPh));
00510     sConfig+="<PH<";
00511     sConfig+=Form("%d",static_cast<Int_t>(fHighestPh));
00512     sConfig+=")";
00513   }
00514   if (fHighestPin!=-1 && fLowestPin!=-1){
00515     sConfig+=", (";
00516     sConfig+=Form("%d",static_cast<Int_t>(fLowestPin));
00517     sConfig+="<PinAdc<";
00518     sConfig+=Form("%d",static_cast<Int_t>(fHighestPin));
00519     sConfig+=")";
00520   }
00521 
00522   if (fPulserBox!=-1 && fLed!=-1){
00523     MSG("LIRun",Msg::kInfo)
00524       <<"("<<fPulserBox<<":"<<fLed<<") "<<GetRunTypeAsString()<<sConfig
00525       <<endl;  
00526   }
00527 
00528   string sVectors="";
00529 
00530   sVectors+=GetVectorAsString(fPh,"fPh = ");
00531   sVectors+=GetVectorAsString(fAdc,"fAdc = ");
00532   sVectors+=GetVectorAsString(fAdcF,"fAdcF = ");
00533   sVectors+=GetVectorAsString(fPin,"fPin = ");
00534   sVectors+=GetVectorAsString(fPin2,"fPin2 = ");
00535   sVectors+=GetVectorAsString(fAdcHigh,"fAdcHigh = ");
00536   sVectors+=GetVectorAsString(fAdcHighF,"fAdcHighF = ");
00537   sVectors+=GetVectorAsString(fAdcLow,"fAdcLow = ");
00538   sVectors+=GetVectorAsString(fAdcLowF,"fAdcLowF = ");
00539 
00540   if (sVectors!=""){
00541     MSG("LIRun",Msg::kInfo)<<sVectors<<endl; 
00542   }
00543 
00544   MSG("LIRun",Msg::kDebug) 
00545     <<"PrintAll method finished"<<endl;
00546 }

void LIRun::PrintConfig ( LIRunType_t  LIRunType  ) 

Definition at line 550 of file LIRun.cxx.

References Form(), fS, Munits::g, kDriftPoint, kGainCurve, Msg::kInfo, Msg::kVerbose, MSG, LILookup::NUMLEDS, and LILookup::NUMPULSERBOXES.

00551 {
00552   MSG("LIRun",Msg::kVerbose) 
00553     <<"Running PrintConfig method..."<<endl;
00554 
00555   //loop and print out the list of LI run pulse heights 
00556   //in the desired format
00557   if (LIRunType==kGainCurve){
00558     MSG("LIRun",Msg::kInfo)<<endl<<"<fullCalib>"<<endl;
00559   }
00560   else if (LIRunType==kDriftPoint){
00561     MSG("LIRun",Msg::kInfo)<<endl<<"<driftCalib>"<<endl;
00562   }
00563 
00564   Int_t numGainPoints=10;
00565   
00566 
00567   for (Int_t i=0;i<NUMPULSERBOXES;i++){
00568     //leave a line between pulser boxes
00569     if (i>0) MSG("LIRun",Msg::kInfo)<<endl;
00570     for (Int_t j=0;j<NUMLEDS;j++){
00571       //Int_t l=i*NUMLEDS+j;
00572 
00573       string sBox="";
00574       sBox=Form("%d",i);
00575       if (i<10) sBox="0"+sBox;
00576 
00577       string sLed="";
00578       sLed=Form("%d",j+1);
00579       if (j<9) sLed="0"+sLed;
00580 
00581       fS="box"+sBox+"led"+sLed+"#I=";
00582 
00583       for (Int_t g=0;g<numGainPoints;g++){
00584 
00585         //round up pulse height
00586         Double_t rem=0;
00587         Double_t newPh=0;
00588         rem=modf(1.1,&newPh);
00589         if (rem>0.5) newPh++;//round up
00590         
00591         string sPh=Form("%d",static_cast<Int_t>(newPh));
00592         fS+=sPh;
00593         if (g<numGainPoints-1) fS+=",";
00594       }
00595       fS+=";";
00596       //print out the string in the required format
00597       MSG("LIRun",Msg::kInfo)<<fS<<endl; 
00598     } 
00599   }
00600   if (LIRunType==kGainCurve){
00601     MSG("LIRun",Msg::kInfo)<<endl<<"</fullCalib>"<<endl;
00602   }
00603   else if (LIRunType==kDriftPoint){
00604     MSG("LIRun",Msg::kInfo)<<endl<<"</driftCalib>"<<endl;
00605   }
00606   
00607   //This is the format under which the parameters are specified
00608   //in the config file
00609 
00610   // New label under which we specify LI sequence for drift calib:
00611   //<driftCalib>
00612   //box00led01#I=400;
00613   //box00led02#I=440;
00614   //box00led03#I=510;
00615   //[etc., etc.]
00616   //box15led20#I=390;
00617   //</driftCalib>
00618   
00619   // New label under which we specify LI sequence for gain-curve calib:
00620   //<fullCalib>
00621   //box00led01#I=100,200,300,400,500,600,700,800,900,1000;
00622   //box00led02#I=110,220,330,440,550,660,770,880,990,1023;
00623   //[etc., etc.]
00624   //box15led20#I=98,196,294,392,490,588,686,784,882,980;
00625   //</fullCalib>
00626   
00627   MSG("LIRun",Msg::kVerbose) 
00628     <<"PrintConfig method finished"<<endl;
00629 }

void LIRun::SetHighLowPhPoints ( Double_t  highestPh,
Double_t  lowestPh 
)

Definition at line 633 of file LIRun.cxx.

References fHighestPh, fLowestPh, Msg::kVerbose, and MSG.

00634 {
00635   MSG("LIRun",Msg::kVerbose) 
00636     <<"Running SetHighLowPhPoints method..."<<endl;
00637 
00638   fHighestPh=highestPh;//ph at highest required adc
00639   fLowestPh=lowestPh;//ph at lowest required adc
00640 
00641   MSG("LIRun",Msg::kVerbose) 
00642     <<"SetHighLowPhPoints method finished"<<endl;
00643 }

void LIRun::SetHighLowPinPoints ( Double_t  highestPin,
Double_t  lowestPin 
)

Definition at line 647 of file LIRun.cxx.

References fHighestPin, fLowestPin, Msg::kVerbose, and MSG.

00649 {
00650   MSG("LIRun",Msg::kVerbose) 
00651     <<"Running SetHighLowPinPoints method..."<<endl;
00652 
00653   fHighestPin=highestPin;//pin adc at highest required adc
00654   fLowestPin=lowestPin;//pin adc at lowest required adc
00655 
00656   MSG("LIRun",Msg::kVerbose) 
00657     <<"SetHighLowPinPoints method finished"<<endl;
00658 }

void LIRun::SetLIInfo ( Int_t  pulserBox,
Int_t  led,
LIRunType_t  LIRunType 
)

Definition at line 112 of file LIRun.cxx.

References fLed, fLIRunType, fPulserBox, Msg::kVerbose, and MSG.

00113 {
00114   MSG("LIRun",Msg::kVerbose) 
00115     <<"Running SetLIInfo method..."<<endl;
00116 
00117   fLed=l;
00118   fPulserBox=pB;
00119   fLIRunType=LIrt;
00120 
00121   MSG("LIRun",Msg::kVerbose) 
00122     <<"SetLIInfo method finished"<<endl;
00123 }


Member Data Documentation

std::vector<Double_t> LIRun::fAdc [private]

Definition at line 90 of file LIRun.h.

Referenced by AddPoint(), GetAdc(), and PrintAll().

std::vector<Double_t> LIRun::fAdcF [private]

Definition at line 91 of file LIRun.h.

Referenced by AddPoint(), GetAdcF(), and PrintAll().

std::vector<Double_t> LIRun::fAdcHigh [private]

Definition at line 92 of file LIRun.h.

Referenced by AddPoint(), GetAdcHigh(), and PrintAll().

std::vector<Double_t> LIRun::fAdcHighF [private]

Definition at line 93 of file LIRun.h.

Referenced by AddPoint(), GetAdcHighF(), and PrintAll().

std::vector<Double_t> LIRun::fAdcLow [private]

Definition at line 94 of file LIRun.h.

Referenced by AddPoint(), GetAdcLow(), and PrintAll().

std::vector<Double_t> LIRun::fAdcLowF [private]

Definition at line 95 of file LIRun.h.

Referenced by AddPoint(), GetAdcLowF(), and PrintAll().

Definition at line 100 of file LIRun.h.

Referenced by GetDetector(), InitialiseVariables(), and LIRun().

Double_t LIRun::fHighestPh [private]

Definition at line 102 of file LIRun.h.

Referenced by InitialiseVariables(), PrintAll(), and SetHighLowPhPoints().

Double_t LIRun::fHighestPin [private]

Definition at line 103 of file LIRun.h.

Referenced by InitialiseVariables(), PrintAll(), and SetHighLowPinPoints().

Int_t LIRun::fLed [private]

Definition at line 101 of file LIRun.h.

Referenced by GetLed(), InitialiseVariables(), LIRun(), PrintAll(), and SetLIInfo().

Definition at line 104 of file LIRun.h.

Referenced by GetRunTypeAsString(), InitialiseVariables(), LIRun(), and SetLIInfo().

Double_t LIRun::fLowestPh [private]

Definition at line 105 of file LIRun.h.

Referenced by InitialiseVariables(), PrintAll(), and SetHighLowPhPoints().

Double_t LIRun::fLowestPin [private]

Definition at line 106 of file LIRun.h.

Referenced by InitialiseVariables(), PrintAll(), and SetHighLowPinPoints().

Double_t LIRun::fMaxAdc [private]

Definition at line 110 of file LIRun.h.

Referenced by AddPoint(), GetMaxAdc(), InitialiseVariables(), and PrintAll().

Double_t LIRun::fMaxAdcF [private]

Definition at line 112 of file LIRun.h.

Referenced by AddPoint(), GetMaxAdcF(), and InitialiseVariables().

Double_t LIRun::fMaxPin [private]

Definition at line 107 of file LIRun.h.

Referenced by AddPoint(), GetMaxPin(), InitialiseVariables(), and PrintAll().

Double_t LIRun::fMaxPin2 [private]

Definition at line 108 of file LIRun.h.

Referenced by AddPoint(), GetMaxPin(), InitialiseVariables(), and PrintAll().

Double_t LIRun::fMinAdc [private]

Definition at line 109 of file LIRun.h.

Referenced by AddPoint(), GetMinAdc(), InitialiseVariables(), and PrintAll().

Double_t LIRun::fMinAdcF [private]

Definition at line 111 of file LIRun.h.

Referenced by AddPoint(), GetMinAdcF(), and InitialiseVariables().

std::vector<Double_t> LIRun::fPh [private]

Definition at line 98 of file LIRun.h.

Referenced by AddPoint(), GetPh(), and PrintAll().

std::vector<Double_t> LIRun::fPin [private]

Definition at line 96 of file LIRun.h.

Referenced by AddPoint(), GetPin(), and PrintAll().

std::vector<Double_t> LIRun::fPin2 [private]

Definition at line 97 of file LIRun.h.

Referenced by AddPoint(), GetPin(), and PrintAll().

Int_t LIRun::fPulserBox [private]

Definition at line 113 of file LIRun.h.

Referenced by GetPb(), InitialiseVariables(), LIRun(), PrintAll(), and SetLIInfo().

std::string LIRun::fS [private]

Definition at line 114 of file LIRun.h.

Referenced by InitialiseVariables(), and PrintConfig().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1