![]() |
ATLAS Offline Software
|
Service to create a root-based D3PD. More...
#include <RootD3PDSvc.h>
Public Member Functions | |
| RootD3PDSvc (const std::string &name, ISvcLocator *svcloc) | |
| Constructor. | |
| virtual StatusCode | initialize () override |
| Standard Gaudi initialize method. | |
| virtual StatusCode | finalize () override |
| Standard Gaudi finalize method. | |
| virtual StatusCode | stop () override |
| Standard Gaudi stop method. | |
| virtual StatusCode | make (const std::string &name, ID3PD *&d3pd) override |
| Create a new D3PD tree. | |
Private Member Functions | |
| RootD3PDSvc (const RootD3PDSvc &) | |
| RootD3PDSvc & | operator= (const RootD3PDSvc &) |
Static Private Member Functions | |
| static void | cleanup () |
| Make sure all files are closed before exiting, to prevent crashes. | |
Private Attributes | |
| bool | m_doBranchRef |
| Property: If true, then add BranchRef info to the tuple. | |
| std::string | m_masterTree |
| Property: Name of the master tree. | |
| std::string | m_indexMajor |
| Property: Major variable name for index making, or null. | |
| std::string | m_indexMinor |
| Property: Minor variable name for index making, or null. | |
| int | m_basketSize |
| Property: Basket buffer size, or -1 to use the Root default. | |
| int | m_entryOffsetLen |
| Property: Basket entry offset buffer size, or -1 to use the Root default. | |
| long long | m_autoFlush |
| Property: Value to set for ROOT's AutoFlush parameter. | |
| std::vector< std::string > | m_allowedNames |
| Property: Allowed names for the created D3PD. | |
| std::vector< std::string > | m_vetoedNames |
| Property: Vetoed names for the created D3PD. | |
| ServiceHandle< ITHistSvc > | m_histSvc |
| Property: Gaudi THistSvc. | |
| std::vector< std::unique_ptr< RootD3PD > > | m_d3pds |
| Remember all the tuples we've made. | |
Service to create a root-based D3PD.
Definition at line 37 of file RootD3PDSvc.h.
| D3PD::RootD3PDSvc::RootD3PDSvc | ( | const std::string & | name, |
| ISvcLocator * | svcloc ) |
Constructor.
| name | Service name. |
| svcloc | Service locator. |
Definition at line 32 of file RootD3PDSvc.cxx.
|
private |
|
staticprivate |
Make sure all files are closed before exiting, to prevent crashes.
Root files are normally closed by THistSvc::finalize().
However, if we get an error during initialization, then the program will exit without running the finalize() methods. In that case, the root files will get closed when global destructors are run. But by that time, some of the root objects needed to perform the close may have already been deleted, leading to a crash.
To avoid this, we register this method with atexit(); we just loop through all existing root files and try to close them all.
Definition at line 80 of file RootD3PDSvc.cxx.
|
overridevirtual |
Standard Gaudi finalize method.
Definition at line 106 of file RootD3PDSvc.cxx.
|
overridevirtual |
Standard Gaudi initialize method.
Definition at line 95 of file RootD3PDSvc.cxx.
|
overridevirtual |
Create a new D3PD tree.
| name | The name of the new tree. If the name contains a slash, it is interpreted as STREAM/NAME. If the stream name contains a colon, then the part of the name before the colon is the ‘parent’ stream name; this is used to locate the master tree. |
| d3pd[out] | The created tree. |
| name | The name of the new tree. If the name contains a slash, it is interpreted as STREAM/NAME. If the stream name is of the form ‘pool:FILE’, then this is a request to put the new tree in the given pool file. If the the stream name otherwise contains a colon, then the part of the name before the colon is the ‘parent’ stream name; this is used to locate the master tree. |
| d3pd[out] | The created tree. |
Definition at line 175 of file RootD3PDSvc.cxx.
|
private |
|
overridevirtual |
Standard Gaudi stop method.
Definition at line 115 of file RootD3PDSvc.cxx.
|
private |
Property: Allowed names for the created D3PD.
Definition at line 104 of file RootD3PDSvc.h.
|
private |
Property: Value to set for ROOT's AutoFlush parameter.
(Tells how often the tree baskets will be flushed.) 0 disables flushing. -1 (default) makes no changes to what THistSvc did. Any other negative number gives the number of bytes after which to flush. A positive number gives the number of entries after which to flush.
Definition at line 101 of file RootD3PDSvc.h.
|
private |
Property: Basket buffer size, or -1 to use the Root default.
Definition at line 90 of file RootD3PDSvc.h.
|
private |
Remember all the tuples we've made.
Definition at line 113 of file RootD3PDSvc.h.
|
private |
Property: If true, then add BranchRef info to the tuple.
Definition at line 77 of file RootD3PDSvc.h.
|
private |
Property: Basket entry offset buffer size, or -1 to use the Root default.
Definition at line 93 of file RootD3PDSvc.h.
|
private |
Definition at line 110 of file RootD3PDSvc.h.
|
private |
Property: Major variable name for index making, or null.
Definition at line 85 of file RootD3PDSvc.h.
|
private |
Property: Minor variable name for index making, or null.
Definition at line 87 of file RootD3PDSvc.h.
|
private |
Property: Name of the master tree.
If set, then this tree will be made a friend of the master. The master tree will also get an index built.
Definition at line 82 of file RootD3PDSvc.h.
|
private |
Property: Vetoed names for the created D3PD.
Definition at line 107 of file RootD3PDSvc.h.