|
def | __init__ (self, StreamName, FileName, TreeName=None, asAlg=False) |
|
def | SetOutputFileName (self, name) |
|
def | AddItem (self, item) |
|
def | RemoveItem (self, item) |
|
def | AddMetaDataItem (self, item) |
|
def | RemoveMetaDataItem (self, item) |
|
def | Print (self) |
|
def | __iadd__ (self, configs) |
|
def | __getattr__ (self, attr) |
|
def | __setattr__ (self, name, value) |
|
def | AddAcceptAlgs (self, algs) |
| Accept Algs. More...
|
|
def | RemoveAcceptAlgs (self, algs) |
|
def | GetAcceptAlgs (self) |
|
def | AddRequireAlgs (self, algs) |
| Require Algs. More...
|
|
def | RemoveRequireAlgs (self, algs) |
|
def | GetRequireAlgs (self) |
|
def | AddVetoAlgs (self, algs) |
| Veto Algs (ignored by prescaler for now) More...
|
|
def | RemoveVetoAlgs (self, algs) |
|
def | GetVetoAlgs (self) |
|
def | AddOtherAlgsToBookkeep (self, algs) |
| Other Algs (e.g. More...
|
|
def | RemoveOtherAlgsToBookkeep (self, algs) |
|
def | GetOtherAlgsToBookkeep (self) |
|
def | GetSkimDecisionsWriter (self) |
| Skim decisions writer. More...
|
|
def | SetPrescale (self, value) |
| Master prescale. More...
|
|
def | GetPrescale (self) |
|
This class is used to handle output ROOT (D3PD) streams in Athena.
It inherits from the AugmentedStreamBase class, so implements its
interface, but at the same time it behaves for all intents and
purposes like a configurable for the D3PD::MakerAlg class.
Definition at line 375 of file MultipleStreamManager.py.
def python.MultipleStreamManager.AugmentedRootStream.__init__ |
( |
|
self, |
|
|
|
StreamName, |
|
|
|
FileName, |
|
|
|
TreeName = None , |
|
|
|
asAlg = False |
|
) |
| |
Constructor for the D3PD stream object.
Arguments:
StreamName: Logical name of the D3PD stream. Note that beside
using it to define the stream in THistSvc, this
name is also used as the name of the TTree in the
output file in case one is not specified explicitly.
FileName: Name of the file to write the D3PD TTree into.
TreeName: Name of the TTree in the output file. If it's not
specified, the stream name is used as the tree name.
asAlg: If set to True, the D3PD::MakerAlg algorithm is added
to the job as a regular algorithm. When set to False
(default), the D3PD algorithm is added to the application
manager as an output stream.
Definition at line 381 of file MultipleStreamManager.py.
381 def __init__( self, StreamName, FileName, TreeName = None, asAlg = False ):
382 """Constructor for the D3PD stream object.
385 StreamName: Logical name of the D3PD stream. Note that beside
386 using it to define the stream in THistSvc, this
387 name is also used as the name of the TTree in the
388 output file in case one is not specified explicitly.
389 FileName: Name of the file to write the D3PD TTree into.
390 TreeName: Name of the TTree in the output file. If it's not
391 specified, the stream name is used as the tree name.
392 asAlg: If set to True, the D3PD::MakerAlg algorithm is added
393 to the job as a regular algorithm. When set to False
394 (default), the D3PD algorithm is added to the application
395 manager as an output stream.
398 AugmentedStreamBase.__init__( self, StreamName )
402 TreeName = StreamName
405 self.fileName = FileName
406 self.treeName = TreeName
409 from AthenaCommon.AlgSequence
import AlgSequence
413 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
414 preseq =
AlgSequence( D3PDMakerFlags.PreD3PDAlgSeqName(),
415 StopOverride =
True )
416 if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
417 topSequence += [ preseq ]
423 ParentStreamName = StreamName.split(
':' )[ 0 ]
424 if StreamName.count(
':' ) != 0:
425 if StreamName.count(
':' ) == 1:
426 StreamName = StreamName.split(
':' )[ 1 ]
428 raise AttributeError(
"Stream name '%s' can't be used!" % StreamName )
429 if not hasattr( topSequence, ParentStreamName +
"AANTStream" ):
431 from AnalysisTools.AnalysisToolsConf
import AANTupleStream
433 ExtraRefNames = [
'StreamRDO',
437 OutputName = FileName,
438 WriteInputDataHeader =
True,
439 StreamName = ParentStreamName )
442 print(self.Name,
": INFO didn't find AnalysisTools.AnalysisToolsConf in release.")
444 print(traceback.format_exc())
448 from AthenaCommon.AppMgr
import ServiceMgr
449 if not hasattr( ServiceMgr,
'THistSvc' ):
450 from GaudiSvc.GaudiSvcConf
import THistSvc
455 for s
in ServiceMgr.THistSvc.Output:
456 stream = s.split()[ 0 ]
457 if stream == StreamName:
463 ServiceMgr.THistSvc.Output += [
"%s DATAFILE='%s' OPT='RECREATE' CL='%i'" %
464 ( StreamName, FileName,
465 D3PDMakerFlags.CompressionLevel() ) ]
477 import D3PDMakerCoreComps
483 self.Stream = D3PDMakerCoreComps.MakerAlg( StreamName +
"D3PDMaker", seq = theseq,
484 file = FileName, stream = ParentStreamName,
485 tuplename = TreeName,
486 D3PDSvc =
"D3PD::RootD3PDSvc" )
489 from AthenaCommon.AppMgr
import theApp
490 theApp.addOutputStream( self.Stream )
492 self.filterSeq = _RootStreamFilterHelper( self, topSequence )
496 print(self.Name,
": INFO didn't find D3PDMakerCoreComps in release.")