fPeakMinusPedLowGainRatio(),
fPeakMinusPedHighGainRatio(),
fDeadMap(),
+ fNEvents(0),
+ fNChanFills(0),
fDeadTowers(0),
fNewDeadTowers(0),
fResurrectedTowers(0),
fColumns(0),
fRows(0),
fModules(0),
+ fCaloString(),
+ fMapping(NULL),
fRunNumber(-1)
{
//Default constructor. First we set the detector-type related constants.
fColumns = fgkPhosCols;
fRows = fgkPhosRows;
fModules = fgkPhosModules;
+ fCaloString = "PHOS";
}
else {
//We'll just trust the enum to keep everything in line, so that if detectorType
fColumns = fgkEmCalCols;
fRows = fgkEmCalRows;
fModules = fgkEmCalModules;
+ fCaloString = "EMCAL";
}
fDetType = detectorType;
fPeakMinusPedLowGainRatio(),
fPeakMinusPedHighGainRatio(),
fDeadMap(),
+ fNEvents(ped.GetNEvents()),
+ fNChanFills(ped.GetNChanFills()),
fDeadTowers(ped.GetDeadTowerCount()),
fNewDeadTowers(ped.GetDeadTowerNew()),
fResurrectedTowers(ped.GetDeadTowerResurrected()),
fColumns(ped.GetColumns()),
fRows(ped.GetRows()),
fModules(ped.GetModules()),
+ fCaloString(ped.GetCaloString()),
+ fMapping(NULL), //! note that we are not copying the map info
fRunNumber(ped.GetRunNumber())
{
// Then the ObjArray ones; we add the histograms rather than trying TObjArray = assignment
GetPeakProfileHighGainRatio(i)->Reset();
}
}
+ fNEvents = 0;
+ fNChanFills = 0;
fDeadTowers = 0;
fNewDeadTowers = 0;
fResurrectedTowers = 0;
//To think about: should fReference be deleted too?... let's not do it this time, at least...
}
+//_____________________________________________________________________
+Bool_t AliCaloCalibPedestal::AddInfo(const AliCaloCalibPedestal *ped)
+{
+ // just do this for the basic histograms/profiles that get filled in ProcessEvent
+ // may not have data for all modules, but let's just Add everything..
+ for (int i = 0; i < fModules; i++) {
+ GetPedProfileLowGain(i)->Add( ped->GetPedProfileLowGain(i) );
+ GetPedProfileHighGain(i)->Add( ped->GetPedProfileHighGain(i) );
+ GetPeakProfileLowGain(i)->Add( ped->GetPeakProfileLowGain(i) );
+ GetPeakProfileHighGain(i)->Add( ped->GetPeakProfileHighGain(i) );
+ }//end for nModules
+
+ // DeadMap; Diff profiles etc would need to be redone after this operation
+
+ return kTRUE;//We succesfully added info from the supplied object
+}
+
+//_____________________________________________________________________
+Bool_t AliCaloCalibPedestal::ProcessEvent(AliRawReader *rawReader)
+{
+ // if fMapping is NULL the rawstream will crate its own mapping
+ AliCaloRawStream rawStream(rawReader, fCaloString, (AliAltroMapping**)fMapping);
+ return ProcessEvent(&rawStream);
+}
+
//_____________________________________________________________________
Bool_t AliCaloCalibPedestal::ProcessEvent(AliCaloRawStream *in)
{
// Method to process=analyze one event in the data stream
if (!in) return kFALSE; //Return right away if there's a null pointer
+ fNEvents++; // one more event
int sample, i = 0; //The sample temp, and the sample number in current event.
int max = fgkSampleMin, min = fgkSampleMax;//Use these for picking the pedestal
int gain = 0;
printf("Oh no: arrayPos = %i.\n", arrayPos);
}
+ fNChanFills++; // one more channel found, and profile to be filled
//NOTE: coordinates are (column, row) for the profiles
if (gain == 0) {
//fill the low gain histograms
((TProfile2D*)fPedestalHighGain[arrayPos])->Fill(in->GetColumn(), -in->GetRow() - 1, min);
((TProfile2D*)fPeakMinusPedHighGain[arrayPos])->Fill(in->GetColumn(), -in->GetRow() - 1, max - min);
}//end if gain
-
+
max = fgkSampleMin; min = fgkSampleMax;
i = 0;