Revision: | 1.16 |
Committed: | Wed Nov 4 16:59:22 2009 UTC (15 years, 6 months ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.15: | +6 -8 lines |
Log Message: | Service by default off. |
# | Content |
---|---|
1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: TreeService.h,v 1.15 2009/11/03 14:01:51 bendavid Exp $ |
3 | // |
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 | // 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 | // } |
18 | // |
19 | // Authors: C.Loizides |
20 | //-------------------------------------------------------------------------------------------------- |
21 | |
22 | #ifndef MITPROD_TREESERVICE_TREESERVICE_H |
23 | #define MITPROD_TREESERVICE_TREESERVICE_H |
24 | |
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 | namespace mithep |
40 | { |
41 | class TreeWriter; |
42 | |
43 | class TreeService { |
44 | public: |
45 | TreeService(const edm::ParameterSet &cfg, edm::ActivityRegistry &ar); |
46 | ~TreeService(); |
47 | |
48 | TreeWriter *get(const char *name=0); |
49 | TreeWriter *get(const std::string &name) { return get(name.c_str()); } |
50 | |
51 | private: |
52 | void postBeginJob(); |
53 | void postEndJob(); |
54 | void postEventProcessing(const edm::Event &e, const edm::EventSetup &es); |
55 | void preEventProcessing(const edm::EventID &e, const edm::Timestamp &t); |
56 | |
57 | TObjArray tws_; //array holding the tree writers |
58 | |
59 | // parameters for service |
60 | 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 | unsigned zipMode_; //compression mode used by OptIO |
68 | double bZipThres_; //bzip threshold |
69 | double gZipThres_; //gzip threshold |
70 | double lzoThres_; //lzo threshold |
71 | double lzmaThres_; //lzma threshold |
72 | unsigned optIOVerbose_; //set verbosity for OptIO library |
73 | bool fDoReset_; //reset object counter (def=1) |
74 | bool fActivate_; //set to true to activate the service |
75 | }; |
76 | } |
77 | #endif |