ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeService/interface/TreeService.h
Revision: 1.15
Committed: Tue Nov 3 14:01:51 2009 UTC (15 years, 6 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.14: +8 -5 lines
Log Message:
Disable TreeService as fwk service to prevent config mistakes

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.15 // $Id: TreeService.h,v 1.14 2009/03/15 11:17:36 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 bendavid 1.15
43 loizides 1.1 class TreeService {
44 bendavid 1.15
45     friend class FillMitTree;
46    
47 loizides 1.1 public:
48 bendavid 1.15 TreeService(const edm::ParameterSet &cfg);
49 loizides 1.1 ~TreeService();
50    
51     TreeWriter *get(const char *name=0);
52 loizides 1.14 TreeWriter *get(const std::string &name) { return get(name.c_str()); }
53 loizides 1.1
54     private:
55 bendavid 1.15 void preEventProcessing();
56     void postEventProcessing();
57 loizides 1.1 void postBeginJob();
58     void postEndJob();
59    
60     TObjArray tws_; //array holding the tree writers
61    
62     // parameters for service
63 loizides 1.13 std::vector<std::string> treeNames_; //tree names
64     std::vector<std::string> fileNames_; //file names
65     std::vector<std::string> pathNames_; //path names
66     std::vector<unsigned> maxSizes_; //max file sizes [MB]
67     std::vector<unsigned> compLevels_; //compression levels
68     std::vector<unsigned> splitLevels_; //default split levels
69     std::vector<unsigned> brSizes_; //default branch sizes [Byte]
70     unsigned zipMode_; //compression mode used by OptIO
71     double bZipThres_; //bzip threshold
72     double gZipThres_; //gzip threshold
73     double lzoThres_; //lzo threshold
74     double lzmaThres_; //lzma threshold
75     unsigned optIOVerbose_; //OptIO verbose
76     bool fDoReset_; //reset object counter (def=1)
77 loizides 1.1 };
78 paus 1.2 }
79 loizides 1.3 #endif