Public Member Functions | |
def | __getattr__ (self, attr) |
def | __getitem__ (self, index) |
def | __init__ (self, input, tree_name=None) |
def | __iter__ (self) |
def | __len__ (self) |
Public Attributes | |
chain | |
files | |
Private Member Functions | |
def | _guessTreeName (self, pattern) |
Wrapper to TChain, with a python iterable interface. Example of use: #TODO make that a doctest / nose? from chain import Chain the_chain = Chain('../test/test_*.root', 'test_tree') event3 = the_chain[2] print event3.var1 for event in the_chain: print event.var1
def chain.Chain.__init__ | ( | self, | |
input, | |||
tree_name = None |
|||
) |
Create a chain. Parameters: input = either a list of files or a wildcard (e.g. 'subdir/*.root'). In the latter case all files matching the pattern will be used to build the chain. tree_name = key of the tree in each file. if None and if each file contains only one TTree, this TTree is used.
Definition at line 35 of file chain.py.
def chain.Chain.__getattr__ | ( | self, | |
attr | |||
) |
All functions of the wrapped TChain are made available
Definition at line 92 of file chain.py.
References hgcalTriggerChains.HGCalTriggerChains.chain, edm::FileLocator::Rule.chain, and chain.Chain.chain.
def chain.Chain.__getitem__ | ( | self, | |
index | |||
) |
Returns the event at position index.
Definition at line 104 of file chain.py.
References hgcalTriggerChains.HGCalTriggerChains.chain, edm::FileLocator::Rule.chain, and chain.Chain.chain.
def chain.Chain.__iter__ | ( | self | ) |
Definition at line 98 of file chain.py.
References hgcalTriggerChains.HGCalTriggerChains.chain, edm::FileLocator::Rule.chain, and chain.Chain.chain.
def chain.Chain.__len__ | ( | self | ) |
Definition at line 101 of file chain.py.
References hgcalTriggerChains.HGCalTriggerChains.chain, edm::FileLocator::Rule.chain, chain.Chain.chain, and createfilelist.int.
|
private |
Find the set of keys of all TTrees in all files matching pattern. If the set contains only one key Returns: the TTree key else raises ValueError.
Definition at line 66 of file chain.py.
References readConfig.fileINI.files, chain.Chain.files, MatrixReader.MatrixReader.files, MatrixUtil.InputInfo.files, JsonOutputProducer::JsonConfigurationBlock.files, join(), and list().
chain.Chain.chain |
Definition at line 62 of file chain.py.
Referenced by chain.Chain.__getattr__(), chain.Chain.__getitem__(), chain.Chain.__iter__(), chain.Chain.__len__(), chain_test.ChainTestCase.test_get(), chain_test.ChainTestCase.test_guess_treename(), chain_test.ChainTestCase.test_iterate(), and chain_test.ChainTestCase.test_load_1().
chain.Chain.files |
Definition at line 47 of file chain.py.
Referenced by chain.Chain._guessTreeName(), dataset.BaseDataset.listOfFiles(), dataset.BaseDataset.listOfGoodFiles(), and dataset.BaseDataset.printFiles().