#include "AliRawEventHeaderBase.h"
#include <TDatime.h>
#include <TSystem.h>
+#include <TH2F.h>
//_____________________________________________________________________
ClassImp(AliFMDBaseDA)
fOutputFile(),
fConditionsFile(),
fSaveHistograms(kFALSE),
+ fMakeSummaries(kFALSE),
fDetectorArray(),
fPulseSize(10),
fPulseLength(10),
fRequiredEvents(0),
fCurrentEvent(0),
- fRunno(0)
+ fRunno(0),
+ fSummaries(0)
{
//Constructor
fSeenDetectors[0] = fSeenDetectors[1] = fSeenDetectors[2] = kFALSE;
fOutputFile(),
fConditionsFile(),
fSaveHistograms(baseDA.fSaveHistograms),
+ fMakeSummaries(baseDA.fMakeSummaries),
fDetectorArray(baseDA.fDetectorArray),
fPulseSize(baseDA.fPulseSize),
fPulseLength(baseDA.fPulseLength),
fRequiredEvents(baseDA.fRequiredEvents),
fCurrentEvent(baseDA.fCurrentEvent),
- fRunno(baseDA.fRunno)
+ fRunno(baseDA.fRunno),
+ fSummaries(0)
{
//Copy constructor
fSeenDetectors[0] = baseDA.fSeenDetectors[0];
Bool_t sodread = kFALSE;
for(Int_t i=0;i<3;i++) {
- reader->NextEvent(); // Read Start-of-Run / Start-of-Files event
+ if (reader->NextEvent()) {
+ // Read Start-of-Run / Start-of-Files event
+ AliWarning(Form("Failed to read the %d%s event",
+ i+1, (i == 0 ? "st" : (i == 1 ? "nd" : "rd"))));
+ break;
+ }
UInt_t eventType = reader->GetType();
if(eventType == AliRawEventHeaderBase::kStartOfData ||
Char_t ring = (ir == 0 ? 'O' : 'I');
UShort_t nsec = (ir == 0 ? 40 : 20);
UShort_t nstr = (ir == 0 ? 256 : 512);
+
+ if (fMakeSummaries) MakeSummary(det, ring);
+
std::cout << " Ring " << ring << ": " << std::flush;
for(UShort_t sec =0; sec < nsec; sec++) {
for(UShort_t strip = 0; strip < nstr; strip++) {
}
}
}
+ // sampleRate->WriteToFile(std::cout, fSeenDetectors);
+ // stripRange->WriteToFile(std::cout, fSeenDetectors);
+
if(fConditionsFile.is_open()) {
fConditionsFile.write("# EOF\n",6);
}
}
+//_____________________________________________________________________
+TH2*
+AliFMDBaseDA::MakeSummaryHistogram(const char* prefix, const char* title,
+ UShort_t d, Char_t r)
+{
+ Int_t nX = ((d == 1 || r == 'I' || r == 'i') ? 20 : 40);
+ Int_t nY = ((d == 1 || r == 'I' || r == 'i') ? 512 : 256);
+
+ TH2* ret = new TH2F(Form("%sFMD%d%c", prefix, d, r),
+ Form("%s for FMD%d%c", title, d, r),
+ nX, -0.5, nX-0.5, nY, -0.5, nY-0.5);
+ ret->SetXTitle("Sector #");
+ ret->SetYTitle("Strip #");
+
+ // if (!fSummaries) fSummaries = new TObjArray;
+ fSummaries.Add(ret);
+ return ret;
+}
//_____________________________________________________________________
//