ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeService/interface/TreeService.h
Revision: 1.6
Committed: Tue Jul 1 20:32:35 2008 UTC (16 years, 10 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.5: +8 -8 lines
Log Message:
Cosmetics.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.6 // $Id: TreeService.h,v 1.5 2008/06/18 19:19:20 loizides Exp $
3 loizides 1.1 //
4     // TreeService
5     //
6     // This service can be used in the config files to provide access to the TreeWriter,
7     // for example:
8     //
9     // service = TreeService {
10 paus 1.2 // untracked vstring treeNames = { "MitTree" }
11     // untracked vstring fileNames = { "mittreefile" }
12     // untracked vstring pathNames = { "." }
13     // untracked vuint32 maxSizes = { 1024 }
14     // untracked vuint32 compLevels = { 9 }
15     // untracked vuint32 splitLevels = { 99 }
16     // untracked vuint32 brSizes = { 32000 }
17 loizides 1.1 // }
18     //
19     // Authors: C.Loizides
20     //
21     //--------------------------------------------------------------------------------------------------
22    
23 loizides 1.5 #ifndef MITPROD_TREESERVICE_H
24     #define MITPROD_TREESERVICE_H
25    
26     #include "DataFormats/Provenance/interface/EventID.h"
27     #include "DataFormats/Provenance/interface/Timestamp.h"
28     #include "FWCore/Framework/interface/Event.h"
29     #include "FWCore/Framework/interface/EventSetup.h"
30    
31     #include <TObjArray.h>
32    
33     namespace edm
34     {
35     class ActivityRegistry;
36     class ParameterSet;
37     class ModuleDescription;
38     }
39    
40 loizides 1.1 namespace mithep
41     {
42     class TreeWriter;
43    
44     class TreeService {
45     public:
46     TreeService(const edm::ParameterSet &, edm::ActivityRegistry &);
47     ~TreeService();
48    
49     TreeWriter *get(const char *name=0);
50    
51     private:
52     void preEventProcessing(const edm::EventID &id, const edm::Timestamp &t);
53     void postEventProcessing(const edm::Event& e, const edm::EventSetup& es);
54     void postBeginJob();
55     void postEndJob();
56    
57     TObjArray tws_; //array holding the tree writers
58    
59     // parameters for service
60 loizides 1.6 std::vector<std::string> treeNames_; //tree names
61     std::vector<std::string> fileNames_; //file names
62     std::vector<std::string> pathNames_; //path names
63     std::vector<unsigned> maxSizes_; //max file sizes [MB]
64     std::vector<unsigned> compLevels_; //compression levels
65     std::vector<unsigned> splitLevels_; //default split levels
66     std::vector<unsigned> brSizes_; //default branch sizes [Byte]
67 loizides 1.1 };
68 paus 1.2 }
69 loizides 1.3 #endif