ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeService/interface/TreeService.h
Revision: 1.12
Committed: Tue Mar 3 18:06:09 2009 UTC (16 years, 2 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre1
Changes since 1.11: +7 -1 lines
Log Message:
Changed default basket size, added interface for optimized compression settings

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.12 // $Id: TreeService.h,v 1.11 2008/10/06 15:56:51 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 loizides 1.10 #ifndef MITPROD_TREESERVICE_TREESERVICE_H
23     #define MITPROD_TREESERVICE_TREESERVICE_H
24 loizides 1.5
25     #include "DataFormats/Provenance/interface/EventID.h"
26     #include "DataFormats/Provenance/interface/Timestamp.h"
27     #include "FWCore/Framework/interface/Event.h"
28     #include "FWCore/Framework/interface/EventSetup.h"
29    
30     #include <TObjArray.h>
31    
32     namespace edm
33     {
34     class ActivityRegistry;
35     class ParameterSet;
36     class ModuleDescription;
37     }
38    
39 loizides 1.1 namespace mithep
40     {
41     class TreeWriter;
42    
43     class TreeService {
44     public:
45 loizides 1.7 TreeService(const edm::ParameterSet &cfg, edm::ActivityRegistry &ar);
46 loizides 1.1 ~TreeService();
47    
48     TreeWriter *get(const char *name=0);
49    
50     private:
51     void preEventProcessing(const edm::EventID &id, const edm::Timestamp &t);
52 loizides 1.8 void postEventProcessing(const edm::Event &e, const edm::EventSetup &es);
53 loizides 1.1 void postBeginJob();
54     void postEndJob();
55    
56     TObjArray tws_; //array holding the tree writers
57    
58     // parameters for service
59 loizides 1.6 std::vector<std::string> treeNames_; //tree names
60     std::vector<std::string> fileNames_; //file names
61     std::vector<std::string> pathNames_; //path names
62     std::vector<unsigned> maxSizes_; //max file sizes [MB]
63     std::vector<unsigned> compLevels_; //compression levels
64     std::vector<unsigned> splitLevels_; //default split levels
65     std::vector<unsigned> brSizes_; //default branch sizes [Byte]
66 bendavid 1.12 unsigned zipMode_; //compression mode for OptIO
67     double bZipThres_;
68     double gZipThres_;
69     double lzoThres_;
70     double lzmaThres_;
71     unsigned optIOVerbose_;
72 loizides 1.11 bool fDoReset_; //reset object counter (def=1)
73 loizides 1.1 };
74 paus 1.2 }
75 loizides 1.3 #endif