#include <TArrayI.h> // ROOT_TArrayI
#include <TClonesArray.h> // ROOT_TClonesArray
// #include <fstream>
+#include "AliDAQ.h"
//____________________________________________________________________
ClassImp(AliFMDRawWriter)
//____________________________________________________________________
AliFMDRawWriter::AliFMDRawWriter(AliFMD* fmd)
: TTask("FMDRawWriter", "Writer of Raw ADC values from the FMD"),
- fFMD(fmd)
+ fFMD(fmd),
+ fSampleRate(0),
+ fChannelsPerAltro(0),
+ fThreshold(0)
{
// CTOR
}
}
prevddl = ddl;
// Need to open a new DDL!
- TString filename(Form("%s_%d.ddl", fFMD->GetName(), ddl));
+ TString filename(AliDAQ::DdlFileName(fFMD->GetName(), ddl));
AliDebug(15, Form("New altro buffer with DDL file %s", filename.Data()));
// Create a new altro buffer - a `1' as the second argument
// means `write mode'
- altro = new AliAltroBuffer(filename.Data(), 1);
+ altro = new AliAltroBuffer(filename.Data());
altro->SetMapping(pars->GetAltroMap());
// Write a dummy (first argument is true) header to the DDL
// file - later on, when we close the file, we write the real
// If we haven't got a writer (either because none were made so
// far, or because we've switch DDL), make one.
if (!writer) {
- AliDebug(1, Form("Opening new ALTRO writer w/file FMD_%d.ddl", ddl));
- file = new std::ofstream(Form("FMD_%d.ddl", ddl));
+ AliDebug(1, Form("Opening new ALTRO writer w/file %s", AliDAQ::DdlFileName("FMD",ddl)));
+ file = new std::ofstream(AliDAQ::DdlFileName("FMD",ddl));
if (!file || !*file) {
- AliFatal(Form("Failed to open file FMD_%d.ddl", ddl));
+ AliFatal(Form("Failed to open file %s", AliDAQ::DdlFileName("FMD",ddl)));
return;
}
writer = new AliFMDAltroWriter(*file);