Esempio n. 1
0
def doItBetter():

    from Configurables import PatLongLivedTracking

    from Configurables import OutputStream
    OutputStream("DstWriter").ItemList = [
        '/Event/Rec/Header#1', '/Event/Rec/Status#1', '/Event/Rec/Summary#1',
        '/Event/pRec/Track/Best#1', '/Event/pRec/Vertex/Primary#1',
        '/Event/pRec/Track/FittedHLT1VeloTracks#1', '/Event/pRec/Rich/PIDs#1',
        '/Event/pRec/Muon/MuonPID#1', '/Event/pRec/Calo/Electrons#1',
        '/Event/pRec/Calo/Photons#1', '/Event/pRec/Calo/MergedPi0s#1',
        '/Event/pRec/Calo/SplitPhotons#1', '/Event/pRec/ProtoP/Charged#1',
        '/Event/pRec/ProtoP/Neutrals#1', '/Event/pRec/Vertex/V0#1',
        '/Event/pRec/Track/Muon#1', '/Event/Calo/RawEvent#1',
        '/Event/HC/RawEvent#1', '/Event/Tracker/RawEvent#1',
        '/Event/Velo/RawEvent#1', '/Event/Muon/RawEvent#1',
        '/Event/Rich/RawEvent#1', '/Event/Trigger/RawEvent#1'
    ]
    #print "##################################"
    #print OutputStream("DstWriter").Output
    #print "##################################"
    OutputStream(
        "DstWriter"
    ).Output = "DATAFILE='PFN:/eos/lhcb/user/d/decianm/minbiasPatLLT.dst' SVC='RootCnvSvc' OPT='REC'"

    GaudiSequencer("RawEventSplitSeq").Members = []
Esempio n. 2
0
def dstconf_write_root(self, items, optItems):
    print '[ERROR] Configure DstConf output ....'
    sys.stdout.flush()
    writer = OutputStream("DstWriter")
    writer.Preload = False
    writer.ItemList += items
    writer.OptItemList += optItems
    writer.Output = "DATAFILE='root.buffers' SVC='Gaudi::SerializeCnvSvc' OPT='RECREATE'"
Esempio n. 3
0
def insertDump(seq, entry, outputname):
    dumpAlgs = []
    from Configurables import EventNodeKiller
    dumpAlgs += [EventNodeKiller("killForDump")]
    EventNodeKiller("killForDump").Nodes = Gaudi.Excise['killAtLeast']
    from Configurables import OutputStream, InputCopyStream
    dump = OutputStream("DumpEverything")
    dump.ItemList = Gaudi.Excise['copyNodes']
    from GaudiConf import IOHelper
    dumpAlgs += IOHelper().outputAlgs(outputname, dump, writeFSR=True)
    return insertSomething(seq, entry, dumpAlgs)
    def _configureOutput(self):
        # first empty the outstream, because it would write all the time
        ApplicationMgr().OutStream = []
        # only configure the writer - use it where applicable
        outputFile = self.getProp('outputFile')
        if not outputFile: return

        from Configurables import OutputStream
        writerName = "DstWriter"
        dstWriter = OutputStream(writerName,
                                 ItemList=["/Event#999"
                                           ])  #,     # miniDST selection: #1

        persistency = None
        if hasattr(self, "Persistency"):
            persistency = self.getProp("Persistency")

        from GaudiConf.IOHelper import IOHelper

        IOHelper(persistency, persistency).outStream(filename=outputFile,
                                                     writer=dstWriter)
Esempio n. 5
0
def configureOutput(self, dstType, withMC, handleLumi):
    global configureBrunelOutput
    print '[ERROR] Configure Brunel output ....'
    sys.stdout.flush()
    if configureBrunelOutput:
        import OnlineEnv
        print '[ERROR] Configure Brunel output sequence ....'
        sys.stdout.flush()
        Configs.DstConf._doWriteROOT = dstconf_write_root
        configureBrunelOutput(self, dstType, withMC, handleLumi)
        ser = Gaudi__SerializeCnvSvc('Gaudi::SerializeCnvSvc')
        ser.Banks = '/Event/GaudiSerialize'
        ser.OutputLevel = 1
        EventPersistencySvc().CnvServices.append(ser)
        writer = OnlineEnv.evtMerger(buffer='Output',
                                     name='BankWriter',
                                     location='/Event/GaudiSerialize',
                                     routing=0x100)
        writer.OutputLevel = 1
        seq = GaudiSequencer('Output')
        seq.Members += [OutputStream('DstWriter'), writer]
        Gaudi.ApplicationMgr().OutStream = [seq]
Esempio n. 6
0
"""
$Id: MicroDSTStream.py,v 1.2 2009-03-20 16:27:18 jpalac Exp $
Configure the MicroDST OutputStream and add it to the ApplicationMgr
@author Juan Palacios [email protected]
"""
from Gaudi.Configuration import *
from Configurables import OutputStream
#
MicroDSTStream = OutputStream('MicroDSTStream')
MicroDSTStream.OptItemList = ["/Event/microDST#99"]
MicroDSTStream.Output = "DATAFILE='MicroDST.dst' TYP='POOL_ROOTTREE' OPT='REC'"

#
Esempio n. 7
0
##IOHelper('MDF').inputFiles(['/afs/cern.ch/user/r/rlambert/public/forMarkus/run_69669_large_2ev.mdf']);
##IOHelper('MDF').inputFiles(['castor://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/data/2011/RAW/FULL/LHCb/COLLISION11/102907/102907_0000000002.raw']);
##IOHelper('MDF').inputFiles(['castor://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/data/2011/RAW/FULL/LHCb/COLLISION11/97114/097114_0000000004.raw?svcClass=lhcbtape'])
##IOHelper('MDF').inputFiles(['/castorfs/cern.ch/grid/lhcb/data/2011/RAW/FULL/LHCb/COLLISION11/97114/097114_0000000004.raw'])

IOHelper('MDF').inputFiles([
    'castor://castorlhcb.cern.ch//castor/cern.ch/grid/lhcb/data/2012/RAW/FULL/LHCb/COLLISION12/133586/133586_0000000309.raw'
])

from Configurables import Brunel, AuditorSvc, OutputStream

ApplicationMgr().ExtSvc.insert(0, AuditorSvc())
Brunel().EvtMax = 10
Brunel().OutputType = 'DST'
Brunel().Persistency = 'ROOT'
Brunel().OutputLevel = 4
MessageSvc().OutputLevel = 4
AuditorSvc().Auditors.append("TES::TraceAuditor")
OutputStream(
    'DstWriter').Output = "DATAFILE='PFN:someFile.dst' TYP='ROOT' OPT='REC'"


def fixstuff():
    for stream in IOHelper().activeStreams():
        if IOHelper().detectStreamType(stream) == "FSR":
            stream.Output = stream.Output.replace("SVC='RootCnvSvc'",
                                                  "SVC='FileRecordCnvSvc'")


appendPostConfigAction(fixstuff)