// This information comes from DCS or the like.
//
#include "AliFMDCalibStripRange.h" // ALIFMDCALIBGAIN_H
+#include "TString.h"
// #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
//____________________________________________________________________
UInt_t board = sec / nSec;
return ((fRanges(det, ring, board, 0) >> 8) & 0x7f);
}
+//____________________________________________________________________
+void
+AliFMDCalibStripRange::WriteToFile(ofstream &outFile)
+{
+ outFile.write("# StripRange \n",14);
+ for(Int_t det=1;det<=3;det++) {
+ UShort_t FirstRing = (det == 1 ? 1 : 0);
+ for (UShort_t ir = FirstRing; ir < 2; ir++) {
+ Char_t ring = (ir == 0 ? 'O' : 'I');
+ UShort_t nsec = (ir == 0 ? 40 : 20);
+ UShort_t nstr = (ir == 0 ? 256 : 512);
+ for(UShort_t sec =0; sec < nsec; sec++) {
+ outFile << det << ','
+ << ring << ','
+ << sec << ','
+ << Min(det,ring,sec) << ','
+ << Max(det,ring,sec) << "\n";
+
+
+ }
+ }
+ }
+
+
+}
+//____________________________________________________________________
+void
+AliFMDCalibStripRange::ReadFromFile(ifstream &inFile)
+{
+ TString line;
+ Bool_t readData=kFALSE;
+
+ while(line.ReadLine(inFile)) {
+ if(line.Contains("striprange",TString::kIgnoreCase)) {
+ readData = kTRUE;
+ break;
+ }
+
+ }
+
+ UShort_t det, sec;
+ Char_t ring;
+ UShort_t min, max;
+ Int_t thisline = inFile.tellg();
+ Char_t c[4];
+
+ while(line.ReadLine(inFile) && readData ) {
+ thisline = inFile.tellg();
+ thisline = thisline--;
+ if(line.Contains("# ",TString::kIgnoreCase)) {
+ readData = kFALSE;
+ continue;
+ }
+
+ inFile.seekg(thisline);
+ inFile >> det >> c[0]
+ >> ring >> c[1]
+ >> sec >> c[2]
+ >> min >> c[3]
+ >> max;
+
+ Set(det,ring,sec,0,min,max);
+
+ }
+
+ inFile.seekg(0);
+
+
+}
//____________________________________________________________________
//