if ( ! AliMpDDLStore::Instance(kFALSE) )
{
AliErrorClass("Mapping not loaded. Cannot work");
- return 0;
+ return kNoMapping;
}
char line[1024];
sin >> busPatchId >> manuId >> sumn >> numberOfEvents;
+ if ( busPatchId == -1 && manuId == -1 && sumn == 0 && numberOfEvents == 0 )
+ {
+ /// DA could not produce information (because run failed somehow).
+ /// That's OK, but let the world know about it
+ return kNoInfoFile;
+ }
+
Int_t detElemId = AliMpDDLStore::Instance()->GetDEfromBus(busPatchId);
AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
if ( sline.Contains("DUMMY") )
{
AliDebugClass(1,"Got a dummy file here");
+ delete [] runs;
+ delete [] dac;
return kDummyFile;
}
if ( sline.Contains("* Run") )
AliDebugClass(1,Form("runNumber is %d",runNumber));
}
}
- if ( sline.Contains("* nInit =") )
- {
- sscanf(line,"// * nInit = %d * f1nbp = %d * f2nbp = %d",&nInit,&f1nbp,&f2nbp);
- AliDebugClass(1,Form("nInit = %d",nInit));
- AliDebugClass(1,Form("f1nbp = %d",f1nbp));
- AliDebugClass(1,Form("f2nbp = %d",f2nbp));
- }
if ( sline.Contains("DAC values") )
{
nDAC = TString(sline(2,sline.Length()-2)).Atoi();
{
if ( nDAC < 100 )
{
+ delete[] runs;
+ delete[] dac;
runs = new Int_t[nDAC];
dac = new Int_t[nDAC];
// skip two lines
in.getline(line,1024);
+ sline = line;
+ if (!sline.Contains("* nInit ="))
+ {
+ AliErrorClass("Improper format : was expecting nInit= line...");
+ }
+ else
+ {
+ sscanf(line,"// * nInit = %d * f1nbp = %d * f2nbp = %d",&nInit,&f1nbp,&f2nbp);
+ AliDebugClass(1,Form("nInit = %d",nInit));
+ AliDebugClass(1,Form("f1nbp = %d",f1nbp));
+ AliDebugClass(1,Form("f2nbp = %d",f2nbp));
+ }
+ in.getline(line,1024);
in.getline(line,1024);
// then get run and dac values
Int_t iDAC(0);
{
AliErrorClass(Form("Something went wrong, as I get too big nDAC = %d",nDAC));
nDAC = 0;
+ delete [] runs;
+ delete [] dac;
return kFormatError;
}
}
}
continue;
}
+
+ if (!param) continue;
+
Int_t channel;
Float_t capaValue;
Float_t injectionGain;
//_____________________________________________________________________________
Int_t
-AliMUONTrackerIO::ReadConfig(const char* filename, AliMUONVStore& confStore, Bool_t& changed)
+AliMUONTrackerIO::ReadConfig(const char* filename, AliMUONVStore& confStore)
{
/// Read config file (produced by the MUONTRKda.exe program for instance)
/// and append the read values into the given VStore
/// To be used when the input is a file (for instance when reading data
/// from the OCDB).
- /// changed must be set to kFALSE before calling this method for the first time
- /// (then the subsequent calls must not set it !)
- ///
TString sFilename(gSystem->ExpandPathName(filename));
in.close();
- return DecodeConfig(stream.str().c_str(),confStore,changed);
+ return DecodeConfig(stream.str().c_str(),confStore);
}
//_____________________________________________________________________________
Int_t
-AliMUONTrackerIO::DecodeConfig(const char* data, AliMUONVStore& confStore, Bool_t& changed)
+AliMUONTrackerIO::DecodeConfig(const char* data, AliMUONVStore& confStore)
{
/// Read config data (produced by the MUONTRKda.exe program for instance)
/// and append the read values into the given VStore
/// To be used when the input is a TString (for instance when getting data
/// from AMORE DB).
- /// changed must be set to kFALSE before calling this method for the first time
- /// (then the subsequent calls must not set it !)
char line[1024];
Int_t busPatchID, manuID;
AliDebugClass(3,Form("line=%s",line));
if ( line[0] == '#' )
{
- TString sline(line);
- sline.ToUpper();
- if (sline.Contains("CHANGED") && !sline.Contains("UNCHANGED")) changed = kTRUE;
continue;
}
std::istringstream sin(line);