ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/src/FillMitTree.cc
(Generate patch)

Comparing UserCode/MitProd/TreeFiller/src/FillMitTree.cc (file contents):
Revision 1.3 by loizides, Thu Jun 19 16:53:43 2008 UTC vs.
Revision 1.67 by paus, Sat May 5 16:49:59 2012 UTC

# Line 2 | Line 2
2  
3   #include "MitProd/TreeFiller/interface/FillMitTree.h"
4   #include "FWCore/MessageLogger/interface/MessageLogger.h"
5 + #include "FWCore/ParameterSet/interface/ParameterSet.h"
6   #include "FWCore/ServiceRegistry/interface/Service.h"
7 < #include "MitProd/TreeService/interface/TreeService.h"
7 > #include "MitProd/ObjectService/interface/ObjectService.h"
8 > #include "MitProd/TreeFiller/interface/AssociationMaps.h"
9 > #include "MitProd/TreeFiller/interface/FillerBasicClusters.h"
10 > #include "MitProd/TreeFiller/interface/FillerBeamSpot.h"
11 > #include "MitProd/TreeFiller/interface/FillerCaloJets.h"
12 > #include "MitProd/TreeFiller/interface/FillerCaloMet.h"
13 > #include "MitProd/TreeFiller/interface/FillerCaloTaus.h"
14 > #include "MitProd/TreeFiller/interface/FillerCaloTowers.h"
15 > #include "MitProd/TreeFiller/interface/FillerConversions.h"
16 > #include "MitProd/TreeFiller/interface/FillerConversionsDecay.h"
17 > #include "MitProd/TreeFiller/interface/FillerDecayParts.h"
18 > #include "MitProd/TreeFiller/interface/FillerDCASig.h"
19 > #include "MitProd/TreeFiller/interface/FillerEmbedWeight.h"
20 > #include "MitProd/TreeFiller/interface/FillerElectrons.h"
21 > #include "MitProd/TreeFiller/interface/FillerEvtSelData.h"
22 > #include "MitProd/TreeFiller/interface/FillerGenJets.h"
23 > #include "MitProd/TreeFiller/interface/FillerGenMet.h"
24 > #include "MitProd/TreeFiller/interface/FillerJPTJets.h"
25 > #include "MitProd/TreeFiller/interface/FillerMCEventInfo.h"
26 > #include "MitProd/TreeFiller/interface/FillerMCParticles.h"
27 > #include "MitProd/TreeFiller/interface/FillerMCVertexes.h"
28 > #include "MitProd/TreeFiller/interface/FillerMet.h"
29   #include "MitProd/TreeFiller/interface/FillerMetaInfos.h"
30 < #include "MitProd/TreeFiller/interface/FillerGlobalMuons.h"
30 > #include "MitProd/TreeFiller/interface/FillerMetaInfos.h"
31 > #include "MitProd/TreeFiller/interface/FillerMuons.h"
32 > #include "MitProd/TreeFiller/interface/FillerPFCandidates.h"
33 > #include "MitProd/TreeFiller/interface/FillerPFJets.h"
34 > #include "MitProd/TreeFiller/interface/FillerPFMet.h"
35 > #include "MitProd/TreeFiller/interface/FillerPFTaus.h"
36 > #include "MitProd/TreeFiller/interface/FillerPhotons.h"
37 > #include "MitProd/TreeFiller/interface/FillerPileupInfo.h"
38 > #include "MitProd/TreeFiller/interface/FillerPileupEnergyDensity.h"
39 > #include "MitProd/TreeFiller/interface/FillerPixelHits.h"
40 > #include "MitProd/TreeFiller/interface/FillerPsClusters.h"
41 > #include "MitProd/TreeFiller/interface/FillerStableParts.h"
42 > #include "MitProd/TreeFiller/interface/FillerStripHits.h"
43 > #include "MitProd/TreeFiller/interface/FillerSuperClusters.h"
44 > #include "MitProd/TreeFiller/interface/FillerTracks.h"
45 > #include "MitProd/TreeFiller/interface/FillerTrackJets.h"
46 > #include "MitProd/TreeFiller/interface/FillerVertexes.h"
47 > #include "MitAna/DataTree/interface/Names.h"
48 > #include "MitAna/DataTree/interface/BranchTable.h"
49 > #include "MitCommon/OptIO/interface/OptInt.h"
50  
51   using namespace std;
52   using namespace edm;
53   using namespace mithep;
54  
55 < //-------------------------------------------------------------------------------------------------
56 < FillMitTree::FillMitTree(const edm::ParameterSet &cfg)
55 > mithep::ObjectService *mithep::FillMitTree::os_ = 0;
56 >
57 > //--------------------------------------------------------------------------------------------------
58 > FillMitTree::FillMitTree(const edm::ParameterSet &cfg) :
59 >  defactive_(cfg.getUntrackedParameter<bool>("defactive",1)),
60 >  brtable_(0),
61 >  acfnumber_(-1),
62 >  tws_(new TreeWriter(Names::gkEvtTreeName,0))
63   {
64 <  // Constructor: initialize fillers
64 >  // Constructor.
65  
66    if (!configure(cfg)) {
67      throw edm::Exception(edm::errors::Configuration, "FillMitTree::FillMitTree()\n")
# Line 22 | Line 69 | FillMitTree::FillMitTree(const edm::Para
69    }
70   }
71  
72 < //-------------------------------------------------------------------------------------------------
72 > //--------------------------------------------------------------------------------------------------
73   FillMitTree::~FillMitTree()
74   {
75 <  // Destructor: nothing to be done here.
75 >  // Destructor.
76 >
77 >  delete brtable_;
78 >  delete tws_;
79   }
80  
81 < //-------------------------------------------------------------------------------------------------
81 > //--------------------------------------------------------------------------------------------------
82 > bool FillMitTree::addActiveFiller(BaseFiller *bf)
83 > {
84 >  // Check if filler is active and add it to list of fillers. Otherwise delete it.
85 >
86 >  if (!bf)
87 >    return 0;
88 >
89 >  if (bf->Active()) {
90 >    fillers_.push_back(bf);
91 >    return 1;
92 >  }
93 >
94 >  delete bf;
95 >  bf = 0;
96 >  return 0;
97 > }
98 >
99 > //--------------------------------------------------------------------------------------------------
100 > void FillMitTree::beginRun(edm::Run const &run, edm::EventSetup const &setup)
101 > {
102 >  // Access and copy event content.
103 >
104 >  // first step: Loop over the data fillers of the various components
105 >  for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
106 >    (*iF)->FillRunBlock(run,setup);
107 >  }
108 >  
109 > }
110 >
111 > //--------------------------------------------------------------------------------------------------
112   void FillMitTree::analyze(const edm::Event      &event,
113                            const edm::EventSetup &setup)
114   {
115    // Access and copy event content.
116 +  
117 +  //tree writer begin event actions
118 +  tws_->BeginEvent(kTRUE);
119  
120 <  // First step: Loop over the data fillers of the various components
120 >  // first step: Loop over the data fillers of the various components
121    for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
122 +    //printf("%s FillDataBlock\n",(*iF)->Name().c_str());
123      (*iF)->FillDataBlock(event,setup);
124    }
125  
126 <  // Second step: Loop over the link resolution of the various components
126 >  // second step: Loop over the link resolution of the various components
127    for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
128 +    //printf("%s ResolveLinks\n",(*iF)->Name().c_str());
129      (*iF)->ResolveLinks(event,setup);
130    }
131 +
132 +  if (brtable_) { // only the first FillMitTree object has to deal with the branch table
133 +    if (acfnumber_==-1) {
134 +      brtable_->Rehash(brtable_->GetSize());
135 +      if (0)
136 +        brtable_->Print();
137 +    }
138 +    if (acfnumber_ != tws_->GetFileNumber()) {
139 +      tws_->StoreObject(brtable_);
140 +      acfnumber_ = tws_->GetFileNumber();
141 +    }
142 +  }
143 +
144 +  //tree writer end of event actions
145 +  tws_->EndEvent(kTRUE);
146   }
147  
148 < //-------------------------------------------------------------------------------------------------
149 < void FillMitTree::beginJob(const edm::EventSetup &event)
148 > //--------------------------------------------------------------------------------------------------
149 > void FillMitTree::beginJob()
150   {
151    // Access the tree and book branches.
152  
153 <  Service<TreeService> ts;
154 <  TreeWriter *tws = ts->get();
155 <  if (! tws) {
156 <    throw edm::Exception(edm::errors::Configuration, "FillMitTree::beginJob()\n")
157 <      << "Could not get pointer to tree." << "\n";
158 <    return;
153 >  if (os_==0) { // only the first FillMitTree object has to deal with this
154 >    Service<ObjectService> os;
155 >    if (!os.isAvailable()) {
156 >      throw edm::Exception(edm::errors::Configuration, "FillMitTree::beginJob()\n")
157 >        << "Could not get object service. "
158 >        << "Do you have the ObjectService defined in your config?" << "\n";
159 >      return;
160 >    }
161 >    os_ = &(*os);
162 >    brtable_ = new BranchTable;
163 >    brtable_->SetName(Names::gkBranchTable);
164 >    brtable_->SetOwner();
165 >    os->add(brtable_, brtable_->GetName());
166    }
167  
168 <  // Loop over the various components and book the branches
168 >  // loop over the various components and book the branches
169    for (std::vector<BaseFiller*>::iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
170 <    (*iF)->BookDataBlock(tws);
170 >    edm::LogInfo("FillMitTree::beginJob") << "Booking for " << (*iF)->Name() << endl;
171 >    (*iF)->BookDataBlock(*tws_);
172    }
173 <  return;
173 >
174 >  // call branch ref for the event tree
175 >  if (brtable_ && tws_->GetTree())
176 >    tws_->GetTree()->BranchRef();
177 >  
178   }
179  
180 < //-------------------------------------------------------------------------------------------------
180 > //--------------------------------------------------------------------------------------------------
181   bool FillMitTree::configure(const edm::ParameterSet &cfg)
182   {
71  // Configure our fillers.
183  
184 +  // Configure TreeWriter
185 +  const std::string twsConfigName("TreeWriter");
186 +  ParameterSet twsConfig;
187 +  if (cfg.existsAs<ParameterSet>(twsConfigName,0))
188 +    twsConfig = cfg.getUntrackedParameter<ParameterSet>(twsConfigName);
189 +  
190 +  configureTreeWriter(twsConfig);
191 +  
192 +  // Configure our fillers according to given parameter ("fillers").
193 +
194 +  std::vector<std::string> pars;
195 +  if (cfg.exists("fillers"))
196 +    pars=cfg.getUntrackedParameter<vector<string> >("fillers");
197 +  else
198 +    cfg.getParameterSetNames(pars, false);
199 +
200 +  // loop over psets
201 +  for (unsigned int i = 0; i<pars.size(); ++i) {
202 +
203 +    const string name(pars.at(i));
204 +
205 +    string ftype("Filler" + name);
206 +    if (cfg.existsAs<ParameterSet>(name,0)) {
207 +      ParameterSet next(cfg.getUntrackedParameter<ParameterSet>(name));
208 +      if (!next.exists("fillerType")) {
209 +        edm::LogError("FillMitTree") << "Cannot determine fillerType for pset named "
210 +                                     << name << std::endl;
211 +        throw edm::Exception(edm::errors::Configuration, "FillMitTree::configure\n")
212 +          << "Cannot determine fillerType for pset named "
213 +          << name << std::endl;
214 +      }
215 +      ftype = next.getUntrackedParameter<string>("fillerType");
216 +    }
217 +
218 +    edm::LogInfo("FillMitTree") << "Attempting to configure '" << ftype
219 +                                << "' for '" << name << "'" << std::endl;
220 +
221 +    if (ftype.compare("FillerMetaInfos")==0) {
222 +      FillerMetaInfos *fillerMetaInfos = new FillerMetaInfos(cfg, name.c_str(), defactive_);
223 +      addActiveFiller(fillerMetaInfos);
224 +      continue;
225 +    }
226 +    if (ftype.compare("FillerMCParticles")==0) {
227 +      FillerMCParticles *fillerMCParticles = new FillerMCParticles(cfg, name.c_str(), defactive_);
228 +      addActiveFiller(fillerMCParticles);
229 +      continue;
230 +    }
231 +    if (ftype.compare("FillerMCEventInfo")==0) {
232 +      FillerMCEventInfo *fillerMCEventInfo = new FillerMCEventInfo(cfg, name.c_str(), defactive_);
233 +      addActiveFiller(fillerMCEventInfo);
234 +      continue;
235 +    }
236 +    if (ftype.compare("FillerMCVertexes")==0) {
237 +      FillerMCVertexes *fillerMCVertexes = new FillerMCVertexes(cfg, name.c_str(), defactive_);
238 +      addActiveFiller(fillerMCVertexes);
239 +      continue;
240 +    }  
241 +    if (ftype.compare("FillerEvtSelData")==0) {
242 +      FillerEvtSelData *fillerEvtSelData = new FillerEvtSelData(cfg, name.c_str(), defactive_);
243 +      addActiveFiller(fillerEvtSelData);
244 +      continue;
245 +    }
246 +    if (ftype.compare("FillerBeamSpot")==0) {
247 +      FillerBeamSpot *fillerBeamSpot = new FillerBeamSpot(cfg, name.c_str(), defactive_);
248 +      addActiveFiller(fillerBeamSpot);
249 +      continue;
250 +    }
251 +    if (ftype.compare("FillerVertexes")==0) {
252 +      FillerVertexes *fillerVertexes = new FillerVertexes(cfg, name.c_str(), defactive_);
253 +      addActiveFiller(fillerVertexes);
254 +      continue;
255 +    }  
256 +    if (ftype.compare("FillerCaloTowers")==0) {
257 +      FillerCaloTowers *fillerCaloTowers = new FillerCaloTowers(cfg, name.c_str(), defactive_);
258 +      addActiveFiller(fillerCaloTowers);
259 +      continue;
260 +    }  
261 +    if (ftype.compare("FillerGenJets")==0) {
262 +      FillerGenJets *fillerGenJets = new FillerGenJets(cfg, name.c_str(), defactive_);
263 +      addActiveFiller(fillerGenJets);
264 +      continue;
265 +    }  
266 +    if (ftype.compare("FillerCaloJets")==0) {
267 +      FillerCaloJets *fillerCaloJets = new FillerCaloJets(cfg, name.c_str(), defactive_);
268 +      addActiveFiller(fillerCaloJets);
269 +      continue;
270 +    }  
271 +    if (ftype.compare("FillerMet")==0) {
272 +      FillerMet *fillerMet = new FillerMet(cfg, name.c_str(), defactive_);
273 +      addActiveFiller(fillerMet);
274 +      continue;
275 +    }  
276 +    if (ftype.compare("FillerGenMet")==0) {
277 +      FillerGenMet *fillerGenMet = new FillerGenMet(cfg, name.c_str(), defactive_);
278 +      addActiveFiller(fillerGenMet);
279 +      continue;
280 +    }  
281 +    if (ftype.compare("FillerCaloMet")==0) {
282 +      FillerCaloMet *fillerCaloMet = new FillerCaloMet(cfg, name.c_str(), defactive_);
283 +      addActiveFiller(fillerCaloMet);
284 +      continue;
285 +    }
286 +    if (ftype.compare("FillerPFMet")==0) {
287 +      FillerPFMet *fillerPFMet = new FillerPFMet(cfg, name.c_str(), defactive_);
288 +      addActiveFiller(fillerPFMet);
289 +      continue;
290 +    }  
291 +    if (ftype.compare("FillerBasicClusters")==0) {
292 +      FillerBasicClusters *fillerBasicClusters =
293 +        new FillerBasicClusters(cfg, name.c_str(), defactive_);
294 +      addActiveFiller(fillerBasicClusters);
295 +      continue;
296 +    }  
297 +    if (ftype.compare("FillerPsClusters")==0) {
298 +      FillerPsClusters *fillerPsClusters =
299 +        new FillerPsClusters(cfg, name.c_str(), defactive_);
300 +      addActiveFiller(fillerPsClusters);
301 +      continue;
302 +    }  
303 +    if (ftype.compare("FillerSuperClusters")==0) {
304 +      FillerSuperClusters *fillerSuperClusters =  
305 +        new FillerSuperClusters(cfg, name.c_str(), defactive_);
306 +      addActiveFiller(fillerSuperClusters);
307 +      continue;
308 +    }  
309 +    if (ftype.compare("FillerPixelHits")==0) {
310 +      FillerPixelHits *fillerPixelHits =  
311 +        new FillerPixelHits(cfg, name.c_str(), defactive_);
312 +      addActiveFiller(fillerPixelHits);
313 +      continue;
314 +    }  
315 +    if (ftype.compare("FillerPileupInfo")==0) {
316 +      FillerPileupInfo *fillerPileupInfo =  
317 +        new FillerPileupInfo(cfg, name.c_str(), defactive_);
318 +      addActiveFiller(fillerPileupInfo);
319 +      continue;
320 +    }  
321 +    if (ftype.compare("FillerPileupEnergyDensity")==0) {
322 +      FillerPileupEnergyDensity *fillerPileupEnergyDensity =  
323 +        new FillerPileupEnergyDensity(cfg, name.c_str(), defactive_);
324 +      addActiveFiller(fillerPileupEnergyDensity);
325 +      continue;
326 +    }  
327 +    if (ftype.compare("FillerStripHits")==0) {
328 +      FillerStripHits *fillerStripHits =  
329 +        new FillerStripHits(cfg, name.c_str(), defactive_);
330 +      addActiveFiller(fillerStripHits);
331 +      continue;
332 +    }  
333 +    if (ftype.compare("FillerTracks")==0) {
334 +      FillerTracks *fillerTracks = new FillerTracks(cfg, name.c_str(), defactive_);
335 +      addActiveFiller(fillerTracks);
336 +      continue;
337 +    }  
338 +    if (ftype.compare("FillerMuons")==0) {
339 +      FillerMuons *fillerMuons = new FillerMuons(cfg, name.c_str(), defactive_);
340 +      addActiveFiller(fillerMuons);
341 +      continue;
342 +    }  
343 +    if (ftype.compare("FillerElectrons")==0) {
344 +      FillerElectrons *fillerElectrons = new FillerElectrons(cfg, name.c_str(), defactive_);
345 +      addActiveFiller(fillerElectrons);
346 +      continue;
347 +    }  
348 +    if (ftype.compare("FillerConversions")==0) {
349 +      FillerConversions *fillerConversions = new FillerConversions(cfg, name.c_str(), defactive_);
350 +      addActiveFiller(fillerConversions);
351 +      continue;
352 +    }
353 +    if (ftype.compare("FillerConversionsDecay")==0) {
354 +      FillerConversionsDecay *fillerConversionsDecay = new FillerConversionsDecay(cfg, name.c_str(), defactive_);
355 +      addActiveFiller(fillerConversionsDecay);
356 +      continue;
357 +    }    
358 +    if (ftype.compare("FillerPhotons")==0) {
359 +      FillerPhotons *fillerPhotons = new FillerPhotons(cfg, name.c_str(), defactive_);
360 +      addActiveFiller(fillerPhotons);
361 +      continue;
362 +    }  
363 +    if (ftype.compare("FillerStableParts")==0) {
364 +      FillerStableParts *fillerStableParts = new FillerStableParts(cfg, name.c_str(), defactive_);
365 +      addActiveFiller(fillerStableParts);
366 +      continue;
367 +    }  
368 +    if (ftype.compare("FillerDecayParts")==0) {
369 +      FillerDecayParts *fillerDecayParts = new FillerDecayParts(cfg, name.c_str(), defactive_);
370 +      addActiveFiller(fillerDecayParts);
371 +      continue;
372 +    }  
373 +    if (ftype.compare("FillerPFCandidates")==0) {
374 +      FillerPFCandidates *fillerPFCands = new FillerPFCandidates(cfg, name.c_str(), defactive_);
375 +      addActiveFiller(fillerPFCands);
376 +      continue;
377 +    }  
378 +    if (ftype.compare("FillerPFJets")==0) {
379 +      FillerPFJets *fillerPFJets = new FillerPFJets(cfg, name.c_str(), defactive_);
380 +      addActiveFiller(fillerPFJets);
381 +      continue;
382 +    }  
383 +    if (ftype.compare("FillerJPTJets")==0) {
384 +      FillerJPTJets *fillerJPTJets = new FillerJPTJets(cfg, name.c_str(), defactive_);
385 +      addActiveFiller(fillerJPTJets);
386 +      continue;
387 +    }  
388 +    if (ftype.compare("FillerCaloTaus")==0) {
389 +      FillerCaloTaus *fillerCaloTaus = new FillerCaloTaus(cfg, name.c_str(), defactive_);
390 +      addActiveFiller(fillerCaloTaus);
391 +      continue;
392 +    }
393 +    if (ftype.compare("FillerPFTaus")==0) {
394 +      FillerPFTaus *fillerPFTaus = new FillerPFTaus(cfg, name.c_str(), defactive_);
395 +      addActiveFiller(fillerPFTaus);
396 +      continue;
397 +    }  
398 +    if (ftype.compare("FillerTrackJets")==0) {
399 +      FillerTrackJets *fillerTrackJets = new FillerTrackJets(cfg, name.c_str(), defactive_);
400 +      addActiveFiller(fillerTrackJets);
401 +      continue;
402 +    }
403 +    if (ftype.compare("FillerEmbedWeight")==0) {
404 +      FillerEmbedWeight *fillerEmbedWeight = new FillerEmbedWeight(cfg, name.c_str(), defactive_);
405 +      addActiveFiller(fillerEmbedWeight);
406 +      continue;
407 +    }
408 +    if (ftype.compare("FillerDCASig")==0) {
409 +      FillerDCASig *fillerDCASig = new FillerDCASig(cfg, name.c_str(), defactive_);
410 +      addActiveFiller(fillerDCASig);
411 +      continue;
412 +    }
413 +    
414 +    edm::LogError("FillMitTree")
415 +      << "Unknown fillerType " << ftype << " for pset named " << name << std::endl;
416 +    throw edm::Exception(edm::errors::Configuration, "FillMitTree::configure\n")
417 +      << "Unknown fillerType " << ftype << " for pset named " << name << std::endl;
418 +  }
419 +
420 +  return 1;
421 + }
422  
423 <  FillerMetaInfos *fillerMetaInfos = new FillerMetaInfos(cfg);
424 <  if (fillerMetaInfos->Active())
425 <    fillers_.push_back(fillerMetaInfos);
426 <  else
78 <    delete fillerMetaInfos;
79 <
80 <  FillerGlobalMuons *fillerGlobalMuons = new FillerGlobalMuons(cfg);
81 <  if (fillerGlobalMuons->Active())
82 <    fillers_.push_back(fillerGlobalMuons);
83 <  else
84 <    delete fillerGlobalMuons;
423 > //--------------------------------------------------------------------------------------------------
424 > bool FillMitTree::configureTreeWriter(const edm::ParameterSet &cfg)
425 > {
426 >  // Configure tree writer with options from config file.
427  
428 +  tws_->SetPrefix       (cfg.getUntrackedParameter<string>("fileName","mit-test"));
429 +  tws_->SetBaseURL      (cfg.getUntrackedParameter<string>("pathName","."));
430 +  tws_->SetMaxSize      ((Long64_t)
431 +                         cfg.getUntrackedParameter<unsigned>("maxSize",1024)*1024*1024);
432 +  tws_->SetCompressLevel(cfg.getUntrackedParameter<unsigned>("compLevel",9));
433 +  tws_->SetDefaultSL    (cfg.getUntrackedParameter<unsigned>("splitLevel",99));
434 +  tws_->SetDefaultBrSize(cfg.getUntrackedParameter<unsigned>("brSize",16*1024));
435 +  
436 +  if (OptInt::IsActivated()) {
437 +    OptInt::SetZipMode     (cfg.getUntrackedParameter<unsigned>("zipMode",99));
438 +    OptInt::SetGzipFraction(cfg.getUntrackedParameter<double>("gZipThres",1.0));
439 +    OptInt::SetBzipFraction(cfg.getUntrackedParameter<double>("bZipThres",-1.0));
440 +    OptInt::SetLzoFraction (cfg.getUntrackedParameter<double>("lzoThres",-1.0));
441 +    OptInt::SetLzmaFraction(cfg.getUntrackedParameter<double>("lzmaThres",0.95));
442 +    OptInt::SetVerbose     (cfg.getUntrackedParameter<unsigned>("optIOVerbose",0));
443 +  }
444 +  else {
445 +    if (cfg.exists("zipMode")   || cfg.exists("bZipThres") || cfg.exists("gZipThres") ||
446 +        cfg.exists("lzoThres")  || cfg.exists("lzmaThres")) {
447 +      edm::LogError("FillMitTree") <<
448 +        "OptIO interface not properly pre-loaded, ignoring given settings." << std::endl;
449 +    }
450 +  }
451 +  
452    return 1;
453   }
454  
455 < //-------------------------------------------------------------------------------------------------
455 > //--------------------------------------------------------------------------------------------------
456   void FillMitTree::endJob()
457   {
458    // Delete fillers.
# Line 94 | Line 460 | void FillMitTree::endJob()
460    for (std::vector<BaseFiller*>::iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
461      delete *iF;
462    }
463 <
463 >  tws_->Clear();
464 >  
465    edm::LogInfo("FillMitTree::endJob") << "Ending Job" << endl;
466   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines