Converting DST to MDF
Friday, July 11th, 2008Here is a options file that converts a DST to MDF. Most of it is form Markus Frank.
#pragma print off
#include "$STDOPTS/LHCbApplication.opts"
#include "$STDOPTS/DstDicts.opts"
#include "$STDOPTS/DC06Conditions.opts"
#pragma print on
ApplicationMgr.EvtMax = 10000;
EventSelector.PrintFreq = 100;
ApplicationMgr.OutputLevel = 10;
ApplicationMgr.HistogramPersistency = "ROOT";
HistogramPersistencySvc.OutputFile = "Moore_minbias.root";
ApplicationMgr.ExtSvc += [ "ToolSvc" , "AuditorSvc" ] ;
ApplicationMgr.AuditAlgorithms = 1;
AuditorSvc.Auditors += [ "TimingAuditor/TIMER" ] ;
MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M";
ToolSvc.SequencerTimerTool.OutputLevel = 4;
EventPersistencySvc.CnvServices += { "LHCb::RawDataCnvSvc" };
ApplicationMgr.OutStream += { "LHCb::MDFWriter/Writer_2" };
Writer_2.Connection = "file:///local_home/snies/DC06_L0_v1_lumi2.mdf";
Writer_2.Compress = 0;
Writer_2.ChecksumType = 1;
Writer_2.GenerateMD5 = true;
EventSelector.Input = {
"DATAFILE='PFN:/local_home/snies/DC06_L0_v1_lumi2.raw' TYP='POOL_ROOTTREE' OPT='READ'"
};
After doing this you might be interested into this little bash script (also by Markus Frank) that prints out the banks stored in the MDF. This way you can make sure your MDF is fine:
#!/bin/bash
runit()
{
cat >/tmp/${USER}/ReadMDF.opts <<END-OF-OPTS
ApplicationMgr.TopAlg =
{"StoreExplorerAlg","LHCb::RawEventTestDump/Dump"};
ApplicationMgr.EvtMax = 100000;
ApplicationMgr.HistogramPersistency = "NONE";
Dump.CheckData = 1;
Dump.CheckData = 0;
Dump.DumpData = 1;
Dump.FullDump = 1;
Dump.OutputLevel = 1;
StoreExplorerAlg.Load = 1;
StoreExplorerAlg.PrintFreq = 100;
EventDataSvc.RootCLID = 1;
EventDataSvc.EnableFaultHandler = true;
EventPersistencySvc.CnvServices = {"LHCb::RawDataCnvSvc"};
EventSelector.PrintFreq = 100;
EventSelector.Input = {"DATA='PFN:file://${1}'
SVC='LHCb::MDFSelector'"};
StoreExplorerAlg.OutputLevel = 1;
END-OF-OPTS
echo $LD_LIBRARY_PATH;
cat /tmp/${USER}/ReadMDF.opts;
$ONLINEKERNELROOT/$CMTCONFIG/gentest.exe libGaudiKernel.so GaudiMain /tmp/${USER}/ReadMDF.opts | more;
}
runit $*