30 using std::ostringstream;
31 using std::istringstream;
38 #include "AliDCSValue.h"
47 #include <Riostream.h>
49 #include <TObjString.h>
74 TString sFilename(gSystem->ExpandPathName(filename));
76 std::ifstream in(sFilename.Data());
85 while ( in.getline(line,1024) )
86 stream << line <<
"\n";
104 AliErrorClass(
"Mapping not loaded. Cannot work");
109 istringstream in(data);
113 while ( in.getline(line,1024) )
115 AliDebugClass(3,Form(
"line=%s",line));
116 if ( line[0] ==
'/' && line[1] ==
'/' )
continue;
117 std::istringstream sin(line);
119 Int_t busPatchId, manuId;
120 Int_t numberOfEvents;
123 sin >> busPatchId >> manuId >> sumn >> numberOfEvents;
125 if ( busPatchId == -1 && manuId == -1 && sumn == 0 && numberOfEvents == 0 )
136 Int_t numberOfChannelsInManu = -1;
140 if ( numberOfChannelsInManu <= 0 )
142 AliErrorClass(Form(
"BP %5d DE %5d MANU %5d nchannels=%d",busPatchId,detElemId,manuId,numberOfChannelsInManu));
150 AliErrorClass(Form(
"DE %5d MANU %5d is already there ?!",detElemId,manuId));
156 occupancyMap.
Add(occupancy);
178 TString sFilename(gSystem->ExpandPathName(filename));
180 std::ifstream in(sFilename.Data());
186 ostringstream stream;
188 while ( in.getline(line,1024) )
189 stream << line <<
"\n";
207 Int_t busPatchID, manuID, manuChannel;
208 Float_t pedMean, pedSigma;
210 istringstream in(data);
212 while ( in.getline(line,1024) )
214 AliDebugClass(3,Form(
"line=%s",line));
215 if ( line[0] ==
'/' && line[1] ==
'/' )
continue;
216 std::istringstream sin(line);
217 sin >> busPatchID >> manuID >> manuChannel >> pedMean >> pedSigma;
222 AliErrorClass(Form(
"Got an invalid DE = %d from busPatchId=%d manuId=%d",
223 detElemID,busPatchID,manuID));
227 AliDebugClass(3,Form(
"BUSPATCH %3d DETELEMID %4d MANU %3d CH %3d MEAN %7.2f SIGMA %7.2f",
228 busPatchID,detElemID,manuID,manuChannel,pedMean,pedSigma));
256 TString sFilename(gSystem->ExpandPathName(filename));
258 std::ifstream in(sFilename.Data());
264 ostringstream stream;
266 while ( in.getline(line,1024) )
267 stream << line <<
"\n";
284 Int_t busPatchID, manuID;
286 istringstream in(data);
288 while ( in.getline(line,1024) )
290 AliDebugClass(3,Form(
"line=%s",line));
291 if ( line[0] ==
'#' )
295 std::istringstream sin(line);
296 sin >> busPatchID >> manuID;
302 AliErrorClass(Form(
"Got an invalid DE = %d from busPatchId=%d manuId=%d",
303 detElemID,busPatchID,manuID));
330 cout <<
"ERROR: mapping not loaded. Cannot work" << endl;
338 while ( (param=static_cast<AliMUONVCalibParam*>(next())) )
340 Int_t detElemId = param->ID0();
341 Int_t manuId = param->ID1();
346 out << busPatchId <<
" " << manuId << endl;
static Int_t ReadOccupancy(const char *filename, AliMUONVStore &occupancyMap)
virtual ~AliMUONTrackerIO()
virtual TIterator * CreateIterator() const =0
Return an iterator to loop over the whole store.
static Float_t InvalidFloatValue()
Return 1E38 as invalid float value.
static Int_t WriteConfig(ofstream &out, const AliMUONVStore &confStore)
Implementation of AliMUONVCalibParam for tuples of floats.
virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value)=0
Set one value, for channel i, dimension j. Consider value is a float.
Int_t GetDEfromBus(Int_t busPatchId) const
static Int_t DecodeConfig(const char *data, AliMUONVStore &confStore)
virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value)=0
Set one value, for channel i, dimension j. Consider value is an integer.
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
The class defines the electronics properties of detection element.
Converts ASCII calibration files (ped, config, occupancy) into AliMUONVStore object.
Container of calibration values for a given number of channels.
static AliMpDDLStore * Instance(Bool_t warn=true)
static Int_t ManuNofChannels()
Max number of channels per manu.
Int_t GetBusPatchId(Int_t detElemId, Int_t manuId) const
static Int_t ReadPedestals(const char *filename, AliMUONVStore &pedStore)
Implementation of AliMUONVCalibParam for tuples of double.
Int_t NofChannelsInManu(Int_t manuId) const
virtual Bool_t Add(TObject *object)=0
Add an object to the store.
static Int_t DecodePedestals(const char *data, AliMUONVStore &pedStore)
static Int_t DecodeOccupancy(const char *data, AliMUONVStore &occupancyMap)
static Int_t ReadConfig(const char *filename, AliMUONVStore &confStore)
Base class for MUON data stores.
static Bool_t IsValidDetElemId(Int_t detElemId, Bool_t warn=false)
virtual TObject * FindObject(const char *name) const
Find an object by name.
file is "empty", i.e. contains to information but that's normal
virtual void SetValueAsDouble(Int_t i, Int_t j, Double_t value)
file is not of the expected format