|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   20 #include "TCollection.h" 
   34   : base_class (
name, svcloc),
 
   35     m_histSvc (
"THistSvc", 
name)
 
   42   declareProperty (
"MasterTree",     
m_masterTree = 
"CollectionTree");
 
   43   declareProperty (
"IndexMajor",     
m_indexMajor = 
"RunNumber");
 
   44   declareProperty (
"IndexMinor",     
m_indexMinor = 
"EventNumber");
 
   48                    "Value to set for ROOT's AutoFlush parameter. " 
   49                    "(Tells how often the tree baskets will be flushed.) " 
   50                    "0 disables flushing. " 
   51                    "-1 (default) makes no changes to what THistSvc did. " 
   52                    "Any other negative number gives the number of bytes " 
   53                    "after which to flush. " 
   54                    "A positive number gives the number of entries after which " 
   57                    "Variable names allowed in the output D3PDs. An empty list " 
   58                    "means that all variable names are allowed. Regular expressions " 
   61                    "Variable names that are not allowed to end up in the " 
   62                    "created D3PDs. Regular expressions are allowed.");
 
   84   TIter 
it (gROOT->GetListOfFiles());
 
   85   while (TObject* o = 
it.Next()) {
 
   86     if (TFile* 
f = 
dynamic_cast<TFile*
> (o))
 
   99   return StatusCode::SUCCESS;
 
  108   return StatusCode::SUCCESS;
 
  126     if (!d3pd->
master().empty()) {
 
  128       TDirectory* 
dir = d3pd->
tree()->GetDirectory();
 
  130         dynamic_cast<TTree*
> (
dir->Get (d3pd->
master().c_str()));
 
  131       if (!
master && d3pd->
tree()->GetEntries() > 0)
 
  135         if (!
master->GetTreeIndex()) {
 
  138           master->ResetBranchAddresses();
 
  149       TDirectory::TContext ctx (
gDirectory, d3pd->
tree()->GetDirectory());
 
  150       d3pd->
tree()->Write();
 
  158   return StatusCode::SUCCESS;
 
  177   std::string tname = 
name;
 
  178   std::string::size_type ipos = 
name.rfind (
'/');
 
  180   std::string poolfile;
 
  181   if (ipos != std::string::npos) {
 
  182     tname = 
name.substr (ipos+1);
 
  184       std::string sname = 
name.substr (0, ipos+1);
 
  185       std::string::size_type jpos = sname.find (
':');
 
  186       if (sname.substr (0, jpos) == 
"pool" ||
 
  187           sname.substr (0, jpos) == 
"/pool")
 
  189         poolfile = sname.substr (jpos+1, std::string::npos);
 
  190         if (!poolfile.empty() && poolfile[poolfile.size()-1] == 
'/')
 
  191           poolfile.erase (poolfile.size()-1);
 
  194         if (jpos != std::string::npos){
 
  195           sname.erase(jpos,sname.size()-jpos-1);
 
  201   TTree* 
tree = 
new TTree (tname.c_str(), tname.c_str());
 
  207   auto rd3pd = std::make_unique<RootD3PD>
 
  212   if (!poolfile.empty())
 
  213     rd3pd->setPoolFile (poolfile);
 
  218   m_d3pds.push_back (std::move (rd3pd));
 
  219   return StatusCode::SUCCESS;
 
  
const TTree * tree() const
Return the underlying root tree.
Define an abstract interface for building a D3PD tree.
ServiceHandle< ITHistSvc > m_histSvc
Property: Gaudi THistSvc.
std::vector< std::string > m_vetoedNames
Property: Vetoed names for the created D3PD.
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.
Block filler tool for noisy FEB information.
virtual StatusCode finalize() override
Standard Gaudi finalize method.
std::vector< std::unique_ptr< RootD3PD > > m_d3pds
Remember all the tuples we've made.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual StatusCode stop() override
Standard Gaudi stop method.
::StatusCode StatusCode
StatusCode definition for legacy code.
int m_basketSize
Property: Basket buffer size, or -1 to use the Root default.
Service to create a Root-based D3PD tree.
std::string m_indexMinor
Property: Minor variable name for index making, or null.
bool m_doBranchRef
Property: If true, then add BranchRef info to the tuple.
#define CHECK(...)
Evaluate an expression and check for errors.
const std::string & master() const
Return the name of the master tree.
Helpers for checking error return status codes and reporting errors.
RootD3PDSvc(const std::string &name, ISvcLocator *svcloc)
Constructor.
virtual StatusCode make(const std::string &name, ID3PD *&d3pd) override
Create a new D3PD tree.
int m_entryOffsetLen
Property: Basket entry offset buffer size, or -1 to use the Root default.
std::string m_masterTree
Property: Name of the master tree.
static void cleanup()
Make sure all files are closed before exiting, to prevent crashes.
std::string m_indexMajor
Property: Major variable name for index making, or null.